gdb:
[deliverable/binutils-gdb.git] / gdb / configure
CommitLineData
c906108c 1#! /bin/sh
c906108c 2# Guess values for system-dependent variables and create Makefiles.
b4e70030 3# Generated by GNU Autoconf 2.59.
c906108c 4#
b4e70030 5# Copyright (C) 2003 Free Software Foundation, Inc.
c906108c
SS
6# This configure script is free software; the Free Software Foundation
7# gives unlimited permission to copy, distribute and modify it.
bec39cab
AC
8## --------------------- ##
9## M4sh Initialization. ##
10## --------------------- ##
11
12# Be Bourne compatible
13if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
14 emulate sh
15 NULLCMD=:
16 # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
17 # is contrary to our usage. Disable this feature.
18 alias -g '${1+"$@"}'='"$@"'
b4e70030
JB
19elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
20 set -o posix
bec39cab
AC
21fi
22DUALCASE=1; export DUALCASE # for MKS sh
23
24# Support unset when possible.
25if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
26 as_unset=unset
27else
28 as_unset=false
29fi
30
31
32# Work around bugs in pre-3.0 UWIN ksh.
b4e70030 33$as_unset ENV MAIL MAILPATH
bec39cab
AC
34PS1='$ '
35PS2='> '
36PS4='+ '
37
38# NLS nuisances.
39for as_var in \
40 LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
41 LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
42 LC_TELEPHONE LC_TIME
43do
44 if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
45 eval $as_var=C; export $as_var
46 else
b4e70030 47 $as_unset $as_var
bec39cab
AC
48 fi
49done
50
51# Required to use basename.
b4e70030 52if expr a : '\(a\)' >/dev/null 2>&1; then
bec39cab
AC
53 as_expr=expr
54else
55 as_expr=false
56fi
57
b4e70030 58if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then
bec39cab
AC
59 as_basename=basename
60else
61 as_basename=false
62fi
63
64
65# Name of the executable.
b4e70030 66as_me=`$as_basename "$0" ||
bec39cab
AC
67$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
68 X"$0" : 'X\(//\)$' \| \
b4e70030
JB
69 X"$0" : 'X\(/\)$' \| \
70 . : '\(.\)' 2>/dev/null ||
bec39cab 71echo X/"$0" |
b4e70030
JB
72 sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
73 /^X\/\(\/\/\)$/{ s//\1/; q; }
74 /^X\/\(\/\).*/{ s//\1/; q; }
75 s/.*/./; q'`
bec39cab 76
4e8d927d 77
b4e70030
JB
78# PATH needs CR, and LINENO needs CR and PATH.
79# Avoid depending upon Character Ranges.
80as_cr_letters='abcdefghijklmnopqrstuvwxyz'
81as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
82as_cr_Letters=$as_cr_letters$as_cr_LETTERS
83as_cr_digits='0123456789'
84as_cr_alnum=$as_cr_Letters$as_cr_digits
4e8d927d 85
b4e70030
JB
86# The user is always right.
87if test "${PATH_SEPARATOR+set}" != set; then
88 echo "#! /bin/sh" >conf$$.sh
89 echo "exit 0" >>conf$$.sh
90 chmod +x conf$$.sh
91 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
92 PATH_SEPARATOR=';'
93 else
94 PATH_SEPARATOR=:
95 fi
96 rm -f conf$$.sh
4e8d927d
DJ
97fi
98
4e8d927d 99
b4e70030
JB
100 as_lineno_1=$LINENO
101 as_lineno_2=$LINENO
102 as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
103 test "x$as_lineno_1" != "x$as_lineno_2" &&
104 test "x$as_lineno_3" = "x$as_lineno_2" || {
105 # Find who we are. Look in the path if we contain no path at all
106 # relative or not.
107 case $0 in
108 *[\\/]* ) as_myself=$0 ;;
109 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
110for as_dir in $PATH
111do
112 IFS=$as_save_IFS
113 test -z "$as_dir" && as_dir=.
114 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
115done
4e8d927d 116
b4e70030
JB
117 ;;
118 esac
119 # We did not find ourselves, most probably we were run as `sh COMMAND'
120 # in which case we are not to be found in the path.
121 if test "x$as_myself" = x; then
122 as_myself=$0
123 fi
124 if test ! -f "$as_myself"; then
125 { echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2
126 { (exit 1); exit 1; }; }
127 fi
128 case $CONFIG_SHELL in
129 '')
bec39cab 130 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
b4e70030 131for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
bec39cab
AC
132do
133 IFS=$as_save_IFS
134 test -z "$as_dir" && as_dir=.
b4e70030
JB
135 for as_base in sh bash ksh sh5; do
136 case $as_dir in
bec39cab 137 /*)
b4e70030 138 if ("$as_dir/$as_base" -c '
4e8d927d
DJ
139 as_lineno_1=$LINENO
140 as_lineno_2=$LINENO
b4e70030 141 as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
4e8d927d 142 test "x$as_lineno_1" != "x$as_lineno_2" &&
b4e70030
JB
143 test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then
144 $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; }
145 $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; }
146 CONFIG_SHELL=$as_dir/$as_base
147 export CONFIG_SHELL
148 exec "$CONFIG_SHELL" "$0" ${1+"$@"}
149 fi;;
150 esac
151 done
152done
153;;
154 esac
bec39cab
AC
155
156 # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
157 # uniformly replaced by the line number. The first 'sed' inserts a
b4e70030
JB
158 # line-number line before each line; the second 'sed' does the real
159 # work. The second script uses 'N' to pair each line-number line
160 # with the numbered line, and appends trailing '-' during
161 # substitution so that $LINENO is not a special case at line end.
bec39cab 162 # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
b4e70030
JB
163 # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-)
164 sed '=' <$as_myself |
bec39cab
AC
165 sed '
166 N
b4e70030
JB
167 s,$,-,
168 : loop
169 s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
bec39cab 170 t loop
b4e70030
JB
171 s,-$,,
172 s,^['$as_cr_digits']*\n,,
bec39cab 173 ' >$as_me.lineno &&
b4e70030 174 chmod +x $as_me.lineno ||
bec39cab
AC
175 { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
176 { (exit 1); exit 1; }; }
177
178 # Don't try to exec as it changes $[0], causing all sort of problems
179 # (the dirname of $[0] is not the place where we might find the
b4e70030
JB
180 # original and so on. Autoconf is especially sensible to this).
181 . ./$as_me.lineno
bec39cab
AC
182 # Exit status is that of the last command.
183 exit
184}
185
186
b4e70030
JB
187case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
188 *c*,-n*) ECHO_N= ECHO_C='
189' ECHO_T=' ' ;;
190 *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;;
191 *) ECHO_N= ECHO_C='\c' ECHO_T= ;;
bec39cab
AC
192esac
193
b4e70030 194if expr a : '\(a\)' >/dev/null 2>&1; then
bec39cab
AC
195 as_expr=expr
196else
197 as_expr=false
198fi
199
200rm -f conf$$ conf$$.exe conf$$.file
201echo >conf$$.file
202if ln -s conf$$.file conf$$ 2>/dev/null; then
b4e70030
JB
203 # We could just check for DJGPP; but this test a) works b) is more generic
204 # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
205 if test -f conf$$.exe; then
206 # Don't use ln at all; we don't have any links
bec39cab 207 as_ln_s='cp -p'
b4e70030
JB
208 else
209 as_ln_s='ln -s'
210 fi
bec39cab
AC
211elif ln conf$$.file conf$$ 2>/dev/null; then
212 as_ln_s=ln
213else
214 as_ln_s='cp -p'
215fi
b4e70030 216rm -f conf$$ conf$$.exe conf$$.file
bec39cab
AC
217
218if mkdir -p . 2>/dev/null; then
219 as_mkdir_p=:
220else
221 test -d ./-p && rmdir ./-p
222 as_mkdir_p=false
223fi
224
b4e70030 225as_executable_p="test -f"
bec39cab
AC
226
227# Sed expression to map a string onto a valid CPP name.
228as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
229
230# Sed expression to map a string onto a valid variable name.
231as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
232
233
b4e70030
JB
234# IFS
235# We need space, tab and new line, in precisely that order.
236as_nl='
237'
238IFS=" $as_nl"
239
240# CDPATH.
241$as_unset CDPATH
bec39cab 242
c906108c 243
bec39cab
AC
244# Name of the host.
245# hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
246# so uname gets run too.
247ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
248
b4e70030
JB
249exec 6>&1
250
bec39cab
AC
251#
252# Initializations.
253#
c906108c 254ac_default_prefix=/usr/local
bec39cab
AC
255ac_config_libobj_dir=.
256cross_compiling=no
257subdirs=
258MFLAGS=
259MAKEFLAGS=
260SHELL=${CONFIG_SHELL-/bin/sh}
261
b4e70030
JB
262# Maximum number of lines to put in a shell here document.
263# This variable seems obsolete. It should probably be removed, and
264# only ac_max_sed_lines should be used.
265: ${ac_max_here_lines=38}
266
bec39cab
AC
267# Identity of this package.
268PACKAGE_NAME=
269PACKAGE_TARNAME=
270PACKAGE_VERSION=
271PACKAGE_STRING=
272PACKAGE_BUGREPORT=
273
274ac_unique_file="main.c"
275# Factoring default headers for most tests.
276ac_includes_default="\
277#include <stdio.h>
278#if HAVE_SYS_TYPES_H
279# include <sys/types.h>
280#endif
281#if HAVE_SYS_STAT_H
282# include <sys/stat.h>
283#endif
284#if STDC_HEADERS
285# include <stdlib.h>
286# include <stddef.h>
287#else
288# if HAVE_STDLIB_H
289# include <stdlib.h>
290# endif
291#endif
292#if HAVE_STRING_H
293# if !STDC_HEADERS && HAVE_MEMORY_H
294# include <memory.h>
295# endif
296# include <string.h>
297#endif
298#if HAVE_STRINGS_H
299# include <strings.h>
300#endif
301#if HAVE_INTTYPES_H
302# include <inttypes.h>
b4e70030
JB
303#else
304# if HAVE_STDINT_H
305# include <stdint.h>
306# endif
bec39cab
AC
307#endif
308#if HAVE_UNISTD_H
309# include <unistd.h>
310#endif"
311
783e057b
DJ
312gl_header_list=
313ac_subdirs_all="$ac_subdirs_all doc testsuite"
b4e70030
JB
314ac_subdirs_all="$ac_subdirs_all gdbtk"
315ac_subdirs_all="$ac_subdirs_all multi-ice"
316ac_subdirs_all="$ac_subdirs_all gdbserver"
89a34d1b 317ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS MAINTAINER_MODE_TRUE MAINTAINER_MODE_FALSE MAINT CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT CPP EGREP RANLIB ac_ct_RANLIB build build_cpu build_vendor build_os host host_cpu host_vendor host_os target target_cpu target_vendor target_os am__leading_dot DEPDIR CCDEPMODE MAKE GMAKE_TRUE GMAKE_FALSE SET_MAKE USE_NLS LIBINTL LIBINTL_DEP INCINTL XGETTEXT GMSGFMT POSUB CATALOGS DATADIRNAME INSTOBJEXT GENCAT CATOBJEXT localedir GL_COND_LIBTOOL_TRUE GL_COND_LIBTOOL_FALSE GNULIB_MEMMEM GNULIB_MEMPCPY GNULIB_MEMRCHR GNULIB_STPCPY GNULIB_STPNCPY GNULIB_STRCHRNUL GNULIB_STRDUP GNULIB_STRNDUP GNULIB_STRNLEN GNULIB_STRPBRK GNULIB_STRSEP GNULIB_STRSTR GNULIB_STRCASESTR GNULIB_STRTOK_R GNULIB_MBSLEN GNULIB_MBSNLEN GNULIB_MBSCHR GNULIB_MBSRCHR GNULIB_MBSSTR GNULIB_MBSCASECMP GNULIB_MBSNCASECMP GNULIB_MBSPCASECMP GNULIB_MBSCASESTR GNULIB_MBSCSPN GNULIB_MBSPBRK GNULIB_MBSSPN GNULIB_MBSSEP GNULIB_MBSTOK_R GNULIB_STRERROR GNULIB_STRSIGNAL HAVE_DECL_MEMMEM HAVE_MEMPCPY HAVE_DECL_MEMRCHR HAVE_STPCPY HAVE_STPNCPY HAVE_STRCHRNUL HAVE_DECL_STRDUP HAVE_STRNDUP HAVE_DECL_STRNDUP HAVE_DECL_STRNLEN HAVE_STRPBRK HAVE_STRSEP HAVE_STRCASESTR HAVE_DECL_STRTOK_R HAVE_DECL_STRERROR HAVE_DECL_STRSIGNAL REPLACE_STRERROR REPLACE_STRSIGNAL REPLACE_MEMMEM REPLACE_STRCASESTR REPLACE_STRSTR HAVE_LONG_LONG_INT HAVE_UNSIGNED_LONG_LONG_INT HAVE_INTTYPES_H HAVE_SYS_TYPES_H INCLUDE_NEXT NEXT_STDINT_H HAVE_STDINT_H HAVE_SYS_INTTYPES_H HAVE_SYS_BITYPES_H BITSIZEOF_PTRDIFF_T BITSIZEOF_SIG_ATOMIC_T BITSIZEOF_SIZE_T BITSIZEOF_WCHAR_T BITSIZEOF_WINT_T HAVE_SIGNED_SIG_ATOMIC_T HAVE_SIGNED_WCHAR_T HAVE_SIGNED_WINT_T PTRDIFF_T_SUFFIX SIG_ATOMIC_T_SUFFIX SIZE_T_SUFFIX WCHAR_T_SUFFIX WINT_T_SUFFIX STDINT_H NEXT_STRING_H GNULIB_WCWIDTH HAVE_DECL_WCWIDTH REPLACE_WCWIDTH WCHAR_H HAVE_WCHAR_H NEXT_WCHAR_H LIBGNU_LIBDEPS LIBGNU_LTLIBDEPS GNULIB_STDINT_H PACKAGE INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA CYGPATH_W VERSION ACLOCAL AUTOCONF AUTOMAKE AUTOHEADER MAKEINFO install_sh STRIP ac_ct_STRIP INSTALL_STRIP_PROGRAM mkdir_p AWK AMTAR am__tar am__untar am__include am__quote AMDEP_TRUE AMDEP_FALSE AMDEPBACKSLASH am__fastdepCC_TRUE am__fastdepCC_FALSE subdirs TARGET_OBS PKGVERSION REPORT_BUGS_TO REPORT_BUGS_TEXI LN_S YACC AR ac_ct_AR DLLTOOL ac_ct_DLLTOOL WINDRES ac_ct_WINDRES MIG ac_ct_MIG READLINE READLINE_DEPS READLINE_CFLAGS HAVE_LIBEXPAT LIBEXPAT LTLIBEXPAT PYTHON_CFLAGS ALLOCA CONFIG_LDFLAGS TARGET_SYSTEM_ROOT TARGET_SYSTEM_ROOT_DEFINE WARN_CFLAGS WERROR_CFLAGS SER_HARDWIRE WIN32LIBS LIBGUI GUI_CFLAGS_X WIN32LDAPP TCL_VERSION TCL_PATCH_LEVEL TCL_BIN_DIR TCL_SRC_DIR TCL_LIB_FILE TCL_LIB_FLAG TCL_LIB_SPEC TCL_STUB_LIB_FILE TCL_STUB_LIB_FLAG TCL_STUB_LIB_SPEC TCL_INCLUDE TCL_LIBRARY TCL_DEPS TK_VERSION TK_BIN_DIR TK_SRC_DIR TK_LIB_FILE TK_LIB_FLAG TK_LIB_SPEC TK_STUB_LIB_FILE TK_STUB_LIB_FLAG TK_STUB_LIB_SPEC TK_INCLUDE TK_LIBRARY TK_DEPS TK_XINCLUDES X_CFLAGS X_LDFLAGS X_LIBS GDBTKLIBS GDBTK_CFLAGS GDBTK_SRC_DIR SIM SIM_OBS ENABLE_CFLAGS PROFILE_CFLAGS CONFIG_OBS CONFIG_DEPS CONFIG_SRCS CONFIG_ALL CONFIG_CLEAN CONFIG_INSTALL CONFIG_UNINSTALL target_subdir frags nm_h datarootdir docdir htmldir pdfdir LIBOBJS LTLIBOBJS gl_LIBOBJS gl_LTLIBOBJS gltests_LIBOBJS gltests_LTLIBOBJS'
a4ce5b0d 318ac_subst_files='host_makefile_frag'
d5af19ba 319ac_pwd=`pwd`
c906108c
SS
320
321# Initialize some variables set by options.
bec39cab
AC
322ac_init_help=
323ac_init_version=false
c906108c
SS
324# The variables have the same names as the options, with
325# dashes changed to underlines.
bec39cab 326cache_file=/dev/null
c906108c 327exec_prefix=NONE
c906108c 328no_create=
c906108c
SS
329no_recursion=
330prefix=NONE
331program_prefix=NONE
332program_suffix=NONE
333program_transform_name=s,x,x,
334silent=
335site=
336srcdir=
c906108c
SS
337verbose=
338x_includes=NONE
339x_libraries=NONE
bec39cab
AC
340
341# Installation directory options.
342# These are left unexpanded so users can "make install exec_prefix=/foo"
343# and all the variables that are supposed to be based on exec_prefix
344# by default will actually change.
345# Use braces instead of parens because sh, perl, etc. also accept them.
c906108c
SS
346bindir='${exec_prefix}/bin'
347sbindir='${exec_prefix}/sbin'
348libexecdir='${exec_prefix}/libexec'
b4e70030 349datadir='${prefix}/share'
c906108c
SS
350sysconfdir='${prefix}/etc'
351sharedstatedir='${prefix}/com'
352localstatedir='${prefix}/var'
b4e70030 353libdir='${exec_prefix}/lib'
c906108c
SS
354includedir='${prefix}/include'
355oldincludedir='/usr/include'
b4e70030
JB
356infodir='${prefix}/info'
357mandir='${prefix}/man'
c906108c 358
c906108c
SS
359ac_prev=
360for ac_option
361do
c906108c
SS
362 # If the previous option needs an argument, assign it.
363 if test -n "$ac_prev"; then
b4e70030 364 eval "$ac_prev=\$ac_option"
c906108c
SS
365 ac_prev=
366 continue
367 fi
368
b4e70030 369 ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'`
c906108c
SS
370
371 # Accept the important Cygnus configure options, so we can diagnose typos.
372
b4e70030 373 case $ac_option in
c906108c
SS
374
375 -bindir | --bindir | --bindi | --bind | --bin | --bi)
376 ac_prev=bindir ;;
377 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
bec39cab 378 bindir=$ac_optarg ;;
c906108c
SS
379
380 -build | --build | --buil | --bui | --bu)
bec39cab 381 ac_prev=build_alias ;;
c906108c 382 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
bec39cab 383 build_alias=$ac_optarg ;;
c906108c
SS
384
385 -cache-file | --cache-file | --cache-fil | --cache-fi \
386 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
387 ac_prev=cache_file ;;
388 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
389 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
bec39cab
AC
390 cache_file=$ac_optarg ;;
391
392 --config-cache | -C)
393 cache_file=config.cache ;;
c906108c 394
b4e70030 395 -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
c906108c 396 ac_prev=datadir ;;
b4e70030
JB
397 -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
398 | --da=*)
bec39cab 399 datadir=$ac_optarg ;;
c906108c
SS
400
401 -disable-* | --disable-*)
bec39cab 402 ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
c906108c 403 # Reject names that are not valid shell variable names.
bec39cab
AC
404 expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
405 { echo "$as_me: error: invalid feature name: $ac_feature" >&2
406 { (exit 1); exit 1; }; }
407 ac_feature=`echo $ac_feature | sed 's/-/_/g'`
b4e70030 408 eval "enable_$ac_feature=no" ;;
c906108c
SS
409
410 -enable-* | --enable-*)
bec39cab 411 ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
c906108c 412 # Reject names that are not valid shell variable names.
bec39cab
AC
413 expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
414 { echo "$as_me: error: invalid feature name: $ac_feature" >&2
415 { (exit 1); exit 1; }; }
416 ac_feature=`echo $ac_feature | sed 's/-/_/g'`
b4e70030
JB
417 case $ac_option in
418 *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
419 *) ac_optarg=yes ;;
420 esac
421 eval "enable_$ac_feature='$ac_optarg'" ;;
c906108c
SS
422
423 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
424 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
425 | --exec | --exe | --ex)
426 ac_prev=exec_prefix ;;
427 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
428 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
429 | --exec=* | --exe=* | --ex=*)
bec39cab 430 exec_prefix=$ac_optarg ;;
c906108c
SS
431
432 -gas | --gas | --ga | --g)
433 # Obsolete; use --with-gas.
434 with_gas=yes ;;
435
bec39cab
AC
436 -help | --help | --hel | --he | -h)
437 ac_init_help=long ;;
438 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
439 ac_init_help=recursive ;;
440 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
441 ac_init_help=short ;;
c906108c
SS
442
443 -host | --host | --hos | --ho)
bec39cab 444 ac_prev=host_alias ;;
c906108c 445 -host=* | --host=* | --hos=* | --ho=*)
bec39cab 446 host_alias=$ac_optarg ;;
c906108c
SS
447
448 -includedir | --includedir | --includedi | --included | --include \
449 | --includ | --inclu | --incl | --inc)
450 ac_prev=includedir ;;
451 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
452 | --includ=* | --inclu=* | --incl=* | --inc=*)
bec39cab 453 includedir=$ac_optarg ;;
c906108c
SS
454
455 -infodir | --infodir | --infodi | --infod | --info | --inf)
456 ac_prev=infodir ;;
457 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
bec39cab 458 infodir=$ac_optarg ;;
c906108c
SS
459
460 -libdir | --libdir | --libdi | --libd)
461 ac_prev=libdir ;;
462 -libdir=* | --libdir=* | --libdi=* | --libd=*)
bec39cab 463 libdir=$ac_optarg ;;
c906108c
SS
464
465 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
466 | --libexe | --libex | --libe)
467 ac_prev=libexecdir ;;
468 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
469 | --libexe=* | --libex=* | --libe=*)
bec39cab 470 libexecdir=$ac_optarg ;;
c906108c
SS
471
472 -localstatedir | --localstatedir | --localstatedi | --localstated \
b4e70030
JB
473 | --localstate | --localstat | --localsta | --localst \
474 | --locals | --local | --loca | --loc | --lo)
c906108c
SS
475 ac_prev=localstatedir ;;
476 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
b4e70030
JB
477 | --localstate=* | --localstat=* | --localsta=* | --localst=* \
478 | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
bec39cab 479 localstatedir=$ac_optarg ;;
c906108c
SS
480
481 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
482 ac_prev=mandir ;;
483 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
bec39cab 484 mandir=$ac_optarg ;;
c906108c
SS
485
486 -nfp | --nfp | --nf)
487 # Obsolete; use --without-fp.
488 with_fp=no ;;
489
490 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
bec39cab 491 | --no-cr | --no-c | -n)
c906108c
SS
492 no_create=yes ;;
493
494 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
495 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
496 no_recursion=yes ;;
497
498 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
499 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
500 | --oldin | --oldi | --old | --ol | --o)
501 ac_prev=oldincludedir ;;
502 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
503 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
504 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
bec39cab 505 oldincludedir=$ac_optarg ;;
c906108c
SS
506
507 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
508 ac_prev=prefix ;;
509 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
bec39cab 510 prefix=$ac_optarg ;;
c906108c
SS
511
512 -program-prefix | --program-prefix | --program-prefi | --program-pref \
513 | --program-pre | --program-pr | --program-p)
514 ac_prev=program_prefix ;;
515 -program-prefix=* | --program-prefix=* | --program-prefi=* \
516 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
bec39cab 517 program_prefix=$ac_optarg ;;
c906108c
SS
518
519 -program-suffix | --program-suffix | --program-suffi | --program-suff \
520 | --program-suf | --program-su | --program-s)
521 ac_prev=program_suffix ;;
522 -program-suffix=* | --program-suffix=* | --program-suffi=* \
523 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
bec39cab 524 program_suffix=$ac_optarg ;;
c906108c
SS
525
526 -program-transform-name | --program-transform-name \
527 | --program-transform-nam | --program-transform-na \
528 | --program-transform-n | --program-transform- \
529 | --program-transform | --program-transfor \
530 | --program-transfo | --program-transf \
531 | --program-trans | --program-tran \
532 | --progr-tra | --program-tr | --program-t)
533 ac_prev=program_transform_name ;;
534 -program-transform-name=* | --program-transform-name=* \
535 | --program-transform-nam=* | --program-transform-na=* \
536 | --program-transform-n=* | --program-transform-=* \
537 | --program-transform=* | --program-transfor=* \
538 | --program-transfo=* | --program-transf=* \
539 | --program-trans=* | --program-tran=* \
540 | --progr-tra=* | --program-tr=* | --program-t=*)
bec39cab 541 program_transform_name=$ac_optarg ;;
c906108c
SS
542
543 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
544 | -silent | --silent | --silen | --sile | --sil)
545 silent=yes ;;
546
547 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
548 ac_prev=sbindir ;;
549 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
550 | --sbi=* | --sb=*)
bec39cab 551 sbindir=$ac_optarg ;;
c906108c
SS
552
553 -sharedstatedir | --sharedstatedir | --sharedstatedi \
554 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
555 | --sharedst | --shareds | --shared | --share | --shar \
556 | --sha | --sh)
557 ac_prev=sharedstatedir ;;
558 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
559 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
560 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
561 | --sha=* | --sh=*)
bec39cab 562 sharedstatedir=$ac_optarg ;;
c906108c
SS
563
564 -site | --site | --sit)
565 ac_prev=site ;;
566 -site=* | --site=* | --sit=*)
bec39cab 567 site=$ac_optarg ;;
3ace7edb 568
c906108c
SS
569 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
570 ac_prev=srcdir ;;
571 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
bec39cab 572 srcdir=$ac_optarg ;;
c906108c
SS
573
574 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
575 | --syscon | --sysco | --sysc | --sys | --sy)
576 ac_prev=sysconfdir ;;
577 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
578 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
bec39cab 579 sysconfdir=$ac_optarg ;;
c906108c
SS
580
581 -target | --target | --targe | --targ | --tar | --ta | --t)
bec39cab 582 ac_prev=target_alias ;;
c906108c 583 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
bec39cab 584 target_alias=$ac_optarg ;;
c906108c
SS
585
586 -v | -verbose | --verbose | --verbos | --verbo | --verb)
587 verbose=yes ;;
588
bec39cab
AC
589 -version | --version | --versio | --versi | --vers | -V)
590 ac_init_version=: ;;
c906108c
SS
591
592 -with-* | --with-*)
bec39cab 593 ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
c906108c 594 # Reject names that are not valid shell variable names.
bec39cab
AC
595 expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
596 { echo "$as_me: error: invalid package name: $ac_package" >&2
597 { (exit 1); exit 1; }; }
c906108c 598 ac_package=`echo $ac_package| sed 's/-/_/g'`
b4e70030
JB
599 case $ac_option in
600 *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
601 *) ac_optarg=yes ;;
602 esac
603 eval "with_$ac_package='$ac_optarg'" ;;
c906108c
SS
604
605 -without-* | --without-*)
bec39cab 606 ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
c906108c 607 # Reject names that are not valid shell variable names.
bec39cab
AC
608 expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
609 { echo "$as_me: error: invalid package name: $ac_package" >&2
610 { (exit 1); exit 1; }; }
611 ac_package=`echo $ac_package | sed 's/-/_/g'`
b4e70030 612 eval "with_$ac_package=no" ;;
c906108c
SS
613
614 --x)
615 # Obsolete; use --with-x.
616 with_x=yes ;;
617
618 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
619 | --x-incl | --x-inc | --x-in | --x-i)
620 ac_prev=x_includes ;;
621 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
622 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
bec39cab 623 x_includes=$ac_optarg ;;
c906108c
SS
624
625 -x-libraries | --x-libraries | --x-librarie | --x-librari \
626 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
627 ac_prev=x_libraries ;;
628 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
629 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
bec39cab 630 x_libraries=$ac_optarg ;;
c906108c 631
bec39cab
AC
632 -*) { echo "$as_me: error: unrecognized option: $ac_option
633Try \`$0 --help' for more information." >&2
634 { (exit 1); exit 1; }; }
c906108c
SS
635 ;;
636
bec39cab
AC
637 *=*)
638 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
639 # Reject names that are not valid shell variable names.
640 expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
641 { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
642 { (exit 1); exit 1; }; }
b4e70030
JB
643 ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`
644 eval "$ac_envvar='$ac_optarg'"
bec39cab
AC
645 export $ac_envvar ;;
646
c906108c 647 *)
bec39cab
AC
648 # FIXME: should be removed in autoconf 3.0.
649 echo "$as_me: WARNING: you should use --build, --host, --target" >&2
650 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
651 echo "$as_me: WARNING: invalid host type: $ac_option" >&2
652 : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
c906108c
SS
653 ;;
654
655 esac
656done
657
658if test -n "$ac_prev"; then
bec39cab
AC
659 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
660 { echo "$as_me: error: missing argument to $ac_option" >&2
661 { (exit 1); exit 1; }; }
c906108c 662fi
c906108c 663
b4e70030
JB
664# Be sure to have absolute paths.
665for ac_var in exec_prefix prefix
c906108c 666do
b4e70030 667 eval ac_val=$`echo $ac_var`
bec39cab 668 case $ac_val in
b4e70030
JB
669 [\\/$]* | ?:[\\/]* | NONE | '' ) ;;
670 *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
671 { (exit 1); exit 1; }; };;
672 esac
673done
674
675# Be sure to have absolute paths.
676for ac_var in bindir sbindir libexecdir datadir sysconfdir sharedstatedir \
677 localstatedir libdir includedir oldincludedir infodir mandir
678do
679 eval ac_val=$`echo $ac_var`
680 case $ac_val in
681 [\\/$]* | ?:[\\/]* ) ;;
682 *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
683 { (exit 1); exit 1; }; };;
c906108c
SS
684 esac
685done
686
bec39cab
AC
687# There might be people who depend on the old broken behavior: `$host'
688# used to hold the argument of --host etc.
689# FIXME: To remove some day.
690build=$build_alias
691host=$host_alias
692target=$target_alias
693
694# FIXME: To remove some day.
695if test "x$host_alias" != x; then
696 if test "x$build_alias" = x; then
697 cross_compiling=maybe
698 echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
699 If a cross compiler is detected then cross compile mode will be used." >&2
700 elif test "x$build_alias" != "x$host_alias"; then
701 cross_compiling=yes
702 fi
703fi
c906108c 704
bec39cab
AC
705ac_tool_prefix=
706test -n "$host_alias" && ac_tool_prefix=$host_alias-
707
708test "$silent" = yes && exec 6>/dev/null
c906108c 709
c906108c
SS
710
711# Find the source files, if location was not specified.
712if test -z "$srcdir"; then
713 ac_srcdir_defaulted=yes
b4e70030
JB
714 # Try the directory containing this script, then its parent.
715 ac_confdir=`(dirname "$0") 2>/dev/null ||
bec39cab
AC
716$as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
717 X"$0" : 'X\(//\)[^/]' \| \
718 X"$0" : 'X\(//\)$' \| \
b4e70030
JB
719 X"$0" : 'X\(/\)' \| \
720 . : '\(.\)' 2>/dev/null ||
bec39cab 721echo X"$0" |
b4e70030
JB
722 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
723 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
724 /^X\(\/\/\)$/{ s//\1/; q; }
725 /^X\(\/\).*/{ s//\1/; q; }
726 s/.*/./; q'`
c906108c 727 srcdir=$ac_confdir
b4e70030 728 if test ! -r $srcdir/$ac_unique_file; then
c906108c
SS
729 srcdir=..
730 fi
731else
732 ac_srcdir_defaulted=no
733fi
b4e70030
JB
734if test ! -r $srcdir/$ac_unique_file; then
735 if test "$ac_srcdir_defaulted" = yes; then
736 { echo "$as_me: error: cannot find sources ($ac_unique_file) in $ac_confdir or .." >&2
737 { (exit 1); exit 1; }; }
738 else
739 { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2
bec39cab 740 { (exit 1); exit 1; }; }
b4e70030 741 fi
c906108c 742fi
b4e70030
JB
743(cd $srcdir && test -r ./$ac_unique_file) 2>/dev/null ||
744 { echo "$as_me: error: sources are in $srcdir, but \`cd $srcdir' does not work" >&2
bec39cab 745 { (exit 1); exit 1; }; }
b4e70030
JB
746srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'`
747ac_env_build_alias_set=${build_alias+set}
748ac_env_build_alias_value=$build_alias
749ac_cv_env_build_alias_set=${build_alias+set}
750ac_cv_env_build_alias_value=$build_alias
751ac_env_host_alias_set=${host_alias+set}
752ac_env_host_alias_value=$host_alias
753ac_cv_env_host_alias_set=${host_alias+set}
754ac_cv_env_host_alias_value=$host_alias
755ac_env_target_alias_set=${target_alias+set}
756ac_env_target_alias_value=$target_alias
757ac_cv_env_target_alias_set=${target_alias+set}
758ac_cv_env_target_alias_value=$target_alias
759ac_env_CC_set=${CC+set}
760ac_env_CC_value=$CC
761ac_cv_env_CC_set=${CC+set}
762ac_cv_env_CC_value=$CC
763ac_env_CFLAGS_set=${CFLAGS+set}
764ac_env_CFLAGS_value=$CFLAGS
765ac_cv_env_CFLAGS_set=${CFLAGS+set}
766ac_cv_env_CFLAGS_value=$CFLAGS
767ac_env_LDFLAGS_set=${LDFLAGS+set}
768ac_env_LDFLAGS_value=$LDFLAGS
769ac_cv_env_LDFLAGS_set=${LDFLAGS+set}
770ac_cv_env_LDFLAGS_value=$LDFLAGS
771ac_env_CPPFLAGS_set=${CPPFLAGS+set}
772ac_env_CPPFLAGS_value=$CPPFLAGS
773ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set}
774ac_cv_env_CPPFLAGS_value=$CPPFLAGS
775ac_env_CPP_set=${CPP+set}
776ac_env_CPP_value=$CPP
777ac_cv_env_CPP_set=${CPP+set}
778ac_cv_env_CPP_value=$CPP
c906108c 779
bec39cab
AC
780#
781# Report the --help message.
782#
783if test "$ac_init_help" = "long"; then
784 # Omit some internal or obsolete options to make the list less imposing.
785 # This message is too long to be a string in the A/UX 3.1 sh.
786 cat <<_ACEOF
787\`configure' configures this package to adapt to many kinds of systems.
788
789Usage: $0 [OPTION]... [VAR=VALUE]...
790
791To assign environment variables (e.g., CC, CFLAGS...), specify them as
792VAR=VALUE. See below for descriptions of some of the useful variables.
793
794Defaults for the options are specified in brackets.
795
796Configuration:
797 -h, --help display this help and exit
798 --help=short display options specific to this package
799 --help=recursive display the short help of all the included packages
800 -V, --version display version information and exit
801 -q, --quiet, --silent do not print \`checking...' messages
802 --cache-file=FILE cache test results in FILE [disabled]
803 -C, --config-cache alias for \`--cache-file=config.cache'
804 -n, --no-create do not create output files
805 --srcdir=DIR find the sources in DIR [configure dir or \`..']
806
b4e70030
JB
807_ACEOF
808
809 cat <<_ACEOF
bec39cab
AC
810Installation directories:
811 --prefix=PREFIX install architecture-independent files in PREFIX
812 [$ac_default_prefix]
813 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
814 [PREFIX]
815
816By default, \`make install' will install all the files in
817\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
818an installation prefix other than \`$ac_default_prefix' using \`--prefix',
819for instance \`--prefix=\$HOME'.
820
821For better control, use the options below.
822
823Fine tuning of the installation directories:
824 --bindir=DIR user executables [EPREFIX/bin]
825 --sbindir=DIR system admin executables [EPREFIX/sbin]
826 --libexecdir=DIR program executables [EPREFIX/libexec]
b4e70030 827 --datadir=DIR read-only architecture-independent data [PREFIX/share]
bec39cab
AC
828 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
829 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
830 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
831 --libdir=DIR object code libraries [EPREFIX/lib]
832 --includedir=DIR C header files [PREFIX/include]
833 --oldincludedir=DIR C header files for non-gcc [/usr/include]
b4e70030
JB
834 --infodir=DIR info documentation [PREFIX/info]
835 --mandir=DIR man documentation [PREFIX/man]
bec39cab
AC
836_ACEOF
837
838 cat <<\_ACEOF
839
840Program names:
841 --program-prefix=PREFIX prepend PREFIX to installed program names
842 --program-suffix=SUFFIX append SUFFIX to installed program names
843 --program-transform-name=PROGRAM run sed PROGRAM on installed program names
844
845X features:
846 --x-includes=DIR X include files are in DIR
847 --x-libraries=DIR X library files are in DIR
848
849System types:
850 --build=BUILD configure for building on BUILD [guessed]
851 --host=HOST cross-compile to build programs to run on HOST [BUILD]
852 --target=TARGET configure for building compilers for TARGET [HOST]
853_ACEOF
854fi
855
856if test -n "$ac_init_help"; then
857
858 cat <<\_ACEOF
859
860Optional Features:
861 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
862 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
85981d60
AC
863 --enable-maintainer-mode enable make rules and dependencies not useful
864 (and sometimes confusing) to the casual installer
e28b3332
DJ
865 --disable-dependency-tracking speeds up one-time build
866 --enable-dependency-tracking do not reject slow dependency extractors
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 884 --with-separate-debug-dir=path Look for global separate debug info in this path LIBDIR/debug
29b0e8a2
JM
885 --with-relocated-sources=PATH
886 Automatically relocate this path for source files
bec39cab 887 --with-libunwind Use libunwind frame unwinding support
cb01cfba
JB
888 --with-curses use the curses library instead of the termcap
889 library
c16158bc
JM
890 --with-pkgversion=PKG Use PKG in the version string in place of "GDB"
891 --with-bugurl=URL Direct users to URL to report a bug
6c7a06a3 892 --with-libiconv-prefix=DIR search for libiconv in DIR/include and DIR/lib
6a30b0a5 893 --with-system-readline use installed readline library
5c39566f 894 --with-expat include expat support (auto/yes/no)
3841debe
DJ
895 --with-gnu-ld assume the C compiler uses GNU ld default=no
896 --with-libexpat-prefix[=DIR] search for libexpat in DIR/include and DIR/lib
897 --without-libexpat-prefix don't search for libexpat in includedir and libdir
d57a3c85 898 --with-python include python support (auto/yes/no/<path>)
bec39cab
AC
899 --without-included-regex don't use included regex; this is the default
900 on systems with version 2 of the GNU C library
901 (use with caution on other system)
902 --with-sysroot=DIR Search for usr/lib et al within DIR.
16e7150e 903 --with-system-gdbinit=file Automatically load a system-wide gdbinit file
5062cc19
KS
904 --with-tcl directory containing tcl configuration (tclConfig.sh)
905 --with-tk directory containing tk configuration (tkConfig.sh)
bec39cab 906 --with-x use the X Window System
bec39cab
AC
907
908Some influential environment variables:
909 CC C compiler command
910 CFLAGS C compiler flags
911 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
912 nonstandard directory <lib dir>
b4e70030
JB
913 CPPFLAGS C/C++ preprocessor flags, e.g. -I<include dir> if you have
914 headers in a nonstandard directory <include dir>
bec39cab
AC
915 CPP C preprocessor
916
917Use these variables to override the choices made by `configure' or to help
918it to find libraries and programs with nonstandard names/locations.
919
920_ACEOF
921fi
922
923if test "$ac_init_help" = "recursive"; then
924 # If there are subdirs, report their specific --help.
b4e70030 925 ac_popdir=`pwd`
bec39cab
AC
926 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
927 test -d $ac_dir || continue
928 ac_builddir=.
929
b4e70030 930if test "$ac_dir" != .; then
bec39cab 931 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
b4e70030
JB
932 # A "../" for each directory in $ac_dir_suffix.
933 ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
934else
935 ac_dir_suffix= ac_top_builddir=
936fi
bec39cab
AC
937
938case $srcdir in
b4e70030 939 .) # No --srcdir option. We are building in place.
bec39cab 940 ac_srcdir=.
b4e70030
JB
941 if test -z "$ac_top_builddir"; then
942 ac_top_srcdir=.
943 else
944 ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
945 fi ;;
946 [\\/]* | ?:[\\/]* ) # Absolute path.
bec39cab 947 ac_srcdir=$srcdir$ac_dir_suffix;
b4e70030
JB
948 ac_top_srcdir=$srcdir ;;
949 *) # Relative path.
950 ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
951 ac_top_srcdir=$ac_top_builddir$srcdir ;;
952esac
953
954# Do not use `cd foo && pwd` to compute absolute paths, because
955# the directories may not exist.
956case `pwd` in
957.) ac_abs_builddir="$ac_dir";;
958*)
959 case "$ac_dir" in
960 .) ac_abs_builddir=`pwd`;;
961 [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
962 *) ac_abs_builddir=`pwd`/"$ac_dir";;
963 esac;;
964esac
965case $ac_abs_builddir in
966.) ac_abs_top_builddir=${ac_top_builddir}.;;
967*)
968 case ${ac_top_builddir}. in
969 .) ac_abs_top_builddir=$ac_abs_builddir;;
970 [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
971 *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
972 esac;;
973esac
974case $ac_abs_builddir in
975.) ac_abs_srcdir=$ac_srcdir;;
976*)
977 case $ac_srcdir in
978 .) ac_abs_srcdir=$ac_abs_builddir;;
979 [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
980 *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
981 esac;;
982esac
983case $ac_abs_builddir in
984.) ac_abs_top_srcdir=$ac_top_srcdir;;
985*)
986 case $ac_top_srcdir in
987 .) ac_abs_top_srcdir=$ac_abs_builddir;;
988 [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
989 *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
990 esac;;
bec39cab
AC
991esac
992
b4e70030
JB
993 cd $ac_dir
994 # Check for guested configure; otherwise get Cygnus style configure.
bec39cab 995 if test -f $ac_srcdir/configure.gnu; then
b4e70030 996 echo
bec39cab
AC
997 $SHELL $ac_srcdir/configure.gnu --help=recursive
998 elif test -f $ac_srcdir/configure; then
b4e70030 999 echo
bec39cab 1000 $SHELL $ac_srcdir/configure --help=recursive
b4e70030
JB
1001 elif test -f $ac_srcdir/configure.ac ||
1002 test -f $ac_srcdir/configure.in; then
1003 echo
1004 $ac_configure --help
3ace7edb 1005 else
bec39cab 1006 echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
b4e70030
JB
1007 fi
1008 cd $ac_popdir
bec39cab
AC
1009 done
1010fi
1011
b4e70030 1012test -n "$ac_init_help" && exit 0
bec39cab
AC
1013if $ac_init_version; then
1014 cat <<\_ACEOF
1015
b4e70030 1016Copyright (C) 2003 Free Software Foundation, Inc.
bec39cab
AC
1017This configure script is free software; the Free Software Foundation
1018gives unlimited permission to copy, distribute and modify it.
1019_ACEOF
b4e70030 1020 exit 0
bec39cab 1021fi
b4e70030
JB
1022exec 5>config.log
1023cat >&5 <<_ACEOF
bec39cab
AC
1024This file contains any messages produced by compilers while
1025running configure, to aid debugging if configure makes a mistake.
1026
1027It was created by $as_me, which was
b4e70030 1028generated by GNU Autoconf 2.59. Invocation command line was
bec39cab
AC
1029
1030 $ $0 $@
1031
1032_ACEOF
1033{
1034cat <<_ASUNAME
1035## --------- ##
1036## Platform. ##
1037## --------- ##
1038
1039hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
1040uname -m = `(uname -m) 2>/dev/null || echo unknown`
1041uname -r = `(uname -r) 2>/dev/null || echo unknown`
1042uname -s = `(uname -s) 2>/dev/null || echo unknown`
1043uname -v = `(uname -v) 2>/dev/null || echo unknown`
1044
1045/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
1046/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
1047
1048/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
1049/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
1050/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
b4e70030 1051hostinfo = `(hostinfo) 2>/dev/null || echo unknown`
bec39cab
AC
1052/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
1053/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
1054/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
1055
1056_ASUNAME
1057
1058as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1059for as_dir in $PATH
1060do
1061 IFS=$as_save_IFS
1062 test -z "$as_dir" && as_dir=.
1063 echo "PATH: $as_dir"
1064done
1065
1066} >&5
1067
1068cat >&5 <<_ACEOF
1069
1070
1071## ----------- ##
1072## Core tests. ##
1073## ----------- ##
1074
1075_ACEOF
1076
1077
1078# Keep a trace of the command line.
1079# Strip out --no-create and --no-recursion so they do not pile up.
1080# Strip out --silent because we don't want to record it for future runs.
1081# Also quote any args containing shell meta-characters.
1082# Make two passes to allow for proper duplicate-argument suppression.
1083ac_configure_args=
1084ac_configure_args0=
1085ac_configure_args1=
1086ac_sep=
1087ac_must_keep_next=false
1088for ac_pass in 1 2
1089do
1090 for ac_arg
1091 do
1092 case $ac_arg in
1093 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
1094 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1095 | -silent | --silent | --silen | --sile | --sil)
1096 continue ;;
b4e70030 1097 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
bec39cab
AC
1098 ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
1099 esac
1100 case $ac_pass in
1101 1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;;
1102 2)
1103 ac_configure_args1="$ac_configure_args1 '$ac_arg'"
1104 if test $ac_must_keep_next = true; then
1105 ac_must_keep_next=false # Got value, back to normal.
1106 else
1107 case $ac_arg in
1108 *=* | --config-cache | -C | -disable-* | --disable-* \
1109 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
1110 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
1111 | -with-* | --with-* | -without-* | --without-* | --x)
1112 case "$ac_configure_args0 " in
1113 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
1114 esac
1115 ;;
1116 -* ) ac_must_keep_next=true ;;
1117 esac
1118 fi
1119 ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
1120 # Get rid of the leading space.
1121 ac_sep=" "
1122 ;;
1123 esac
1124 done
1125done
1126$as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; }
1127$as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; }
1128
1129# When interrupted or exit'd, cleanup temporary files, and complete
1130# config.log. We remove comments because anyway the quotes in there
1131# would cause problems or look ugly.
b4e70030
JB
1132# WARNING: Be sure not to use single quotes in there, as some shells,
1133# such as our DU 5.0 friend, will then `close' the trap.
bec39cab
AC
1134trap 'exit_status=$?
1135 # Save into config.log some information that might help in debugging.
1136 {
1137 echo
1138
1139 cat <<\_ASBOX
1140## ---------------- ##
1141## Cache variables. ##
1142## ---------------- ##
1143_ASBOX
1144 echo
1145 # The following way of writing the cache mishandles newlines in values,
b4e70030 1146{
bec39cab 1147 (set) 2>&1 |
b4e70030
JB
1148 case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
1149 *ac_space=\ *)
bec39cab 1150 sed -n \
b4e70030
JB
1151 "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
1152 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
1153 ;;
bec39cab 1154 *)
b4e70030
JB
1155 sed -n \
1156 "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
bec39cab 1157 ;;
b4e70030
JB
1158 esac;
1159}
bec39cab
AC
1160 echo
1161
1162 cat <<\_ASBOX
1163## ----------------- ##
1164## Output variables. ##
1165## ----------------- ##
1166_ASBOX
1167 echo
1168 for ac_var in $ac_subst_vars
1169 do
b4e70030
JB
1170 eval ac_val=$`echo $ac_var`
1171 echo "$ac_var='"'"'$ac_val'"'"'"
bec39cab
AC
1172 done | sort
1173 echo
1174
1175 if test -n "$ac_subst_files"; then
1176 cat <<\_ASBOX
b4e70030
JB
1177## ------------- ##
1178## Output files. ##
1179## ------------- ##
bec39cab
AC
1180_ASBOX
1181 echo
1182 for ac_var in $ac_subst_files
1183 do
b4e70030
JB
1184 eval ac_val=$`echo $ac_var`
1185 echo "$ac_var='"'"'$ac_val'"'"'"
bec39cab
AC
1186 done | sort
1187 echo
1188 fi
1189
1190 if test -s confdefs.h; then
1191 cat <<\_ASBOX
1192## ----------- ##
1193## confdefs.h. ##
1194## ----------- ##
1195_ASBOX
1196 echo
b4e70030 1197 sed "/^$/d" confdefs.h | sort
bec39cab 1198 echo
3ace7edb 1199 fi
bec39cab
AC
1200 test "$ac_signal" != 0 &&
1201 echo "$as_me: caught signal $ac_signal"
1202 echo "$as_me: exit $exit_status"
1203 } >&5
b4e70030
JB
1204 rm -f core *.core &&
1205 rm -rf conftest* confdefs* conf$$* $ac_clean_files &&
bec39cab 1206 exit $exit_status
b4e70030 1207 ' 0
bec39cab
AC
1208for ac_signal in 1 2 13 15; do
1209 trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
1210done
1211ac_signal=0
1212
1213# confdefs.h avoids OS command line length limits that DEFS can exceed.
b4e70030
JB
1214rm -rf conftest* confdefs.h
1215# AIX cpp loses on an empty file, so make sure it contains at least a newline.
1216echo >confdefs.h
bec39cab
AC
1217
1218# Predefined preprocessor variables.
1219
1220cat >>confdefs.h <<_ACEOF
1221#define PACKAGE_NAME "$PACKAGE_NAME"
1222_ACEOF
1223
1224
1225cat >>confdefs.h <<_ACEOF
1226#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
1227_ACEOF
1228
1229
1230cat >>confdefs.h <<_ACEOF
1231#define PACKAGE_VERSION "$PACKAGE_VERSION"
1232_ACEOF
1233
1234
1235cat >>confdefs.h <<_ACEOF
1236#define PACKAGE_STRING "$PACKAGE_STRING"
1237_ACEOF
1238
1239
1240cat >>confdefs.h <<_ACEOF
1241#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
1242_ACEOF
1243
1244
1245# Let the site file select an alternate cache file if it wants to.
1246# Prefer explicitly selected file to automatically selected ones.
b4e70030
JB
1247if test -z "$CONFIG_SITE"; then
1248 if test "x$prefix" != xNONE; then
1249 CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
1250 else
1251 CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
1252 fi
c906108c 1253fi
b4e70030 1254for ac_site_file in $CONFIG_SITE; do
c906108c 1255 if test -r "$ac_site_file"; then
bec39cab
AC
1256 { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5
1257echo "$as_me: loading site script $ac_site_file" >&6;}
1258 sed 's/^/| /' "$ac_site_file" >&5
c906108c
SS
1259 . "$ac_site_file"
1260 fi
1261done
1262
1263if test -r "$cache_file"; then
bec39cab
AC
1264 # Some versions of bash will fail to source /dev/null (special
1265 # files actually), so we avoid doing that.
1266 if test -f "$cache_file"; then
1267 { echo "$as_me:$LINENO: loading cache $cache_file" >&5
1268echo "$as_me: loading cache $cache_file" >&6;}
1269 case $cache_file in
1270 [\\/]* | ?:[\\/]* ) . $cache_file;;
1271 *) . ./$cache_file;;
1272 esac
1273 fi
c906108c 1274else
bec39cab
AC
1275 { echo "$as_me:$LINENO: creating cache $cache_file" >&5
1276echo "$as_me: creating cache $cache_file" >&6;}
1277 >$cache_file
1278fi
1279
1280# Check that the precious variables saved in the cache have kept the same
1281# value.
1282ac_cache_corrupted=false
b4e70030
JB
1283for ac_var in `(set) 2>&1 |
1284 sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
bec39cab
AC
1285 eval ac_old_set=\$ac_cv_env_${ac_var}_set
1286 eval ac_new_set=\$ac_env_${ac_var}_set
b4e70030
JB
1287 eval ac_old_val="\$ac_cv_env_${ac_var}_value"
1288 eval ac_new_val="\$ac_env_${ac_var}_value"
bec39cab
AC
1289 case $ac_old_set,$ac_new_set in
1290 set,)
1291 { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
1292echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
1293 ac_cache_corrupted=: ;;
1294 ,set)
1295 { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5
1296echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
1297 ac_cache_corrupted=: ;;
1298 ,);;
1299 *)
1300 if test "x$ac_old_val" != "x$ac_new_val"; then
fdc59709
PB
1301 # differences in whitespace do not lead to failure.
1302 ac_old_val_w=`echo x $ac_old_val`
1303 ac_new_val_w=`echo x $ac_new_val`
1304 if test "$ac_old_val_w" != "$ac_new_val_w"; then
1305 { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5
bec39cab 1306echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
fdc59709
PB
1307 ac_cache_corrupted=:
1308 else
1309 { echo "$as_me:$LINENO: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
1310echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
1311 eval $ac_var=\$ac_old_val
1312 fi
1313 { echo "$as_me:$LINENO: former value: \`$ac_old_val'" >&5
1314echo "$as_me: former value: \`$ac_old_val'" >&2;}
1315 { echo "$as_me:$LINENO: current value: \`$ac_new_val'" >&5
1316echo "$as_me: current value: \`$ac_new_val'" >&2;}
bec39cab
AC
1317 fi;;
1318 esac
1319 # Pass precious variables to config.status.
1320 if test "$ac_new_set" = set; then
1321 case $ac_new_val in
b4e70030
JB
1322 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
1323 ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
bec39cab
AC
1324 *) ac_arg=$ac_var=$ac_new_val ;;
1325 esac
1326 case " $ac_configure_args " in
1327 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
1328 *) ac_configure_args="$ac_configure_args '$ac_arg'" ;;
1329 esac
1330 fi
1331done
1332if $ac_cache_corrupted; then
d5af19ba
DJ
1333 { echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
1334echo "$as_me: error: in \`$ac_pwd':" >&2;}
bec39cab
AC
1335 { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5
1336echo "$as_me: error: changes in the environment can compromise the build" >&2;}
1337 { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
1338echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
1339 { (exit 1); exit 1; }; }
c906108c
SS
1340fi
1341
b4e70030
JB
1342ac_ext=c
1343ac_cpp='$CPP $CPPFLAGS'
1344ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1345ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1346ac_compiler_gnu=$ac_cv_c_compiler_gnu
c906108c
SS
1347
1348
783e057b
DJ
1349gl_header_list="$gl_header_list stdint.h"
1350gl_header_list="$gl_header_list wchar.h"
1351gl_header_list="$gl_header_list string.h"
bec39cab
AC
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
bec39cab 1368
d5af19ba
DJ
1369
1370
1371
b4e70030
JB
1372 ac_config_headers="$ac_config_headers config.h:config.in"
1373
1374echo "$as_me:$LINENO: checking whether to enable maintainer-specific portions of Makefiles" >&5
1375echo $ECHO_N "checking whether to enable maintainer-specific portions of Makefiles... $ECHO_C" >&6
1376 # Check whether --enable-maintainer-mode or --disable-maintainer-mode was given.
413ccac7 1377if test "${enable_maintainer_mode+set}" = set; then
b4e70030
JB
1378 enableval="$enable_maintainer_mode"
1379 USE_MAINTAINER_MODE=$enableval
413ccac7
AC
1380else
1381 USE_MAINTAINER_MODE=no
b4e70030
JB
1382fi;
1383 echo "$as_me:$LINENO: result: $USE_MAINTAINER_MODE" >&5
1384echo "${ECHO_T}$USE_MAINTAINER_MODE" >&6
413ccac7 1385
413ccac7
AC
1386
1387if test $USE_MAINTAINER_MODE = yes; then
1388 MAINTAINER_MODE_TRUE=
1389 MAINTAINER_MODE_FALSE='#'
1390else
1391 MAINTAINER_MODE_TRUE='#'
1392 MAINTAINER_MODE_FALSE=
1393fi
85981d60 1394
413ccac7 1395 MAINT=$MAINTAINER_MODE_TRUE
413ccac7 1396
c906108c 1397
bec39cab
AC
1398
1399ac_ext=c
1400ac_cpp='$CPP $CPPFLAGS'
1401ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1402ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1403ac_compiler_gnu=$ac_cv_c_compiler_gnu
1404if test -n "$ac_tool_prefix"; then
1405 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
1406set dummy ${ac_tool_prefix}gcc; ac_word=$2
b4e70030
JB
1407echo "$as_me:$LINENO: checking for $ac_word" >&5
1408echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
bec39cab
AC
1409if test "${ac_cv_prog_CC+set}" = set; then
1410 echo $ECHO_N "(cached) $ECHO_C" >&6
1411else
1412 if test -n "$CC"; then
1413 ac_cv_prog_CC="$CC" # Let the user override the test.
1414else
1415as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1416for as_dir in $PATH
1417do
1418 IFS=$as_save_IFS
1419 test -z "$as_dir" && as_dir=.
1420 for ac_exec_ext in '' $ac_executable_extensions; do
b4e70030 1421 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
bec39cab
AC
1422 ac_cv_prog_CC="${ac_tool_prefix}gcc"
1423 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1424 break 2
1425 fi
1426done
1427done
1428
1429fi
1430fi
1431CC=$ac_cv_prog_CC
1432if test -n "$CC"; then
b4e70030
JB
1433 echo "$as_me:$LINENO: result: $CC" >&5
1434echo "${ECHO_T}$CC" >&6
bec39cab 1435else
b4e70030
JB
1436 echo "$as_me:$LINENO: result: no" >&5
1437echo "${ECHO_T}no" >&6
bec39cab
AC
1438fi
1439
1440fi
1441if test -z "$ac_cv_prog_CC"; then
1442 ac_ct_CC=$CC
1443 # Extract the first word of "gcc", so it can be a program name with args.
c906108c 1444set dummy gcc; ac_word=$2
b4e70030
JB
1445echo "$as_me:$LINENO: checking for $ac_word" >&5
1446echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
bec39cab
AC
1447if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1448 echo $ECHO_N "(cached) $ECHO_C" >&6
1449else
1450 if test -n "$ac_ct_CC"; then
1451 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1452else
1453as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1454for as_dir in $PATH
1455do
1456 IFS=$as_save_IFS
1457 test -z "$as_dir" && as_dir=.
1458 for ac_exec_ext in '' $ac_executable_extensions; do
b4e70030 1459 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
bec39cab
AC
1460 ac_cv_prog_ac_ct_CC="gcc"
1461 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1462 break 2
1463 fi
1464done
1465done
1466
1467fi
1468fi
1469ac_ct_CC=$ac_cv_prog_ac_ct_CC
1470if test -n "$ac_ct_CC"; then
b4e70030
JB
1471 echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
1472echo "${ECHO_T}$ac_ct_CC" >&6
bec39cab 1473else
b4e70030
JB
1474 echo "$as_me:$LINENO: result: no" >&5
1475echo "${ECHO_T}no" >&6
bec39cab
AC
1476fi
1477
b4e70030 1478 CC=$ac_ct_CC
bec39cab
AC
1479else
1480 CC="$ac_cv_prog_CC"
1481fi
1482
1483if test -z "$CC"; then
b4e70030
JB
1484 if test -n "$ac_tool_prefix"; then
1485 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
bec39cab 1486set dummy ${ac_tool_prefix}cc; ac_word=$2
b4e70030
JB
1487echo "$as_me:$LINENO: checking for $ac_word" >&5
1488echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
bec39cab
AC
1489if test "${ac_cv_prog_CC+set}" = set; then
1490 echo $ECHO_N "(cached) $ECHO_C" >&6
c906108c
SS
1491else
1492 if test -n "$CC"; then
1493 ac_cv_prog_CC="$CC" # Let the user override the test.
1494else
bec39cab
AC
1495as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1496for as_dir in $PATH
1497do
1498 IFS=$as_save_IFS
1499 test -z "$as_dir" && as_dir=.
1500 for ac_exec_ext in '' $ac_executable_extensions; do
b4e70030 1501 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
bec39cab
AC
1502 ac_cv_prog_CC="${ac_tool_prefix}cc"
1503 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1504 break 2
1505 fi
1506done
1507done
1508
c906108c
SS
1509fi
1510fi
bec39cab 1511CC=$ac_cv_prog_CC
c906108c 1512if test -n "$CC"; then
b4e70030
JB
1513 echo "$as_me:$LINENO: result: $CC" >&5
1514echo "${ECHO_T}$CC" >&6
c906108c 1515else
b4e70030
JB
1516 echo "$as_me:$LINENO: result: no" >&5
1517echo "${ECHO_T}no" >&6
c906108c
SS
1518fi
1519
b4e70030
JB
1520fi
1521if test -z "$ac_cv_prog_CC"; then
1522 ac_ct_CC=$CC
1523 # Extract the first word of "cc", so it can be a program name with args.
1524set dummy cc; ac_word=$2
1525echo "$as_me:$LINENO: checking for $ac_word" >&5
1526echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1527if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1528 echo $ECHO_N "(cached) $ECHO_C" >&6
1529else
1530 if test -n "$ac_ct_CC"; then
1531 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1532else
1533as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1534for as_dir in $PATH
1535do
1536 IFS=$as_save_IFS
1537 test -z "$as_dir" && as_dir=.
1538 for ac_exec_ext in '' $ac_executable_extensions; do
1539 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1540 ac_cv_prog_ac_ct_CC="cc"
1541 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1542 break 2
4e8d927d 1543 fi
b4e70030
JB
1544done
1545done
1546
1547fi
1548fi
1549ac_ct_CC=$ac_cv_prog_ac_ct_CC
1550if test -n "$ac_ct_CC"; then
1551 echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
1552echo "${ECHO_T}$ac_ct_CC" >&6
1553else
1554 echo "$as_me:$LINENO: result: no" >&5
1555echo "${ECHO_T}no" >&6
1556fi
1557
1558 CC=$ac_ct_CC
1559else
1560 CC="$ac_cv_prog_CC"
1561fi
1562
bec39cab 1563fi
c906108c
SS
1564if test -z "$CC"; then
1565 # Extract the first word of "cc", so it can be a program name with args.
1566set dummy cc; ac_word=$2
b4e70030
JB
1567echo "$as_me:$LINENO: checking for $ac_word" >&5
1568echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
bec39cab
AC
1569if test "${ac_cv_prog_CC+set}" = set; then
1570 echo $ECHO_N "(cached) $ECHO_C" >&6
c906108c
SS
1571else
1572 if test -n "$CC"; then
1573 ac_cv_prog_CC="$CC" # Let the user override the test.
1574else
c906108c 1575 ac_prog_rejected=no
bec39cab
AC
1576as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1577for as_dir in $PATH
1578do
1579 IFS=$as_save_IFS
1580 test -z "$as_dir" && as_dir=.
1581 for ac_exec_ext in '' $ac_executable_extensions; do
b4e70030 1582 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
bec39cab
AC
1583 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
1584 ac_prog_rejected=yes
1585 continue
1586 fi
1587 ac_cv_prog_CC="cc"
1588 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1589 break 2
1590 fi
1591done
1592done
1593
c906108c
SS
1594if test $ac_prog_rejected = yes; then
1595 # We found a bogon in the path, so make sure we never use it.
1596 set dummy $ac_cv_prog_CC
1597 shift
bec39cab 1598 if test $# != 0; then
c906108c
SS
1599 # We chose a different compiler from the bogus one.
1600 # However, it has the same basename, so the bogon will be chosen
1601 # first if we set CC to just the basename; use the full file name.
1602 shift
bec39cab 1603 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
c906108c
SS
1604 fi
1605fi
1606fi
1607fi
bec39cab 1608CC=$ac_cv_prog_CC
c906108c 1609if test -n "$CC"; then
b4e70030
JB
1610 echo "$as_me:$LINENO: result: $CC" >&5
1611echo "${ECHO_T}$CC" >&6
c906108c 1612else
b4e70030
JB
1613 echo "$as_me:$LINENO: result: no" >&5
1614echo "${ECHO_T}no" >&6
c906108c
SS
1615fi
1616
bec39cab
AC
1617fi
1618if test -z "$CC"; then
1619 if test -n "$ac_tool_prefix"; then
b4e70030 1620 for ac_prog in cl
bec39cab
AC
1621 do
1622 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
1623set dummy $ac_tool_prefix$ac_prog; ac_word=$2
b4e70030
JB
1624echo "$as_me:$LINENO: checking for $ac_word" >&5
1625echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
bec39cab
AC
1626if test "${ac_cv_prog_CC+set}" = set; then
1627 echo $ECHO_N "(cached) $ECHO_C" >&6
c906108c
SS
1628else
1629 if test -n "$CC"; then
1630 ac_cv_prog_CC="$CC" # Let the user override the test.
1631else
bec39cab
AC
1632as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1633for as_dir in $PATH
1634do
1635 IFS=$as_save_IFS
1636 test -z "$as_dir" && as_dir=.
1637 for ac_exec_ext in '' $ac_executable_extensions; do
b4e70030 1638 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
bec39cab
AC
1639 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
1640 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1641 break 2
1642 fi
1643done
1644done
1645
c906108c
SS
1646fi
1647fi
bec39cab 1648CC=$ac_cv_prog_CC
c906108c 1649if test -n "$CC"; then
b4e70030
JB
1650 echo "$as_me:$LINENO: result: $CC" >&5
1651echo "${ECHO_T}$CC" >&6
c906108c 1652else
b4e70030
JB
1653 echo "$as_me:$LINENO: result: no" >&5
1654echo "${ECHO_T}no" >&6
c906108c 1655fi
bec39cab
AC
1656
1657 test -n "$CC" && break
1658 done
1659fi
1660if test -z "$CC"; then
1661 ac_ct_CC=$CC
b4e70030 1662 for ac_prog in cl
bec39cab
AC
1663do
1664 # Extract the first word of "$ac_prog", so it can be a program name with args.
1665set dummy $ac_prog; ac_word=$2
b4e70030
JB
1666echo "$as_me:$LINENO: checking for $ac_word" >&5
1667echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
bec39cab
AC
1668if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1669 echo $ECHO_N "(cached) $ECHO_C" >&6
1670else
1671 if test -n "$ac_ct_CC"; then
1672 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1673else
1674as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1675for as_dir in $PATH
1676do
1677 IFS=$as_save_IFS
1678 test -z "$as_dir" && as_dir=.
1679 for ac_exec_ext in '' $ac_executable_extensions; do
b4e70030 1680 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
bec39cab
AC
1681 ac_cv_prog_ac_ct_CC="$ac_prog"
1682 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1683 break 2
c906108c 1684 fi
bec39cab
AC
1685done
1686done
1687
1688fi
1689fi
1690ac_ct_CC=$ac_cv_prog_ac_ct_CC
1691if test -n "$ac_ct_CC"; then
b4e70030
JB
1692 echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
1693echo "${ECHO_T}$ac_ct_CC" >&6
bec39cab 1694else
b4e70030
JB
1695 echo "$as_me:$LINENO: result: no" >&5
1696echo "${ECHO_T}no" >&6
c906108c
SS
1697fi
1698
bec39cab
AC
1699 test -n "$ac_ct_CC" && break
1700done
c906108c 1701
b4e70030 1702 CC=$ac_ct_CC
bec39cab
AC
1703fi
1704
1705fi
1706
1707
d5af19ba
DJ
1708test -z "$CC" && { { echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
1709echo "$as_me: error: in \`$ac_pwd':" >&2;}
1710{ { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH
bec39cab
AC
1711See \`config.log' for more details." >&5
1712echo "$as_me: error: no acceptable C compiler found in \$PATH
1713See \`config.log' for more details." >&2;}
d5af19ba 1714 { (exit 1); exit 1; }; }; }
bec39cab
AC
1715
1716# Provide some information about the compiler.
b4e70030
JB
1717echo "$as_me:$LINENO:" \
1718 "checking for C compiler version" >&5
bec39cab 1719ac_compiler=`set X $ac_compile; echo $2`
b4e70030
JB
1720{ (eval echo "$as_me:$LINENO: \"$ac_compiler --version </dev/null >&5\"") >&5
1721 (eval $ac_compiler --version </dev/null >&5) 2>&5
bec39cab
AC
1722 ac_status=$?
1723 echo "$as_me:$LINENO: \$? = $ac_status" >&5
1724 (exit $ac_status); }
b4e70030
JB
1725{ (eval echo "$as_me:$LINENO: \"$ac_compiler -v </dev/null >&5\"") >&5
1726 (eval $ac_compiler -v </dev/null >&5) 2>&5
bec39cab
AC
1727 ac_status=$?
1728 echo "$as_me:$LINENO: \$? = $ac_status" >&5
1729 (exit $ac_status); }
b4e70030
JB
1730{ (eval echo "$as_me:$LINENO: \"$ac_compiler -V </dev/null >&5\"") >&5
1731 (eval $ac_compiler -V </dev/null >&5) 2>&5
bec39cab
AC
1732 ac_status=$?
1733 echo "$as_me:$LINENO: \$? = $ac_status" >&5
1734 (exit $ac_status); }
1735
1736cat >conftest.$ac_ext <<_ACEOF
1737/* confdefs.h. */
1738_ACEOF
1739cat confdefs.h >>conftest.$ac_ext
1740cat >>conftest.$ac_ext <<_ACEOF
1741/* end confdefs.h. */
1742
1743int
1744main ()
1745{
1746
1747 ;
1748 return 0;
1749}
1750_ACEOF
1751ac_clean_files_save=$ac_clean_files
b4e70030 1752ac_clean_files="$ac_clean_files a.out a.exe b.out"
bec39cab
AC
1753# Try to create an executable without -o first, disregard a.out.
1754# It will help us diagnose broken compilers, and finding out an intuition
1755# of exeext.
b4e70030
JB
1756echo "$as_me:$LINENO: checking for C compiler default output file name" >&5
1757echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6
bec39cab
AC
1758ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
1759if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5
1760 (eval $ac_link_default) 2>&5
1761 ac_status=$?
1762 echo "$as_me:$LINENO: \$? = $ac_status" >&5
1763 (exit $ac_status); }; then
b4e70030
JB
1764 # Find the output, starting from the most likely. This scheme is
1765# not robust to junk in `.', hence go to wildcards (a.*) only as a last
1766# resort.
1767
1768# Be careful to initialize this variable, since it used to be cached.
1769# Otherwise an old cache value of `no' led to `EXEEXT = no' in a Makefile.
1770ac_cv_exeext=
1771# b.out is created by i960 compilers.
1772for ac_file in a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out
bec39cab
AC
1773do
1774 test -f "$ac_file" || continue
1775 case $ac_file in
b4e70030
JB
1776 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj )
1777 ;;
1778 conftest.$ac_ext )
1779 # This is the source file.
1780 ;;
1781 [ab].out )
1782 # We found the default executable, but exeext='' is most
1783 # certainly right.
1784 break;;
1785 *.* )
1786 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1787 # FIXME: I believe we export ac_cv_exeext for Libtool,
1788 # but it would be cool to find out if it's true. Does anybody
1789 # maintain Libtool? --akim.
1790 export ac_cv_exeext
1791 break;;
1792 * )
1793 break;;
bec39cab
AC
1794 esac
1795done
1796else
1797 echo "$as_me: failed program was:" >&5
1798sed 's/^/| /' conftest.$ac_ext >&5
1799
d5af19ba
DJ
1800{ { echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
1801echo "$as_me: error: in \`$ac_pwd':" >&2;}
bec39cab
AC
1802{ { echo "$as_me:$LINENO: error: C compiler cannot create executables
1803See \`config.log' for more details." >&5
1804echo "$as_me: error: C compiler cannot create executables
1805See \`config.log' for more details." >&2;}
d5af19ba 1806 { (exit 77); exit 77; }; }; }
bec39cab
AC
1807fi
1808
b4e70030
JB
1809ac_exeext=$ac_cv_exeext
1810echo "$as_me:$LINENO: result: $ac_file" >&5
1811echo "${ECHO_T}$ac_file" >&6
1812
1813# Check the compiler produces executables we can run. If not, either
bec39cab 1814# the compiler is broken, or we cross compile.
b4e70030
JB
1815echo "$as_me:$LINENO: checking whether the C compiler works" >&5
1816echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
bec39cab
AC
1817# FIXME: These cross compiler hacks should be removed for Autoconf 3.0
1818# If not cross compiling, check that we can run a simple program.
1819if test "$cross_compiling" != yes; then
1820 if { ac_try='./$ac_file'
1821 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
1822 (eval $ac_try) 2>&5
1823 ac_status=$?
1824 echo "$as_me:$LINENO: \$? = $ac_status" >&5
1825 (exit $ac_status); }; }; then
1826 cross_compiling=no
c906108c 1827 else
bec39cab
AC
1828 if test "$cross_compiling" = maybe; then
1829 cross_compiling=yes
1830 else
d5af19ba
DJ
1831 { { echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
1832echo "$as_me: error: in \`$ac_pwd':" >&2;}
1833{ { echo "$as_me:$LINENO: error: cannot run C compiled programs.
bec39cab
AC
1834If you meant to cross compile, use \`--host'.
1835See \`config.log' for more details." >&5
1836echo "$as_me: error: cannot run C compiled programs.
1837If you meant to cross compile, use \`--host'.
1838See \`config.log' for more details." >&2;}
d5af19ba 1839 { (exit 1); exit 1; }; }; }
bec39cab 1840 fi
c906108c 1841 fi
bec39cab 1842fi
b4e70030
JB
1843echo "$as_me:$LINENO: result: yes" >&5
1844echo "${ECHO_T}yes" >&6
bec39cab 1845
b4e70030
JB
1846rm -f a.out a.exe conftest$ac_cv_exeext b.out
1847ac_clean_files=$ac_clean_files_save
1848# Check the compiler produces executables we can run. If not, either
1849# the compiler is broken, or we cross compile.
1850echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
1851echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
1852echo "$as_me:$LINENO: result: $cross_compiling" >&5
1853echo "${ECHO_T}$cross_compiling" >&6
4e8d927d 1854
b4e70030
JB
1855echo "$as_me:$LINENO: checking for suffix of executables" >&5
1856echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6
1857if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
bec39cab
AC
1858 (eval $ac_link) 2>&5
1859 ac_status=$?
1860 echo "$as_me:$LINENO: \$? = $ac_status" >&5
1861 (exit $ac_status); }; then
b4e70030
JB
1862 # If both `conftest.exe' and `conftest' are `present' (well, observable)
1863# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
1864# work properly (i.e., refer to `conftest.exe'), while it won't with
1865# `rm'.
1866for ac_file in conftest.exe conftest conftest.*; do
1867 test -f "$ac_file" || continue
1868 case $ac_file in
1869 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) ;;
1870 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1871 export ac_cv_exeext
1872 break;;
1873 * ) break;;
1874 esac
1875done
c906108c 1876else
d5af19ba
DJ
1877 { { echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
1878echo "$as_me: error: in \`$ac_pwd':" >&2;}
1879{ { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link
bec39cab
AC
1880See \`config.log' for more details." >&5
1881echo "$as_me: error: cannot compute suffix of executables: cannot compile and link
1882See \`config.log' for more details." >&2;}
d5af19ba 1883 { (exit 1); exit 1; }; }; }
c906108c 1884fi
c906108c 1885
b4e70030
JB
1886rm -f conftest$ac_cv_exeext
1887echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
1888echo "${ECHO_T}$ac_cv_exeext" >&6
c906108c 1889
b4e70030 1890rm -f conftest.$ac_ext
bec39cab
AC
1891EXEEXT=$ac_cv_exeext
1892ac_exeext=$EXEEXT
b4e70030
JB
1893echo "$as_me:$LINENO: checking for suffix of object files" >&5
1894echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6
bec39cab
AC
1895if test "${ac_cv_objext+set}" = set; then
1896 echo $ECHO_N "(cached) $ECHO_C" >&6
1897else
b4e70030
JB
1898 cat >conftest.$ac_ext <<_ACEOF
1899/* confdefs.h. */
1900_ACEOF
1901cat confdefs.h >>conftest.$ac_ext
1902cat >>conftest.$ac_ext <<_ACEOF
1903/* end confdefs.h. */
1904
1905int
1906main ()
1907{
1908
1909 ;
1910 return 0;
1911}
1912_ACEOF
1913rm -f conftest.o conftest.obj
bec39cab
AC
1914if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
1915 (eval $ac_compile) 2>&5
1916 ac_status=$?
1917 echo "$as_me:$LINENO: \$? = $ac_status" >&5
1918 (exit $ac_status); }; then
b4e70030 1919 for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
bec39cab 1920 case $ac_file in
b4e70030 1921 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg ) ;;
bec39cab
AC
1922 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
1923 break;;
1924 esac
1925done
c906108c 1926else
bec39cab
AC
1927 echo "$as_me: failed program was:" >&5
1928sed 's/^/| /' conftest.$ac_ext >&5
1929
d5af19ba
DJ
1930{ { echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
1931echo "$as_me: error: in \`$ac_pwd':" >&2;}
bec39cab
AC
1932{ { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile
1933See \`config.log' for more details." >&5
1934echo "$as_me: error: cannot compute suffix of object files: cannot compile
1935See \`config.log' for more details." >&2;}
d5af19ba 1936 { (exit 1); exit 1; }; }; }
c906108c
SS
1937fi
1938
b4e70030 1939rm -f conftest.$ac_cv_objext conftest.$ac_ext
bec39cab 1940fi
b4e70030
JB
1941echo "$as_me:$LINENO: result: $ac_cv_objext" >&5
1942echo "${ECHO_T}$ac_cv_objext" >&6
bec39cab
AC
1943OBJEXT=$ac_cv_objext
1944ac_objext=$OBJEXT
b4e70030
JB
1945echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
1946echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
bec39cab
AC
1947if test "${ac_cv_c_compiler_gnu+set}" = set; then
1948 echo $ECHO_N "(cached) $ECHO_C" >&6
c906108c 1949else
bec39cab
AC
1950 cat >conftest.$ac_ext <<_ACEOF
1951/* confdefs.h. */
1952_ACEOF
1953cat confdefs.h >>conftest.$ac_ext
1954cat >>conftest.$ac_ext <<_ACEOF
1955/* end confdefs.h. */
1956
1957int
1958main ()
1959{
1960#ifndef __GNUC__
1961 choke me
1962#endif
1963
1964 ;
1965 return 0;
1966}
1967_ACEOF
1968rm -f conftest.$ac_objext
1969if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
1970 (eval $ac_compile) 2>conftest.er1
1971 ac_status=$?
1972 grep -v '^ *+' conftest.er1 >conftest.err
1973 rm -f conftest.er1
1974 cat conftest.err >&5
1975 echo "$as_me:$LINENO: \$? = $ac_status" >&5
1976 (exit $ac_status); } &&
b4e70030
JB
1977 { ac_try='test -z "$ac_c_werror_flag"
1978 || test ! -s conftest.err'
bec39cab
AC
1979 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
1980 (eval $ac_try) 2>&5
1981 ac_status=$?
1982 echo "$as_me:$LINENO: \$? = $ac_status" >&5
1983 (exit $ac_status); }; } &&
1984 { ac_try='test -s conftest.$ac_objext'
1985 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
1986 (eval $ac_try) 2>&5
1987 ac_status=$?
1988 echo "$as_me:$LINENO: \$? = $ac_status" >&5
1989 (exit $ac_status); }; }; then
1990 ac_compiler_gnu=yes
1991else
1992 echo "$as_me: failed program was:" >&5
1993sed 's/^/| /' conftest.$ac_ext >&5
1994
b4e70030 1995ac_compiler_gnu=no
bec39cab
AC
1996fi
1997rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
1998ac_cv_c_compiler_gnu=$ac_compiler_gnu
1999
2000fi
b4e70030
JB
2001echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
2002echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
bec39cab
AC
2003GCC=`test $ac_compiler_gnu = yes && echo yes`
2004ac_test_CFLAGS=${CFLAGS+set}
2005ac_save_CFLAGS=$CFLAGS
b4e70030
JB
2006CFLAGS="-g"
2007echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
2008echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
bec39cab
AC
2009if test "${ac_cv_prog_cc_g+set}" = set; then
2010 echo $ECHO_N "(cached) $ECHO_C" >&6
2011else
b4e70030 2012 cat >conftest.$ac_ext <<_ACEOF
bec39cab
AC
2013/* confdefs.h. */
2014_ACEOF
2015cat confdefs.h >>conftest.$ac_ext
2016cat >>conftest.$ac_ext <<_ACEOF
2017/* end confdefs.h. */
2018
2019int
2020main ()
2021{
2022
2023 ;
2024 return 0;
2025}
2026_ACEOF
2027rm -f conftest.$ac_objext
2028if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2029 (eval $ac_compile) 2>conftest.er1
2030 ac_status=$?
2031 grep -v '^ *+' conftest.er1 >conftest.err
2032 rm -f conftest.er1
2033 cat conftest.err >&5
2034 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2035 (exit $ac_status); } &&
b4e70030
JB
2036 { ac_try='test -z "$ac_c_werror_flag"
2037 || test ! -s conftest.err'
bec39cab
AC
2038 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2039 (eval $ac_try) 2>&5
2040 ac_status=$?
2041 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2042 (exit $ac_status); }; } &&
2043 { ac_try='test -s conftest.$ac_objext'
2044 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2045 (eval $ac_try) 2>&5
2046 ac_status=$?
2047 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2048 (exit $ac_status); }; }; then
c906108c
SS
2049 ac_cv_prog_cc_g=yes
2050else
bec39cab
AC
2051 echo "$as_me: failed program was:" >&5
2052sed 's/^/| /' conftest.$ac_ext >&5
c906108c 2053
b4e70030 2054ac_cv_prog_cc_g=no
4e8d927d 2055fi
bec39cab
AC
2056rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
2057fi
b4e70030
JB
2058echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
2059echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
c906108c 2060if test "$ac_test_CFLAGS" = set; then
bec39cab 2061 CFLAGS=$ac_save_CFLAGS
c906108c
SS
2062elif test $ac_cv_prog_cc_g = yes; then
2063 if test "$GCC" = yes; then
2064 CFLAGS="-g -O2"
2065 else
2066 CFLAGS="-g"
2067 fi
2068else
2069 if test "$GCC" = yes; then
2070 CFLAGS="-O2"
2071 else
2072 CFLAGS=
2073 fi
2074fi
b4e70030
JB
2075echo "$as_me:$LINENO: checking for $CC option to accept ANSI C" >&5
2076echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
2077if test "${ac_cv_prog_cc_stdc+set}" = set; then
bec39cab
AC
2078 echo $ECHO_N "(cached) $ECHO_C" >&6
2079else
b4e70030 2080 ac_cv_prog_cc_stdc=no
bec39cab
AC
2081ac_save_CC=$CC
2082cat >conftest.$ac_ext <<_ACEOF
2083/* confdefs.h. */
2084_ACEOF
2085cat confdefs.h >>conftest.$ac_ext
2086cat >>conftest.$ac_ext <<_ACEOF
2087/* end confdefs.h. */
c906108c
SS
2088#include <stdarg.h>
2089#include <stdio.h>
2090#include <sys/types.h>
2091#include <sys/stat.h>
2092/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
2093struct buf { int x; };
2094FILE * (*rcsopen) (struct buf *, struct stat *, int);
2095static char *e (p, i)
2096 char **p;
2097 int i;
2098{
2099 return p[i];
2100}
2101static char *f (char * (*g) (char **, int), char **p, ...)
2102{
2103 char *s;
2104 va_list v;
2105 va_start (v,p);
2106 s = g (p, va_arg (v,int));
2107 va_end (v);
2108 return s;
2109}
bec39cab
AC
2110
2111/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
2112 function prototypes and stuff, but not '\xHH' hex character constants.
2113 These don't provoke an error unfortunately, instead are silently treated
b4e70030 2114 as 'x'. The following induces an error, until -std1 is added to get
bec39cab
AC
2115 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
2116 array size at least. It's necessary to write '\x00'==0 to get something
b4e70030 2117 that's true only with -std1. */
bec39cab
AC
2118int osf4_cc_array ['\x00' == 0 ? 1 : -1];
2119
c906108c
SS
2120int test (int i, double x);
2121struct s1 {int (*f) (int a);};
2122struct s2 {int (*f) (double a);};
2123int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
2124int argc;
2125char **argv;
bec39cab
AC
2126int
2127main ()
2128{
c906108c 2129return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
bec39cab
AC
2130 ;
2131 return 0;
2132}
2133_ACEOF
b4e70030
JB
2134# Don't try gcc -ansi; that turns off useful extensions and
2135# breaks some systems' header files.
2136# AIX -qlanglvl=ansi
2137# Ultrix and OSF/1 -std1
2138# HP-UX 10.20 and later -Ae
2139# HP-UX older versions -Aa -D_HPUX_SOURCE
2140# SVR4 -Xc -D__EXTENSIONS__
2141for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
bec39cab
AC
2142do
2143 CC="$ac_save_CC $ac_arg"
2144 rm -f conftest.$ac_objext
2145if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2146 (eval $ac_compile) 2>conftest.er1
2147 ac_status=$?
2148 grep -v '^ *+' conftest.er1 >conftest.err
2149 rm -f conftest.er1
2150 cat conftest.err >&5
2151 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2152 (exit $ac_status); } &&
b4e70030
JB
2153 { ac_try='test -z "$ac_c_werror_flag"
2154 || test ! -s conftest.err'
bec39cab
AC
2155 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2156 (eval $ac_try) 2>&5
2157 ac_status=$?
2158 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2159 (exit $ac_status); }; } &&
2160 { ac_try='test -s conftest.$ac_objext'
2161 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2162 (eval $ac_try) 2>&5
2163 ac_status=$?
2164 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2165 (exit $ac_status); }; }; then
b4e70030
JB
2166 ac_cv_prog_cc_stdc=$ac_arg
2167break
c906108c 2168else
bec39cab
AC
2169 echo "$as_me: failed program was:" >&5
2170sed 's/^/| /' conftest.$ac_ext >&5
2171
c906108c 2172fi
bec39cab 2173rm -f conftest.err conftest.$ac_objext
c906108c 2174done
b4e70030 2175rm -f conftest.$ac_ext conftest.$ac_objext
bec39cab 2176CC=$ac_save_CC
c906108c
SS
2177
2178fi
b4e70030
JB
2179
2180case "x$ac_cv_prog_cc_stdc" in
2181 x|xno)
2182 echo "$as_me:$LINENO: result: none needed" >&5
2183echo "${ECHO_T}none needed" >&6 ;;
bec39cab 2184 *)
b4e70030
JB
2185 echo "$as_me:$LINENO: result: $ac_cv_prog_cc_stdc" >&5
2186echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
2187 CC="$CC $ac_cv_prog_cc_stdc" ;;
c906108c
SS
2188esac
2189
b4e70030
JB
2190# Some people use a C++ compiler to compile C. Since we use `exit',
2191# in C++ we need to declare it. In case someone uses the same compiler
2192# for both compiling C and C++ we need to have the C++ compiler decide
2193# the declaration of exit, since it's the most demanding environment.
2194cat >conftest.$ac_ext <<_ACEOF
2195#ifndef __cplusplus
2196 choke me
2197#endif
2198_ACEOF
2199rm -f conftest.$ac_objext
2200if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2201 (eval $ac_compile) 2>conftest.er1
2202 ac_status=$?
2203 grep -v '^ *+' conftest.er1 >conftest.err
2204 rm -f conftest.er1
2205 cat conftest.err >&5
2206 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2207 (exit $ac_status); } &&
2208 { ac_try='test -z "$ac_c_werror_flag"
2209 || test ! -s conftest.err'
2210 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2211 (eval $ac_try) 2>&5
2212 ac_status=$?
2213 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2214 (exit $ac_status); }; } &&
2215 { ac_try='test -s conftest.$ac_objext'
2216 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2217 (eval $ac_try) 2>&5
2218 ac_status=$?
2219 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2220 (exit $ac_status); }; }; then
2221 for ac_declaration in \
2222 '' \
2223 'extern "C" void std::exit (int) throw (); using std::exit;' \
2224 'extern "C" void std::exit (int); using std::exit;' \
2225 'extern "C" void exit (int) throw ();' \
2226 'extern "C" void exit (int);' \
2227 'void exit (int);'
2228do
2229 cat >conftest.$ac_ext <<_ACEOF
2230/* confdefs.h. */
2231_ACEOF
2232cat confdefs.h >>conftest.$ac_ext
2233cat >>conftest.$ac_ext <<_ACEOF
2234/* end confdefs.h. */
2235$ac_declaration
2236#include <stdlib.h>
2237int
2238main ()
2239{
2240exit (42);
2241 ;
2242 return 0;
2243}
2244_ACEOF
2245rm -f conftest.$ac_objext
2246if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2247 (eval $ac_compile) 2>conftest.er1
2248 ac_status=$?
2249 grep -v '^ *+' conftest.er1 >conftest.err
2250 rm -f conftest.er1
2251 cat conftest.err >&5
2252 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2253 (exit $ac_status); } &&
2254 { ac_try='test -z "$ac_c_werror_flag"
2255 || test ! -s conftest.err'
2256 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2257 (eval $ac_try) 2>&5
2258 ac_status=$?
2259 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2260 (exit $ac_status); }; } &&
2261 { ac_try='test -s conftest.$ac_objext'
2262 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2263 (eval $ac_try) 2>&5
2264 ac_status=$?
2265 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2266 (exit $ac_status); }; }; then
2267 :
2268else
2269 echo "$as_me: failed program was:" >&5
2270sed 's/^/| /' conftest.$ac_ext >&5
2271
2272continue
2273fi
2274rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
2275 cat >conftest.$ac_ext <<_ACEOF
2276/* confdefs.h. */
2277_ACEOF
2278cat confdefs.h >>conftest.$ac_ext
2279cat >>conftest.$ac_ext <<_ACEOF
2280/* end confdefs.h. */
2281$ac_declaration
2282int
2283main ()
2284{
2285exit (42);
2286 ;
2287 return 0;
2288}
2289_ACEOF
2290rm -f conftest.$ac_objext
2291if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2292 (eval $ac_compile) 2>conftest.er1
2293 ac_status=$?
2294 grep -v '^ *+' conftest.er1 >conftest.err
2295 rm -f conftest.er1
2296 cat conftest.err >&5
2297 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2298 (exit $ac_status); } &&
2299 { ac_try='test -z "$ac_c_werror_flag"
2300 || test ! -s conftest.err'
2301 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2302 (eval $ac_try) 2>&5
2303 ac_status=$?
2304 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2305 (exit $ac_status); }; } &&
2306 { ac_try='test -s conftest.$ac_objext'
2307 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2308 (eval $ac_try) 2>&5
2309 ac_status=$?
2310 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2311 (exit $ac_status); }; }; then
2312 break
2313else
2314 echo "$as_me: failed program was:" >&5
2315sed 's/^/| /' conftest.$ac_ext >&5
2316
2317fi
2318rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
2319done
2320rm -f conftest*
2321if test -n "$ac_declaration"; then
2322 echo '#ifdef __cplusplus' >>confdefs.h
2323 echo $ac_declaration >>confdefs.h
2324 echo '#endif' >>confdefs.h
2325fi
2326
2327else
2328 echo "$as_me: failed program was:" >&5
2329sed 's/^/| /' conftest.$ac_ext >&5
c906108c 2330
b4e70030
JB
2331fi
2332rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
bec39cab
AC
2333ac_ext=c
2334ac_cpp='$CPP $CPPFLAGS'
2335ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2336ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2337ac_compiler_gnu=$ac_cv_c_compiler_gnu
c906108c 2338
60ca704f 2339
bec39cab
AC
2340cat >>confdefs.h <<\_ACEOF
2341#define _GNU_SOURCE 1
2342_ACEOF
c906108c
SS
2343
2344
8bb2c122 2345
bec39cab
AC
2346ac_ext=c
2347ac_cpp='$CPP $CPPFLAGS'
2348ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2349ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2350ac_compiler_gnu=$ac_cv_c_compiler_gnu
b4e70030
JB
2351echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
2352echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
bec39cab
AC
2353# On Suns, sometimes $CPP names a directory.
2354if test -n "$CPP" && test -d "$CPP"; then
2355 CPP=
8bb2c122 2356fi
bec39cab
AC
2357if test -z "$CPP"; then
2358 if test "${ac_cv_prog_CPP+set}" = set; then
2359 echo $ECHO_N "(cached) $ECHO_C" >&6
2360else
2361 # Double quotes because CPP needs to be expanded
2362 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
2363 do
2364 ac_preproc_ok=false
2365for ac_c_preproc_warn_flag in '' yes
2366do
2367 # Use a header file that comes with gcc, so configuring glibc
2368 # with a fresh cross-compiler works.
2369 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2370 # <limits.h> exists even on freestanding compilers.
2371 # On the NeXT, cc -E runs the code through the compiler's parser,
2372 # not just through cpp. "Syntax error" is here to catch this case.
2373 cat >conftest.$ac_ext <<_ACEOF
2374/* confdefs.h. */
2375_ACEOF
2376cat confdefs.h >>conftest.$ac_ext
2377cat >>conftest.$ac_ext <<_ACEOF
2378/* end confdefs.h. */
2379#ifdef __STDC__
2380# include <limits.h>
2381#else
2382# include <assert.h>
2383#endif
2384 Syntax error
2385_ACEOF
2386if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2387 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2388 ac_status=$?
2389 grep -v '^ *+' conftest.er1 >conftest.err
2390 rm -f conftest.er1
2391 cat conftest.err >&5
2392 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2393 (exit $ac_status); } >/dev/null; then
2394 if test -s conftest.err; then
2395 ac_cpp_err=$ac_c_preproc_warn_flag
2396 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
2397 else
2398 ac_cpp_err=
2399 fi
8bb2c122 2400else
bec39cab 2401 ac_cpp_err=yes
8bb2c122 2402fi
bec39cab
AC
2403if test -z "$ac_cpp_err"; then
2404 :
8bb2c122 2405else
bec39cab
AC
2406 echo "$as_me: failed program was:" >&5
2407sed 's/^/| /' conftest.$ac_ext >&5
2408
2409 # Broken: fails on valid input.
2410continue
2411fi
2412rm -f conftest.err conftest.$ac_ext
2413
b4e70030 2414 # OK, works on sane cases. Now check whether non-existent headers
bec39cab
AC
2415 # can be detected and how.
2416 cat >conftest.$ac_ext <<_ACEOF
2417/* confdefs.h. */
2418_ACEOF
2419cat confdefs.h >>conftest.$ac_ext
2420cat >>conftest.$ac_ext <<_ACEOF
2421/* end confdefs.h. */
2422#include <ac_nonexistent.h>
2423_ACEOF
2424if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2425 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2426 ac_status=$?
2427 grep -v '^ *+' conftest.er1 >conftest.err
2428 rm -f conftest.er1
2429 cat conftest.err >&5
2430 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2431 (exit $ac_status); } >/dev/null; then
2432 if test -s conftest.err; then
2433 ac_cpp_err=$ac_c_preproc_warn_flag
2434 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
2435 else
2436 ac_cpp_err=
2437 fi
8bb2c122 2438else
bec39cab 2439 ac_cpp_err=yes
8bb2c122 2440fi
bec39cab
AC
2441if test -z "$ac_cpp_err"; then
2442 # Broken: success on invalid input.
2443continue
8bb2c122 2444else
bec39cab
AC
2445 echo "$as_me: failed program was:" >&5
2446sed 's/^/| /' conftest.$ac_ext >&5
8bb2c122 2447
bec39cab
AC
2448 # Passes both tests.
2449ac_preproc_ok=:
2450break
8bb2c122 2451fi
bec39cab 2452rm -f conftest.err conftest.$ac_ext
8bb2c122 2453
bec39cab
AC
2454done
2455# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2456rm -f conftest.err conftest.$ac_ext
2457if $ac_preproc_ok; then
2458 break
2459fi
8bb2c122 2460
bec39cab
AC
2461 done
2462 ac_cv_prog_CPP=$CPP
ddc9cd0f 2463
c906108c 2464fi
bec39cab
AC
2465 CPP=$ac_cv_prog_CPP
2466else
2467 ac_cv_prog_CPP=$CPP
c906108c 2468fi
b4e70030
JB
2469echo "$as_me:$LINENO: result: $CPP" >&5
2470echo "${ECHO_T}$CPP" >&6
bec39cab
AC
2471ac_preproc_ok=false
2472for ac_c_preproc_warn_flag in '' yes
2473do
2474 # Use a header file that comes with gcc, so configuring glibc
2475 # with a fresh cross-compiler works.
2476 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2477 # <limits.h> exists even on freestanding compilers.
2478 # On the NeXT, cc -E runs the code through the compiler's parser,
2479 # not just through cpp. "Syntax error" is here to catch this case.
2480 cat >conftest.$ac_ext <<_ACEOF
2481/* confdefs.h. */
2482_ACEOF
2483cat confdefs.h >>conftest.$ac_ext
2484cat >>conftest.$ac_ext <<_ACEOF
2485/* end confdefs.h. */
2486#ifdef __STDC__
2487# include <limits.h>
2488#else
2489# include <assert.h>
2490#endif
2491 Syntax error
2492_ACEOF
2493if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2494 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2495 ac_status=$?
2496 grep -v '^ *+' conftest.er1 >conftest.err
2497 rm -f conftest.er1
2498 cat conftest.err >&5
2499 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2500 (exit $ac_status); } >/dev/null; then
2501 if test -s conftest.err; then
2502 ac_cpp_err=$ac_c_preproc_warn_flag
2503 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
2504 else
2505 ac_cpp_err=
2506 fi
c906108c 2507else
bec39cab 2508 ac_cpp_err=yes
c906108c 2509fi
bec39cab
AC
2510if test -z "$ac_cpp_err"; then
2511 :
c906108c 2512else
bec39cab
AC
2513 echo "$as_me: failed program was:" >&5
2514sed 's/^/| /' conftest.$ac_ext >&5
2515
2516 # Broken: fails on valid input.
2517continue
2518fi
2519rm -f conftest.err conftest.$ac_ext
2520
b4e70030 2521 # OK, works on sane cases. Now check whether non-existent headers
bec39cab
AC
2522 # can be detected and how.
2523 cat >conftest.$ac_ext <<_ACEOF
2524/* confdefs.h. */
2525_ACEOF
2526cat confdefs.h >>conftest.$ac_ext
2527cat >>conftest.$ac_ext <<_ACEOF
2528/* end confdefs.h. */
2529#include <ac_nonexistent.h>
2530_ACEOF
2531if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2532 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2533 ac_status=$?
2534 grep -v '^ *+' conftest.er1 >conftest.err
2535 rm -f conftest.er1
2536 cat conftest.err >&5
2537 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2538 (exit $ac_status); } >/dev/null; then
2539 if test -s conftest.err; then
2540 ac_cpp_err=$ac_c_preproc_warn_flag
2541 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
2542 else
2543 ac_cpp_err=
2544 fi
c906108c 2545else
bec39cab 2546 ac_cpp_err=yes
c906108c 2547fi
bec39cab
AC
2548if test -z "$ac_cpp_err"; then
2549 # Broken: success on invalid input.
2550continue
c906108c 2551else
bec39cab
AC
2552 echo "$as_me: failed program was:" >&5
2553sed 's/^/| /' conftest.$ac_ext >&5
c906108c 2554
bec39cab
AC
2555 # Passes both tests.
2556ac_preproc_ok=:
2557break
c906108c 2558fi
bec39cab 2559rm -f conftest.err conftest.$ac_ext
c906108c 2560
bec39cab
AC
2561done
2562# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2563rm -f conftest.err conftest.$ac_ext
2564if $ac_preproc_ok; then
c906108c
SS
2565 :
2566else
d5af19ba
DJ
2567 { { echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
2568echo "$as_me: error: in \`$ac_pwd':" >&2;}
2569{ { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check
bec39cab
AC
2570See \`config.log' for more details." >&5
2571echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check
2572See \`config.log' for more details." >&2;}
d5af19ba 2573 { (exit 1); exit 1; }; }; }
c906108c 2574fi
c906108c 2575
bec39cab
AC
2576ac_ext=c
2577ac_cpp='$CPP $CPPFLAGS'
2578ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2579ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2580ac_compiler_gnu=$ac_cv_c_compiler_gnu
2581
2582
b4e70030
JB
2583echo "$as_me:$LINENO: checking for egrep" >&5
2584echo $ECHO_N "checking for egrep... $ECHO_C" >&6
2585if test "${ac_cv_prog_egrep+set}" = set; then
4e8d927d
DJ
2586 echo $ECHO_N "(cached) $ECHO_C" >&6
2587else
b4e70030
JB
2588 if echo a | (grep -E '(a|b)') >/dev/null 2>&1
2589 then ac_cv_prog_egrep='grep -E'
2590 else ac_cv_prog_egrep='egrep'
bec39cab 2591 fi
4e8d927d 2592fi
b4e70030
JB
2593echo "$as_me:$LINENO: result: $ac_cv_prog_egrep" >&5
2594echo "${ECHO_T}$ac_cv_prog_egrep" >&6
2595 EGREP=$ac_cv_prog_egrep
c906108c 2596
bec39cab
AC
2597
2598
b4e70030
JB
2599echo "$as_me:$LINENO: checking for AIX" >&5
2600echo $ECHO_N "checking for AIX... $ECHO_C" >&6
bec39cab
AC
2601cat >conftest.$ac_ext <<_ACEOF
2602/* confdefs.h. */
2603_ACEOF
2604cat confdefs.h >>conftest.$ac_ext
2605cat >>conftest.$ac_ext <<_ACEOF
2606/* end confdefs.h. */
2607#ifdef _AIX
2608 yes
2609#endif
2610
2611_ACEOF
c906108c 2612if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
bec39cab 2613 $EGREP "yes" >/dev/null 2>&1; then
b4e70030
JB
2614 echo "$as_me:$LINENO: result: yes" >&5
2615echo "${ECHO_T}yes" >&6
bec39cab
AC
2616cat >>confdefs.h <<\_ACEOF
2617#define _ALL_SOURCE 1
2618_ACEOF
2619
c906108c 2620else
b4e70030
JB
2621 echo "$as_me:$LINENO: result: no" >&5
2622echo "${ECHO_T}no" >&6
c906108c
SS
2623fi
2624rm -f conftest*
2625
c906108c 2626
b4e70030
JB
2627echo "$as_me:$LINENO: checking for library containing strerror" >&5
2628echo $ECHO_N "checking for library containing strerror... $ECHO_C" >&6
bec39cab
AC
2629if test "${ac_cv_search_strerror+set}" = set; then
2630 echo $ECHO_N "(cached) $ECHO_C" >&6
c906108c 2631else
bec39cab 2632 ac_func_search_save_LIBS=$LIBS
b4e70030 2633ac_cv_search_strerror=no
bec39cab
AC
2634cat >conftest.$ac_ext <<_ACEOF
2635/* confdefs.h. */
2636_ACEOF
2637cat confdefs.h >>conftest.$ac_ext
2638cat >>conftest.$ac_ext <<_ACEOF
2639/* end confdefs.h. */
c906108c 2640
b4e70030 2641/* Override any gcc2 internal prototype to avoid an error. */
bec39cab
AC
2642#ifdef __cplusplus
2643extern "C"
2644#endif
b4e70030
JB
2645/* We use char because int might match the return type of a gcc2
2646 builtin and then its argument prototype would still apply. */
bec39cab
AC
2647char strerror ();
2648int
2649main ()
2650{
b4e70030 2651strerror ();
bec39cab
AC
2652 ;
2653 return 0;
2654}
2655_ACEOF
b4e70030 2656rm -f conftest.$ac_objext conftest$ac_exeext
bec39cab
AC
2657if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
2658 (eval $ac_link) 2>conftest.er1
2659 ac_status=$?
2660 grep -v '^ *+' conftest.er1 >conftest.err
2661 rm -f conftest.er1
2662 cat conftest.err >&5
2663 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2664 (exit $ac_status); } &&
b4e70030
JB
2665 { ac_try='test -z "$ac_c_werror_flag"
2666 || test ! -s conftest.err'
bec39cab
AC
2667 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2668 (eval $ac_try) 2>&5
2669 ac_status=$?
2670 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2671 (exit $ac_status); }; } &&
2672 { ac_try='test -s conftest$ac_exeext'
2673 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2674 (eval $ac_try) 2>&5
2675 ac_status=$?
2676 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2677 (exit $ac_status); }; }; then
b4e70030 2678 ac_cv_search_strerror="none required"
c906108c 2679else
bec39cab
AC
2680 echo "$as_me: failed program was:" >&5
2681sed 's/^/| /' conftest.$ac_ext >&5
c906108c
SS
2682
2683fi
bec39cab 2684rm -f conftest.err conftest.$ac_objext \
b4e70030
JB
2685 conftest$ac_exeext conftest.$ac_ext
2686if test "$ac_cv_search_strerror" = no; then
2687 for ac_lib in cposix; do
2688 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
2689 cat >conftest.$ac_ext <<_ACEOF
2690/* confdefs.h. */
2691_ACEOF
2692cat confdefs.h >>conftest.$ac_ext
2693cat >>conftest.$ac_ext <<_ACEOF
2694/* end confdefs.h. */
2695
2696/* Override any gcc2 internal prototype to avoid an error. */
2697#ifdef __cplusplus
2698extern "C"
2699#endif
2700/* We use char because int might match the return type of a gcc2
2701 builtin and then its argument prototype would still apply. */
2702char strerror ();
2703int
2704main ()
2705{
2706strerror ();
2707 ;
2708 return 0;
2709}
2710_ACEOF
2711rm -f conftest.$ac_objext conftest$ac_exeext
2712if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
2713 (eval $ac_link) 2>conftest.er1
2714 ac_status=$?
2715 grep -v '^ *+' conftest.er1 >conftest.err
2716 rm -f conftest.er1
2717 cat conftest.err >&5
2718 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2719 (exit $ac_status); } &&
2720 { ac_try='test -z "$ac_c_werror_flag"
2721 || test ! -s conftest.err'
2722 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2723 (eval $ac_try) 2>&5
2724 ac_status=$?
2725 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2726 (exit $ac_status); }; } &&
2727 { ac_try='test -s conftest$ac_exeext'
2728 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2729 (eval $ac_try) 2>&5
2730 ac_status=$?
2731 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2732 (exit $ac_status); }; }; then
2733 ac_cv_search_strerror="-l$ac_lib"
2734break
4e8d927d 2735else
b4e70030
JB
2736 echo "$as_me: failed program was:" >&5
2737sed 's/^/| /' conftest.$ac_ext >&5
2738
2739fi
2740rm -f conftest.err conftest.$ac_objext \
2741 conftest$ac_exeext conftest.$ac_ext
2742 done
c906108c 2743fi
bec39cab 2744LIBS=$ac_func_search_save_LIBS
c906108c 2745fi
b4e70030
JB
2746echo "$as_me:$LINENO: result: $ac_cv_search_strerror" >&5
2747echo "${ECHO_T}$ac_cv_search_strerror" >&6
2748if test "$ac_cv_search_strerror" != no; then
2749 test "$ac_cv_search_strerror" = "none required" || LIBS="$ac_cv_search_strerror $LIBS"
bec39cab 2750
c906108c
SS
2751fi
2752
783e057b
DJ
2753if test -n "$ac_tool_prefix"; then
2754 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
2755set dummy ${ac_tool_prefix}ranlib; ac_word=$2
2756echo "$as_me:$LINENO: checking for $ac_word" >&5
2757echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2758if test "${ac_cv_prog_RANLIB+set}" = set; then
2759 echo $ECHO_N "(cached) $ECHO_C" >&6
2760else
2761 if test -n "$RANLIB"; then
2762 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
2763else
2764as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2765for as_dir in $PATH
2766do
2767 IFS=$as_save_IFS
2768 test -z "$as_dir" && as_dir=.
2769 for ac_exec_ext in '' $ac_executable_extensions; do
2770 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2771 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
2772 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2773 break 2
2774 fi
2775done
2776done
c906108c 2777
783e057b
DJ
2778fi
2779fi
2780RANLIB=$ac_cv_prog_RANLIB
2781if test -n "$RANLIB"; then
2782 echo "$as_me:$LINENO: result: $RANLIB" >&5
2783echo "${ECHO_T}$RANLIB" >&6
2784else
2785 echo "$as_me:$LINENO: result: no" >&5
2786echo "${ECHO_T}no" >&6
2787fi
bec39cab 2788
783e057b
DJ
2789fi
2790if test -z "$ac_cv_prog_RANLIB"; then
2791 ac_ct_RANLIB=$RANLIB
2792 # Extract the first word of "ranlib", so it can be a program name with args.
2793set dummy ranlib; ac_word=$2
2794echo "$as_me:$LINENO: checking for $ac_word" >&5
2795echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2796if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
bec39cab 2797 echo $ECHO_N "(cached) $ECHO_C" >&6
c906108c 2798else
783e057b
DJ
2799 if test -n "$ac_ct_RANLIB"; then
2800 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
2801else
2802as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2803for as_dir in $PATH
bec39cab 2804do
783e057b
DJ
2805 IFS=$as_save_IFS
2806 test -z "$as_dir" && as_dir=.
2807 for ac_exec_ext in '' $ac_executable_extensions; do
2808 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2809 ac_cv_prog_ac_ct_RANLIB="ranlib"
2810 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2811 break 2
2812 fi
2813done
2814done
2815
2816 test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB=":"
2817fi
2818fi
2819ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
2820if test -n "$ac_ct_RANLIB"; then
2821 echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5
2822echo "${ECHO_T}$ac_ct_RANLIB" >&6
2823else
2824 echo "$as_me:$LINENO: result: no" >&5
2825echo "${ECHO_T}no" >&6
2826fi
2827
2828 RANLIB=$ac_ct_RANLIB
2829else
2830 RANLIB="$ac_cv_prog_RANLIB"
2831fi
2832
2833echo "$as_me:$LINENO: checking for ANSI C header files" >&5
2834echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
2835if test "${ac_cv_header_stdc+set}" = set; then
2836 echo $ECHO_N "(cached) $ECHO_C" >&6
2837else
bec39cab
AC
2838 cat >conftest.$ac_ext <<_ACEOF
2839/* confdefs.h. */
2840_ACEOF
2841cat confdefs.h >>conftest.$ac_ext
2842cat >>conftest.$ac_ext <<_ACEOF
2843/* end confdefs.h. */
783e057b 2844#include <stdlib.h>
bec39cab 2845#include <stdarg.h>
783e057b
DJ
2846#include <string.h>
2847#include <float.h>
c906108c 2848
bec39cab
AC
2849int
2850main ()
2851{
c906108c 2852
bec39cab
AC
2853 ;
2854 return 0;
2855}
2856_ACEOF
2857rm -f conftest.$ac_objext
2858if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2859 (eval $ac_compile) 2>conftest.er1
2860 ac_status=$?
2861 grep -v '^ *+' conftest.er1 >conftest.err
2862 rm -f conftest.er1
2863 cat conftest.err >&5
2864 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2865 (exit $ac_status); } &&
b4e70030
JB
2866 { ac_try='test -z "$ac_c_werror_flag"
2867 || test ! -s conftest.err'
bec39cab
AC
2868 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2869 (eval $ac_try) 2>&5
2870 ac_status=$?
2871 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2872 (exit $ac_status); }; } &&
2873 { ac_try='test -s conftest.$ac_objext'
2874 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2875 (eval $ac_try) 2>&5
2876 ac_status=$?
2877 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2878 (exit $ac_status); }; }; then
783e057b 2879 ac_cv_header_stdc=yes
c906108c 2880else
bec39cab
AC
2881 echo "$as_me: failed program was:" >&5
2882sed 's/^/| /' conftest.$ac_ext >&5
c906108c 2883
783e057b 2884ac_cv_header_stdc=no
c906108c 2885fi
bec39cab 2886rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c 2887
783e057b
DJ
2888if test $ac_cv_header_stdc = yes; then
2889 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
2890 cat >conftest.$ac_ext <<_ACEOF
2891/* confdefs.h. */
2892_ACEOF
2893cat confdefs.h >>conftest.$ac_ext
2894cat >>conftest.$ac_ext <<_ACEOF
2895/* end confdefs.h. */
2896#include <string.h>
c906108c 2897
783e057b
DJ
2898_ACEOF
2899if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2900 $EGREP "memchr" >/dev/null 2>&1; then
2901 :
c906108c 2902else
783e057b 2903 ac_cv_header_stdc=no
c906108c 2904fi
783e057b 2905rm -f conftest*
c906108c
SS
2906
2907fi
2908
783e057b
DJ
2909if test $ac_cv_header_stdc = yes; then
2910 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
2911 cat >conftest.$ac_ext <<_ACEOF
2912/* confdefs.h. */
2913_ACEOF
2914cat confdefs.h >>conftest.$ac_ext
2915cat >>conftest.$ac_ext <<_ACEOF
2916/* end confdefs.h. */
2917#include <stdlib.h>
bec39cab 2918
783e057b
DJ
2919_ACEOF
2920if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2921 $EGREP "free" >/dev/null 2>&1; then
2922 :
bec39cab 2923else
783e057b 2924 ac_cv_header_stdc=no
bec39cab 2925fi
783e057b 2926rm -f conftest*
bec39cab
AC
2927
2928fi
bec39cab 2929
783e057b
DJ
2930if test $ac_cv_header_stdc = yes; then
2931 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
2932 if test "$cross_compiling" = yes; then
2933 :
bec39cab 2934else
783e057b
DJ
2935 cat >conftest.$ac_ext <<_ACEOF
2936/* confdefs.h. */
2937_ACEOF
2938cat confdefs.h >>conftest.$ac_ext
2939cat >>conftest.$ac_ext <<_ACEOF
2940/* end confdefs.h. */
2941#include <ctype.h>
2942#if ((' ' & 0x0FF) == 0x020)
2943# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
2944# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
2945#else
2946# define ISLOWER(c) \
2947 (('a' <= (c) && (c) <= 'i') \
2948 || ('j' <= (c) && (c) <= 'r') \
2949 || ('s' <= (c) && (c) <= 'z'))
2950# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
2951#endif
2952
2953#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
2954int
2955main ()
2956{
2957 int i;
2958 for (i = 0; i < 256; i++)
2959 if (XOR (islower (i), ISLOWER (i))
2960 || toupper (i) != TOUPPER (i))
2961 exit(2);
2962 exit (0);
2963}
2964_ACEOF
2965rm -f conftest$ac_exeext
2966if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
2967 (eval $ac_link) 2>&5
2968 ac_status=$?
2969 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2970 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
2971 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2972 (eval $ac_try) 2>&5
2973 ac_status=$?
2974 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2975 (exit $ac_status); }; }; then
2976 :
2977else
2978 echo "$as_me: program exited with status $ac_status" >&5
2979echo "$as_me: failed program was:" >&5
2980sed 's/^/| /' conftest.$ac_ext >&5
2981
2982( exit $ac_status )
2983ac_cv_header_stdc=no
2984fi
2985rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
2986fi
2987fi
2988fi
2989echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
2990echo "${ECHO_T}$ac_cv_header_stdc" >&6
2991if test $ac_cv_header_stdc = yes; then
2992
2993cat >>confdefs.h <<\_ACEOF
2994#define STDC_HEADERS 1
2995_ACEOF
2996
2997fi
2998
2999# On IRIX 5.3, sys/types and inttypes.h are conflicting.
3000
3001
3002
3003
3004
3005
3006
3007
3008
3009for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
3010 inttypes.h stdint.h unistd.h
3011do
3012as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
3013echo "$as_me:$LINENO: checking for $ac_header" >&5
3014echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
3015if eval "test \"\${$as_ac_Header+set}\" = set"; then
3016 echo $ECHO_N "(cached) $ECHO_C" >&6
3017else
3018 cat >conftest.$ac_ext <<_ACEOF
3019/* confdefs.h. */
3020_ACEOF
3021cat confdefs.h >>conftest.$ac_ext
3022cat >>conftest.$ac_ext <<_ACEOF
3023/* end confdefs.h. */
3024$ac_includes_default
3025
3026#include <$ac_header>
3027_ACEOF
3028rm -f conftest.$ac_objext
3029if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3030 (eval $ac_compile) 2>conftest.er1
3031 ac_status=$?
3032 grep -v '^ *+' conftest.er1 >conftest.err
3033 rm -f conftest.er1
3034 cat conftest.err >&5
3035 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3036 (exit $ac_status); } &&
3037 { ac_try='test -z "$ac_c_werror_flag"
3038 || test ! -s conftest.err'
3039 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3040 (eval $ac_try) 2>&5
3041 ac_status=$?
3042 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3043 (exit $ac_status); }; } &&
3044 { ac_try='test -s conftest.$ac_objext'
3045 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3046 (eval $ac_try) 2>&5
3047 ac_status=$?
3048 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3049 (exit $ac_status); }; }; then
3050 eval "$as_ac_Header=yes"
3051else
3052 echo "$as_me: failed program was:" >&5
3053sed 's/^/| /' conftest.$ac_ext >&5
3054
3055eval "$as_ac_Header=no"
3056fi
3057rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
3058fi
3059echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
3060echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
3061if test `eval echo '${'$as_ac_Header'}'` = yes; then
3062 cat >>confdefs.h <<_ACEOF
3063#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
3064_ACEOF
3065
3066fi
3067
3068done
3069
3070
3071
3072 if test "${ac_cv_header_minix_config_h+set}" = set; then
3073 echo "$as_me:$LINENO: checking for minix/config.h" >&5
3074echo $ECHO_N "checking for minix/config.h... $ECHO_C" >&6
3075if test "${ac_cv_header_minix_config_h+set}" = set; then
3076 echo $ECHO_N "(cached) $ECHO_C" >&6
3077fi
3078echo "$as_me:$LINENO: result: $ac_cv_header_minix_config_h" >&5
3079echo "${ECHO_T}$ac_cv_header_minix_config_h" >&6
3080else
3081 # Is the header compilable?
3082echo "$as_me:$LINENO: checking minix/config.h usability" >&5
3083echo $ECHO_N "checking minix/config.h usability... $ECHO_C" >&6
3084cat >conftest.$ac_ext <<_ACEOF
3085/* confdefs.h. */
3086_ACEOF
3087cat confdefs.h >>conftest.$ac_ext
3088cat >>conftest.$ac_ext <<_ACEOF
3089/* end confdefs.h. */
3090$ac_includes_default
3091#include <minix/config.h>
3092_ACEOF
3093rm -f conftest.$ac_objext
3094if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3095 (eval $ac_compile) 2>conftest.er1
3096 ac_status=$?
3097 grep -v '^ *+' conftest.er1 >conftest.err
3098 rm -f conftest.er1
3099 cat conftest.err >&5
3100 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3101 (exit $ac_status); } &&
3102 { ac_try='test -z "$ac_c_werror_flag"
3103 || test ! -s conftest.err'
3104 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3105 (eval $ac_try) 2>&5
3106 ac_status=$?
3107 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3108 (exit $ac_status); }; } &&
3109 { ac_try='test -s conftest.$ac_objext'
3110 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3111 (eval $ac_try) 2>&5
3112 ac_status=$?
3113 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3114 (exit $ac_status); }; }; then
3115 ac_header_compiler=yes
3116else
3117 echo "$as_me: failed program was:" >&5
3118sed 's/^/| /' conftest.$ac_ext >&5
3119
3120ac_header_compiler=no
3121fi
3122rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
3123echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
3124echo "${ECHO_T}$ac_header_compiler" >&6
3125
3126# Is the header present?
3127echo "$as_me:$LINENO: checking minix/config.h presence" >&5
3128echo $ECHO_N "checking minix/config.h presence... $ECHO_C" >&6
3129cat >conftest.$ac_ext <<_ACEOF
3130/* confdefs.h. */
3131_ACEOF
3132cat confdefs.h >>conftest.$ac_ext
3133cat >>conftest.$ac_ext <<_ACEOF
3134/* end confdefs.h. */
3135#include <minix/config.h>
3136_ACEOF
3137if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
3138 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
3139 ac_status=$?
3140 grep -v '^ *+' conftest.er1 >conftest.err
3141 rm -f conftest.er1
3142 cat conftest.err >&5
3143 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3144 (exit $ac_status); } >/dev/null; then
3145 if test -s conftest.err; then
3146 ac_cpp_err=$ac_c_preproc_warn_flag
3147 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
3148 else
3149 ac_cpp_err=
3150 fi
3151else
3152 ac_cpp_err=yes
3153fi
3154if test -z "$ac_cpp_err"; then
3155 ac_header_preproc=yes
3156else
3157 echo "$as_me: failed program was:" >&5
3158sed 's/^/| /' conftest.$ac_ext >&5
3159
3160 ac_header_preproc=no
3161fi
3162rm -f conftest.err conftest.$ac_ext
3163echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
3164echo "${ECHO_T}$ac_header_preproc" >&6
3165
3166# So? What about this header?
3167case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
3168 yes:no: )
3169 { echo "$as_me:$LINENO: WARNING: minix/config.h: accepted by the compiler, rejected by the preprocessor!" >&5
3170echo "$as_me: WARNING: minix/config.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
3171 { echo "$as_me:$LINENO: WARNING: minix/config.h: proceeding with the compiler's result" >&5
3172echo "$as_me: WARNING: minix/config.h: proceeding with the compiler's result" >&2;}
3173 ac_header_preproc=yes
3174 ;;
3175 no:yes:* )
3176 { echo "$as_me:$LINENO: WARNING: minix/config.h: present but cannot be compiled" >&5
3177echo "$as_me: WARNING: minix/config.h: present but cannot be compiled" >&2;}
3178 { echo "$as_me:$LINENO: WARNING: minix/config.h: check for missing prerequisite headers?" >&5
3179echo "$as_me: WARNING: minix/config.h: check for missing prerequisite headers?" >&2;}
3180 { echo "$as_me:$LINENO: WARNING: minix/config.h: see the Autoconf documentation" >&5
3181echo "$as_me: WARNING: minix/config.h: see the Autoconf documentation" >&2;}
3182 { echo "$as_me:$LINENO: WARNING: minix/config.h: section \"Present But Cannot Be Compiled\"" >&5
3183echo "$as_me: WARNING: minix/config.h: section \"Present But Cannot Be Compiled\"" >&2;}
3184 { echo "$as_me:$LINENO: WARNING: minix/config.h: proceeding with the preprocessor's result" >&5
3185echo "$as_me: WARNING: minix/config.h: proceeding with the preprocessor's result" >&2;}
3186 { echo "$as_me:$LINENO: WARNING: minix/config.h: in the future, the compiler will take precedence" >&5
3187echo "$as_me: WARNING: minix/config.h: in the future, the compiler will take precedence" >&2;}
3188 (
3189 cat <<\_ASBOX
3190## ------------------------------------------ ##
3191## Report this to the AC_PACKAGE_NAME lists. ##
3192## ------------------------------------------ ##
3193_ASBOX
3194 ) |
3195 sed "s/^/$as_me: WARNING: /" >&2
3196 ;;
3197esac
3198echo "$as_me:$LINENO: checking for minix/config.h" >&5
3199echo $ECHO_N "checking for minix/config.h... $ECHO_C" >&6
3200if test "${ac_cv_header_minix_config_h+set}" = set; then
3201 echo $ECHO_N "(cached) $ECHO_C" >&6
3202else
3203 ac_cv_header_minix_config_h=$ac_header_preproc
3204fi
3205echo "$as_me:$LINENO: result: $ac_cv_header_minix_config_h" >&5
3206echo "${ECHO_T}$ac_cv_header_minix_config_h" >&6
3207
3208fi
3209if test $ac_cv_header_minix_config_h = yes; then
3210 MINIX=yes
3211else
3212 MINIX=
3213fi
3214
3215
3216 if test "$MINIX" = yes; then
3217
3218cat >>confdefs.h <<\_ACEOF
3219#define _POSIX_SOURCE 1
3220_ACEOF
3221
3222
3223cat >>confdefs.h <<\_ACEOF
3224#define _POSIX_1_SOURCE 2
3225_ACEOF
3226
3227
3228cat >>confdefs.h <<\_ACEOF
3229#define _MINIX 1
3230_ACEOF
3231
3232 fi
3233
3234
3235
3236 echo "$as_me:$LINENO: checking whether it is safe to define __EXTENSIONS__" >&5
3237echo $ECHO_N "checking whether it is safe to define __EXTENSIONS__... $ECHO_C" >&6
3238if test "${ac_cv_safe_to_define___extensions__+set}" = set; then
3239 echo $ECHO_N "(cached) $ECHO_C" >&6
3240else
3241 cat >conftest.$ac_ext <<_ACEOF
3242/* confdefs.h. */
3243_ACEOF
3244cat confdefs.h >>conftest.$ac_ext
3245cat >>conftest.$ac_ext <<_ACEOF
3246/* end confdefs.h. */
3247
3248# define __EXTENSIONS__ 1
3249 $ac_includes_default
3250int
3251main ()
3252{
3253
3254 ;
3255 return 0;
3256}
3257_ACEOF
3258rm -f conftest.$ac_objext
3259if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3260 (eval $ac_compile) 2>conftest.er1
3261 ac_status=$?
3262 grep -v '^ *+' conftest.er1 >conftest.err
3263 rm -f conftest.er1
3264 cat conftest.err >&5
3265 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3266 (exit $ac_status); } &&
3267 { ac_try='test -z "$ac_c_werror_flag"
3268 || test ! -s conftest.err'
3269 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3270 (eval $ac_try) 2>&5
3271 ac_status=$?
3272 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3273 (exit $ac_status); }; } &&
3274 { ac_try='test -s conftest.$ac_objext'
3275 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3276 (eval $ac_try) 2>&5
3277 ac_status=$?
3278 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3279 (exit $ac_status); }; }; then
3280 ac_cv_safe_to_define___extensions__=yes
3281else
3282 echo "$as_me: failed program was:" >&5
3283sed 's/^/| /' conftest.$ac_ext >&5
3284
3285ac_cv_safe_to_define___extensions__=no
3286fi
3287rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
3288fi
3289echo "$as_me:$LINENO: result: $ac_cv_safe_to_define___extensions__" >&5
3290echo "${ECHO_T}$ac_cv_safe_to_define___extensions__" >&6
3291 test $ac_cv_safe_to_define___extensions__ = yes &&
3292 cat >>confdefs.h <<\_ACEOF
3293#define __EXTENSIONS__ 1
3294_ACEOF
3295
3296 cat >>confdefs.h <<\_ACEOF
3297#define _ALL_SOURCE 1
3298_ACEOF
3299
3300 cat >>confdefs.h <<\_ACEOF
3301#define _GNU_SOURCE 1
3302_ACEOF
3303
3304 cat >>confdefs.h <<\_ACEOF
3305#define _POSIX_PTHREAD_SEMANTICS 1
3306_ACEOF
3307
3308 cat >>confdefs.h <<\_ACEOF
3309#define _TANDEM_SOURCE 1
3310_ACEOF
3311
3312
3313
3314
3315
3316
3317
3318
3319
3320
3321echo "$as_me:$LINENO: checking for ${CC-cc} option to accept ANSI C" >&5
3322echo $ECHO_N "checking for ${CC-cc} option to accept ANSI C... $ECHO_C" >&6
3323if test "${am_cv_prog_cc_stdc+set}" = set; then
3324 echo $ECHO_N "(cached) $ECHO_C" >&6
3325else
3326 am_cv_prog_cc_stdc=no
3327ac_save_CC="$CC"
3328# Don't try gcc -ansi; that turns off useful extensions and
3329# breaks some systems' header files.
3330# AIX -qlanglvl=ansi
3331# Ultrix and OSF/1 -std1
3332# HP-UX 10.20 and later -Ae
3333# HP-UX older versions -Aa -D_HPUX_SOURCE
3334# SVR4 -Xc -D__EXTENSIONS__
3335for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
3336do
3337 CC="$ac_save_CC $ac_arg"
3338 cat >conftest.$ac_ext <<_ACEOF
3339/* confdefs.h. */
3340_ACEOF
3341cat confdefs.h >>conftest.$ac_ext
3342cat >>conftest.$ac_ext <<_ACEOF
3343/* end confdefs.h. */
3344#include <stdarg.h>
3345#include <stdio.h>
3346#include <sys/types.h>
3347#include <sys/stat.h>
3348/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
3349struct buf { int x; };
3350FILE * (*rcsopen) (struct buf *, struct stat *, int);
3351static char *e (p, i)
3352 char **p;
3353 int i;
3354{
3355 return p[i];
3356}
3357static char *f (char * (*g) (char **, int), char **p, ...)
3358{
3359 char *s;
3360 va_list v;
3361 va_start (v,p);
3362 s = g (p, va_arg (v,int));
3363 va_end (v);
3364 return s;
3365}
3366int test (int i, double x);
3367struct s1 {int (*f) (int a);};
3368struct s2 {int (*f) (double a);};
3369int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
3370int argc;
3371char **argv;
3372
3373int
3374main ()
3375{
3376
3377return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
3378
3379 ;
3380 return 0;
3381}
3382_ACEOF
3383rm -f conftest.$ac_objext
3384if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3385 (eval $ac_compile) 2>conftest.er1
3386 ac_status=$?
3387 grep -v '^ *+' conftest.er1 >conftest.err
3388 rm -f conftest.er1
3389 cat conftest.err >&5
3390 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3391 (exit $ac_status); } &&
3392 { ac_try='test -z "$ac_c_werror_flag"
3393 || test ! -s conftest.err'
3394 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3395 (eval $ac_try) 2>&5
3396 ac_status=$?
3397 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3398 (exit $ac_status); }; } &&
3399 { ac_try='test -s conftest.$ac_objext'
3400 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3401 (eval $ac_try) 2>&5
3402 ac_status=$?
3403 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3404 (exit $ac_status); }; }; then
3405 am_cv_prog_cc_stdc="$ac_arg"; break
3406else
3407 echo "$as_me: failed program was:" >&5
3408sed 's/^/| /' conftest.$ac_ext >&5
3409
3410fi
3411rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
3412done
3413CC="$ac_save_CC"
3414
3415fi
3416
3417if test -z "$am_cv_prog_cc_stdc"; then
3418 echo "$as_me:$LINENO: result: none needed" >&5
3419echo "${ECHO_T}none needed" >&6
3420else
3421 echo "$as_me:$LINENO: result: $am_cv_prog_cc_stdc" >&5
3422echo "${ECHO_T}$am_cv_prog_cc_stdc" >&6
3423fi
3424case "x$am_cv_prog_cc_stdc" in
3425 x|xno) ;;
3426 *) CC="$CC $am_cv_prog_cc_stdc" ;;
3427esac
3428
3429
3430ac_aux_dir=
3431for ac_dir in .. $srcdir/..; do
3432 if test -f $ac_dir/install-sh; then
3433 ac_aux_dir=$ac_dir
3434 ac_install_sh="$ac_aux_dir/install-sh -c"
3435 break
3436 elif test -f $ac_dir/install.sh; then
3437 ac_aux_dir=$ac_dir
3438 ac_install_sh="$ac_aux_dir/install.sh -c"
3439 break
3440 elif test -f $ac_dir/shtool; then
3441 ac_aux_dir=$ac_dir
3442 ac_install_sh="$ac_aux_dir/shtool install -c"
3443 break
3444 fi
3445done
3446if test -z "$ac_aux_dir"; then
3447 { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in .. $srcdir/.." >&5
3448echo "$as_me: error: cannot find install-sh or install.sh in .. $srcdir/.." >&2;}
3449 { (exit 1); exit 1; }; }
3450fi
3451ac_config_guess="$SHELL $ac_aux_dir/config.guess"
3452ac_config_sub="$SHELL $ac_aux_dir/config.sub"
3453ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
3454
3455# Make sure we can run config.sub.
3456$ac_config_sub sun4 >/dev/null 2>&1 ||
3457 { { echo "$as_me:$LINENO: error: cannot run $ac_config_sub" >&5
3458echo "$as_me: error: cannot run $ac_config_sub" >&2;}
3459 { (exit 1); exit 1; }; }
3460
3461echo "$as_me:$LINENO: checking build system type" >&5
3462echo $ECHO_N "checking build system type... $ECHO_C" >&6
3463if test "${ac_cv_build+set}" = set; then
3464 echo $ECHO_N "(cached) $ECHO_C" >&6
3465else
3466 ac_cv_build_alias=$build_alias
3467test -z "$ac_cv_build_alias" &&
3468 ac_cv_build_alias=`$ac_config_guess`
3469test -z "$ac_cv_build_alias" &&
3470 { { echo "$as_me:$LINENO: error: cannot guess build type; you must specify one" >&5
3471echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
3472 { (exit 1); exit 1; }; }
3473ac_cv_build=`$ac_config_sub $ac_cv_build_alias` ||
3474 { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_build_alias failed" >&5
3475echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed" >&2;}
3476 { (exit 1); exit 1; }; }
3477
3478fi
3479echo "$as_me:$LINENO: result: $ac_cv_build" >&5
3480echo "${ECHO_T}$ac_cv_build" >&6
3481build=$ac_cv_build
3482build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
3483build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
3484build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
3485
3486
3487echo "$as_me:$LINENO: checking host system type" >&5
3488echo $ECHO_N "checking host system type... $ECHO_C" >&6
3489if test "${ac_cv_host+set}" = set; then
3490 echo $ECHO_N "(cached) $ECHO_C" >&6
3491else
3492 ac_cv_host_alias=$host_alias
3493test -z "$ac_cv_host_alias" &&
3494 ac_cv_host_alias=$ac_cv_build_alias
3495ac_cv_host=`$ac_config_sub $ac_cv_host_alias` ||
3496 { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_host_alias failed" >&5
3497echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;}
3498 { (exit 1); exit 1; }; }
3499
3500fi
3501echo "$as_me:$LINENO: result: $ac_cv_host" >&5
3502echo "${ECHO_T}$ac_cv_host" >&6
3503host=$ac_cv_host
3504host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
3505host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
3506host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
3507
3508
3509echo "$as_me:$LINENO: checking target system type" >&5
3510echo $ECHO_N "checking target system type... $ECHO_C" >&6
3511if test "${ac_cv_target+set}" = set; then
3512 echo $ECHO_N "(cached) $ECHO_C" >&6
3513else
3514 ac_cv_target_alias=$target_alias
3515test "x$ac_cv_target_alias" = "x" &&
b4e70030
JB
3516 ac_cv_target_alias=$ac_cv_host_alias
3517ac_cv_target=`$ac_config_sub $ac_cv_target_alias` ||
3518 { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_target_alias failed" >&5
3519echo "$as_me: error: $ac_config_sub $ac_cv_target_alias failed" >&2;}
bec39cab
AC
3520 { (exit 1); exit 1; }; }
3521
3522fi
783e057b
DJ
3523echo "$as_me:$LINENO: result: $ac_cv_target" >&5
3524echo "${ECHO_T}$ac_cv_target" >&6
3525target=$ac_cv_target
3526target_cpu=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
3527target_vendor=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
3528target_os=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
3529
3530
3531# The aliases save the names the user supplied, while $host etc.
3532# will get canonicalized.
3533test -n "$target_alias" &&
3534 test "$program_prefix$program_suffix$program_transform_name" = \
3535 NONENONEs,x,x, &&
3536 program_prefix=${target_alias}-
3537
a417dc56
RW
3538# Dependency checking.
3539rm -rf .tst 2>/dev/null
3540mkdir .tst 2>/dev/null
3541if test -d .tst; then
3542 am__leading_dot=.
3543else
3544 am__leading_dot=_
3545fi
3546rmdir .tst 2>/dev/null
3547
3548DEPDIR="${am__leading_dot}deps"
3549
3550 ac_config_commands="$ac_config_commands depdir"
3551
3552
3553depcc="$CC" am_compiler_list=
3554
3555am_depcomp=$ac_aux_dir/depcomp
3556echo "$as_me:$LINENO: checking dependency style of $depcc" >&5
3557echo $ECHO_N "checking dependency style of $depcc... $ECHO_C" >&6
3558if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then
3559 echo $ECHO_N "(cached) $ECHO_C" >&6
3560else
3561 if test -f "$am_depcomp"; then
3562 # We make a subdir and do the tests there. Otherwise we can end up
3563 # making bogus files that we don't know about and never remove. For
3564 # instance it was reported that on HP-UX the gcc test will end up
3565 # making a dummy file named `D' -- because `-MD' means `put the output
3566 # in D'.
3567 mkdir conftest.dir
3568 # Copy depcomp to subdir because otherwise we won't find it if we're
3569 # using a relative directory.
3570 cp "$am_depcomp" conftest.dir
3571 cd conftest.dir
3572 # We will build objects and dependencies in a subdirectory because
3573 # it helps to detect inapplicable dependency modes. For instance
3574 # both Tru64's cc and ICC support -MD to output dependencies as a
3575 # side effect of compilation, but ICC will put the dependencies in
3576 # the current directory while Tru64 will put them in the object
3577 # directory.
3578 mkdir sub
3579
3580 am_cv_CC_dependencies_compiler_type=none
3581 if test "$am_compiler_list" = ""; then
3582 am_compiler_list=`sed -n 's/^\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
3583 fi
3584 for depmode in $am_compiler_list; do
3585 if test $depmode = none; then break; fi
3586
3587 echo "$as_me:$LINENO: trying $depmode" >&5
3588 # Setup a source with many dependencies, because some compilers
3589 # like to wrap large dependency lists on column 80 (with \), and
3590 # we should not choose a depcomp mode which is confused by this.
3591 #
3592 # We need to recreate these files for each test, as the compiler may
3593 # overwrite some of them when testing with obscure command lines.
3594 # This happens at least with the AIX C compiler.
3595 : > sub/conftest.c
3596 for i in 1 2 3 4 5 6; do
3597 echo '#include "conftst'$i'.h"' >> sub/conftest.c
3598 # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
3599 # Solaris 8's {/usr,}/bin/sh.
3600 touch sub/conftst$i.h
3601 done
3602 echo "include sub/conftest.Po" > confmf
3603
3604 # We check with `-c' and `-o' for the sake of the "dashmstdout"
3605 # mode. It turns out that the SunPro C++ compiler does not properly
3606 # handle `-M -o', and we need to detect this.
3607 depcmd="depmode=$depmode \
3608 source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
3609 depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
3610 $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c"
3611 echo "| $depcmd" | sed -e 's/ */ /g' >&5
3612 if env $depcmd > conftest.err 2>&1 &&
3613 grep sub/conftst6.h sub/conftest.Po >>conftest.err 2>&1 &&
3614 grep sub/conftest.${OBJEXT-o} sub/conftest.Po >>conftest.err 2>&1 &&
3615 ${MAKE-make} -s -f confmf >>conftest.err 2>&1; then
3616 # icc doesn't choke on unknown options, it will just issue warnings
3617 # or remarks (even with -Werror). So we grep stderr for any message
3618 # that says an option was ignored or not supported.
3619 # When given -MP, icc 7.0 and 7.1 complain thusly:
3620 # icc: Command line warning: ignoring option '-M'; no argument required
3621 # The diagnosis changed in icc 8.0:
3622 # icc: Command line remark: option '-MP' not supported
3623 if (grep 'ignoring option' conftest.err ||
3624 grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
3625 am_cv_CC_dependencies_compiler_type=$depmode
3626 echo "$as_me:$LINENO: success" >&5
3627 break
3628 fi
3629 fi
3630 echo "$as_me:$LINENO: failure, diagnostics are:" >&5
3631 sed -e 's/^/| /' < conftest.err >&5
3632 done
3633
3634 cd ..
3635 rm -rf conftest.dir
3636else
3637 am_cv_CC_dependencies_compiler_type=none
3638fi
3639
3640fi
3641echo "$as_me:$LINENO: result: $am_cv_CC_dependencies_compiler_type" >&5
3642echo "${ECHO_T}$am_cv_CC_dependencies_compiler_type" >&6
3643if test x${am_cv_CC_dependencies_compiler_type-none} = xnone
3644then { { echo "$as_me:$LINENO: error: no usable dependency style found" >&5
3645echo "$as_me: error: no usable dependency style found" >&2;}
3646 { (exit 1); exit 1; }; }
3647else CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type
3648
3649fi
3650
3651
3652# Check for the 'make' the user wants to use.
3653for ac_prog in make
3654do
3655 # Extract the first word of "$ac_prog", so it can be a program name with args.
3656set dummy $ac_prog; ac_word=$2
3657echo "$as_me:$LINENO: checking for $ac_word" >&5
3658echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3659if test "${ac_cv_prog_MAKE+set}" = set; then
3660 echo $ECHO_N "(cached) $ECHO_C" >&6
3661else
3662 if test -n "$MAKE"; then
3663 ac_cv_prog_MAKE="$MAKE" # Let the user override the test.
3664else
3665as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3666for as_dir in $PATH
3667do
3668 IFS=$as_save_IFS
3669 test -z "$as_dir" && as_dir=.
3670 for ac_exec_ext in '' $ac_executable_extensions; do
3671 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3672 ac_cv_prog_MAKE="$ac_prog"
3673 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3674 break 2
3675 fi
3676done
3677done
3678
3679fi
3680fi
3681MAKE=$ac_cv_prog_MAKE
3682if test -n "$MAKE"; then
3683 echo "$as_me:$LINENO: result: $MAKE" >&5
3684echo "${ECHO_T}$MAKE" >&6
3685else
3686 echo "$as_me:$LINENO: result: no" >&5
3687echo "${ECHO_T}no" >&6
3688fi
3689
3690 test -n "$MAKE" && break
3691done
3692
3693MAKE_IS_GNU=
3694case "`$MAKE --version 2>&1 | sed 1q`" in
3695 *GNU*)
3696 MAKE_IS_GNU=yes
3697 ;;
3698esac
3699
3700
3701if test "$MAKE_IS_GNU" = yes; then
3702 GMAKE_TRUE=
3703 GMAKE_FALSE='#'
3704else
3705 GMAKE_TRUE='#'
3706 GMAKE_FALSE=
3707fi
3708
3709echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5
3710echo $ECHO_N "checking whether ${MAKE-make} sets \$(MAKE)... $ECHO_C" >&6
3711set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,:./+-,___p_,'`
3712if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
3713 echo $ECHO_N "(cached) $ECHO_C" >&6
3714else
3715 cat >conftest.make <<\_ACEOF
3716all:
3717 @echo 'ac_maketemp="$(MAKE)"'
3718_ACEOF
3719# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
3720eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=`
3721if test -n "$ac_maketemp"; then
3722 eval ac_cv_prog_make_${ac_make}_set=yes
3723else
3724 eval ac_cv_prog_make_${ac_make}_set=no
3725fi
3726rm -f conftest.make
3727fi
3728if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
3729 echo "$as_me:$LINENO: result: yes" >&5
3730echo "${ECHO_T}yes" >&6
3731 SET_MAKE=
3732else
3733 echo "$as_me:$LINENO: result: no" >&5
3734echo "${ECHO_T}no" >&6
3735 SET_MAKE="MAKE=${MAKE-make}"
3736fi
3737
3738
783e057b
DJ
3739
3740CONFIG_OBS=
3741CONFIG_DEPS=
3742CONFIG_SRCS=
3743ENABLE_CFLAGS=
3744
3745CONFIG_ALL=
3746CONFIG_CLEAN=
3747CONFIG_INSTALL=
3748CONFIG_UNINSTALL=
3749
3750# If we haven't got the data from the intl directory,
3751# assume NLS is disabled.
3752USE_NLS=no
3753LIBINTL=
3754LIBINTL_DEP=
3755INCINTL=
3756XGETTEXT=
3757GMSGFMT=
3758POSUB=
3759
3760if test -f ../intl/config.intl; then
3761 . ../intl/config.intl
3762fi
3763echo "$as_me:$LINENO: checking whether NLS is requested" >&5
3764echo $ECHO_N "checking whether NLS is requested... $ECHO_C" >&6
3765if test x"$USE_NLS" != xyes; then
3766 echo "$as_me:$LINENO: result: no" >&5
3767echo "${ECHO_T}no" >&6
3768else
3769 echo "$as_me:$LINENO: result: yes" >&5
3770echo "${ECHO_T}yes" >&6
3771
3772cat >>confdefs.h <<\_ACEOF
3773#define ENABLE_NLS 1
3774_ACEOF
3775
3776
3777 echo "$as_me:$LINENO: checking for catalogs to be installed" >&5
3778echo $ECHO_N "checking for catalogs to be installed... $ECHO_C" >&6
3779 # Look for .po and .gmo files in the source directory.
3780 CATALOGS=
3781 XLINGUAS=
3782 for cat in $srcdir/po/*.gmo $srcdir/po/*.po; do
3783 # If there aren't any .gmo files the shell will give us the
3784 # literal string "../path/to/srcdir/po/*.gmo" which has to be
3785 # weeded out.
3786 case "$cat" in *\**)
3787 continue;;
3788 esac
3789 # The quadruple backslash is collapsed to a double backslash
3790 # by the backticks, then collapsed again by the double quotes,
3791 # leaving us with one backslash in the sed expression (right
3792 # before the dot that mustn't act as a wildcard).
3793 cat=`echo $cat | sed -e "s!$srcdir/po/!!" -e "s!\\\\.po!.gmo!"`
3794 lang=`echo $cat | sed -e "s!\\\\.gmo!!"`
3795 # The user is allowed to set LINGUAS to a list of languages to
3796 # install catalogs for. If it's empty that means "all of them."
3797 if test "x$LINGUAS" = x; then
3798 CATALOGS="$CATALOGS $cat"
3799 XLINGUAS="$XLINGUAS $lang"
3800 else
3801 case "$LINGUAS" in *$lang*)
3802 CATALOGS="$CATALOGS $cat"
3803 XLINGUAS="$XLINGUAS $lang"
3804 ;;
3805 esac
3806 fi
3807 done
3808 LINGUAS="$XLINGUAS"
3809 echo "$as_me:$LINENO: result: $LINGUAS" >&5
3810echo "${ECHO_T}$LINGUAS" >&6
3811
3812
3813 DATADIRNAME=share
3814
3815 INSTOBJEXT=.mo
3816
3817 GENCAT=gencat
3818
3819 CATOBJEXT=.gmo
3820
3821fi
3822
3823localedir='${datadir}/locale'
3824
3825
3826if test x"$USE_NLS" = xyes; then
3827 CONFIG_ALL="$CONFIG_ALL all-po"
3828 CONFIG_CLEAN="$CONFIG_CLEAN clean-po"
3829 CONFIG_INSTALL="$CONFIG_INSTALL install-po"
3830 CONFIG_UNINSTALL="$CONFIG_UNINSTALL uninstall-po"
3831fi
3832
3833
3834 GNULIB_MEMMEM=0;
3835 GNULIB_MEMPCPY=0;
3836 GNULIB_MEMRCHR=0;
3837 GNULIB_STPCPY=0;
3838 GNULIB_STPNCPY=0;
3839 GNULIB_STRCHRNUL=0;
3840 GNULIB_STRDUP=0;
3841 GNULIB_STRNDUP=0;
3842 GNULIB_STRNLEN=0;
3843 GNULIB_STRPBRK=0;
3844 GNULIB_STRSEP=0;
3845 GNULIB_STRSTR=0;
3846 GNULIB_STRCASESTR=0;
3847 GNULIB_STRTOK_R=0;
3848 GNULIB_MBSLEN=0;
3849 GNULIB_MBSNLEN=0;
3850 GNULIB_MBSCHR=0;
3851 GNULIB_MBSRCHR=0;
3852 GNULIB_MBSSTR=0;
3853 GNULIB_MBSCASECMP=0;
3854 GNULIB_MBSNCASECMP=0;
3855 GNULIB_MBSPCASECMP=0;
3856 GNULIB_MBSCASESTR=0;
3857 GNULIB_MBSCSPN=0;
3858 GNULIB_MBSPBRK=0;
3859 GNULIB_MBSSPN=0;
3860 GNULIB_MBSSEP=0;
3861 GNULIB_MBSTOK_R=0;
3862 GNULIB_STRERROR=0;
3863 GNULIB_STRSIGNAL=0;
3864 HAVE_DECL_MEMMEM=1;
3865 HAVE_MEMPCPY=1;
3866 HAVE_DECL_MEMRCHR=1;
3867 HAVE_STPCPY=1;
3868 HAVE_STPNCPY=1;
3869 HAVE_STRCHRNUL=1;
3870 HAVE_DECL_STRDUP=1;
3871 HAVE_STRNDUP=1;
3872 HAVE_DECL_STRNDUP=1;
3873 HAVE_DECL_STRNLEN=1;
3874 HAVE_STRPBRK=1;
3875 HAVE_STRSEP=1;
3876 HAVE_STRCASESTR=1;
3877 HAVE_DECL_STRTOK_R=1;
3878 HAVE_DECL_STRERROR=1;
3879 HAVE_DECL_STRSIGNAL=1;
3880 REPLACE_STRERROR=0;
3881 REPLACE_STRSIGNAL=0;
3882 REPLACE_MEMMEM=0;
3883 REPLACE_STRCASESTR=0;
3884 REPLACE_STRSTR=0;
3885
3886
3887 echo "$as_me:$LINENO: checking whether memmem is declared" >&5
3888echo $ECHO_N "checking whether memmem is declared... $ECHO_C" >&6
3889if test "${ac_cv_have_decl_memmem+set}" = set; then
3890 echo $ECHO_N "(cached) $ECHO_C" >&6
3891else
3892 cat >conftest.$ac_ext <<_ACEOF
3893/* confdefs.h. */
3894_ACEOF
3895cat confdefs.h >>conftest.$ac_ext
3896cat >>conftest.$ac_ext <<_ACEOF
3897/* end confdefs.h. */
3898$ac_includes_default
3899int
3900main ()
3901{
3902#ifndef memmem
3903 char *p = (char *) memmem;
3904#endif
3905
3906 ;
3907 return 0;
3908}
3909_ACEOF
3910rm -f conftest.$ac_objext
3911if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3912 (eval $ac_compile) 2>conftest.er1
3913 ac_status=$?
3914 grep -v '^ *+' conftest.er1 >conftest.err
3915 rm -f conftest.er1
3916 cat conftest.err >&5
3917 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3918 (exit $ac_status); } &&
3919 { ac_try='test -z "$ac_c_werror_flag"
3920 || test ! -s conftest.err'
3921 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3922 (eval $ac_try) 2>&5
3923 ac_status=$?
3924 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3925 (exit $ac_status); }; } &&
3926 { ac_try='test -s conftest.$ac_objext'
3927 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3928 (eval $ac_try) 2>&5
3929 ac_status=$?
3930 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3931 (exit $ac_status); }; }; then
3932 ac_cv_have_decl_memmem=yes
3933else
3934 echo "$as_me: failed program was:" >&5
3935sed 's/^/| /' conftest.$ac_ext >&5
3936
3937ac_cv_have_decl_memmem=no
3938fi
3939rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
3940fi
3941echo "$as_me:$LINENO: result: $ac_cv_have_decl_memmem" >&5
3942echo "${ECHO_T}$ac_cv_have_decl_memmem" >&6
3943if test $ac_cv_have_decl_memmem = yes; then
3944
3945cat >>confdefs.h <<_ACEOF
3946#define HAVE_DECL_MEMMEM 1
3947_ACEOF
3948
3949
3950else
3951 cat >>confdefs.h <<_ACEOF
3952#define HAVE_DECL_MEMMEM 0
3953_ACEOF
3954
3955
3956fi
3957
3958
3959
3960
3961
3962
3963
3964
3965
3966
3967
3968
3969
3970
3971
3972for ac_func in memmem
3973do
3974as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
3975echo "$as_me:$LINENO: checking for $ac_func" >&5
3976echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
3977if eval "test \"\${$as_ac_var+set}\" = set"; then
3978 echo $ECHO_N "(cached) $ECHO_C" >&6
3979else
3980 cat >conftest.$ac_ext <<_ACEOF
3981/* confdefs.h. */
3982_ACEOF
3983cat confdefs.h >>conftest.$ac_ext
3984cat >>conftest.$ac_ext <<_ACEOF
3985/* end confdefs.h. */
3986/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
3987 For example, HP-UX 11i <limits.h> declares gettimeofday. */
3988#define $ac_func innocuous_$ac_func
3989
3990/* System header to define __stub macros and hopefully few prototypes,
3991 which can conflict with char $ac_func (); below.
3992 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3993 <limits.h> exists even on freestanding compilers. */
3994
3995#ifdef __STDC__
3996# include <limits.h>
3997#else
3998# include <assert.h>
3999#endif
4000
4001#undef $ac_func
4002
4003/* Override any gcc2 internal prototype to avoid an error. */
4004#ifdef __cplusplus
4005extern "C"
4006{
4007#endif
4008/* We use char because int might match the return type of a gcc2
4009 builtin and then its argument prototype would still apply. */
4010char $ac_func ();
4011/* The GNU C library defines this for functions which it implements
4012 to always fail with ENOSYS. Some functions are actually named
4013 something starting with __ and the normal name is an alias. */
4014#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4015choke me
4016#else
4017char (*f) () = $ac_func;
4018#endif
4019#ifdef __cplusplus
4020}
4021#endif
4022
4023int
4024main ()
4025{
4026return f != $ac_func;
4027 ;
4028 return 0;
4029}
4030_ACEOF
4031rm -f conftest.$ac_objext conftest$ac_exeext
4032if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4033 (eval $ac_link) 2>conftest.er1
4034 ac_status=$?
4035 grep -v '^ *+' conftest.er1 >conftest.err
4036 rm -f conftest.er1
4037 cat conftest.err >&5
4038 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4039 (exit $ac_status); } &&
4040 { ac_try='test -z "$ac_c_werror_flag"
4041 || test ! -s conftest.err'
4042 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4043 (eval $ac_try) 2>&5
4044 ac_status=$?
4045 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4046 (exit $ac_status); }; } &&
4047 { ac_try='test -s conftest$ac_exeext'
4048 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4049 (eval $ac_try) 2>&5
4050 ac_status=$?
4051 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4052 (exit $ac_status); }; }; then
4053 eval "$as_ac_var=yes"
4054else
4055 echo "$as_me: failed program was:" >&5
4056sed 's/^/| /' conftest.$ac_ext >&5
4057
4058eval "$as_ac_var=no"
4059fi
4060rm -f conftest.err conftest.$ac_objext \
4061 conftest$ac_exeext conftest.$ac_ext
4062fi
4063echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
4064echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
4065if test `eval echo '${'$as_ac_var'}'` = yes; then
4066 cat >>confdefs.h <<_ACEOF
4067#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
4068_ACEOF
4069
4070else
4071
4072 gl_LIBOBJS="$gl_LIBOBJS $ac_func.$ac_objext"
4073
4074fi
4075done
4076
4077
4078
4079 :
4080
4081
4082
4083
4084
4085 if test $ac_cv_have_decl_memmem = no; then
4086 HAVE_DECL_MEMMEM=0
4087 fi
4088 :
4089
4090
4091 echo "$as_me:$LINENO: checking for long long int" >&5
4092echo $ECHO_N "checking for long long int... $ECHO_C" >&6
4093if test "${ac_cv_type_long_long_int+set}" = set; then
4094 echo $ECHO_N "(cached) $ECHO_C" >&6
4095else
4096 cat >conftest.$ac_ext <<_ACEOF
4097
4098 /* confdefs.h. */
4099_ACEOF
4100cat confdefs.h >>conftest.$ac_ext
4101cat >>conftest.$ac_ext <<_ACEOF
4102/* end confdefs.h. */
4103/* For now, do not test the preprocessor; as of 2007 there are too many
4104 implementations with broken preprocessors. Perhaps this can
4105 be revisited in 2012. In the meantime, code should not expect
4106 #if to work with literals wider than 32 bits. */
4107 /* Test literals. */
4108 long long int ll = 9223372036854775807ll;
4109 long long int nll = -9223372036854775807LL;
4110 unsigned long long int ull = 18446744073709551615ULL;
4111 /* Test constant expressions. */
4112 typedef int a[((-9223372036854775807LL < 0 && 0 < 9223372036854775807ll)
4113 ? 1 : -1)];
4114 typedef int b[(18446744073709551615ULL <= (unsigned long long int) -1
4115 ? 1 : -1)];
4116 int i = 63;
4117int
4118main ()
4119{
4120/* Test availability of runtime routines for shift and division. */
4121 long long int llmax = 9223372036854775807ll;
4122 unsigned long long int ullmax = 18446744073709551615ull;
4123 return ((ll << 63) | (ll >> 63) | (ll < i) | (ll > i)
4124 | (llmax / ll) | (llmax % ll)
4125 | (ull << 63) | (ull >> 63) | (ull << i) | (ull >> i)
4126 | (ullmax / ull) | (ullmax % ull));
4127 ;
4128 return 0;
4129}
4130
4131_ACEOF
4132rm -f conftest.$ac_objext conftest$ac_exeext
4133if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4134 (eval $ac_link) 2>conftest.er1
4135 ac_status=$?
4136 grep -v '^ *+' conftest.er1 >conftest.err
4137 rm -f conftest.er1
4138 cat conftest.err >&5
4139 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4140 (exit $ac_status); } &&
4141 { ac_try='test -z "$ac_c_werror_flag"
4142 || test ! -s conftest.err'
4143 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4144 (eval $ac_try) 2>&5
4145 ac_status=$?
4146 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4147 (exit $ac_status); }; } &&
4148 { ac_try='test -s conftest$ac_exeext'
4149 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4150 (eval $ac_try) 2>&5
4151 ac_status=$?
4152 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4153 (exit $ac_status); }; }; then
4154 if test "$cross_compiling" = yes; then
4155 ac_cv_type_long_long_int=yes
4156else
4157 cat >conftest.$ac_ext <<_ACEOF
4158/* confdefs.h. */
4159_ACEOF
4160cat confdefs.h >>conftest.$ac_ext
4161cat >>conftest.$ac_ext <<_ACEOF
4162/* end confdefs.h. */
4163#include <limits.h>
4164 #ifndef LLONG_MAX
4165 # define HALF \
4166 (1LL << (sizeof (long long int) * CHAR_BIT - 2))
4167 # define LLONG_MAX (HALF - 1 + HALF)
4168 #endif
4169int
4170main ()
4171{
4172long long int n = 1;
4173 int i;
4174 for (i = 0; ; i++)
4175 {
4176 long long int m = n << i;
4177 if (m >> i != n)
4178 return 1;
4179 if (LLONG_MAX / 2 < m)
4180 break;
4181 }
4182 return 0;
4183 ;
4184 return 0;
4185}
4186_ACEOF
4187rm -f conftest$ac_exeext
4188if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4189 (eval $ac_link) 2>&5
4190 ac_status=$?
4191 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4192 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
4193 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4194 (eval $ac_try) 2>&5
4195 ac_status=$?
4196 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4197 (exit $ac_status); }; }; then
4198 ac_cv_type_long_long_int=yes
4199else
4200 echo "$as_me: program exited with status $ac_status" >&5
4201echo "$as_me: failed program was:" >&5
4202sed 's/^/| /' conftest.$ac_ext >&5
4203
4204( exit $ac_status )
4205ac_cv_type_long_long_int=no
4206fi
4207rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
4208fi
4209else
4210 echo "$as_me: failed program was:" >&5
4211sed 's/^/| /' conftest.$ac_ext >&5
4212
4213ac_cv_type_long_long_int=no
4214fi
4215rm -f conftest.err conftest.$ac_objext \
4216 conftest$ac_exeext conftest.$ac_ext
4217fi
4218echo "$as_me:$LINENO: result: $ac_cv_type_long_long_int" >&5
4219echo "${ECHO_T}$ac_cv_type_long_long_int" >&6
4220 if test $ac_cv_type_long_long_int = yes; then
4221
4222cat >>confdefs.h <<\_ACEOF
4223#define HAVE_LONG_LONG_INT 1
4224_ACEOF
4225
4226 fi
4227
4228
4229 echo "$as_me:$LINENO: checking for unsigned long long int" >&5
4230echo $ECHO_N "checking for unsigned long long int... $ECHO_C" >&6
4231if test "${ac_cv_type_unsigned_long_long_int+set}" = set; then
4232 echo $ECHO_N "(cached) $ECHO_C" >&6
4233else
4234 cat >conftest.$ac_ext <<_ACEOF
4235
4236 /* confdefs.h. */
4237_ACEOF
4238cat confdefs.h >>conftest.$ac_ext
4239cat >>conftest.$ac_ext <<_ACEOF
4240/* end confdefs.h. */
4241/* For now, do not test the preprocessor; as of 2007 there are too many
4242 implementations with broken preprocessors. Perhaps this can
4243 be revisited in 2012. In the meantime, code should not expect
4244 #if to work with literals wider than 32 bits. */
4245 /* Test literals. */
4246 long long int ll = 9223372036854775807ll;
4247 long long int nll = -9223372036854775807LL;
4248 unsigned long long int ull = 18446744073709551615ULL;
4249 /* Test constant expressions. */
4250 typedef int a[((-9223372036854775807LL < 0 && 0 < 9223372036854775807ll)
4251 ? 1 : -1)];
4252 typedef int b[(18446744073709551615ULL <= (unsigned long long int) -1
4253 ? 1 : -1)];
4254 int i = 63;
4255int
4256main ()
4257{
4258/* Test availability of runtime routines for shift and division. */
4259 long long int llmax = 9223372036854775807ll;
4260 unsigned long long int ullmax = 18446744073709551615ull;
4261 return ((ll << 63) | (ll >> 63) | (ll < i) | (ll > i)
4262 | (llmax / ll) | (llmax % ll)
4263 | (ull << 63) | (ull >> 63) | (ull << i) | (ull >> i)
4264 | (ullmax / ull) | (ullmax % ull));
4265 ;
4266 return 0;
4267}
4268
4269_ACEOF
4270rm -f conftest.$ac_objext conftest$ac_exeext
4271if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4272 (eval $ac_link) 2>conftest.er1
4273 ac_status=$?
4274 grep -v '^ *+' conftest.er1 >conftest.err
4275 rm -f conftest.er1
4276 cat conftest.err >&5
4277 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4278 (exit $ac_status); } &&
4279 { ac_try='test -z "$ac_c_werror_flag"
4280 || test ! -s conftest.err'
4281 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4282 (eval $ac_try) 2>&5
4283 ac_status=$?
4284 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4285 (exit $ac_status); }; } &&
4286 { ac_try='test -s conftest$ac_exeext'
4287 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4288 (eval $ac_try) 2>&5
4289 ac_status=$?
4290 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4291 (exit $ac_status); }; }; then
4292 ac_cv_type_unsigned_long_long_int=yes
4293else
4294 echo "$as_me: failed program was:" >&5
4295sed 's/^/| /' conftest.$ac_ext >&5
4296
4297ac_cv_type_unsigned_long_long_int=no
4298fi
4299rm -f conftest.err conftest.$ac_objext \
4300 conftest$ac_exeext conftest.$ac_ext
4301fi
4302echo "$as_me:$LINENO: result: $ac_cv_type_unsigned_long_long_int" >&5
4303echo "${ECHO_T}$ac_cv_type_unsigned_long_long_int" >&6
4304 if test $ac_cv_type_unsigned_long_long_int = yes; then
4305
4306cat >>confdefs.h <<\_ACEOF
4307#define HAVE_UNSIGNED_LONG_LONG_INT 1
4308_ACEOF
4309
4310 fi
4311
4312
4313
4314 echo "$as_me:$LINENO: checking whether the preprocessor supports include_next" >&5
4315echo $ECHO_N "checking whether the preprocessor supports include_next... $ECHO_C" >&6
4316if test "${gl_cv_have_include_next+set}" = set; then
4317 echo $ECHO_N "(cached) $ECHO_C" >&6
4318else
4319 rm -rf conftestd1 conftestd2
4320 mkdir conftestd1 conftestd2
4321 cat <<EOF > conftestd1/conftest.h
4322#define DEFINED_IN_CONFTESTD1
4323#include_next <conftest.h>
4324#ifdef DEFINED_IN_CONFTESTD2
4325int foo;
4326#else
4327#error "include_next doesn't work"
4328#endif
4329EOF
4330 cat <<EOF > conftestd2/conftest.h
4331#ifndef DEFINED_IN_CONFTESTD1
4332#error "include_next test doesn't work"
4333#endif
4334#define DEFINED_IN_CONFTESTD2
4335EOF
4336 save_CPPFLAGS="$CPPFLAGS"
4337 CPPFLAGS="$CPPFLAGS -Iconftestd1 -Iconftestd2"
4338 cat >conftest.$ac_ext <<_ACEOF
4339#include <conftest.h>
4340_ACEOF
4341rm -f conftest.$ac_objext
4342if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4343 (eval $ac_compile) 2>conftest.er1
4344 ac_status=$?
4345 grep -v '^ *+' conftest.er1 >conftest.err
4346 rm -f conftest.er1
4347 cat conftest.err >&5
4348 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4349 (exit $ac_status); } &&
4350 { ac_try='test -z "$ac_c_werror_flag"
4351 || test ! -s conftest.err'
4352 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4353 (eval $ac_try) 2>&5
4354 ac_status=$?
4355 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4356 (exit $ac_status); }; } &&
4357 { ac_try='test -s conftest.$ac_objext'
4358 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4359 (eval $ac_try) 2>&5
4360 ac_status=$?
4361 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4362 (exit $ac_status); }; }; then
4363 gl_cv_have_include_next=yes
4364else
4365 echo "$as_me: failed program was:" >&5
4366sed 's/^/| /' conftest.$ac_ext >&5
4367
4368gl_cv_have_include_next=no
4369fi
4370rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
4371 CPPFLAGS="$save_CPPFLAGS"
4372 rm -rf conftestd1 conftestd2
4373
4374fi
4375echo "$as_me:$LINENO: result: $gl_cv_have_include_next" >&5
4376echo "${ECHO_T}$gl_cv_have_include_next" >&6
4377 if test $gl_cv_have_include_next = yes; then
4378
4379
4380cat >>confdefs.h <<\_ACEOF
4381#define HAVE_INCLUDE_NEXT 1
4382_ACEOF
4383
4384
4385 INCLUDE_NEXT=include_next
4386 else
4387 INCLUDE_NEXT=include
4388 fi
4389
4390
4391
4392
4393
4394
4395
4396for ac_header in $gl_header_list
4397do
4398as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
4399if eval "test \"\${$as_ac_Header+set}\" = set"; then
4400 echo "$as_me:$LINENO: checking for $ac_header" >&5
4401echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
4402if eval "test \"\${$as_ac_Header+set}\" = set"; then
4403 echo $ECHO_N "(cached) $ECHO_C" >&6
4404fi
4405echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
4406echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
4407else
4408 # Is the header compilable?
4409echo "$as_me:$LINENO: checking $ac_header usability" >&5
4410echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
4411cat >conftest.$ac_ext <<_ACEOF
4412/* confdefs.h. */
4413_ACEOF
4414cat confdefs.h >>conftest.$ac_ext
4415cat >>conftest.$ac_ext <<_ACEOF
4416/* end confdefs.h. */
4417$ac_includes_default
4418#include <$ac_header>
4419_ACEOF
4420rm -f conftest.$ac_objext
4421if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4422 (eval $ac_compile) 2>conftest.er1
4423 ac_status=$?
4424 grep -v '^ *+' conftest.er1 >conftest.err
4425 rm -f conftest.er1
4426 cat conftest.err >&5
4427 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4428 (exit $ac_status); } &&
4429 { ac_try='test -z "$ac_c_werror_flag"
4430 || test ! -s conftest.err'
4431 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4432 (eval $ac_try) 2>&5
4433 ac_status=$?
4434 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4435 (exit $ac_status); }; } &&
4436 { ac_try='test -s conftest.$ac_objext'
4437 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4438 (eval $ac_try) 2>&5
4439 ac_status=$?
4440 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4441 (exit $ac_status); }; }; then
4442 ac_header_compiler=yes
4443else
4444 echo "$as_me: failed program was:" >&5
4445sed 's/^/| /' conftest.$ac_ext >&5
4446
4447ac_header_compiler=no
4448fi
4449rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
4450echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
4451echo "${ECHO_T}$ac_header_compiler" >&6
4452
4453# Is the header present?
4454echo "$as_me:$LINENO: checking $ac_header presence" >&5
4455echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
4456cat >conftest.$ac_ext <<_ACEOF
4457/* confdefs.h. */
4458_ACEOF
4459cat confdefs.h >>conftest.$ac_ext
4460cat >>conftest.$ac_ext <<_ACEOF
4461/* end confdefs.h. */
4462#include <$ac_header>
4463_ACEOF
4464if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
4465 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
4466 ac_status=$?
4467 grep -v '^ *+' conftest.er1 >conftest.err
4468 rm -f conftest.er1
4469 cat conftest.err >&5
4470 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4471 (exit $ac_status); } >/dev/null; then
4472 if test -s conftest.err; then
4473 ac_cpp_err=$ac_c_preproc_warn_flag
4474 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
4475 else
4476 ac_cpp_err=
4477 fi
4478else
4479 ac_cpp_err=yes
4480fi
4481if test -z "$ac_cpp_err"; then
4482 ac_header_preproc=yes
4483else
4484 echo "$as_me: failed program was:" >&5
4485sed 's/^/| /' conftest.$ac_ext >&5
4486
4487 ac_header_preproc=no
4488fi
4489rm -f conftest.err conftest.$ac_ext
4490echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
4491echo "${ECHO_T}$ac_header_preproc" >&6
4492
4493# So? What about this header?
4494case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
4495 yes:no: )
4496 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
4497echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
4498 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
4499echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
4500 ac_header_preproc=yes
4501 ;;
4502 no:yes:* )
4503 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
4504echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
4505 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
4506echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
4507 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
4508echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
4509 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
4510echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
4511 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
4512echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
4513 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
4514echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
4515 (
4516 cat <<\_ASBOX
4517## ------------------------------------------ ##
4518## Report this to the AC_PACKAGE_NAME lists. ##
4519## ------------------------------------------ ##
4520_ASBOX
4521 ) |
4522 sed "s/^/$as_me: WARNING: /" >&2
4523 ;;
4524esac
4525echo "$as_me:$LINENO: checking for $ac_header" >&5
4526echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
4527if eval "test \"\${$as_ac_Header+set}\" = set"; then
4528 echo $ECHO_N "(cached) $ECHO_C" >&6
4529else
4530 eval "$as_ac_Header=\$ac_header_preproc"
4531fi
4532echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
4533echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
4534
4535fi
4536if test `eval echo '${'$as_ac_Header'}'` = yes; then
4537 cat >>confdefs.h <<_ACEOF
4538#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
4539_ACEOF
4540
4541fi
4542
4543done
4544
4545
4546
4547
4548
4549
4550
4551
4552
4553
4554
4555
4556echo "$as_me:$LINENO: checking for C/C++ restrict keyword" >&5
4557echo $ECHO_N "checking for C/C++ restrict keyword... $ECHO_C" >&6
4558if test "${ac_cv_c_restrict+set}" = set; then
4559 echo $ECHO_N "(cached) $ECHO_C" >&6
4560else
4561 ac_cv_c_restrict=no
4562 # The order here caters to the fact that C++ does not require restrict.
4563 for ac_kw in __restrict __restrict__ _Restrict restrict; do
4564 cat >conftest.$ac_ext <<_ACEOF
4565/* confdefs.h. */
4566_ACEOF
4567cat confdefs.h >>conftest.$ac_ext
4568cat >>conftest.$ac_ext <<_ACEOF
4569/* end confdefs.h. */
4570typedef int * int_ptr;
4571 int foo (int_ptr $ac_kw ip) {
4572 return ip[0];
4573 }
4574int
4575main ()
4576{
4577int s[1];
4578 int * $ac_kw t = s;
4579 t[0] = 0;
4580 return foo(t)
4581 ;
4582 return 0;
4583}
4584_ACEOF
4585rm -f conftest.$ac_objext
4586if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4587 (eval $ac_compile) 2>conftest.er1
4588 ac_status=$?
4589 grep -v '^ *+' conftest.er1 >conftest.err
4590 rm -f conftest.er1
4591 cat conftest.err >&5
4592 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4593 (exit $ac_status); } &&
4594 { ac_try='test -z "$ac_c_werror_flag"
4595 || test ! -s conftest.err'
4596 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4597 (eval $ac_try) 2>&5
4598 ac_status=$?
4599 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4600 (exit $ac_status); }; } &&
4601 { ac_try='test -s conftest.$ac_objext'
4602 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4603 (eval $ac_try) 2>&5
4604 ac_status=$?
4605 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4606 (exit $ac_status); }; }; then
4607 ac_cv_c_restrict=$ac_kw
4608else
4609 echo "$as_me: failed program was:" >&5
4610sed 's/^/| /' conftest.$ac_ext >&5
4611
4612fi
4613rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
4614 test "$ac_cv_c_restrict" != no && break
4615 done
4616
4617fi
4618echo "$as_me:$LINENO: result: $ac_cv_c_restrict" >&5
4619echo "${ECHO_T}$ac_cv_c_restrict" >&6
4620
4621
4622 case $ac_cv_c_restrict in
4623 restrict) ;;
4624 no) cat >>confdefs.h <<\_ACEOF
4625#define restrict
4626_ACEOF
4627 ;;
4628 *) cat >>confdefs.h <<_ACEOF
4629#define restrict $ac_cv_c_restrict
4630_ACEOF
4631 ;;
4632 esac
4633
4634
4635
4636
4637
4638
4639
4640
4641
4642
4643
4644
4645
4646 :
4647
4648
4649
4650
4651
4652
4653
4654 if test $gl_cv_have_include_next = yes; then
4655 gl_cv_next_string_h='<'string.h'>'
4656 else
4657 echo "$as_me:$LINENO: checking absolute name of <string.h>" >&5
4658echo $ECHO_N "checking absolute name of <string.h>... $ECHO_C" >&6
4659if test "${gl_cv_next_string_h+set}" = set; then
4660 echo $ECHO_N "(cached) $ECHO_C" >&6
4661else
4662
4663 if test $ac_cv_header_string_h = yes; then
4664 cat >conftest.$ac_ext <<_ACEOF
4665/* confdefs.h. */
4666_ACEOF
4667cat confdefs.h >>conftest.$ac_ext
4668cat >>conftest.$ac_ext <<_ACEOF
4669/* end confdefs.h. */
4670#include <string.h>
4671
4672_ACEOF
4673 gl_cv_next_string_h='"'`(eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4674 sed -n '\#/string.h#{
4675 s#.*"\(.*/string.h\)".*#\1#
4676 s#^/[^/]#//&#
4677 p
4678 q
4679 }'`'"'
4680 else
4681 gl_cv_next_string_h='<'string.h'>'
4682 fi
4683
4684fi
4685echo "$as_me:$LINENO: result: $gl_cv_next_string_h" >&5
4686echo "${ECHO_T}$gl_cv_next_string_h" >&6
4687 fi
4688 NEXT_STRING_H=$gl_cv_next_string_h
4689
4690
4691
4692
4693
4694 GNULIB_WCWIDTH=0;
4695 HAVE_DECL_WCWIDTH=1;
4696 REPLACE_WCWIDTH=0;
4697 WCHAR_H=
4698
4699
4700
4701
4702
4703if false; then
4704 GL_COND_LIBTOOL_TRUE=
4705 GL_COND_LIBTOOL_FALSE='#'
4706else
4707 GL_COND_LIBTOOL_TRUE='#'
4708 GL_COND_LIBTOOL_FALSE=
4709fi
4710
4711 gl_cond_libtool=false
4712 gl_libdeps=
4713 gl_ltlibdeps=
4714
4715
4716
4717 gl_source_base='gnulib'
4718
4719
4720
4721
4722
4723
4724
4725
4726
4727for ac_func in memchr
4728do
4729as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
4730echo "$as_me:$LINENO: checking for $ac_func" >&5
4731echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
4732if eval "test \"\${$as_ac_var+set}\" = set"; then
4733 echo $ECHO_N "(cached) $ECHO_C" >&6
4734else
4735 cat >conftest.$ac_ext <<_ACEOF
4736/* confdefs.h. */
4737_ACEOF
4738cat confdefs.h >>conftest.$ac_ext
4739cat >>conftest.$ac_ext <<_ACEOF
4740/* end confdefs.h. */
4741/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
4742 For example, HP-UX 11i <limits.h> declares gettimeofday. */
4743#define $ac_func innocuous_$ac_func
4744
4745/* System header to define __stub macros and hopefully few prototypes,
4746 which can conflict with char $ac_func (); below.
4747 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4748 <limits.h> exists even on freestanding compilers. */
4749
4750#ifdef __STDC__
4751# include <limits.h>
4752#else
4753# include <assert.h>
4754#endif
4755
4756#undef $ac_func
4757
4758/* Override any gcc2 internal prototype to avoid an error. */
4759#ifdef __cplusplus
4760extern "C"
4761{
4762#endif
4763/* We use char because int might match the return type of a gcc2
4764 builtin and then its argument prototype would still apply. */
4765char $ac_func ();
4766/* The GNU C library defines this for functions which it implements
4767 to always fail with ENOSYS. Some functions are actually named
4768 something starting with __ and the normal name is an alias. */
4769#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4770choke me
4771#else
4772char (*f) () = $ac_func;
4773#endif
4774#ifdef __cplusplus
4775}
4776#endif
4777
4778int
4779main ()
4780{
4781return f != $ac_func;
4782 ;
4783 return 0;
4784}
4785_ACEOF
4786rm -f conftest.$ac_objext conftest$ac_exeext
4787if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4788 (eval $ac_link) 2>conftest.er1
4789 ac_status=$?
4790 grep -v '^ *+' conftest.er1 >conftest.err
4791 rm -f conftest.er1
4792 cat conftest.err >&5
4793 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4794 (exit $ac_status); } &&
4795 { ac_try='test -z "$ac_c_werror_flag"
4796 || test ! -s conftest.err'
4797 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4798 (eval $ac_try) 2>&5
4799 ac_status=$?
4800 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4801 (exit $ac_status); }; } &&
4802 { ac_try='test -s conftest$ac_exeext'
4803 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4804 (eval $ac_try) 2>&5
4805 ac_status=$?
4806 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4807 (exit $ac_status); }; }; then
4808 eval "$as_ac_var=yes"
4809else
4810 echo "$as_me: failed program was:" >&5
4811sed 's/^/| /' conftest.$ac_ext >&5
4812
4813eval "$as_ac_var=no"
4814fi
4815rm -f conftest.err conftest.$ac_objext \
4816 conftest$ac_exeext conftest.$ac_ext
4817fi
4818echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
4819echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
4820if test `eval echo '${'$as_ac_var'}'` = yes; then
4821 cat >>confdefs.h <<_ACEOF
4822#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
4823_ACEOF
4824
4825else
4826
4827 gl_LIBOBJS="$gl_LIBOBJS $ac_func.$ac_objext"
4828
4829fi
4830done
4831
4832
4833 if test $ac_cv_func_memchr = no; then
4834
4835
4836for ac_header in bp-sym.h
4837do
4838as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
4839if eval "test \"\${$as_ac_Header+set}\" = set"; then
4840 echo "$as_me:$LINENO: checking for $ac_header" >&5
4841echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
4842if eval "test \"\${$as_ac_Header+set}\" = set"; then
4843 echo $ECHO_N "(cached) $ECHO_C" >&6
4844fi
4845echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
4846echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
4847else
4848 # Is the header compilable?
4849echo "$as_me:$LINENO: checking $ac_header usability" >&5
4850echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
4851cat >conftest.$ac_ext <<_ACEOF
4852/* confdefs.h. */
4853_ACEOF
4854cat confdefs.h >>conftest.$ac_ext
4855cat >>conftest.$ac_ext <<_ACEOF
4856/* end confdefs.h. */
4857$ac_includes_default
4858#include <$ac_header>
4859_ACEOF
4860rm -f conftest.$ac_objext
4861if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4862 (eval $ac_compile) 2>conftest.er1
4863 ac_status=$?
4864 grep -v '^ *+' conftest.er1 >conftest.err
4865 rm -f conftest.er1
4866 cat conftest.err >&5
4867 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4868 (exit $ac_status); } &&
4869 { ac_try='test -z "$ac_c_werror_flag"
4870 || test ! -s conftest.err'
4871 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4872 (eval $ac_try) 2>&5
4873 ac_status=$?
4874 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4875 (exit $ac_status); }; } &&
4876 { ac_try='test -s conftest.$ac_objext'
4877 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4878 (eval $ac_try) 2>&5
4879 ac_status=$?
4880 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4881 (exit $ac_status); }; }; then
4882 ac_header_compiler=yes
4883else
4884 echo "$as_me: failed program was:" >&5
4885sed 's/^/| /' conftest.$ac_ext >&5
4886
4887ac_header_compiler=no
4888fi
4889rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
4890echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
4891echo "${ECHO_T}$ac_header_compiler" >&6
4892
4893# Is the header present?
4894echo "$as_me:$LINENO: checking $ac_header presence" >&5
4895echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
4896cat >conftest.$ac_ext <<_ACEOF
4897/* confdefs.h. */
4898_ACEOF
4899cat confdefs.h >>conftest.$ac_ext
4900cat >>conftest.$ac_ext <<_ACEOF
4901/* end confdefs.h. */
4902#include <$ac_header>
4903_ACEOF
4904if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
4905 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
4906 ac_status=$?
4907 grep -v '^ *+' conftest.er1 >conftest.err
4908 rm -f conftest.er1
4909 cat conftest.err >&5
4910 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4911 (exit $ac_status); } >/dev/null; then
4912 if test -s conftest.err; then
4913 ac_cpp_err=$ac_c_preproc_warn_flag
4914 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
4915 else
4916 ac_cpp_err=
4917 fi
4918else
4919 ac_cpp_err=yes
4920fi
4921if test -z "$ac_cpp_err"; then
4922 ac_header_preproc=yes
4923else
4924 echo "$as_me: failed program was:" >&5
4925sed 's/^/| /' conftest.$ac_ext >&5
4926
4927 ac_header_preproc=no
4928fi
4929rm -f conftest.err conftest.$ac_ext
4930echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
4931echo "${ECHO_T}$ac_header_preproc" >&6
4932
4933# So? What about this header?
4934case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
4935 yes:no: )
4936 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
4937echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
4938 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
4939echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
4940 ac_header_preproc=yes
4941 ;;
4942 no:yes:* )
4943 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
4944echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
4945 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
4946echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
4947 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
4948echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
4949 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
4950echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
4951 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
4952echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
4953 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
4954echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
4955 (
4956 cat <<\_ASBOX
4957## ------------------------------------------ ##
4958## Report this to the AC_PACKAGE_NAME lists. ##
4959## ------------------------------------------ ##
4960_ASBOX
4961 ) |
4962 sed "s/^/$as_me: WARNING: /" >&2
4963 ;;
4964esac
4965echo "$as_me:$LINENO: checking for $ac_header" >&5
4966echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
4967if eval "test \"\${$as_ac_Header+set}\" = set"; then
4968 echo $ECHO_N "(cached) $ECHO_C" >&6
4969else
4970 eval "$as_ac_Header=\$ac_header_preproc"
4971fi
4972echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
4973echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
4974
4975fi
4976if test `eval echo '${'$as_ac_Header'}'` = yes; then
4977 cat >>confdefs.h <<_ACEOF
4978#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
4979_ACEOF
4980
4981fi
4982
4983done
4984
4985
4986 fi
4987
4988
4989 echo "$as_me:$LINENO: checking for working memcmp" >&5
4990echo $ECHO_N "checking for working memcmp... $ECHO_C" >&6
4991if test "${ac_cv_func_memcmp_working+set}" = set; then
4992 echo $ECHO_N "(cached) $ECHO_C" >&6
4993else
4994 if test "$cross_compiling" = yes; then
4995 ac_cv_func_memcmp_working=no
4996else
4997 cat >conftest.$ac_ext <<_ACEOF
4998/* confdefs.h. */
4999_ACEOF
5000cat confdefs.h >>conftest.$ac_ext
5001cat >>conftest.$ac_ext <<_ACEOF
5002/* end confdefs.h. */
5003$ac_includes_default
5004int
5005main ()
5006{
5007
5008 /* Some versions of memcmp are not 8-bit clean. */
5009 char c0 = 0x40, c1 = 0x80, c2 = 0x81;
5010 if (memcmp(&c0, &c2, 1) >= 0 || memcmp(&c1, &c2, 1) >= 0)
5011 exit (1);
5012
5013 /* The Next x86 OpenStep bug shows up only when comparing 16 bytes
5014 or more and with at least one buffer not starting on a 4-byte boundary.
5015 William Lewis provided this test program. */
5016 {
5017 char foo[21];
5018 char bar[21];
5019 int i;
5020 for (i = 0; i < 4; i++)
5021 {
5022 char *a = foo + i;
5023 char *b = bar + i;
5024 strcpy (a, "--------01111111");
5025 strcpy (b, "--------10000000");
5026 if (memcmp (a, b, 16) >= 0)
5027 exit (1);
5028 }
5029 exit (0);
5030 }
5031
5032 ;
5033 return 0;
5034}
5035_ACEOF
5036rm -f conftest$ac_exeext
5037if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5038 (eval $ac_link) 2>&5
5039 ac_status=$?
5040 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5041 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5042 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5043 (eval $ac_try) 2>&5
5044 ac_status=$?
5045 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5046 (exit $ac_status); }; }; then
5047 ac_cv_func_memcmp_working=yes
5048else
5049 echo "$as_me: program exited with status $ac_status" >&5
5050echo "$as_me: failed program was:" >&5
5051sed 's/^/| /' conftest.$ac_ext >&5
5052
5053( exit $ac_status )
5054ac_cv_func_memcmp_working=no
5055fi
5056rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5057fi
5058fi
5059echo "$as_me:$LINENO: result: $ac_cv_func_memcmp_working" >&5
5060echo "${ECHO_T}$ac_cv_func_memcmp_working" >&6
5061test $ac_cv_func_memcmp_working = no &&
5062
5063
5064
5065
5066
5067
5068 gl_LIBOBJS="$gl_LIBOBJS memcmp.$ac_objext"
5069
5070
5071 if test $ac_cv_func_memcmp_working = no; then
5072
5073cat >>confdefs.h <<\_ACEOF
5074#define memcmp rpl_memcmp
5075_ACEOF
5076
5077 :
5078 fi
5079
5080
5081
5082 if test $ac_cv_have_decl_memmem = yes; then
5083 echo "$as_me:$LINENO: checking whether memmem works in linear time" >&5
5084echo $ECHO_N "checking whether memmem works in linear time... $ECHO_C" >&6
5085if test "${gl_cv_func_memmem_works+set}" = set; then
5086 echo $ECHO_N "(cached) $ECHO_C" >&6
5087else
5088 if test "$cross_compiling" = yes; then
5089 gl_cv_func_memmem_works="guessing no"
5090else
5091 cat >conftest.$ac_ext <<_ACEOF
5092/* confdefs.h. */
5093_ACEOF
5094cat confdefs.h >>conftest.$ac_ext
5095cat >>conftest.$ac_ext <<_ACEOF
5096/* end confdefs.h. */
5097
5098#include <string.h> /* for memmem */
5099#include <stdlib.h> /* for malloc */
5100#include <unistd.h> /* for alarm */
5101
5102int
5103main ()
5104{
5105size_t m = 1000000;
5106 char *haystack = (char *) malloc (2 * m + 1);
5107 char *needle = (char *) malloc (m + 1);
5108 void *result = 0;
5109 /* Failure to compile this test due to missing alarm is okay,
5110 since all such platforms (mingw) also lack memmem. */
5111 alarm (5);
5112 /* Check for quadratic performance. */
5113 if (haystack && needle)
5114 {
5115 memset (haystack, 'A', 2 * m);
5116 haystack[2 * m] = 'B';
5117 memset (needle, 'A', m);
5118 needle[m] = 'B';
5119 result = memmem (haystack, 2 * m + 1, needle, m + 1);
5120 }
5121 /* Check for empty needle behavior. */
5122 return !result || !memmem ("a", 1, 0, 0);
5123 ;
5124 return 0;
5125}
5126_ACEOF
5127rm -f conftest$ac_exeext
5128if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5129 (eval $ac_link) 2>&5
5130 ac_status=$?
5131 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5132 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5133 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5134 (eval $ac_try) 2>&5
5135 ac_status=$?
5136 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5137 (exit $ac_status); }; }; then
5138 gl_cv_func_memmem_works=yes
5139else
5140 echo "$as_me: program exited with status $ac_status" >&5
5141echo "$as_me: failed program was:" >&5
5142sed 's/^/| /' conftest.$ac_ext >&5
5143
5144( exit $ac_status )
5145gl_cv_func_memmem_works=no
5146fi
5147rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5148fi
5149fi
5150echo "$as_me:$LINENO: result: $gl_cv_func_memmem_works" >&5
5151echo "${ECHO_T}$gl_cv_func_memmem_works" >&6
5152 if test "$gl_cv_func_memmem_works" != yes; then
5153 REPLACE_MEMMEM=1
5154
5155
5156
5157
5158
5159
5160
5161 gl_LIBOBJS="$gl_LIBOBJS memmem.$ac_objext"
5162
5163 fi
5164 fi
5165
5166
5167
5168
5169
5170
5171
5172
5173
5174
5175
5176
5177
5178for ac_func in memmem
5179do
5180as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
5181echo "$as_me:$LINENO: checking for $ac_func" >&5
5182echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
5183if eval "test \"\${$as_ac_var+set}\" = set"; then
5184 echo $ECHO_N "(cached) $ECHO_C" >&6
5185else
5186 cat >conftest.$ac_ext <<_ACEOF
5187/* confdefs.h. */
5188_ACEOF
5189cat confdefs.h >>conftest.$ac_ext
5190cat >>conftest.$ac_ext <<_ACEOF
5191/* end confdefs.h. */
5192/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
5193 For example, HP-UX 11i <limits.h> declares gettimeofday. */
5194#define $ac_func innocuous_$ac_func
5195
5196/* System header to define __stub macros and hopefully few prototypes,
5197 which can conflict with char $ac_func (); below.
5198 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
5199 <limits.h> exists even on freestanding compilers. */
5200
5201#ifdef __STDC__
5202# include <limits.h>
5203#else
5204# include <assert.h>
5205#endif
5206
5207#undef $ac_func
5208
5209/* Override any gcc2 internal prototype to avoid an error. */
5210#ifdef __cplusplus
5211extern "C"
5212{
5213#endif
5214/* We use char because int might match the return type of a gcc2
5215 builtin and then its argument prototype would still apply. */
5216char $ac_func ();
5217/* The GNU C library defines this for functions which it implements
5218 to always fail with ENOSYS. Some functions are actually named
5219 something starting with __ and the normal name is an alias. */
5220#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5221choke me
5222#else
5223char (*f) () = $ac_func;
5224#endif
5225#ifdef __cplusplus
5226}
5227#endif
5228
5229int
5230main ()
5231{
5232return f != $ac_func;
5233 ;
5234 return 0;
5235}
5236_ACEOF
5237rm -f conftest.$ac_objext conftest$ac_exeext
5238if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5239 (eval $ac_link) 2>conftest.er1
5240 ac_status=$?
5241 grep -v '^ *+' conftest.er1 >conftest.err
5242 rm -f conftest.er1
5243 cat conftest.err >&5
5244 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5245 (exit $ac_status); } &&
5246 { ac_try='test -z "$ac_c_werror_flag"
5247 || test ! -s conftest.err'
5248 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5249 (eval $ac_try) 2>&5
5250 ac_status=$?
5251 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5252 (exit $ac_status); }; } &&
5253 { ac_try='test -s conftest$ac_exeext'
5254 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5255 (eval $ac_try) 2>&5
5256 ac_status=$?
5257 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5258 (exit $ac_status); }; }; then
5259 eval "$as_ac_var=yes"
5260else
5261 echo "$as_me: failed program was:" >&5
5262sed 's/^/| /' conftest.$ac_ext >&5
5263
5264eval "$as_ac_var=no"
5265fi
5266rm -f conftest.err conftest.$ac_objext \
5267 conftest$ac_exeext conftest.$ac_ext
5268fi
5269echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
5270echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
5271if test `eval echo '${'$as_ac_var'}'` = yes; then
5272 cat >>confdefs.h <<_ACEOF
5273#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
5274_ACEOF
5275
5276else
5277
5278 gl_LIBOBJS="$gl_LIBOBJS $ac_func.$ac_objext"
5279
5280fi
5281done
5282
5283
5284
5285 :
5286
5287
5288
5289
5290
5291 if test $ac_cv_have_decl_memmem = no; then
5292 HAVE_DECL_MEMMEM=0
5293 fi
5294 :
5295
5296
5297
5298 GNULIB_MEMMEM=1
5299
5300
5301
5302
5303 if test $ac_cv_type_long_long_int = yes; then
5304 HAVE_LONG_LONG_INT=1
5305 else
5306 HAVE_LONG_LONG_INT=0
5307 fi
5308
5309
5310 if test $ac_cv_type_unsigned_long_long_int = yes; then
5311 HAVE_UNSIGNED_LONG_LONG_INT=1
5312 else
5313 HAVE_UNSIGNED_LONG_LONG_INT=0
5314 fi
5315
5316
5317 if test $ac_cv_header_inttypes_h = yes; then
5318 HAVE_INTTYPES_H=1
5319 else
5320 HAVE_INTTYPES_H=0
5321 fi
5322
5323
5324 if test $ac_cv_header_sys_types_h = yes; then
5325 HAVE_SYS_TYPES_H=1
5326 else
5327 HAVE_SYS_TYPES_H=0
5328 fi
5329
5330
5331
5332
5333
5334 :
5335
5336
5337
5338
5339
5340
5341
5342 if test $gl_cv_have_include_next = yes; then
5343 gl_cv_next_stdint_h='<'stdint.h'>'
5344 else
5345 echo "$as_me:$LINENO: checking absolute name of <stdint.h>" >&5
5346echo $ECHO_N "checking absolute name of <stdint.h>... $ECHO_C" >&6
5347if test "${gl_cv_next_stdint_h+set}" = set; then
5348 echo $ECHO_N "(cached) $ECHO_C" >&6
5349else
5350
5351 if test $ac_cv_header_stdint_h = yes; then
5352 cat >conftest.$ac_ext <<_ACEOF
5353/* confdefs.h. */
5354_ACEOF
5355cat confdefs.h >>conftest.$ac_ext
5356cat >>conftest.$ac_ext <<_ACEOF
5357/* end confdefs.h. */
5358#include <stdint.h>
5359
5360_ACEOF
5361 gl_cv_next_stdint_h='"'`(eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5362 sed -n '\#/stdint.h#{
5363 s#.*"\(.*/stdint.h\)".*#\1#
5364 s#^/[^/]#//&#
5365 p
5366 q
5367 }'`'"'
5368 else
5369 gl_cv_next_stdint_h='<'stdint.h'>'
5370 fi
5371
5372fi
5373echo "$as_me:$LINENO: result: $gl_cv_next_stdint_h" >&5
5374echo "${ECHO_T}$gl_cv_next_stdint_h" >&6
5375 fi
5376 NEXT_STDINT_H=$gl_cv_next_stdint_h
5377
5378
5379
5380 if test $ac_cv_header_stdint_h = yes; then
5381 HAVE_STDINT_H=1
5382 else
5383 HAVE_STDINT_H=0
5384 fi
5385
5386
5387 if test $ac_cv_header_stdint_h = yes; then
5388 echo "$as_me:$LINENO: checking whether stdint.h conforms to C99" >&5
5389echo $ECHO_N "checking whether stdint.h conforms to C99... $ECHO_C" >&6
5390if test "${gl_cv_header_working_stdint_h+set}" = set; then
5391 echo $ECHO_N "(cached) $ECHO_C" >&6
5392else
5393 gl_cv_header_working_stdint_h=no
5394 cat >conftest.$ac_ext <<_ACEOF
5395
5396 /* confdefs.h. */
5397_ACEOF
5398cat confdefs.h >>conftest.$ac_ext
5399cat >>conftest.$ac_ext <<_ACEOF
5400/* end confdefs.h. */
5401
5402#define __STDC_LIMIT_MACROS 1 /* to make it work also in C++ mode */
5403#define __STDC_CONSTANT_MACROS 1 /* to make it work also in C++ mode */
5404#define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */
5405#include <stdint.h>
5406/* Dragonfly defines WCHAR_MIN, WCHAR_MAX only in <wchar.h>. */
5407#if !(defined WCHAR_MIN && defined WCHAR_MAX)
5408#error "WCHAR_MIN, WCHAR_MAX not defined in <stdint.h>"
5409#endif
5410
5411
5412 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
5413 included before <wchar.h>. */
5414 #include <stddef.h>
5415 #include <signal.h>
5416 #if HAVE_WCHAR_H
5417 # include <stdio.h>
5418 # include <time.h>
5419 # include <wchar.h>
5420 #endif
5421
5422
5423#ifdef INT8_MAX
5424int8_t a1 = INT8_MAX;
5425int8_t a1min = INT8_MIN;
5426#endif
5427#ifdef INT16_MAX
5428int16_t a2 = INT16_MAX;
5429int16_t a2min = INT16_MIN;
5430#endif
5431#ifdef INT32_MAX
5432int32_t a3 = INT32_MAX;
5433int32_t a3min = INT32_MIN;
5434#endif
5435#ifdef INT64_MAX
5436int64_t a4 = INT64_MAX;
5437int64_t a4min = INT64_MIN;
5438#endif
5439#ifdef UINT8_MAX
5440uint8_t b1 = UINT8_MAX;
5441#else
5442typedef int b1[(unsigned char) -1 != 255 ? 1 : -1];
5443#endif
5444#ifdef UINT16_MAX
5445uint16_t b2 = UINT16_MAX;
5446#endif
5447#ifdef UINT32_MAX
5448uint32_t b3 = UINT32_MAX;
5449#endif
5450#ifdef UINT64_MAX
5451uint64_t b4 = UINT64_MAX;
5452#endif
5453int_least8_t c1 = INT8_C (0x7f);
5454int_least8_t c1max = INT_LEAST8_MAX;
5455int_least8_t c1min = INT_LEAST8_MIN;
5456int_least16_t c2 = INT16_C (0x7fff);
5457int_least16_t c2max = INT_LEAST16_MAX;
5458int_least16_t c2min = INT_LEAST16_MIN;
5459int_least32_t c3 = INT32_C (0x7fffffff);
5460int_least32_t c3max = INT_LEAST32_MAX;
5461int_least32_t c3min = INT_LEAST32_MIN;
5462int_least64_t c4 = INT64_C (0x7fffffffffffffff);
5463int_least64_t c4max = INT_LEAST64_MAX;
5464int_least64_t c4min = INT_LEAST64_MIN;
5465uint_least8_t d1 = UINT8_C (0xff);
5466uint_least8_t d1max = UINT_LEAST8_MAX;
5467uint_least16_t d2 = UINT16_C (0xffff);
5468uint_least16_t d2max = UINT_LEAST16_MAX;
5469uint_least32_t d3 = UINT32_C (0xffffffff);
5470uint_least32_t d3max = UINT_LEAST32_MAX;
5471uint_least64_t d4 = UINT64_C (0xffffffffffffffff);
5472uint_least64_t d4max = UINT_LEAST64_MAX;
5473int_fast8_t e1 = INT_FAST8_MAX;
5474int_fast8_t e1min = INT_FAST8_MIN;
5475int_fast16_t e2 = INT_FAST16_MAX;
5476int_fast16_t e2min = INT_FAST16_MIN;
5477int_fast32_t e3 = INT_FAST32_MAX;
5478int_fast32_t e3min = INT_FAST32_MIN;
5479int_fast64_t e4 = INT_FAST64_MAX;
5480int_fast64_t e4min = INT_FAST64_MIN;
5481uint_fast8_t f1 = UINT_FAST8_MAX;
5482uint_fast16_t f2 = UINT_FAST16_MAX;
5483uint_fast32_t f3 = UINT_FAST32_MAX;
5484uint_fast64_t f4 = UINT_FAST64_MAX;
5485#ifdef INTPTR_MAX
5486intptr_t g = INTPTR_MAX;
5487intptr_t gmin = INTPTR_MIN;
5488#endif
5489#ifdef UINTPTR_MAX
5490uintptr_t h = UINTPTR_MAX;
5491#endif
5492intmax_t i = INTMAX_MAX;
5493uintmax_t j = UINTMAX_MAX;
5494
5495#include <limits.h> /* for CHAR_BIT */
5496#define TYPE_MINIMUM(t) \
5497 ((t) ((t) 0 < (t) -1 ? (t) 0 : ~ (t) 0 << (sizeof (t) * CHAR_BIT - 1)))
5498#define TYPE_MAXIMUM(t) \
5499 ((t) ((t) 0 < (t) -1 ? (t) -1 : ~ (~ (t) 0 << (sizeof (t) * CHAR_BIT - 1))))
5500struct s {
5501 int check_PTRDIFF:
5502 PTRDIFF_MIN == TYPE_MINIMUM (ptrdiff_t)
5503 && PTRDIFF_MAX == TYPE_MAXIMUM (ptrdiff_t)
5504 ? 1 : -1;
5505 /* Detect bug in FreeBSD 6.0 / ia64. */
5506 int check_SIG_ATOMIC:
5507 SIG_ATOMIC_MIN == TYPE_MINIMUM (sig_atomic_t)
5508 && SIG_ATOMIC_MAX == TYPE_MAXIMUM (sig_atomic_t)
5509 ? 1 : -1;
5510 int check_SIZE: SIZE_MAX == TYPE_MAXIMUM (size_t) ? 1 : -1;
5511 int check_WCHAR:
5512 WCHAR_MIN == TYPE_MINIMUM (wchar_t)
5513 && WCHAR_MAX == TYPE_MAXIMUM (wchar_t)
5514 ? 1 : -1;
5515 /* Detect bug in mingw. */
5516 int check_WINT:
5517 WINT_MIN == TYPE_MINIMUM (wint_t)
5518 && WINT_MAX == TYPE_MAXIMUM (wint_t)
5519 ? 1 : -1;
5520
5521 /* Detect bugs in glibc 2.4 and Solaris 10 stdint.h, among others. */
5522 int check_UINT8_C:
5523 (-1 < UINT8_C (0)) == (-1 < (uint_least8_t) 0) ? 1 : -1;
5524 int check_UINT16_C:
5525 (-1 < UINT16_C (0)) == (-1 < (uint_least16_t) 0) ? 1 : -1;
5526
5527 /* Detect bugs in OpenBSD 3.9 stdint.h. */
5528#ifdef UINT8_MAX
5529 int check_uint8: (uint8_t) -1 == UINT8_MAX ? 1 : -1;
5530#endif
5531#ifdef UINT16_MAX
5532 int check_uint16: (uint16_t) -1 == UINT16_MAX ? 1 : -1;
5533#endif
5534#ifdef UINT32_MAX
5535 int check_uint32: (uint32_t) -1 == UINT32_MAX ? 1 : -1;
5536#endif
5537#ifdef UINT64_MAX
5538 int check_uint64: (uint64_t) -1 == UINT64_MAX ? 1 : -1;
5539#endif
5540 int check_uint_least8: (uint_least8_t) -1 == UINT_LEAST8_MAX ? 1 : -1;
5541 int check_uint_least16: (uint_least16_t) -1 == UINT_LEAST16_MAX ? 1 : -1;
5542 int check_uint_least32: (uint_least32_t) -1 == UINT_LEAST32_MAX ? 1 : -1;
5543 int check_uint_least64: (uint_least64_t) -1 == UINT_LEAST64_MAX ? 1 : -1;
5544 int check_uint_fast8: (uint_fast8_t) -1 == UINT_FAST8_MAX ? 1 : -1;
5545 int check_uint_fast16: (uint_fast16_t) -1 == UINT_FAST16_MAX ? 1 : -1;
5546 int check_uint_fast32: (uint_fast32_t) -1 == UINT_FAST32_MAX ? 1 : -1;
5547 int check_uint_fast64: (uint_fast64_t) -1 == UINT_FAST64_MAX ? 1 : -1;
5548 int check_uintptr: (uintptr_t) -1 == UINTPTR_MAX ? 1 : -1;
5549 int check_uintmax: (uintmax_t) -1 == UINTMAX_MAX ? 1 : -1;
5550 int check_size: (size_t) -1 == SIZE_MAX ? 1 : -1;
5551};
5552
5553int
5554main ()
5555{
5556
5557 ;
5558 return 0;
5559}
5560_ACEOF
5561rm -f conftest.$ac_objext
5562if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5563 (eval $ac_compile) 2>conftest.er1
5564 ac_status=$?
5565 grep -v '^ *+' conftest.er1 >conftest.err
5566 rm -f conftest.er1
5567 cat conftest.err >&5
5568 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5569 (exit $ac_status); } &&
5570 { ac_try='test -z "$ac_c_werror_flag"
5571 || test ! -s conftest.err'
5572 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5573 (eval $ac_try) 2>&5
5574 ac_status=$?
5575 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5576 (exit $ac_status); }; } &&
5577 { ac_try='test -s conftest.$ac_objext'
5578 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5579 (eval $ac_try) 2>&5
5580 ac_status=$?
5581 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5582 (exit $ac_status); }; }; then
5583 gl_cv_header_working_stdint_h=yes
5584else
5585 echo "$as_me: failed program was:" >&5
5586sed 's/^/| /' conftest.$ac_ext >&5
5587
5588fi
5589rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
5590fi
5591echo "$as_me:$LINENO: result: $gl_cv_header_working_stdint_h" >&5
5592echo "${ECHO_T}$gl_cv_header_working_stdint_h" >&6
5593 fi
5594 if test "$gl_cv_header_working_stdint_h" = yes; then
5595 STDINT_H=
5596 else
5597
5598
5599for ac_header in sys/inttypes.h sys/bitypes.h
5600do
5601as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
5602if eval "test \"\${$as_ac_Header+set}\" = set"; then
5603 echo "$as_me:$LINENO: checking for $ac_header" >&5
5604echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
5605if eval "test \"\${$as_ac_Header+set}\" = set"; then
5606 echo $ECHO_N "(cached) $ECHO_C" >&6
5607fi
5608echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
5609echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
5610else
5611 # Is the header compilable?
5612echo "$as_me:$LINENO: checking $ac_header usability" >&5
5613echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
5614cat >conftest.$ac_ext <<_ACEOF
5615/* confdefs.h. */
5616_ACEOF
5617cat confdefs.h >>conftest.$ac_ext
5618cat >>conftest.$ac_ext <<_ACEOF
5619/* end confdefs.h. */
5620$ac_includes_default
5621#include <$ac_header>
5622_ACEOF
5623rm -f conftest.$ac_objext
5624if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5625 (eval $ac_compile) 2>conftest.er1
5626 ac_status=$?
5627 grep -v '^ *+' conftest.er1 >conftest.err
5628 rm -f conftest.er1
5629 cat conftest.err >&5
5630 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5631 (exit $ac_status); } &&
5632 { ac_try='test -z "$ac_c_werror_flag"
5633 || test ! -s conftest.err'
5634 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5635 (eval $ac_try) 2>&5
5636 ac_status=$?
5637 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5638 (exit $ac_status); }; } &&
5639 { ac_try='test -s conftest.$ac_objext'
5640 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5641 (eval $ac_try) 2>&5
5642 ac_status=$?
5643 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5644 (exit $ac_status); }; }; then
5645 ac_header_compiler=yes
5646else
5647 echo "$as_me: failed program was:" >&5
5648sed 's/^/| /' conftest.$ac_ext >&5
5649
5650ac_header_compiler=no
5651fi
5652rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
5653echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
5654echo "${ECHO_T}$ac_header_compiler" >&6
5655
5656# Is the header present?
5657echo "$as_me:$LINENO: checking $ac_header presence" >&5
5658echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
5659cat >conftest.$ac_ext <<_ACEOF
5660/* confdefs.h. */
5661_ACEOF
5662cat confdefs.h >>conftest.$ac_ext
5663cat >>conftest.$ac_ext <<_ACEOF
5664/* end confdefs.h. */
5665#include <$ac_header>
5666_ACEOF
5667if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
5668 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
5669 ac_status=$?
5670 grep -v '^ *+' conftest.er1 >conftest.err
5671 rm -f conftest.er1
5672 cat conftest.err >&5
5673 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5674 (exit $ac_status); } >/dev/null; then
5675 if test -s conftest.err; then
5676 ac_cpp_err=$ac_c_preproc_warn_flag
5677 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
5678 else
5679 ac_cpp_err=
5680 fi
5681else
5682 ac_cpp_err=yes
5683fi
5684if test -z "$ac_cpp_err"; then
5685 ac_header_preproc=yes
5686else
5687 echo "$as_me: failed program was:" >&5
5688sed 's/^/| /' conftest.$ac_ext >&5
5689
5690 ac_header_preproc=no
5691fi
5692rm -f conftest.err conftest.$ac_ext
5693echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
5694echo "${ECHO_T}$ac_header_preproc" >&6
5695
5696# So? What about this header?
5697case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
5698 yes:no: )
5699 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
5700echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
5701 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
5702echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
5703 ac_header_preproc=yes
5704 ;;
5705 no:yes:* )
5706 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
5707echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
5708 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
5709echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
5710 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
5711echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
5712 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
5713echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
5714 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
5715echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
5716 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
5717echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
5718 (
5719 cat <<\_ASBOX
5720## ------------------------------------------ ##
5721## Report this to the AC_PACKAGE_NAME lists. ##
5722## ------------------------------------------ ##
5723_ASBOX
5724 ) |
5725 sed "s/^/$as_me: WARNING: /" >&2
5726 ;;
5727esac
5728echo "$as_me:$LINENO: checking for $ac_header" >&5
5729echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
5730if eval "test \"\${$as_ac_Header+set}\" = set"; then
5731 echo $ECHO_N "(cached) $ECHO_C" >&6
5732else
5733 eval "$as_ac_Header=\$ac_header_preproc"
5734fi
5735echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
5736echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
5737
5738fi
5739if test `eval echo '${'$as_ac_Header'}'` = yes; then
5740 cat >>confdefs.h <<_ACEOF
5741#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
5742_ACEOF
5743
5744fi
5745
5746done
5747
5748 if test $ac_cv_header_sys_inttypes_h = yes; then
5749 HAVE_SYS_INTTYPES_H=1
5750 else
5751 HAVE_SYS_INTTYPES_H=0
5752 fi
5753
5754 if test $ac_cv_header_sys_bitypes_h = yes; then
5755 HAVE_SYS_BITYPES_H=1
5756 else
5757 HAVE_SYS_BITYPES_H=0
5758 fi
5759
5760
5761
5762 :
5763
5764
5765
5766
5767
5768
5769
5770
5771
5772
5773
5774
5775
5776
5777 for gltype in ptrdiff_t sig_atomic_t size_t wchar_t wint_t ; do
5778 echo "$as_me:$LINENO: checking for bit size of $gltype" >&5
5779echo $ECHO_N "checking for bit size of $gltype... $ECHO_C" >&6
5780if eval "test \"\${gl_cv_bitsizeof_${gltype}+set}\" = set"; then
5781 echo $ECHO_N "(cached) $ECHO_C" >&6
5782else
5783 if test "$cross_compiling" = yes; then
5784 # Depending upon the size, compute the lo and hi bounds.
5785cat >conftest.$ac_ext <<_ACEOF
5786/* confdefs.h. */
5787_ACEOF
5788cat confdefs.h >>conftest.$ac_ext
5789cat >>conftest.$ac_ext <<_ACEOF
5790/* end confdefs.h. */
5791
5792 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
5793 included before <wchar.h>. */
5794 #include <stddef.h>
5795 #include <signal.h>
5796 #if HAVE_WCHAR_H
5797 # include <stdio.h>
5798 # include <time.h>
5799 # include <wchar.h>
5800 #endif
5801
5802#include <limits.h>
5803int
5804main ()
5805{
5806static int test_array [1 - 2 * !((sizeof ($gltype) * CHAR_BIT) >= 0)];
5807test_array [0] = 0
5808
5809 ;
5810 return 0;
5811}
5812_ACEOF
5813rm -f conftest.$ac_objext
5814if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5815 (eval $ac_compile) 2>conftest.er1
5816 ac_status=$?
5817 grep -v '^ *+' conftest.er1 >conftest.err
5818 rm -f conftest.er1
5819 cat conftest.err >&5
5820 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5821 (exit $ac_status); } &&
5822 { ac_try='test -z "$ac_c_werror_flag"
5823 || test ! -s conftest.err'
5824 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5825 (eval $ac_try) 2>&5
5826 ac_status=$?
5827 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5828 (exit $ac_status); }; } &&
5829 { ac_try='test -s conftest.$ac_objext'
5830 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5831 (eval $ac_try) 2>&5
5832 ac_status=$?
5833 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5834 (exit $ac_status); }; }; then
5835 ac_lo=0 ac_mid=0
5836 while :; do
5837 cat >conftest.$ac_ext <<_ACEOF
5838/* confdefs.h. */
5839_ACEOF
5840cat confdefs.h >>conftest.$ac_ext
5841cat >>conftest.$ac_ext <<_ACEOF
5842/* end confdefs.h. */
5843
5844 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
5845 included before <wchar.h>. */
5846 #include <stddef.h>
5847 #include <signal.h>
5848 #if HAVE_WCHAR_H
5849 # include <stdio.h>
5850 # include <time.h>
5851 # include <wchar.h>
5852 #endif
5853
5854#include <limits.h>
5855int
5856main ()
5857{
5858static int test_array [1 - 2 * !((sizeof ($gltype) * CHAR_BIT) <= $ac_mid)];
5859test_array [0] = 0
5860
5861 ;
5862 return 0;
5863}
5864_ACEOF
5865rm -f conftest.$ac_objext
5866if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5867 (eval $ac_compile) 2>conftest.er1
5868 ac_status=$?
5869 grep -v '^ *+' conftest.er1 >conftest.err
5870 rm -f conftest.er1
5871 cat conftest.err >&5
5872 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5873 (exit $ac_status); } &&
5874 { ac_try='test -z "$ac_c_werror_flag"
5875 || test ! -s conftest.err'
5876 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5877 (eval $ac_try) 2>&5
5878 ac_status=$?
5879 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5880 (exit $ac_status); }; } &&
5881 { ac_try='test -s conftest.$ac_objext'
5882 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5883 (eval $ac_try) 2>&5
5884 ac_status=$?
5885 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5886 (exit $ac_status); }; }; then
5887 ac_hi=$ac_mid; break
5888else
5889 echo "$as_me: failed program was:" >&5
5890sed 's/^/| /' conftest.$ac_ext >&5
5891
5892ac_lo=`expr $ac_mid + 1`
5893 if test $ac_lo -le $ac_mid; then
5894 ac_lo= ac_hi=
5895 break
5896 fi
5897 ac_mid=`expr 2 '*' $ac_mid + 1`
5898fi
5899rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
5900 done
5901else
5902 echo "$as_me: failed program was:" >&5
5903sed 's/^/| /' conftest.$ac_ext >&5
5904
5905cat >conftest.$ac_ext <<_ACEOF
5906/* confdefs.h. */
5907_ACEOF
5908cat confdefs.h >>conftest.$ac_ext
5909cat >>conftest.$ac_ext <<_ACEOF
5910/* end confdefs.h. */
5911
5912 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
5913 included before <wchar.h>. */
5914 #include <stddef.h>
5915 #include <signal.h>
5916 #if HAVE_WCHAR_H
5917 # include <stdio.h>
5918 # include <time.h>
5919 # include <wchar.h>
5920 #endif
5921
5922#include <limits.h>
5923int
5924main ()
5925{
5926static int test_array [1 - 2 * !((sizeof ($gltype) * CHAR_BIT) < 0)];
5927test_array [0] = 0
5928
5929 ;
5930 return 0;
5931}
5932_ACEOF
5933rm -f conftest.$ac_objext
5934if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5935 (eval $ac_compile) 2>conftest.er1
5936 ac_status=$?
5937 grep -v '^ *+' conftest.er1 >conftest.err
5938 rm -f conftest.er1
5939 cat conftest.err >&5
5940 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5941 (exit $ac_status); } &&
5942 { ac_try='test -z "$ac_c_werror_flag"
5943 || test ! -s conftest.err'
5944 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5945 (eval $ac_try) 2>&5
5946 ac_status=$?
5947 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5948 (exit $ac_status); }; } &&
5949 { ac_try='test -s conftest.$ac_objext'
5950 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5951 (eval $ac_try) 2>&5
5952 ac_status=$?
5953 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5954 (exit $ac_status); }; }; then
5955 ac_hi=-1 ac_mid=-1
5956 while :; do
5957 cat >conftest.$ac_ext <<_ACEOF
5958/* confdefs.h. */
5959_ACEOF
5960cat confdefs.h >>conftest.$ac_ext
5961cat >>conftest.$ac_ext <<_ACEOF
5962/* end confdefs.h. */
5963
5964 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
5965 included before <wchar.h>. */
5966 #include <stddef.h>
5967 #include <signal.h>
5968 #if HAVE_WCHAR_H
5969 # include <stdio.h>
5970 # include <time.h>
5971 # include <wchar.h>
5972 #endif
5973
5974#include <limits.h>
5975int
5976main ()
5977{
5978static int test_array [1 - 2 * !((sizeof ($gltype) * CHAR_BIT) >= $ac_mid)];
5979test_array [0] = 0
5980
5981 ;
5982 return 0;
5983}
5984_ACEOF
5985rm -f conftest.$ac_objext
5986if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5987 (eval $ac_compile) 2>conftest.er1
5988 ac_status=$?
5989 grep -v '^ *+' conftest.er1 >conftest.err
5990 rm -f conftest.er1
5991 cat conftest.err >&5
5992 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5993 (exit $ac_status); } &&
5994 { ac_try='test -z "$ac_c_werror_flag"
5995 || test ! -s conftest.err'
5996 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5997 (eval $ac_try) 2>&5
5998 ac_status=$?
5999 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6000 (exit $ac_status); }; } &&
6001 { ac_try='test -s conftest.$ac_objext'
6002 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6003 (eval $ac_try) 2>&5
6004 ac_status=$?
6005 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6006 (exit $ac_status); }; }; then
6007 ac_lo=$ac_mid; break
6008else
6009 echo "$as_me: failed program was:" >&5
6010sed 's/^/| /' conftest.$ac_ext >&5
6011
6012ac_hi=`expr '(' $ac_mid ')' - 1`
6013 if test $ac_mid -le $ac_hi; then
6014 ac_lo= ac_hi=
6015 break
6016 fi
6017 ac_mid=`expr 2 '*' $ac_mid`
6018fi
6019rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
6020 done
6021else
6022 echo "$as_me: failed program was:" >&5
6023sed 's/^/| /' conftest.$ac_ext >&5
6024
6025ac_lo= ac_hi=
6026fi
6027rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
6028fi
6029rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
6030# Binary search between lo and hi bounds.
6031while test "x$ac_lo" != "x$ac_hi"; do
6032 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
6033 cat >conftest.$ac_ext <<_ACEOF
6034/* confdefs.h. */
6035_ACEOF
6036cat confdefs.h >>conftest.$ac_ext
6037cat >>conftest.$ac_ext <<_ACEOF
6038/* end confdefs.h. */
6039
6040 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
6041 included before <wchar.h>. */
6042 #include <stddef.h>
6043 #include <signal.h>
6044 #if HAVE_WCHAR_H
6045 # include <stdio.h>
6046 # include <time.h>
6047 # include <wchar.h>
6048 #endif
6049
6050#include <limits.h>
6051int
6052main ()
6053{
6054static int test_array [1 - 2 * !((sizeof ($gltype) * CHAR_BIT) <= $ac_mid)];
6055test_array [0] = 0
6056
6057 ;
6058 return 0;
6059}
6060_ACEOF
6061rm -f conftest.$ac_objext
6062if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6063 (eval $ac_compile) 2>conftest.er1
6064 ac_status=$?
6065 grep -v '^ *+' conftest.er1 >conftest.err
6066 rm -f conftest.er1
6067 cat conftest.err >&5
6068 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6069 (exit $ac_status); } &&
6070 { ac_try='test -z "$ac_c_werror_flag"
6071 || test ! -s conftest.err'
6072 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6073 (eval $ac_try) 2>&5
6074 ac_status=$?
6075 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6076 (exit $ac_status); }; } &&
6077 { ac_try='test -s conftest.$ac_objext'
6078 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6079 (eval $ac_try) 2>&5
6080 ac_status=$?
6081 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6082 (exit $ac_status); }; }; then
6083 ac_hi=$ac_mid
6084else
6085 echo "$as_me: failed program was:" >&5
6086sed 's/^/| /' conftest.$ac_ext >&5
6087
6088ac_lo=`expr '(' $ac_mid ')' + 1`
6089fi
6090rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
6091done
6092case $ac_lo in
6093?*) result=$ac_lo;;
6094'') result=unknown ;;
6095esac
6096else
6097 if test "$cross_compiling" = yes; then
d5af19ba
DJ
6098 { { echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
6099echo "$as_me: error: in \`$ac_pwd':" >&2;}
6100{ { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
783e057b
DJ
6101See \`config.log' for more details." >&5
6102echo "$as_me: error: cannot run test program while cross compiling
6103See \`config.log' for more details." >&2;}
d5af19ba 6104 { (exit 1); exit 1; }; }; }
783e057b
DJ
6105else
6106 cat >conftest.$ac_ext <<_ACEOF
6107/* confdefs.h. */
6108_ACEOF
6109cat confdefs.h >>conftest.$ac_ext
6110cat >>conftest.$ac_ext <<_ACEOF
6111/* end confdefs.h. */
6112
6113 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
6114 included before <wchar.h>. */
6115 #include <stddef.h>
6116 #include <signal.h>
6117 #if HAVE_WCHAR_H
6118 # include <stdio.h>
6119 # include <time.h>
6120 # include <wchar.h>
6121 #endif
6122
6123#include <limits.h>
6124long longval () { return sizeof ($gltype) * CHAR_BIT; }
6125unsigned long ulongval () { return sizeof ($gltype) * CHAR_BIT; }
6126#include <stdio.h>
6127#include <stdlib.h>
6128int
6129main ()
6130{
6131
6132 FILE *f = fopen ("conftest.val", "w");
6133 if (! f)
6134 exit (1);
6135 if ((sizeof ($gltype) * CHAR_BIT) < 0)
6136 {
6137 long i = longval ();
6138 if (i != (sizeof ($gltype) * CHAR_BIT))
6139 exit (1);
6140 fprintf (f, "%ld\n", i);
6141 }
6142 else
6143 {
6144 unsigned long i = ulongval ();
6145 if (i != (sizeof ($gltype) * CHAR_BIT))
6146 exit (1);
6147 fprintf (f, "%lu\n", i);
6148 }
6149 exit (ferror (f) || fclose (f) != 0);
6150
6151 ;
6152 return 0;
6153}
6154_ACEOF
6155rm -f conftest$ac_exeext
6156if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6157 (eval $ac_link) 2>&5
6158 ac_status=$?
6159 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6160 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
6161 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6162 (eval $ac_try) 2>&5
6163 ac_status=$?
6164 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6165 (exit $ac_status); }; }; then
6166 result=`cat conftest.val`
6167else
6168 echo "$as_me: program exited with status $ac_status" >&5
6169echo "$as_me: failed program was:" >&5
6170sed 's/^/| /' conftest.$ac_ext >&5
6171
6172( exit $ac_status )
6173result=unknown
6174fi
6175rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
6176fi
6177fi
6178rm -f conftest.val
6179 eval gl_cv_bitsizeof_${gltype}=\$result
c906108c 6180
783e057b
DJ
6181fi
6182echo "$as_me:$LINENO: result: `eval echo '${'gl_cv_bitsizeof_${gltype}'}'`" >&5
6183echo "${ECHO_T}`eval echo '${'gl_cv_bitsizeof_${gltype}'}'`" >&6
6184 eval result=\$gl_cv_bitsizeof_${gltype}
6185 if test $result = unknown; then
6186 result=0
6187 fi
6188 GLTYPE=`echo "$gltype" | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
6189 cat >>confdefs.h <<_ACEOF
6190#define BITSIZEOF_${GLTYPE} $result
6191_ACEOF
c906108c 6192
783e057b
DJ
6193 eval BITSIZEOF_${GLTYPE}=\$result
6194 done
c906108c 6195
c906108c 6196
c906108c 6197
bec39cab 6198
3841debe 6199
783e057b
DJ
6200
6201
6202 for gltype in sig_atomic_t wchar_t wint_t ; do
6203 echo "$as_me:$LINENO: checking whether $gltype is signed" >&5
6204echo $ECHO_N "checking whether $gltype is signed... $ECHO_C" >&6
6205if eval "test \"\${gl_cv_type_${gltype}_signed+set}\" = set"; then
6206 echo $ECHO_N "(cached) $ECHO_C" >&6
6207else
6208 cat >conftest.$ac_ext <<_ACEOF
6209/* confdefs.h. */
6210_ACEOF
6211cat confdefs.h >>conftest.$ac_ext
6212cat >>conftest.$ac_ext <<_ACEOF
6213/* end confdefs.h. */
6214
6215 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
6216 included before <wchar.h>. */
6217 #include <stddef.h>
6218 #include <signal.h>
6219 #if HAVE_WCHAR_H
6220 # include <stdio.h>
6221 # include <time.h>
6222 # include <wchar.h>
6223 #endif
6224
6225 int verify[2 * (($gltype) -1 < ($gltype) 0) - 1];
6226int
6227main ()
6228{
6229
6230 ;
6231 return 0;
6232}
6233_ACEOF
6234rm -f conftest.$ac_objext
6235if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6236 (eval $ac_compile) 2>conftest.er1
6237 ac_status=$?
6238 grep -v '^ *+' conftest.er1 >conftest.err
6239 rm -f conftest.er1
6240 cat conftest.err >&5
6241 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6242 (exit $ac_status); } &&
6243 { ac_try='test -z "$ac_c_werror_flag"
6244 || test ! -s conftest.err'
6245 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6246 (eval $ac_try) 2>&5
6247 ac_status=$?
6248 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6249 (exit $ac_status); }; } &&
6250 { ac_try='test -s conftest.$ac_objext'
6251 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6252 (eval $ac_try) 2>&5
6253 ac_status=$?
6254 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6255 (exit $ac_status); }; }; then
6256 result=yes
6257else
6258 echo "$as_me: failed program was:" >&5
6259sed 's/^/| /' conftest.$ac_ext >&5
6260
6261result=no
20e95c23 6262fi
783e057b
DJ
6263rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
6264 eval gl_cv_type_${gltype}_signed=\$result
6265
6266fi
6267echo "$as_me:$LINENO: result: `eval echo '${'gl_cv_type_${gltype}_signed'}'`" >&5
6268echo "${ECHO_T}`eval echo '${'gl_cv_type_${gltype}_signed'}'`" >&6
6269 eval result=\$gl_cv_type_${gltype}_signed
6270 GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
6271 if test "$result" = yes; then
6272 cat >>confdefs.h <<_ACEOF
6273#define HAVE_SIGNED_${GLTYPE} 1
6274_ACEOF
6275
6276 eval HAVE_SIGNED_${GLTYPE}=1
6277 else
6278 eval HAVE_SIGNED_${GLTYPE}=0
6279 fi
6280 done
6281
6282
6283 gl_cv_type_ptrdiff_t_signed=yes
6284 gl_cv_type_size_t_signed=no
6285
6286
6287
6288
6289
6290
6291
6292 for gltype in ptrdiff_t sig_atomic_t size_t wchar_t wint_t ; do
6293 echo "$as_me:$LINENO: checking for $gltype integer literal suffix" >&5
6294echo $ECHO_N "checking for $gltype integer literal suffix... $ECHO_C" >&6
6295if eval "test \"\${gl_cv_type_${gltype}_suffix+set}\" = set"; then
6296 echo $ECHO_N "(cached) $ECHO_C" >&6
c906108c 6297else
783e057b
DJ
6298 eval gl_cv_type_${gltype}_suffix=no
6299 eval result=\$gl_cv_type_${gltype}_signed
6300 if test "$result" = yes; then
6301 glsufu=
6302 else
6303 glsufu=u
6304 fi
6305 for glsuf in "$glsufu" ${glsufu}l ${glsufu}ll ${glsufu}i64; do
6306 case $glsuf in
6307 '') gltype1='int';;
6308 l) gltype1='long int';;
6309 ll) gltype1='long long int';;
6310 i64) gltype1='__int64';;
6311 u) gltype1='unsigned int';;
6312 ul) gltype1='unsigned long int';;
6313 ull) gltype1='unsigned long long int';;
6314 ui64)gltype1='unsigned __int64';;
6315 esac
6316 cat >conftest.$ac_ext <<_ACEOF
6317/* confdefs.h. */
6318_ACEOF
6319cat confdefs.h >>conftest.$ac_ext
6320cat >>conftest.$ac_ext <<_ACEOF
6321/* end confdefs.h. */
6322
6323 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
6324 included before <wchar.h>. */
6325 #include <stddef.h>
6326 #include <signal.h>
6327 #if HAVE_WCHAR_H
6328 # include <stdio.h>
6329 # include <time.h>
6330 # include <wchar.h>
6331 #endif
6332
6333 extern $gltype foo;
6334 extern $gltype1 foo;
6335int
6336main ()
6337{
6338
6339 ;
6340 return 0;
6341}
6342_ACEOF
6343rm -f conftest.$ac_objext
6344if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6345 (eval $ac_compile) 2>conftest.er1
6346 ac_status=$?
6347 grep -v '^ *+' conftest.er1 >conftest.err
6348 rm -f conftest.er1
6349 cat conftest.err >&5
6350 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6351 (exit $ac_status); } &&
6352 { ac_try='test -z "$ac_c_werror_flag"
6353 || test ! -s conftest.err'
6354 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6355 (eval $ac_try) 2>&5
6356 ac_status=$?
6357 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6358 (exit $ac_status); }; } &&
6359 { ac_try='test -s conftest.$ac_objext'
6360 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6361 (eval $ac_try) 2>&5
6362 ac_status=$?
6363 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6364 (exit $ac_status); }; }; then
6365 eval gl_cv_type_${gltype}_suffix=\$glsuf
6366else
6367 echo "$as_me: failed program was:" >&5
6368sed 's/^/| /' conftest.$ac_ext >&5
6369
6370fi
6371rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
6372 eval result=\$gl_cv_type_${gltype}_suffix
6373 test "$result" != no && break
6374 done
6375fi
6376echo "$as_me:$LINENO: result: `eval echo '${'gl_cv_type_${gltype}_suffix'}'`" >&5
6377echo "${ECHO_T}`eval echo '${'gl_cv_type_${gltype}_suffix'}'`" >&6
6378 GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
6379 eval result=\$gl_cv_type_${gltype}_suffix
6380 test "$result" = no && result=
6381 eval ${GLTYPE}_SUFFIX=\$result
6382 cat >>confdefs.h <<_ACEOF
6383#define ${GLTYPE}_SUFFIX $result
6384_ACEOF
6385
6386 done
6387
6388
6389
6390 STDINT_H=stdint.h
6391 fi
6392
6393
6394
6395
6396
6397
6398
6399 echo "$as_me:$LINENO: checking whether <wchar.h> is standalone" >&5
6400echo $ECHO_N "checking whether <wchar.h> is standalone... $ECHO_C" >&6
6401if test "${gl_cv_header_wchar_h_standalone+set}" = set; then
6402 echo $ECHO_N "(cached) $ECHO_C" >&6
6403else
6404 cat >conftest.$ac_ext <<_ACEOF
6405#include <wchar.h>
6406wchar_t w;
6407_ACEOF
6408rm -f conftest.$ac_objext
6409if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6410 (eval $ac_compile) 2>conftest.er1
6411 ac_status=$?
6412 grep -v '^ *+' conftest.er1 >conftest.err
6413 rm -f conftest.er1
6414 cat conftest.err >&5
6415 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6416 (exit $ac_status); } &&
6417 { ac_try='test -z "$ac_c_werror_flag"
6418 || test ! -s conftest.err'
6419 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6420 (eval $ac_try) 2>&5
6421 ac_status=$?
6422 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6423 (exit $ac_status); }; } &&
6424 { ac_try='test -s conftest.$ac_objext'
6425 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6426 (eval $ac_try) 2>&5
6427 ac_status=$?
6428 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6429 (exit $ac_status); }; }; then
6430 gl_cv_header_wchar_h_standalone=yes
6431else
6432 echo "$as_me: failed program was:" >&5
6433sed 's/^/| /' conftest.$ac_ext >&5
6434
6435gl_cv_header_wchar_h_standalone=no
6436fi
6437rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
6438fi
6439echo "$as_me:$LINENO: result: $gl_cv_header_wchar_h_standalone" >&5
6440echo "${ECHO_T}$gl_cv_header_wchar_h_standalone" >&6
6441 if test $gl_cv_header_wchar_h_standalone != yes; then
6442 WCHAR_H=wchar.h
6443 fi
6444
6445
6446 :
6447
6448
6449
6450
6451
6452 if test $ac_cv_header_wchar_h = yes; then
6453 HAVE_WCHAR_H=1
6454 else
6455 HAVE_WCHAR_H=0
6456 fi
6457
6458
6459
6460
6461 :
6462
6463
6464
6465
6466
6467
6468
6469 if test $gl_cv_have_include_next = yes; then
6470 gl_cv_next_wchar_h='<'wchar.h'>'
6471 else
6472 echo "$as_me:$LINENO: checking absolute name of <wchar.h>" >&5
6473echo $ECHO_N "checking absolute name of <wchar.h>... $ECHO_C" >&6
6474if test "${gl_cv_next_wchar_h+set}" = set; then
6475 echo $ECHO_N "(cached) $ECHO_C" >&6
6476else
6477
6478 if test $ac_cv_header_wchar_h = yes; then
6479 cat >conftest.$ac_ext <<_ACEOF
6480/* confdefs.h. */
6481_ACEOF
6482cat confdefs.h >>conftest.$ac_ext
6483cat >>conftest.$ac_ext <<_ACEOF
6484/* end confdefs.h. */
6485#include <wchar.h>
6486
6487_ACEOF
6488 gl_cv_next_wchar_h='"'`(eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6489 sed -n '\#/wchar.h#{
6490 s#.*"\(.*/wchar.h\)".*#\1#
6491 s#^/[^/]#//&#
6492 p
6493 q
6494 }'`'"'
6495 else
6496 gl_cv_next_wchar_h='<'wchar.h'>'
6497 fi
6498
6499fi
6500echo "$as_me:$LINENO: result: $gl_cv_next_wchar_h" >&5
6501echo "${ECHO_T}$gl_cv_next_wchar_h" >&6
6502 fi
6503 NEXT_WCHAR_H=$gl_cv_next_wchar_h
6504
c906108c 6505
c906108c 6506
c906108c 6507
c906108c 6508
c906108c 6509
c906108c 6510
c906108c 6511
783e057b
DJ
6512 gltests_libdeps=
6513 gltests_ltlibdeps=
20e95c23 6514
20e95c23 6515
20e95c23 6516
783e057b 6517 gl_source_base='tests'
c906108c 6518
bec39cab 6519
bec39cab 6520
783e057b
DJ
6521
6522 LIBGNU_LIBDEPS="$gl_libdeps"
6523
6524 LIBGNU_LTLIBDEPS="$gl_ltlibdeps"
6525
6526
e28b3332 6527
d5af19ba
DJ
6528# For Makefile dependencies.
6529GNULIB_STDINT_H=
6530if test x"$STDINT_H" != x; then
6531 GNULIB_STDINT_H=gnulib/$STDINT_H
6532fi
6533
6534
bec39cab
AC
6535PACKAGE=gdb
6536
6537cat >>confdefs.h <<_ACEOF
6538#define PACKAGE "$PACKAGE"
6539_ACEOF
6540
6541
6542
e28b3332
DJ
6543# GDB does not use automake, but gnulib does. This line lets us
6544# generate its Makefile.in.
6545am__api_version="1.9"
6546# Find a good install program. We prefer a C program (faster),
6547# so one script is as good as another. But avoid the broken or
6548# incompatible versions:
6549# SysV /etc/install, /usr/sbin/install
6550# SunOS /usr/etc/install
6551# IRIX /sbin/install
6552# AIX /bin/install
6553# AmigaOS /C/install, which installs bootblocks on floppy discs
6554# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
6555# AFS /usr/afsws/bin/install, which mishandles nonexistent args
6556# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
6557# OS/2's system install, which has a completely different semantic
6558# ./install, which can be erroneously created by make from ./install.sh.
85541719 6559# Reject install programs that cannot install multiple files.
e28b3332
DJ
6560echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
6561echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6
6562if test -z "$INSTALL"; then
6563if test "${ac_cv_path_install+set}" = set; then
6564 echo $ECHO_N "(cached) $ECHO_C" >&6
6565else
6566 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6567for as_dir in $PATH
6568do
6569 IFS=$as_save_IFS
6570 test -z "$as_dir" && as_dir=.
6571 # Account for people who put trailing slashes in PATH elements.
6572case $as_dir/ in
6573 ./ | .// | /cC/* | \
6574 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
6575 ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \
6576 /usr/ucb/* ) ;;
6577 *)
6578 # OSF1 and SCO ODT 3.0 have their own names for install.
6579 # Don't use installbsd from OSF since it installs stuff as root
6580 # by default.
6581 for ac_prog in ginstall scoinst install; do
6582 for ac_exec_ext in '' $ac_executable_extensions; do
6583 if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
6584 if test $ac_prog = install &&
6585 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
6586 # AIX install. It has an incompatible calling convention.
6587 :
6588 elif test $ac_prog = install &&
6589 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
6590 # program-specific install script used by HP pwplus--don't use.
6591 :
6592 else
85541719
DE
6593 rm -rf conftest.one conftest.two conftest.dir
6594 echo one > conftest.one
6595 echo two > conftest.two
6596 mkdir conftest.dir
6597 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
6598 test -s conftest.one && test -s conftest.two &&
6599 test -s conftest.dir/conftest.one &&
6600 test -s conftest.dir/conftest.two
6601 then
6602 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
6603 break 3
6604 fi
e28b3332
DJ
6605 fi
6606 fi
6607 done
6608 done
6609 ;;
6610esac
6611done
6612
85541719 6613rm -rf conftest.one conftest.two conftest.dir
e28b3332
DJ
6614
6615fi
6616 if test "${ac_cv_path_install+set}" = set; then
6617 INSTALL=$ac_cv_path_install
6618 else
85541719
DE
6619 # As a last resort, use the slow shell script. Don't cache a
6620 # value for INSTALL within a source directory, because that will
e28b3332 6621 # break other packages using the cache if that directory is
85541719 6622 # removed, or if the value is a relative name.
e28b3332
DJ
6623 INSTALL=$ac_install_sh
6624 fi
6625fi
6626echo "$as_me:$LINENO: result: $INSTALL" >&5
6627echo "${ECHO_T}$INSTALL" >&6
6628
6629# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
6630# It thinks the first close brace ends the variable substitution.
6631test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
6632
6633test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
6634
6635test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
6636
6637echo "$as_me:$LINENO: checking whether build environment is sane" >&5
6638echo $ECHO_N "checking whether build environment is sane... $ECHO_C" >&6
6639# Just in case
6640sleep 1
6641echo timestamp > conftest.file
6642# Do `set' in a subshell so we don't clobber the current shell's
6643# arguments. Must try -L first in case configure is actually a
6644# symlink; some systems play weird games with the mod time of symlinks
6645# (eg FreeBSD returns the mod time of the symlink's containing
6646# directory).
6647if (
6648 set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null`
6649 if test "$*" = "X"; then
6650 # -L didn't work.
6651 set X `ls -t $srcdir/configure conftest.file`
6652 fi
6653 rm -f conftest.file
6654 if test "$*" != "X $srcdir/configure conftest.file" \
6655 && test "$*" != "X conftest.file $srcdir/configure"; then
6656
6657 # If neither matched, then we have a broken ls. This can happen
6658 # if, for instance, CONFIG_SHELL is bash and it inherits a
6659 # broken ls alias from the environment. This has actually
6660 # happened. Such a system could not be considered "sane".
6661 { { echo "$as_me:$LINENO: error: ls -t appears to fail. Make sure there is not a broken
6662alias in your environment" >&5
6663echo "$as_me: error: ls -t appears to fail. Make sure there is not a broken
6664alias in your environment" >&2;}
6665 { (exit 1); exit 1; }; }
6666 fi
6667
6668 test "$2" = conftest.file
6669 )
6670then
6671 # Ok.
6672 :
6673else
6674 { { echo "$as_me:$LINENO: error: newly created file is older than distributed files!
6675Check your system clock" >&5
6676echo "$as_me: error: newly created file is older than distributed files!
6677Check your system clock" >&2;}
6678 { (exit 1); exit 1; }; }
6679fi
6680echo "$as_me:$LINENO: result: yes" >&5
6681echo "${ECHO_T}yes" >&6
6682test "$program_prefix" != NONE &&
6683 program_transform_name="s,^,$program_prefix,;$program_transform_name"
6684# Use a double $ so make ignores it.
6685test "$program_suffix" != NONE &&
6686 program_transform_name="s,\$,$program_suffix,;$program_transform_name"
6687# Double any \ or $. echo might interpret backslashes.
6688# By default was `s,x,x', remove it if useless.
6689cat <<\_ACEOF >conftest.sed
6690s/[\\$]/&&/g;s/;s,x,x,$//
6691_ACEOF
6692program_transform_name=`echo $program_transform_name | sed -f conftest.sed`
6693rm conftest.sed
6694
6695# expand $ac_aux_dir to an absolute path
6696am_aux_dir=`cd $ac_aux_dir && pwd`
6697
6698test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing"
6699# Use eval to expand $SHELL
6700if eval "$MISSING --run true"; then
6701 am_missing_run="$MISSING --run "
6702else
6703 am_missing_run=
6704 { echo "$as_me:$LINENO: WARNING: \`missing' script is too old or missing" >&5
6705echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;}
6706fi
6707
6708if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then
6709 # We used to keeping the `.' as first argument, in order to
6710 # allow $(mkdir_p) to be used without argument. As in
6711 # $(mkdir_p) $(somedir)
6712 # where $(somedir) is conditionally defined. However this is wrong
6713 # for two reasons:
6714 # 1. if the package is installed by a user who cannot write `.'
6715 # make install will fail,
6716 # 2. the above comment should most certainly read
6717 # $(mkdir_p) $(DESTDIR)$(somedir)
6718 # so it does not work when $(somedir) is undefined and
6719 # $(DESTDIR) is not.
6720 # To support the latter case, we have to write
6721 # test -z "$(somedir)" || $(mkdir_p) $(DESTDIR)$(somedir),
6722 # so the `.' trick is pointless.
6723 mkdir_p='mkdir -p --'
6724else
6725 # On NextStep and OpenStep, the `mkdir' command does not
6726 # recognize any option. It will interpret all options as
6727 # directories to create, and then abort because `.' already
6728 # exists.
6729 for d in ./-p ./--version;
6730 do
6731 test -d $d && rmdir $d
6732 done
6733 # $(mkinstalldirs) is defined by Automake if mkinstalldirs exists.
6734 if test -f "$ac_aux_dir/mkinstalldirs"; then
6735 mkdir_p='$(mkinstalldirs)'
6736 else
6737 mkdir_p='$(install_sh) -d'
6738 fi
6739fi
6740
6741for ac_prog in gawk mawk nawk awk
6742do
6743 # Extract the first word of "$ac_prog", so it can be a program name with args.
6744set dummy $ac_prog; ac_word=$2
6745echo "$as_me:$LINENO: checking for $ac_word" >&5
6746echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
6747if test "${ac_cv_prog_AWK+set}" = set; then
6748 echo $ECHO_N "(cached) $ECHO_C" >&6
6749else
6750 if test -n "$AWK"; then
6751 ac_cv_prog_AWK="$AWK" # Let the user override the test.
6752else
6753as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6754for as_dir in $PATH
6755do
6756 IFS=$as_save_IFS
6757 test -z "$as_dir" && as_dir=.
6758 for ac_exec_ext in '' $ac_executable_extensions; do
6759 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6760 ac_cv_prog_AWK="$ac_prog"
6761 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
6762 break 2
6763 fi
6764done
6765done
6766
6767fi
6768fi
6769AWK=$ac_cv_prog_AWK
6770if test -n "$AWK"; then
6771 echo "$as_me:$LINENO: result: $AWK" >&5
6772echo "${ECHO_T}$AWK" >&6
6773else
6774 echo "$as_me:$LINENO: result: no" >&5
6775echo "${ECHO_T}no" >&6
6776fi
6777
6778 test -n "$AWK" && break
6779done
6780
e28b3332
DJ
6781 ac_config_commands="$ac_config_commands depfiles"
6782
6783
6784am_make=${MAKE-make}
6785cat > confinc << 'END'
6786am__doit:
6787 @echo done
6788.PHONY: am__doit
6789END
6790# If we don't find an include directive, just comment out the code.
6791echo "$as_me:$LINENO: checking for style of include used by $am_make" >&5
6792echo $ECHO_N "checking for style of include used by $am_make... $ECHO_C" >&6
6793am__include="#"
6794am__quote=
6795_am_result=none
6796# First try GNU make style include.
6797echo "include confinc" > confmf
6798# We grep out `Entering directory' and `Leaving directory'
6799# messages which can occur if `w' ends up in MAKEFLAGS.
6800# In particular we don't look at `^make:' because GNU make might
6801# be invoked under some other name (usually "gmake"), in which
6802# case it prints its new name instead of `make'.
6803if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then
6804 am__include=include
6805 am__quote=
6806 _am_result=GNU
6807fi
6808# Now try BSD make style include.
6809if test "$am__include" = "#"; then
6810 echo '.include "confinc"' > confmf
6811 if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then
6812 am__include=.include
6813 am__quote="\""
6814 _am_result=BSD
6815 fi
6816fi
6817
6818
6819echo "$as_me:$LINENO: result: $_am_result" >&5
6820echo "${ECHO_T}$_am_result" >&6
6821rm -f confinc confmf
6822
6823# Check whether --enable-dependency-tracking or --disable-dependency-tracking was given.
6824if test "${enable_dependency_tracking+set}" = set; then
6825 enableval="$enable_dependency_tracking"
6826
6827fi;
6828if test "x$enable_dependency_tracking" != xno; then
6829 am_depcomp="$ac_aux_dir/depcomp"
6830 AMDEPBACKSLASH='\'
6831fi
6832
6833
6834if test "x$enable_dependency_tracking" != xno; then
6835 AMDEP_TRUE=
6836 AMDEP_FALSE='#'
6837else
6838 AMDEP_TRUE='#'
6839 AMDEP_FALSE=
6840fi
6841
6842
6843
6844# test to see if srcdir already configured
6845if test "`cd $srcdir && pwd`" != "`pwd`" &&
6846 test -f $srcdir/config.status; then
6847 { { echo "$as_me:$LINENO: error: source directory already configured; run \"make distclean\" there first" >&5
6848echo "$as_me: error: source directory already configured; run \"make distclean\" there first" >&2;}
6849 { (exit 1); exit 1; }; }
6850fi
6851
6852# test whether we have cygpath
6853if test -z "$CYGPATH_W"; then
6854 if (cygpath --version) >/dev/null 2>/dev/null; then
6855 CYGPATH_W='cygpath -w'
6856 else
6857 CYGPATH_W=echo
6858 fi
6859fi
6860
6861
6862# Define the identity of the package.
6863 PACKAGE=gdb
6864 VERSION=UNUSED-VERSION
6865
6866
6867# Some tools Automake needs.
6868
6869ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"}
6870
6871
6872AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"}
6873
6874
6875AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"}
6876
6877
6878AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"}
6879
6880
6881MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"}
6882
6883install_sh=${install_sh-"$am_aux_dir/install-sh"}
6884
6885# Installed binaries are usually stripped using `strip' when the user
6886# run `make install-strip'. However `strip' might not be the right
6887# tool to use in cross-compilation environments, therefore Automake
6888# will honor the `STRIP' environment variable to overrule this program.
6889if test "$cross_compiling" != no; then
6890 if test -n "$ac_tool_prefix"; then
6891 # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
6892set dummy ${ac_tool_prefix}strip; ac_word=$2
6893echo "$as_me:$LINENO: checking for $ac_word" >&5
6894echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
6895if test "${ac_cv_prog_STRIP+set}" = set; then
6896 echo $ECHO_N "(cached) $ECHO_C" >&6
6897else
6898 if test -n "$STRIP"; then
6899 ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
6900else
6901as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6902for as_dir in $PATH
6903do
6904 IFS=$as_save_IFS
6905 test -z "$as_dir" && as_dir=.
6906 for ac_exec_ext in '' $ac_executable_extensions; do
6907 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6908 ac_cv_prog_STRIP="${ac_tool_prefix}strip"
6909 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
6910 break 2
6911 fi
6912done
6913done
6914
6915fi
6916fi
6917STRIP=$ac_cv_prog_STRIP
6918if test -n "$STRIP"; then
6919 echo "$as_me:$LINENO: result: $STRIP" >&5
6920echo "${ECHO_T}$STRIP" >&6
6921else
6922 echo "$as_me:$LINENO: result: no" >&5
6923echo "${ECHO_T}no" >&6
6924fi
6925
6926fi
6927if test -z "$ac_cv_prog_STRIP"; then
6928 ac_ct_STRIP=$STRIP
6929 # Extract the first word of "strip", so it can be a program name with args.
6930set dummy strip; ac_word=$2
6931echo "$as_me:$LINENO: checking for $ac_word" >&5
6932echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
6933if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then
6934 echo $ECHO_N "(cached) $ECHO_C" >&6
6935else
6936 if test -n "$ac_ct_STRIP"; then
6937 ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
6938else
6939as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6940for as_dir in $PATH
6941do
6942 IFS=$as_save_IFS
6943 test -z "$as_dir" && as_dir=.
6944 for ac_exec_ext in '' $ac_executable_extensions; do
6945 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6946 ac_cv_prog_ac_ct_STRIP="strip"
6947 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
6948 break 2
6949 fi
6950done
6951done
6952
6953 test -z "$ac_cv_prog_ac_ct_STRIP" && ac_cv_prog_ac_ct_STRIP=":"
6954fi
6955fi
6956ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
6957if test -n "$ac_ct_STRIP"; then
6958 echo "$as_me:$LINENO: result: $ac_ct_STRIP" >&5
6959echo "${ECHO_T}$ac_ct_STRIP" >&6
6960else
6961 echo "$as_me:$LINENO: result: no" >&5
6962echo "${ECHO_T}no" >&6
6963fi
6964
6965 STRIP=$ac_ct_STRIP
6966else
6967 STRIP="$ac_cv_prog_STRIP"
6968fi
6969
6970fi
6971INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s"
6972
6973# We need awk for the "check" target. The system "awk" is bad on
6974# some platforms.
6975# Always define AMTAR for backward compatibility.
6976
6977AMTAR=${AMTAR-"${am_missing_run}tar"}
6978
6979am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'
6980
6981
6982
6983
6984depcc="$CC" am_compiler_list=
6985
6986echo "$as_me:$LINENO: checking dependency style of $depcc" >&5
6987echo $ECHO_N "checking dependency style of $depcc... $ECHO_C" >&6
6988if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then
6989 echo $ECHO_N "(cached) $ECHO_C" >&6
6990else
6991 if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
6992 # We make a subdir and do the tests there. Otherwise we can end up
6993 # making bogus files that we don't know about and never remove. For
6994 # instance it was reported that on HP-UX the gcc test will end up
6995 # making a dummy file named `D' -- because `-MD' means `put the output
6996 # in D'.
6997 mkdir conftest.dir
6998 # Copy depcomp to subdir because otherwise we won't find it if we're
6999 # using a relative directory.
7000 cp "$am_depcomp" conftest.dir
7001 cd conftest.dir
7002 # We will build objects and dependencies in a subdirectory because
7003 # it helps to detect inapplicable dependency modes. For instance
7004 # both Tru64's cc and ICC support -MD to output dependencies as a
7005 # side effect of compilation, but ICC will put the dependencies in
7006 # the current directory while Tru64 will put them in the object
7007 # directory.
7008 mkdir sub
7009
7010 am_cv_CC_dependencies_compiler_type=none
7011 if test "$am_compiler_list" = ""; then
7012 am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
7013 fi
7014 for depmode in $am_compiler_list; do
7015 # Setup a source with many dependencies, because some compilers
7016 # like to wrap large dependency lists on column 80 (with \), and
7017 # we should not choose a depcomp mode which is confused by this.
7018 #
7019 # We need to recreate these files for each test, as the compiler may
7020 # overwrite some of them when testing with obscure command lines.
7021 # This happens at least with the AIX C compiler.
7022 : > sub/conftest.c
7023 for i in 1 2 3 4 5 6; do
7024 echo '#include "conftst'$i'.h"' >> sub/conftest.c
7025 # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
7026 # Solaris 8's {/usr,}/bin/sh.
7027 touch sub/conftst$i.h
7028 done
7029 echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
7030
7031 case $depmode in
7032 nosideeffect)
7033 # after this tag, mechanisms are not by side-effect, so they'll
7034 # only be used when explicitly requested
7035 if test "x$enable_dependency_tracking" = xyes; then
7036 continue
7037 else
7038 break
7039 fi
7040 ;;
7041 none) break ;;
7042 esac
7043 # We check with `-c' and `-o' for the sake of the "dashmstdout"
7044 # mode. It turns out that the SunPro C++ compiler does not properly
7045 # handle `-M -o', and we need to detect this.
7046 if depmode=$depmode \
7047 source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
7048 depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
7049 $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \
7050 >/dev/null 2>conftest.err &&
7051 grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
7052 grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 &&
7053 ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
7054 # icc doesn't choke on unknown options, it will just issue warnings
7055 # or remarks (even with -Werror). So we grep stderr for any message
7056 # that says an option was ignored or not supported.
7057 # When given -MP, icc 7.0 and 7.1 complain thusly:
7058 # icc: Command line warning: ignoring option '-M'; no argument required
7059 # The diagnosis changed in icc 8.0:
7060 # icc: Command line remark: option '-MP' not supported
7061 if (grep 'ignoring option' conftest.err ||
7062 grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
7063 am_cv_CC_dependencies_compiler_type=$depmode
7064 break
7065 fi
7066 fi
7067 done
7068
7069 cd ..
7070 rm -rf conftest.dir
7071else
7072 am_cv_CC_dependencies_compiler_type=none
7073fi
7074
7075fi
7076echo "$as_me:$LINENO: result: $am_cv_CC_dependencies_compiler_type" >&5
7077echo "${ECHO_T}$am_cv_CC_dependencies_compiler_type" >&6
7078CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type
7079
7080
7081
7082if
7083 test "x$enable_dependency_tracking" != xno \
7084 && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then
7085 am__fastdepCC_TRUE=
7086 am__fastdepCC_FALSE='#'
7087else
7088 am__fastdepCC_TRUE='#'
7089 am__fastdepCC_FALSE=
7090fi
7091
7092
7093
7094
bec39cab
AC
7095debugdir=${libdir}/debug
7096
7097
b4e70030 7098# Check whether --with-separate-debug-dir or --without-separate-debug-dir was given.
bec39cab 7099if test "${with_separate_debug_dir+set}" = set; then
783e057b
DJ
7100 withval="$with_separate_debug_dir"
7101 debugdir="${withval}"
7102fi;
20e95c23 7103
20e95c23 7104
783e057b
DJ
7105 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
7106 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
7107 ac_define_dir=`eval echo $debugdir`
7108 ac_define_dir=`eval echo $ac_define_dir`
20e95c23 7109
783e057b
DJ
7110cat >>confdefs.h <<_ACEOF
7111#define DEBUGDIR "$ac_define_dir"
20e95c23 7112_ACEOF
20e95c23 7113
20e95c23 7114
783e057b 7115#AC_DEFINE_UNQUOTED(DEBUGDIR, "$debugdir"),
20e95c23 7116
783e057b
DJ
7117if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
7118 if test "x$prefix" = xNONE; then
7119 test_prefix=/usr/local
7120 else
7121 test_prefix=$prefix
7122 fi
20e95c23 7123else
783e057b 7124 test_prefix=$exec_prefix
20e95c23 7125fi
783e057b
DJ
7126case ${debugdir} in
7127"${test_prefix}"|"${test_prefix}/"*|\
7128'${exec_prefix}'|'${exec_prefix}/'*)
20e95c23
DJ
7129
7130cat >>confdefs.h <<\_ACEOF
783e057b 7131#define DEBUGDIR_RELOCATABLE 1
20e95c23
DJ
7132_ACEOF
7133
783e057b
DJ
7134 ;;
7135esac
7136
20e95c23 7137
29b0e8a2
JM
7138# Check whether --with-relocated-sources or --without-relocated-sources was given.
7139if test "${with_relocated_sources+set}" = set; then
7140 withval="$with_relocated_sources"
7141 reloc_srcdir="${withval}"
7142
7143 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
7144 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
7145 ac_define_dir=`eval echo $reloc_srcdir`
7146 ac_define_dir=`eval echo $ac_define_dir`
7147
7148cat >>confdefs.h <<_ACEOF
7149#define RELOC_SRCDIR "$ac_define_dir"
7150_ACEOF
7151
7152
7153
7154fi;
7155
7156
20e95c23 7157
783e057b 7158subdirs="$subdirs doc testsuite"
20e95c23
DJ
7159
7160
783e057b
DJ
7161# Check whether to support alternative target configurations
7162# Check whether --enable-targets or --disable-targets was given.
7163if test "${enable_targets+set}" = set; then
7164 enableval="$enable_targets"
7165 case "${enableval}" in
7166 yes | "") { { echo "$as_me:$LINENO: error: enable-targets option must specify target names or 'all'" >&5
7167echo "$as_me: error: enable-targets option must specify target names or 'all'" >&2;}
7168 { (exit 1); exit 1; }; }
7169 ;;
7170 no) enable_targets= ;;
7171 *) enable_targets=$enableval ;;
7172esac
7173fi;
20e95c23 7174
783e057b
DJ
7175# Check whether to enable 64-bit support on 32-bit hosts
7176# Check whether --enable-64-bit-bfd or --disable-64-bit-bfd was given.
7177if test "${enable_64_bit_bfd+set}" = set; then
7178 enableval="$enable_64_bit_bfd"
7179 case "${enableval}" in
7180 yes) want64=true ;;
7181 no) want64=false ;;
7182 *) { { echo "$as_me:$LINENO: error: bad value ${enableval} for 64-bit-bfd option" >&5
7183echo "$as_me: error: bad value ${enableval} for 64-bit-bfd option" >&2;}
7184 { (exit 1); exit 1; }; } ;;
7185esac
7186else
7187 want64=false
7188fi;
7189# Provide defaults for some variables set by the per-host and per-target
7190# configuration.
7191gdb_host_obs=posix-hdep.o
20e95c23 7192
783e057b
DJ
7193if test "${target}" = "${host}"; then
7194 gdb_native=yes
7195else
7196 gdb_native=no
7197fi
20e95c23 7198
783e057b 7199. $srcdir/configure.host
20e95c23 7200
783e057b 7201# Accumulate some settings from configure.tgt over all enabled targets
20e95c23 7202
783e057b
DJ
7203TARGET_OBS=
7204all_targets=
20e95c23 7205
783e057b 7206for targ_alias in `echo $target_alias $enable_targets | sed 's/,/ /g'`
20e95c23 7207do
783e057b
DJ
7208 if test "$targ_alias" = "all"; then
7209 all_targets=true
7210 else
7211 # Canonicalize the secondary target names.
7212 result=`$ac_config_sub $targ_alias 2>/dev/null`
7213 if test -n "$result"; then
7214 targ=$result
7215 else
7216 targ=$targ_alias
7217 fi
20e95c23 7218
783e057b 7219 . ${srcdir}/configure.tgt
20e95c23 7220
783e057b
DJ
7221 # Target-specific object files
7222 for i in ${gdb_target_obs}; do
7223 case " $TARGET_OBS " in
7224 *" ${i} "*) ;;
7225 *)
7226 TARGET_OBS="$TARGET_OBS ${i}"
7227 ;;
7228 esac
7229 done
20e95c23 7230
783e057b
DJ
7231 # Check whether this target needs 64-bit CORE_ADDR
7232 if test x${want64} = xfalse; then
7233 . ${srcdir}/../bfd/config.bfd
7234 fi
7235 fi
20e95c23
DJ
7236done
7237
783e057b
DJ
7238if test x${all_targets} = xtrue; then
7239
7240 # We want all 64-bit targets if we either:
7241 # - run on a 64-bit host or
7242 # - already require 64-bit support for some other target or
7243 # - the --enable-64-bit-bfd option was supplied
7244 # Otherwise we only support all 32-bit targets.
7245 #
7246 # NOTE: This test must be in sync with the corresponding
7247 # tests in BFD!
20e95c23 7248
783e057b
DJ
7249 if test x${want64} = xfalse; then
7250 echo "$as_me:$LINENO: checking for long" >&5
c0993dbe
UW
7251echo $ECHO_N "checking for long... $ECHO_C" >&6
7252if test "${ac_cv_type_long+set}" = set; then
7253 echo $ECHO_N "(cached) $ECHO_C" >&6
7254else
7255 cat >conftest.$ac_ext <<_ACEOF
7256/* confdefs.h. */
7257_ACEOF
7258cat confdefs.h >>conftest.$ac_ext
7259cat >>conftest.$ac_ext <<_ACEOF
7260/* end confdefs.h. */
7261$ac_includes_default
7262int
7263main ()
7264{
7265if ((long *) 0)
7266 return 0;
7267if (sizeof (long))
7268 return 0;
7269 ;
7270 return 0;
7271}
7272_ACEOF
7273rm -f conftest.$ac_objext
7274if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7275 (eval $ac_compile) 2>conftest.er1
7276 ac_status=$?
7277 grep -v '^ *+' conftest.er1 >conftest.err
7278 rm -f conftest.er1
7279 cat conftest.err >&5
7280 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7281 (exit $ac_status); } &&
7282 { ac_try='test -z "$ac_c_werror_flag"
7283 || test ! -s conftest.err'
7284 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7285 (eval $ac_try) 2>&5
7286 ac_status=$?
7287 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7288 (exit $ac_status); }; } &&
7289 { ac_try='test -s conftest.$ac_objext'
7290 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7291 (eval $ac_try) 2>&5
7292 ac_status=$?
7293 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7294 (exit $ac_status); }; }; then
7295 ac_cv_type_long=yes
7296else
7297 echo "$as_me: failed program was:" >&5
7298sed 's/^/| /' conftest.$ac_ext >&5
7299
7300ac_cv_type_long=no
7301fi
7302rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
7303fi
7304echo "$as_me:$LINENO: result: $ac_cv_type_long" >&5
7305echo "${ECHO_T}$ac_cv_type_long" >&6
7306
7307echo "$as_me:$LINENO: checking size of long" >&5
7308echo $ECHO_N "checking size of long... $ECHO_C" >&6
7309if test "${ac_cv_sizeof_long+set}" = set; then
7310 echo $ECHO_N "(cached) $ECHO_C" >&6
7311else
7312 if test "$ac_cv_type_long" = yes; then
7313 # The cast to unsigned long works around a bug in the HP C Compiler
7314 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7315 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7316 # This bug is HP SR number 8606223364.
7317 if test "$cross_compiling" = yes; then
7318 # Depending upon the size, compute the lo and hi bounds.
7319cat >conftest.$ac_ext <<_ACEOF
7320/* confdefs.h. */
7321_ACEOF
7322cat confdefs.h >>conftest.$ac_ext
7323cat >>conftest.$ac_ext <<_ACEOF
7324/* end confdefs.h. */
7325$ac_includes_default
7326int
7327main ()
7328{
7329static int test_array [1 - 2 * !(((long) (sizeof (long))) >= 0)];
7330test_array [0] = 0
7331
7332 ;
7333 return 0;
7334}
7335_ACEOF
7336rm -f conftest.$ac_objext
7337if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7338 (eval $ac_compile) 2>conftest.er1
7339 ac_status=$?
7340 grep -v '^ *+' conftest.er1 >conftest.err
7341 rm -f conftest.er1
7342 cat conftest.err >&5
7343 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7344 (exit $ac_status); } &&
7345 { ac_try='test -z "$ac_c_werror_flag"
7346 || test ! -s conftest.err'
7347 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7348 (eval $ac_try) 2>&5
7349 ac_status=$?
7350 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7351 (exit $ac_status); }; } &&
7352 { ac_try='test -s conftest.$ac_objext'
7353 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7354 (eval $ac_try) 2>&5
7355 ac_status=$?
7356 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7357 (exit $ac_status); }; }; then
7358 ac_lo=0 ac_mid=0
7359 while :; do
7360 cat >conftest.$ac_ext <<_ACEOF
7361/* confdefs.h. */
7362_ACEOF
7363cat confdefs.h >>conftest.$ac_ext
7364cat >>conftest.$ac_ext <<_ACEOF
7365/* end confdefs.h. */
7366$ac_includes_default
7367int
7368main ()
7369{
7370static int test_array [1 - 2 * !(((long) (sizeof (long))) <= $ac_mid)];
7371test_array [0] = 0
7372
7373 ;
7374 return 0;
7375}
7376_ACEOF
7377rm -f conftest.$ac_objext
7378if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7379 (eval $ac_compile) 2>conftest.er1
7380 ac_status=$?
7381 grep -v '^ *+' conftest.er1 >conftest.err
7382 rm -f conftest.er1
7383 cat conftest.err >&5
7384 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7385 (exit $ac_status); } &&
7386 { ac_try='test -z "$ac_c_werror_flag"
7387 || test ! -s conftest.err'
7388 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7389 (eval $ac_try) 2>&5
7390 ac_status=$?
7391 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7392 (exit $ac_status); }; } &&
7393 { ac_try='test -s conftest.$ac_objext'
7394 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7395 (eval $ac_try) 2>&5
7396 ac_status=$?
7397 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7398 (exit $ac_status); }; }; then
7399 ac_hi=$ac_mid; break
7400else
7401 echo "$as_me: failed program was:" >&5
7402sed 's/^/| /' conftest.$ac_ext >&5
7403
7404ac_lo=`expr $ac_mid + 1`
7405 if test $ac_lo -le $ac_mid; then
7406 ac_lo= ac_hi=
7407 break
7408 fi
7409 ac_mid=`expr 2 '*' $ac_mid + 1`
7410fi
7411rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
7412 done
7413else
7414 echo "$as_me: failed program was:" >&5
7415sed 's/^/| /' conftest.$ac_ext >&5
7416
7417cat >conftest.$ac_ext <<_ACEOF
7418/* confdefs.h. */
7419_ACEOF
7420cat confdefs.h >>conftest.$ac_ext
7421cat >>conftest.$ac_ext <<_ACEOF
7422/* end confdefs.h. */
7423$ac_includes_default
7424int
7425main ()
7426{
7427static int test_array [1 - 2 * !(((long) (sizeof (long))) < 0)];
7428test_array [0] = 0
7429
7430 ;
7431 return 0;
7432}
7433_ACEOF
7434rm -f conftest.$ac_objext
7435if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7436 (eval $ac_compile) 2>conftest.er1
7437 ac_status=$?
7438 grep -v '^ *+' conftest.er1 >conftest.err
7439 rm -f conftest.er1
7440 cat conftest.err >&5
7441 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7442 (exit $ac_status); } &&
7443 { ac_try='test -z "$ac_c_werror_flag"
7444 || test ! -s conftest.err'
7445 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7446 (eval $ac_try) 2>&5
7447 ac_status=$?
7448 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7449 (exit $ac_status); }; } &&
7450 { ac_try='test -s conftest.$ac_objext'
7451 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7452 (eval $ac_try) 2>&5
7453 ac_status=$?
7454 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7455 (exit $ac_status); }; }; then
7456 ac_hi=-1 ac_mid=-1
7457 while :; do
7458 cat >conftest.$ac_ext <<_ACEOF
7459/* confdefs.h. */
7460_ACEOF
7461cat confdefs.h >>conftest.$ac_ext
7462cat >>conftest.$ac_ext <<_ACEOF
7463/* end confdefs.h. */
7464$ac_includes_default
7465int
7466main ()
7467{
7468static int test_array [1 - 2 * !(((long) (sizeof (long))) >= $ac_mid)];
7469test_array [0] = 0
7470
7471 ;
7472 return 0;
7473}
7474_ACEOF
7475rm -f conftest.$ac_objext
7476if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7477 (eval $ac_compile) 2>conftest.er1
7478 ac_status=$?
7479 grep -v '^ *+' conftest.er1 >conftest.err
7480 rm -f conftest.er1
7481 cat conftest.err >&5
7482 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7483 (exit $ac_status); } &&
7484 { ac_try='test -z "$ac_c_werror_flag"
7485 || test ! -s conftest.err'
7486 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7487 (eval $ac_try) 2>&5
7488 ac_status=$?
7489 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7490 (exit $ac_status); }; } &&
7491 { ac_try='test -s conftest.$ac_objext'
7492 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7493 (eval $ac_try) 2>&5
7494 ac_status=$?
7495 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7496 (exit $ac_status); }; }; then
7497 ac_lo=$ac_mid; break
7498else
7499 echo "$as_me: failed program was:" >&5
7500sed 's/^/| /' conftest.$ac_ext >&5
7501
7502ac_hi=`expr '(' $ac_mid ')' - 1`
7503 if test $ac_mid -le $ac_hi; then
7504 ac_lo= ac_hi=
7505 break
7506 fi
7507 ac_mid=`expr 2 '*' $ac_mid`
7508fi
7509rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
7510 done
7511else
7512 echo "$as_me: failed program was:" >&5
7513sed 's/^/| /' conftest.$ac_ext >&5
7514
7515ac_lo= ac_hi=
7516fi
7517rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
7518fi
7519rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
7520# Binary search between lo and hi bounds.
7521while test "x$ac_lo" != "x$ac_hi"; do
7522 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
7523 cat >conftest.$ac_ext <<_ACEOF
7524/* confdefs.h. */
7525_ACEOF
7526cat confdefs.h >>conftest.$ac_ext
7527cat >>conftest.$ac_ext <<_ACEOF
7528/* end confdefs.h. */
7529$ac_includes_default
7530int
7531main ()
7532{
7533static int test_array [1 - 2 * !(((long) (sizeof (long))) <= $ac_mid)];
7534test_array [0] = 0
7535
7536 ;
7537 return 0;
7538}
7539_ACEOF
7540rm -f conftest.$ac_objext
7541if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7542 (eval $ac_compile) 2>conftest.er1
7543 ac_status=$?
7544 grep -v '^ *+' conftest.er1 >conftest.err
7545 rm -f conftest.er1
7546 cat conftest.err >&5
7547 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7548 (exit $ac_status); } &&
7549 { ac_try='test -z "$ac_c_werror_flag"
7550 || test ! -s conftest.err'
7551 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7552 (eval $ac_try) 2>&5
7553 ac_status=$?
7554 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7555 (exit $ac_status); }; } &&
7556 { ac_try='test -s conftest.$ac_objext'
7557 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7558 (eval $ac_try) 2>&5
7559 ac_status=$?
7560 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7561 (exit $ac_status); }; }; then
7562 ac_hi=$ac_mid
7563else
7564 echo "$as_me: failed program was:" >&5
7565sed 's/^/| /' conftest.$ac_ext >&5
7566
7567ac_lo=`expr '(' $ac_mid ')' + 1`
7568fi
7569rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
7570done
7571case $ac_lo in
7572?*) ac_cv_sizeof_long=$ac_lo;;
d5af19ba
DJ
7573'') { { echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
7574echo "$as_me: error: in \`$ac_pwd':" >&2;}
7575{ { echo "$as_me:$LINENO: error: cannot compute sizeof (long), 77
c0993dbe
UW
7576See \`config.log' for more details." >&5
7577echo "$as_me: error: cannot compute sizeof (long), 77
7578See \`config.log' for more details." >&2;}
d5af19ba 7579 { (exit 1); exit 1; }; }; } ;;
c0993dbe
UW
7580esac
7581else
7582 if test "$cross_compiling" = yes; then
d5af19ba
DJ
7583 { { echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
7584echo "$as_me: error: in \`$ac_pwd':" >&2;}
7585{ { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
c0993dbe
UW
7586See \`config.log' for more details." >&5
7587echo "$as_me: error: cannot run test program while cross compiling
7588See \`config.log' for more details." >&2;}
d5af19ba 7589 { (exit 1); exit 1; }; }; }
c0993dbe
UW
7590else
7591 cat >conftest.$ac_ext <<_ACEOF
7592/* confdefs.h. */
7593_ACEOF
7594cat confdefs.h >>conftest.$ac_ext
7595cat >>conftest.$ac_ext <<_ACEOF
7596/* end confdefs.h. */
7597$ac_includes_default
7598long longval () { return (long) (sizeof (long)); }
7599unsigned long ulongval () { return (long) (sizeof (long)); }
7600#include <stdio.h>
7601#include <stdlib.h>
7602int
7603main ()
7604{
7605
7606 FILE *f = fopen ("conftest.val", "w");
7607 if (! f)
7608 exit (1);
7609 if (((long) (sizeof (long))) < 0)
7610 {
7611 long i = longval ();
7612 if (i != ((long) (sizeof (long))))
7613 exit (1);
7614 fprintf (f, "%ld\n", i);
7615 }
7616 else
7617 {
7618 unsigned long i = ulongval ();
7619 if (i != ((long) (sizeof (long))))
7620 exit (1);
7621 fprintf (f, "%lu\n", i);
7622 }
7623 exit (ferror (f) || fclose (f) != 0);
7624
7625 ;
7626 return 0;
7627}
7628_ACEOF
7629rm -f conftest$ac_exeext
7630if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7631 (eval $ac_link) 2>&5
7632 ac_status=$?
7633 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7634 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
7635 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7636 (eval $ac_try) 2>&5
7637 ac_status=$?
7638 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7639 (exit $ac_status); }; }; then
7640 ac_cv_sizeof_long=`cat conftest.val`
7641else
7642 echo "$as_me: program exited with status $ac_status" >&5
7643echo "$as_me: failed program was:" >&5
7644sed 's/^/| /' conftest.$ac_ext >&5
7645
7646( exit $ac_status )
d5af19ba
DJ
7647{ { echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
7648echo "$as_me: error: in \`$ac_pwd':" >&2;}
c0993dbe
UW
7649{ { echo "$as_me:$LINENO: error: cannot compute sizeof (long), 77
7650See \`config.log' for more details." >&5
7651echo "$as_me: error: cannot compute sizeof (long), 77
7652See \`config.log' for more details." >&2;}
d5af19ba 7653 { (exit 1); exit 1; }; }; }
c0993dbe
UW
7654fi
7655rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
7656fi
7657fi
7658rm -f conftest.val
7659else
7660 ac_cv_sizeof_long=0
7661fi
7662fi
7663echo "$as_me:$LINENO: result: $ac_cv_sizeof_long" >&5
7664echo "${ECHO_T}$ac_cv_sizeof_long" >&6
7665cat >>confdefs.h <<_ACEOF
7666#define SIZEOF_LONG $ac_cv_sizeof_long
7667_ACEOF
7668
7669
7670 if test "x${ac_cv_sizeof_long}" = "x8"; then
7671 want64=true
7672 fi
7673 fi
7674 if test x${want64} = xtrue; then
7675 TARGET_OBS='$(ALL_TARGET_OBS) $(ALL_64_TARGET_OBS)'
7676 else
7677 TARGET_OBS='$(ALL_TARGET_OBS)'
7678 fi
7679fi
7680
7681
7682
7683# For other settings, only the main target counts.
7684gdb_sim=
7685gdb_osabi=
7686build_gdbserver=
7687targ=$target; . ${srcdir}/configure.tgt
7688
7689# Fetch the default architecture and default target vector from BFD.
7690targ=$target; . $srcdir/../bfd/config.bfd
7691
7692# We only want the first architecture, so strip off the others if
7693# there is more than one.
7694targ_archs=`echo $targ_archs | sed 's/ .*//'`
7695
7696if test "x$targ_archs" != x; then
7697
7698cat >>confdefs.h <<_ACEOF
7699#define DEFAULT_BFD_ARCH $targ_archs
7700_ACEOF
7701
7702fi
7703if test "x$targ_defvec" != x; then
7704
7705cat >>confdefs.h <<_ACEOF
7706#define DEFAULT_BFD_VEC $targ_defvec
7707_ACEOF
7708
7709fi
7710
c0993dbe
UW
7711# The CLI cannot be disabled yet, but may be in the future.
7712
7713# Enable CLI.
7714# Check whether --enable-gdbcli or --disable-gdbcli was given.
7715if test "${enable_gdbcli+set}" = set; then
7716 enableval="$enable_gdbcli"
7717 case $enableval in
7718 yes)
7719 ;;
7720 no)
7721 { { echo "$as_me:$LINENO: error: the command-line interface cannot be disabled yet" >&5
7722echo "$as_me: error: the command-line interface cannot be disabled yet" >&2;}
7723 { (exit 1); exit 1; }; } ;;
7724 *)
7725 { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-gdbcli" >&5
7726echo "$as_me: error: bad value $enableval for --enable-gdbcli" >&2;}
7727 { (exit 1); exit 1; }; } ;;
7728 esac
7729else
7730 enable_gdbcli=yes
7731fi;
7732if test x"$enable_gdbcli" = xyes; then
7733 if test -d $srcdir/cli; then
7734 CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_CLI_OBS)"
7735 CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_CLI_DEPS)"
7736 CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_CLI_SRCS)"
7737 ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_CLI_CFLAGS)"
7738 fi
7739fi
7740
7741# Enable MI.
7742# Check whether --enable-gdbmi or --disable-gdbmi was given.
7743if test "${enable_gdbmi+set}" = set; then
7744 enableval="$enable_gdbmi"
7745 case $enableval in
7746 yes | no)
7747 ;;
7748 *)
7749 { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-gdbmi" >&5
7750echo "$as_me: error: bad value $enableval for --enable-gdbmi" >&2;}
7751 { (exit 1); exit 1; }; } ;;
7752 esac
7753else
7754 enable_gdbmi=yes
7755fi;
7756if test x"$enable_gdbmi" = xyes; then
7757 if test -d $srcdir/mi; then
7758 CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_MI_OBS)"
7759 CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_MI_DEPS)"
7760 CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_MI_SRCS)"
7761 ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_MI_CFLAGS)"
7762 fi
7763fi
7764
7765# Enable TUI.
7766# Check whether --enable-tui or --disable-tui was given.
7767if test "${enable_tui+set}" = set; then
7768 enableval="$enable_tui"
7769 case $enableval in
3ca64bd3 7770 yes | no | auto)
c0993dbe
UW
7771 ;;
7772 *)
7773 { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-tui" >&5
7774echo "$as_me: error: bad value $enableval for --enable-tui" >&2;}
7775 { (exit 1); exit 1; }; } ;;
7776 esac
7777else
3ca64bd3 7778 enable_tui=auto
c0993dbe
UW
7779fi;
7780
7781# Enable gdbtk.
7782# Check whether --enable-gdbtk or --disable-gdbtk was given.
7783if test "${enable_gdbtk+set}" = set; then
7784 enableval="$enable_gdbtk"
7785 case $enableval in
7786 yes | no)
7787 ;;
7788 *)
7789 { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-gdbtk" >&5
7790echo "$as_me: error: bad value $enableval for --enable-gdbtk" >&2;}
7791 { (exit 1); exit 1; }; } ;;
7792 esac
7793else
5062cc19 7794 if test -d $srcdir/gdbtk; then
c0993dbe
UW
7795 enable_gdbtk=yes
7796 else
7797 enable_gdbtk=no
7798 fi
7799fi;
7800# We unconditionally disable gdbtk tests on selected platforms.
7801case $host_os in
7802 go32* | windows*)
7803 { echo "$as_me:$LINENO: WARNING: gdbtk isn't supported on $host; disabling" >&5
7804echo "$as_me: WARNING: gdbtk isn't supported on $host; disabling" >&2;}
7805 enable_gdbtk=no ;;
7806esac
7807
7808# Libunwind support.
bec39cab 7809
b4e70030 7810# Check whether --with-libunwind or --without-libunwind was given.
bec39cab 7811if test "${with_libunwind+set}" = set; then
b4e70030
JB
7812 withval="$with_libunwind"
7813 case "${withval}" in
bec39cab
AC
7814 yes) enable_libunwind=yes ;;
7815 no) enable_libunwind=no ;;
7816 *) { { echo "$as_me:$LINENO: error: bad value ${withval} for GDB with-libunwind option" >&5
7817echo "$as_me: error: bad value ${withval} for GDB with-libunwind option" >&2;}
7818 { (exit 1); exit 1; }; } ;;
7819esac
7820else
7821
7822
a9322a30
TT
7823
7824for ac_header in libunwind.h libunwind-ia64.h
bec39cab
AC
7825do
7826as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
b4e70030
JB
7827if eval "test \"\${$as_ac_Header+set}\" = set"; then
7828 echo "$as_me:$LINENO: checking for $ac_header" >&5
7829echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
7830if eval "test \"\${$as_ac_Header+set}\" = set"; then
bec39cab
AC
7831 echo $ECHO_N "(cached) $ECHO_C" >&6
7832fi
b4e70030
JB
7833echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
7834echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
bec39cab
AC
7835else
7836 # Is the header compilable?
b4e70030
JB
7837echo "$as_me:$LINENO: checking $ac_header usability" >&5
7838echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
bec39cab
AC
7839cat >conftest.$ac_ext <<_ACEOF
7840/* confdefs.h. */
7841_ACEOF
7842cat confdefs.h >>conftest.$ac_ext
7843cat >>conftest.$ac_ext <<_ACEOF
7844/* end confdefs.h. */
7845$ac_includes_default
7846#include <$ac_header>
7847_ACEOF
7848rm -f conftest.$ac_objext
7849if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7850 (eval $ac_compile) 2>conftest.er1
7851 ac_status=$?
7852 grep -v '^ *+' conftest.er1 >conftest.err
7853 rm -f conftest.er1
7854 cat conftest.err >&5
7855 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7856 (exit $ac_status); } &&
b4e70030
JB
7857 { ac_try='test -z "$ac_c_werror_flag"
7858 || test ! -s conftest.err'
bec39cab
AC
7859 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7860 (eval $ac_try) 2>&5
7861 ac_status=$?
7862 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7863 (exit $ac_status); }; } &&
7864 { ac_try='test -s conftest.$ac_objext'
7865 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7866 (eval $ac_try) 2>&5
7867 ac_status=$?
7868 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7869 (exit $ac_status); }; }; then
7870 ac_header_compiler=yes
7871else
7872 echo "$as_me: failed program was:" >&5
7873sed 's/^/| /' conftest.$ac_ext >&5
7874
b4e70030 7875ac_header_compiler=no
bec39cab
AC
7876fi
7877rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
b4e70030
JB
7878echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
7879echo "${ECHO_T}$ac_header_compiler" >&6
bec39cab
AC
7880
7881# Is the header present?
b4e70030
JB
7882echo "$as_me:$LINENO: checking $ac_header presence" >&5
7883echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
bec39cab
AC
7884cat >conftest.$ac_ext <<_ACEOF
7885/* confdefs.h. */
7886_ACEOF
7887cat confdefs.h >>conftest.$ac_ext
7888cat >>conftest.$ac_ext <<_ACEOF
7889/* end confdefs.h. */
7890#include <$ac_header>
7891_ACEOF
7892if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
7893 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
7894 ac_status=$?
7895 grep -v '^ *+' conftest.er1 >conftest.err
7896 rm -f conftest.er1
7897 cat conftest.err >&5
7898 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7899 (exit $ac_status); } >/dev/null; then
7900 if test -s conftest.err; then
7901 ac_cpp_err=$ac_c_preproc_warn_flag
7902 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
7903 else
7904 ac_cpp_err=
7905 fi
7906else
7907 ac_cpp_err=yes
7908fi
7909if test -z "$ac_cpp_err"; then
7910 ac_header_preproc=yes
7911else
7912 echo "$as_me: failed program was:" >&5
7913sed 's/^/| /' conftest.$ac_ext >&5
7914
7915 ac_header_preproc=no
7916fi
7917rm -f conftest.err conftest.$ac_ext
b4e70030
JB
7918echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
7919echo "${ECHO_T}$ac_header_preproc" >&6
bec39cab
AC
7920
7921# So? What about this header?
7922case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
7923 yes:no: )
7924 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
7925echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
7926 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
7927echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
7928 ac_header_preproc=yes
7929 ;;
7930 no:yes:* )
7931 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
7932echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
7933 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
7934echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
7935 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
7936echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
7937 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
7938echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
7939 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
7940echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
7941 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
7942echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
b4e70030
JB
7943 (
7944 cat <<\_ASBOX
7945## ------------------------------------------ ##
7946## Report this to the AC_PACKAGE_NAME lists. ##
7947## ------------------------------------------ ##
7948_ASBOX
7949 ) |
7950 sed "s/^/$as_me: WARNING: /" >&2
bec39cab
AC
7951 ;;
7952esac
b4e70030
JB
7953echo "$as_me:$LINENO: checking for $ac_header" >&5
7954echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
7955if eval "test \"\${$as_ac_Header+set}\" = set"; then
bec39cab
AC
7956 echo $ECHO_N "(cached) $ECHO_C" >&6
7957else
7958 eval "$as_ac_Header=\$ac_header_preproc"
7959fi
b4e70030
JB
7960echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
7961echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
bec39cab
AC
7962
7963fi
7964if test `eval echo '${'$as_ac_Header'}'` = yes; then
7965 cat >>confdefs.h <<_ACEOF
7966#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
7967_ACEOF
7968
7969fi
7970
7971done
7972
a9322a30
TT
7973 if test x"$ac_cv_header_libunwind_h" = xyes -a x"$ac_cv_header_libunwind_ia64_h" = xyes; then
7974 enable_libunwind=yes;
7975 fi
7976
7977fi;
7978
7979if test x"$enable_libunwind" = xyes; then
7980
bec39cab 7981
a9322a30 7982for ac_header in libunwind.h libunwind-ia64.h
bec39cab
AC
7983do
7984as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
b4e70030
JB
7985if eval "test \"\${$as_ac_Header+set}\" = set"; then
7986 echo "$as_me:$LINENO: checking for $ac_header" >&5
7987echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
7988if eval "test \"\${$as_ac_Header+set}\" = set"; then
bec39cab
AC
7989 echo $ECHO_N "(cached) $ECHO_C" >&6
7990fi
b4e70030
JB
7991echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
7992echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
bec39cab
AC
7993else
7994 # Is the header compilable?
b4e70030
JB
7995echo "$as_me:$LINENO: checking $ac_header usability" >&5
7996echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
bec39cab
AC
7997cat >conftest.$ac_ext <<_ACEOF
7998/* confdefs.h. */
7999_ACEOF
8000cat confdefs.h >>conftest.$ac_ext
8001cat >>conftest.$ac_ext <<_ACEOF
8002/* end confdefs.h. */
8003$ac_includes_default
8004#include <$ac_header>
8005_ACEOF
8006rm -f conftest.$ac_objext
8007if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8008 (eval $ac_compile) 2>conftest.er1
8009 ac_status=$?
8010 grep -v '^ *+' conftest.er1 >conftest.err
8011 rm -f conftest.er1
8012 cat conftest.err >&5
8013 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8014 (exit $ac_status); } &&
b4e70030
JB
8015 { ac_try='test -z "$ac_c_werror_flag"
8016 || test ! -s conftest.err'
bec39cab
AC
8017 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8018 (eval $ac_try) 2>&5
8019 ac_status=$?
8020 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8021 (exit $ac_status); }; } &&
8022 { ac_try='test -s conftest.$ac_objext'
8023 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8024 (eval $ac_try) 2>&5
8025 ac_status=$?
8026 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8027 (exit $ac_status); }; }; then
8028 ac_header_compiler=yes
8029else
8030 echo "$as_me: failed program was:" >&5
8031sed 's/^/| /' conftest.$ac_ext >&5
8032
b4e70030 8033ac_header_compiler=no
bec39cab
AC
8034fi
8035rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
b4e70030
JB
8036echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
8037echo "${ECHO_T}$ac_header_compiler" >&6
bec39cab
AC
8038
8039# Is the header present?
b4e70030
JB
8040echo "$as_me:$LINENO: checking $ac_header presence" >&5
8041echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
bec39cab
AC
8042cat >conftest.$ac_ext <<_ACEOF
8043/* confdefs.h. */
8044_ACEOF
8045cat confdefs.h >>conftest.$ac_ext
8046cat >>conftest.$ac_ext <<_ACEOF
8047/* end confdefs.h. */
8048#include <$ac_header>
8049_ACEOF
8050if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
8051 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
8052 ac_status=$?
8053 grep -v '^ *+' conftest.er1 >conftest.err
8054 rm -f conftest.er1
8055 cat conftest.err >&5
8056 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8057 (exit $ac_status); } >/dev/null; then
8058 if test -s conftest.err; then
8059 ac_cpp_err=$ac_c_preproc_warn_flag
8060 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
8061 else
8062 ac_cpp_err=
8063 fi
8064else
8065 ac_cpp_err=yes
8066fi
8067if test -z "$ac_cpp_err"; then
8068 ac_header_preproc=yes
8069else
8070 echo "$as_me: failed program was:" >&5
8071sed 's/^/| /' conftest.$ac_ext >&5
8072
8073 ac_header_preproc=no
8074fi
8075rm -f conftest.err conftest.$ac_ext
b4e70030
JB
8076echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
8077echo "${ECHO_T}$ac_header_preproc" >&6
bec39cab
AC
8078
8079# So? What about this header?
8080case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
8081 yes:no: )
8082 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
8083echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
8084 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
8085echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
8086 ac_header_preproc=yes
8087 ;;
8088 no:yes:* )
8089 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
8090echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
8091 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
8092echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
8093 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
8094echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
8095 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
8096echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
8097 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
8098echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
8099 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
8100echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
b4e70030
JB
8101 (
8102 cat <<\_ASBOX
8103## ------------------------------------------ ##
8104## Report this to the AC_PACKAGE_NAME lists. ##
8105## ------------------------------------------ ##
8106_ASBOX
8107 ) |
8108 sed "s/^/$as_me: WARNING: /" >&2
bec39cab
AC
8109 ;;
8110esac
b4e70030
JB
8111echo "$as_me:$LINENO: checking for $ac_header" >&5
8112echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
8113if eval "test \"\${$as_ac_Header+set}\" = set"; then
bec39cab
AC
8114 echo $ECHO_N "(cached) $ECHO_C" >&6
8115else
8116 eval "$as_ac_Header=\$ac_header_preproc"
8117fi
b4e70030
JB
8118echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
8119echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
bec39cab
AC
8120
8121fi
8122if test `eval echo '${'$as_ac_Header'}'` = yes; then
8123 cat >>confdefs.h <<_ACEOF
8124#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
8125_ACEOF
8126
8127fi
8128
8129done
8130
bec39cab 8131
a9322a30
TT
8132cat >>confdefs.h <<\_ACEOF
8133#define HAVE_LIBUNWIND 1
8134_ACEOF
8135
8136 CONFIG_OBS="$CONFIG_OBS libunwind-frame.o"
8137 CONFIG_DEPS="$CONFIG_DEPS libunwind-frame.o"
8138 CONFIG_SRCS="$CONFIG_SRCS libunwind-frame.c"
8139fi
8140
cb01cfba
JB
8141opt_curses=no
8142
8143# Check whether --with-curses or --without-curses was given.
8144if test "${with_curses+set}" = set; then
8145 withval="$with_curses"
8146 opt_curses=$withval
8147fi;
8148
76a39ba7 8149prefer_curses=no
cb01cfba 8150if test "$opt_curses" = "yes"; then
76a39ba7 8151 prefer_curses=yes
cb01cfba
JB
8152fi
8153
a9322a30
TT
8154# Profiling support.
8155# Check whether --enable-profiling or --disable-profiling was given.
8156if test "${enable_profiling+set}" = set; then
8157 enableval="$enable_profiling"
8158 case $enableval in
8159 yes | no)
8160 ;;
8161 *)
8162 { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-profile" >&5
8163echo "$as_me: error: bad value $enableval for --enable-profile" >&2;}
8164 { (exit 1); exit 1; }; } ;;
8165 esac
8166else
8167 enable_profiling=no
b4e70030 8168fi;
bec39cab 8169
bec39cab 8170
a9322a30
TT
8171
8172for ac_func in monstartup _mcleanup
bec39cab 8173do
a9322a30
TT
8174as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
8175echo "$as_me:$LINENO: checking for $ac_func" >&5
8176echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
8177if eval "test \"\${$as_ac_var+set}\" = set"; then
bec39cab 8178 echo $ECHO_N "(cached) $ECHO_C" >&6
bec39cab 8179else
a9322a30 8180 cat >conftest.$ac_ext <<_ACEOF
bec39cab
AC
8181/* confdefs.h. */
8182_ACEOF
8183cat confdefs.h >>conftest.$ac_ext
8184cat >>conftest.$ac_ext <<_ACEOF
8185/* end confdefs.h. */
a9322a30
TT
8186/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
8187 For example, HP-UX 11i <limits.h> declares gettimeofday. */
8188#define $ac_func innocuous_$ac_func
8189
8190/* System header to define __stub macros and hopefully few prototypes,
8191 which can conflict with char $ac_func (); below.
8192 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
8193 <limits.h> exists even on freestanding compilers. */
8194
8195#ifdef __STDC__
8196# include <limits.h>
8197#else
8198# include <assert.h>
8199#endif
8200
8201#undef $ac_func
8202
8203/* Override any gcc2 internal prototype to avoid an error. */
8204#ifdef __cplusplus
8205extern "C"
8206{
8207#endif
8208/* We use char because int might match the return type of a gcc2
8209 builtin and then its argument prototype would still apply. */
8210char $ac_func ();
8211/* The GNU C library defines this for functions which it implements
8212 to always fail with ENOSYS. Some functions are actually named
8213 something starting with __ and the normal name is an alias. */
8214#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8215choke me
8216#else
8217char (*f) () = $ac_func;
8218#endif
8219#ifdef __cplusplus
8220}
8221#endif
8222
8223int
8224main ()
8225{
8226return f != $ac_func;
8227 ;
8228 return 0;
8229}
bec39cab 8230_ACEOF
a9322a30
TT
8231rm -f conftest.$ac_objext conftest$ac_exeext
8232if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8233 (eval $ac_link) 2>conftest.er1
bec39cab
AC
8234 ac_status=$?
8235 grep -v '^ *+' conftest.er1 >conftest.err
8236 rm -f conftest.er1
8237 cat conftest.err >&5
8238 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8239 (exit $ac_status); } &&
b4e70030
JB
8240 { ac_try='test -z "$ac_c_werror_flag"
8241 || test ! -s conftest.err'
bec39cab
AC
8242 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8243 (eval $ac_try) 2>&5
8244 ac_status=$?
8245 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8246 (exit $ac_status); }; } &&
a9322a30 8247 { ac_try='test -s conftest$ac_exeext'
bec39cab
AC
8248 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8249 (eval $ac_try) 2>&5
8250 ac_status=$?
8251 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8252 (exit $ac_status); }; }; then
a9322a30 8253 eval "$as_ac_var=yes"
bec39cab
AC
8254else
8255 echo "$as_me: failed program was:" >&5
8256sed 's/^/| /' conftest.$ac_ext >&5
8257
a9322a30 8258eval "$as_ac_var=no"
bec39cab 8259fi
a9322a30
TT
8260rm -f conftest.err conftest.$ac_objext \
8261 conftest$ac_exeext conftest.$ac_ext
bec39cab 8262fi
a9322a30
TT
8263echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
8264echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
8265if test `eval echo '${'$as_ac_var'}'` = yes; then
bec39cab 8266 cat >>confdefs.h <<_ACEOF
a9322a30 8267#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
bec39cab
AC
8268_ACEOF
8269
8270fi
bec39cab
AC
8271done
8272
a9322a30
TT
8273echo "$as_me:$LINENO: checking for _etext" >&5
8274echo $ECHO_N "checking for _etext... $ECHO_C" >&6
8275if test "${ac_cv_var__etext+set}" = set; then
bec39cab 8276 echo $ECHO_N "(cached) $ECHO_C" >&6
bec39cab 8277else
a9322a30 8278 cat >conftest.$ac_ext <<_ACEOF
bec39cab
AC
8279/* confdefs.h. */
8280_ACEOF
8281cat confdefs.h >>conftest.$ac_ext
8282cat >>conftest.$ac_ext <<_ACEOF
8283/* end confdefs.h. */
a9322a30
TT
8284#include <stdlib.h>
8285extern char _etext;
8286
8287int
8288main ()
8289{
8290free (&_etext);
8291 ;
8292 return 0;
8293}
bec39cab 8294_ACEOF
a9322a30
TT
8295rm -f conftest.$ac_objext conftest$ac_exeext
8296if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8297 (eval $ac_link) 2>conftest.er1
bec39cab
AC
8298 ac_status=$?
8299 grep -v '^ *+' conftest.er1 >conftest.err
8300 rm -f conftest.er1
8301 cat conftest.err >&5
8302 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8303 (exit $ac_status); } &&
b4e70030
JB
8304 { ac_try='test -z "$ac_c_werror_flag"
8305 || test ! -s conftest.err'
bec39cab
AC
8306 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8307 (eval $ac_try) 2>&5
8308 ac_status=$?
8309 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8310 (exit $ac_status); }; } &&
a9322a30 8311 { ac_try='test -s conftest$ac_exeext'
bec39cab
AC
8312 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8313 (eval $ac_try) 2>&5
8314 ac_status=$?
8315 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8316 (exit $ac_status); }; }; then
a9322a30 8317 ac_cv_var__etext=yes
bec39cab
AC
8318else
8319 echo "$as_me: failed program was:" >&5
8320sed 's/^/| /' conftest.$ac_ext >&5
8321
a9322a30 8322ac_cv_var__etext=no
bec39cab 8323fi
a9322a30
TT
8324rm -f conftest.err conftest.$ac_objext \
8325 conftest$ac_exeext conftest.$ac_ext
bec39cab 8326fi
a9322a30
TT
8327echo "$as_me:$LINENO: result: $ac_cv_var__etext" >&5
8328echo "${ECHO_T}$ac_cv_var__etext" >&6
8329if test $ac_cv_var__etext = yes; then
60ca704f
SE
8330
8331cat >>confdefs.h <<\_ACEOF
a9322a30 8332#define HAVE__ETEXT 1
bec39cab
AC
8333_ACEOF
8334
bec39cab 8335fi
a9322a30
TT
8336echo "$as_me:$LINENO: checking for etext" >&5
8337echo $ECHO_N "checking for etext... $ECHO_C" >&6
8338if test "${ac_cv_var_etext+set}" = set; then
bec39cab
AC
8339 echo $ECHO_N "(cached) $ECHO_C" >&6
8340else
8341 cat >conftest.$ac_ext <<_ACEOF
8342/* confdefs.h. */
8343_ACEOF
8344cat confdefs.h >>conftest.$ac_ext
8345cat >>conftest.$ac_ext <<_ACEOF
8346/* end confdefs.h. */
a9322a30
TT
8347#include <stdlib.h>
8348extern char etext;
bec39cab
AC
8349
8350int
8351main ()
8352{
a9322a30 8353free (&etext);
bec39cab
AC
8354 ;
8355 return 0;
8356}
8357_ACEOF
8358rm -f conftest.$ac_objext conftest$ac_exeext
8359if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8360 (eval $ac_link) 2>conftest.er1
8361 ac_status=$?
8362 grep -v '^ *+' conftest.er1 >conftest.err
8363 rm -f conftest.er1
8364 cat conftest.err >&5
8365 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8366 (exit $ac_status); } &&
b4e70030
JB
8367 { ac_try='test -z "$ac_c_werror_flag"
8368 || test ! -s conftest.err'
bec39cab
AC
8369 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8370 (eval $ac_try) 2>&5
8371 ac_status=$?
8372 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8373 (exit $ac_status); }; } &&
8374 { ac_try='test -s conftest$ac_exeext'
8375 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8376 (eval $ac_try) 2>&5
8377 ac_status=$?
8378 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8379 (exit $ac_status); }; }; then
a9322a30 8380 ac_cv_var_etext=yes
bec39cab
AC
8381else
8382 echo "$as_me: failed program was:" >&5
8383sed 's/^/| /' conftest.$ac_ext >&5
8384
a9322a30 8385ac_cv_var_etext=no
bec39cab
AC
8386fi
8387rm -f conftest.err conftest.$ac_objext \
8388 conftest$ac_exeext conftest.$ac_ext
8389fi
a9322a30
TT
8390echo "$as_me:$LINENO: result: $ac_cv_var_etext" >&5
8391echo "${ECHO_T}$ac_cv_var_etext" >&6
8392if test $ac_cv_var_etext = yes; then
8393
8394cat >>confdefs.h <<\_ACEOF
8395#define HAVE_ETEXT 1
bec39cab
AC
8396_ACEOF
8397
8398fi
a9322a30
TT
8399if test "$enable_profiling" = yes ; then
8400 if test $ac_cv_func_monstartup = no || test $ac_cv_func__mcleanup = no; then
8401 { { echo "$as_me:$LINENO: error: --enable-profiling requires monstartup and _mcleanup" >&5
8402echo "$as_me: error: --enable-profiling requires monstartup and _mcleanup" >&2;}
8403 { (exit 1); exit 1; }; }
8404 fi
8405 PROFILE_CFLAGS=-pg
8406 OLD_CFLAGS="$CFLAGS"
8407 CFLAGS="$CFLAGS $PROFILE_CFLAGS"
bec39cab 8408
a9322a30
TT
8409 echo "$as_me:$LINENO: checking whether $CC supports -pg" >&5
8410echo $ECHO_N "checking whether $CC supports -pg... $ECHO_C" >&6
8411if test "${ac_cv_cc_supports_pg+set}" = set; then
bec39cab
AC
8412 echo $ECHO_N "(cached) $ECHO_C" >&6
8413else
8414 cat >conftest.$ac_ext <<_ACEOF
8415/* confdefs.h. */
8416_ACEOF
8417cat confdefs.h >>conftest.$ac_ext
8418cat >>conftest.$ac_ext <<_ACEOF
8419/* end confdefs.h. */
bec39cab
AC
8420
8421int
8422main ()
8423{
a9322a30 8424int x;
bec39cab
AC
8425 ;
8426 return 0;
8427}
8428_ACEOF
a9322a30
TT
8429rm -f conftest.$ac_objext
8430if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8431 (eval $ac_compile) 2>conftest.er1
bec39cab
AC
8432 ac_status=$?
8433 grep -v '^ *+' conftest.er1 >conftest.err
8434 rm -f conftest.er1
8435 cat conftest.err >&5
8436 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8437 (exit $ac_status); } &&
b4e70030
JB
8438 { ac_try='test -z "$ac_c_werror_flag"
8439 || test ! -s conftest.err'
bec39cab
AC
8440 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8441 (eval $ac_try) 2>&5
8442 ac_status=$?
8443 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8444 (exit $ac_status); }; } &&
a9322a30 8445 { ac_try='test -s conftest.$ac_objext'
bec39cab
AC
8446 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8447 (eval $ac_try) 2>&5
8448 ac_status=$?
8449 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8450 (exit $ac_status); }; }; then
a9322a30 8451 ac_cv_cc_supports_pg=yes
bec39cab
AC
8452else
8453 echo "$as_me: failed program was:" >&5
8454sed 's/^/| /' conftest.$ac_ext >&5
8455
a9322a30 8456ac_cv_cc_supports_pg=no
bec39cab 8457fi
a9322a30 8458rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
bec39cab 8459fi
a9322a30
TT
8460echo "$as_me:$LINENO: result: $ac_cv_cc_supports_pg" >&5
8461echo "${ECHO_T}$ac_cv_cc_supports_pg" >&6
bec39cab 8462
a9322a30
TT
8463 if test $ac_cv_cc_supports_pg = no; then
8464 { { echo "$as_me:$LINENO: error: --enable-profiling requires a compiler which supports -pg" >&5
8465echo "$as_me: error: --enable-profiling requires a compiler which supports -pg" >&2;}
8466 { (exit 1); exit 1; }; }
8467 fi
bec39cab 8468
a9322a30 8469 CFLAGS="$OLD_CFLAGS"
bec39cab
AC
8470fi
8471
c16158bc
JM
8472
8473
8474# Check whether --with-pkgversion or --without-pkgversion was given.
8475if test "${with_pkgversion+set}" = set; then
8476 withval="$with_pkgversion"
8477 case "$withval" in
8478 yes) { { echo "$as_me:$LINENO: error: package version not specified" >&5
8479echo "$as_me: error: package version not specified" >&2;}
8480 { (exit 1); exit 1; }; } ;;
8481 no) PKGVERSION= ;;
8482 *) PKGVERSION="($withval) " ;;
8483 esac
8484else
8485 PKGVERSION="(GDB) "
8486
8487fi;
8488
8489
8490
8491
8492# Check whether --with-bugurl or --without-bugurl was given.
8493if test "${with_bugurl+set}" = set; then
8494 withval="$with_bugurl"
8495 case "$withval" in
8496 yes) { { echo "$as_me:$LINENO: error: bug URL not specified" >&5
8497echo "$as_me: error: bug URL not specified" >&2;}
8498 { (exit 1); exit 1; }; } ;;
8499 no) BUGURL=
8500 ;;
8501 *) BUGURL="$withval"
8502 ;;
8503 esac
8504else
8505 BUGURL="http://www.gnu.org/software/gdb/bugs/"
8506
8507fi;
8508 case ${BUGURL} in
8509 "")
8510 REPORT_BUGS_TO=
8511 REPORT_BUGS_TEXI=
8512 ;;
8513 *)
8514 REPORT_BUGS_TO="<$BUGURL>"
8515 REPORT_BUGS_TEXI=@uref{`echo "$BUGURL" | sed 's/@/@@/g'`}
8516 ;;
8517 esac;
8518
8519
8520
8521
8522cat >>confdefs.h <<_ACEOF
8523#define PKGVERSION "$PKGVERSION"
8524_ACEOF
8525
8526
8527cat >>confdefs.h <<_ACEOF
8528#define REPORT_BUGS_TO "$REPORT_BUGS_TO"
8529_ACEOF
8530
8531
bec39cab
AC
8532# --------------------- #
8533# Checks for programs. #
8534# --------------------- #
8535
8536for ac_prog in gawk mawk nawk awk
8537do
8538 # Extract the first word of "$ac_prog", so it can be a program name with args.
8539set dummy $ac_prog; ac_word=$2
b4e70030
JB
8540echo "$as_me:$LINENO: checking for $ac_word" >&5
8541echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
bec39cab
AC
8542if test "${ac_cv_prog_AWK+set}" = set; then
8543 echo $ECHO_N "(cached) $ECHO_C" >&6
8544else
8545 if test -n "$AWK"; then
8546 ac_cv_prog_AWK="$AWK" # Let the user override the test.
8547else
8548as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8549for as_dir in $PATH
8550do
8551 IFS=$as_save_IFS
8552 test -z "$as_dir" && as_dir=.
8553 for ac_exec_ext in '' $ac_executable_extensions; do
b4e70030 8554 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
bec39cab
AC
8555 ac_cv_prog_AWK="$ac_prog"
8556 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
8557 break 2
8558 fi
8559done
8560done
8561
8562fi
8563fi
8564AWK=$ac_cv_prog_AWK
8565if test -n "$AWK"; then
b4e70030
JB
8566 echo "$as_me:$LINENO: result: $AWK" >&5
8567echo "${ECHO_T}$AWK" >&6
bec39cab 8568else
b4e70030
JB
8569 echo "$as_me:$LINENO: result: no" >&5
8570echo "${ECHO_T}no" >&6
bec39cab
AC
8571fi
8572
8573 test -n "$AWK" && break
8574done
8575
8576# Find a good install program. We prefer a C program (faster),
8577# so one script is as good as another. But avoid the broken or
8578# incompatible versions:
8579# SysV /etc/install, /usr/sbin/install
8580# SunOS /usr/etc/install
8581# IRIX /sbin/install
8582# AIX /bin/install
8583# AmigaOS /C/install, which installs bootblocks on floppy discs
8584# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
8585# AFS /usr/afsws/bin/install, which mishandles nonexistent args
8586# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
8587# OS/2's system install, which has a completely different semantic
8588# ./install, which can be erroneously created by make from ./install.sh.
85541719 8589# Reject install programs that cannot install multiple files.
b4e70030
JB
8590echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
8591echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6
bec39cab
AC
8592if test -z "$INSTALL"; then
8593if test "${ac_cv_path_install+set}" = set; then
8594 echo $ECHO_N "(cached) $ECHO_C" >&6
8595else
8596 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8597for as_dir in $PATH
8598do
8599 IFS=$as_save_IFS
8600 test -z "$as_dir" && as_dir=.
8601 # Account for people who put trailing slashes in PATH elements.
8602case $as_dir/ in
8603 ./ | .// | /cC/* | \
8604 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
8605 ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \
8606 /usr/ucb/* ) ;;
c906108c 8607 *)
bec39cab
AC
8608 # OSF1 and SCO ODT 3.0 have their own names for install.
8609 # Don't use installbsd from OSF since it installs stuff as root
8610 # by default.
8611 for ac_prog in ginstall scoinst install; do
8612 for ac_exec_ext in '' $ac_executable_extensions; do
b4e70030 8613 if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
bec39cab
AC
8614 if test $ac_prog = install &&
8615 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
8616 # AIX install. It has an incompatible calling convention.
8617 :
8618 elif test $ac_prog = install &&
8619 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
8620 # program-specific install script used by HP pwplus--don't use.
8621 :
8622 else
85541719
DE
8623 rm -rf conftest.one conftest.two conftest.dir
8624 echo one > conftest.one
8625 echo two > conftest.two
8626 mkdir conftest.dir
8627 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
8628 test -s conftest.one && test -s conftest.two &&
8629 test -s conftest.dir/conftest.one &&
8630 test -s conftest.dir/conftest.two
8631 then
8632 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
8633 break 3
8634 fi
bec39cab
AC
8635 fi
8636 fi
8637 done
8638 done
8639 ;;
c906108c 8640esac
bec39cab
AC
8641done
8642
85541719 8643rm -rf conftest.one conftest.two conftest.dir
bec39cab
AC
8644
8645fi
8646 if test "${ac_cv_path_install+set}" = set; then
8647 INSTALL=$ac_cv_path_install
8648 else
85541719
DE
8649 # As a last resort, use the slow shell script. Don't cache a
8650 # value for INSTALL within a source directory, because that will
bec39cab 8651 # break other packages using the cache if that directory is
85541719 8652 # removed, or if the value is a relative name.
bec39cab
AC
8653 INSTALL=$ac_install_sh
8654 fi
8655fi
b4e70030
JB
8656echo "$as_me:$LINENO: result: $INSTALL" >&5
8657echo "${ECHO_T}$INSTALL" >&6
bec39cab
AC
8658
8659# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
8660# It thinks the first close brace ends the variable substitution.
8661test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
8662
8663test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
8664
8665test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
8666
b4e70030
JB
8667echo "$as_me:$LINENO: checking whether ln -s works" >&5
8668echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6
bec39cab
AC
8669LN_S=$as_ln_s
8670if test "$LN_S" = "ln -s"; then
b4e70030
JB
8671 echo "$as_me:$LINENO: result: yes" >&5
8672echo "${ECHO_T}yes" >&6
bec39cab 8673else
b4e70030
JB
8674 echo "$as_me:$LINENO: result: no, using $LN_S" >&5
8675echo "${ECHO_T}no, using $LN_S" >&6
bec39cab
AC
8676fi
8677
8678if test -n "$ac_tool_prefix"; then
8679 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
8680set dummy ${ac_tool_prefix}ranlib; ac_word=$2
b4e70030
JB
8681echo "$as_me:$LINENO: checking for $ac_word" >&5
8682echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
bec39cab
AC
8683if test "${ac_cv_prog_RANLIB+set}" = set; then
8684 echo $ECHO_N "(cached) $ECHO_C" >&6
8685else
8686 if test -n "$RANLIB"; then
8687 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
8688else
8689as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8690for as_dir in $PATH
8691do
8692 IFS=$as_save_IFS
8693 test -z "$as_dir" && as_dir=.
8694 for ac_exec_ext in '' $ac_executable_extensions; do
b4e70030 8695 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
bec39cab
AC
8696 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
8697 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
8698 break 2
8699 fi
8700done
8701done
8702
8703fi
8704fi
8705RANLIB=$ac_cv_prog_RANLIB
8706if test -n "$RANLIB"; then
b4e70030
JB
8707 echo "$as_me:$LINENO: result: $RANLIB" >&5
8708echo "${ECHO_T}$RANLIB" >&6
bec39cab 8709else
b4e70030
JB
8710 echo "$as_me:$LINENO: result: no" >&5
8711echo "${ECHO_T}no" >&6
bec39cab
AC
8712fi
8713
8714fi
8715if test -z "$ac_cv_prog_RANLIB"; then
8716 ac_ct_RANLIB=$RANLIB
8717 # Extract the first word of "ranlib", so it can be a program name with args.
8718set dummy ranlib; ac_word=$2
b4e70030
JB
8719echo "$as_me:$LINENO: checking for $ac_word" >&5
8720echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
bec39cab
AC
8721if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
8722 echo $ECHO_N "(cached) $ECHO_C" >&6
8723else
8724 if test -n "$ac_ct_RANLIB"; then
8725 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
8726else
8727as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8728for as_dir in $PATH
8729do
8730 IFS=$as_save_IFS
8731 test -z "$as_dir" && as_dir=.
8732 for ac_exec_ext in '' $ac_executable_extensions; do
b4e70030 8733 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
bec39cab
AC
8734 ac_cv_prog_ac_ct_RANLIB="ranlib"
8735 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
8736 break 2
8737 fi
8738done
8739done
8740
b4e70030 8741 test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB=":"
bec39cab
AC
8742fi
8743fi
8744ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
8745if test -n "$ac_ct_RANLIB"; then
b4e70030
JB
8746 echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5
8747echo "${ECHO_T}$ac_ct_RANLIB" >&6
bec39cab 8748else
b4e70030
JB
8749 echo "$as_me:$LINENO: result: no" >&5
8750echo "${ECHO_T}no" >&6
bec39cab
AC
8751fi
8752
b4e70030 8753 RANLIB=$ac_ct_RANLIB
bec39cab
AC
8754else
8755 RANLIB="$ac_cv_prog_RANLIB"
8756fi
8757
8758for ac_prog in 'bison -y' byacc
8759do
8760 # Extract the first word of "$ac_prog", so it can be a program name with args.
8761set dummy $ac_prog; ac_word=$2
b4e70030
JB
8762echo "$as_me:$LINENO: checking for $ac_word" >&5
8763echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
bec39cab
AC
8764if test "${ac_cv_prog_YACC+set}" = set; then
8765 echo $ECHO_N "(cached) $ECHO_C" >&6
8766else
8767 if test -n "$YACC"; then
8768 ac_cv_prog_YACC="$YACC" # Let the user override the test.
8769else
8770as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8771for as_dir in $PATH
8772do
8773 IFS=$as_save_IFS
8774 test -z "$as_dir" && as_dir=.
8775 for ac_exec_ext in '' $ac_executable_extensions; do
b4e70030 8776 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
bec39cab
AC
8777 ac_cv_prog_YACC="$ac_prog"
8778 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
8779 break 2
8780 fi
8781done
8782done
8783
8784fi
8785fi
8786YACC=$ac_cv_prog_YACC
8787if test -n "$YACC"; then
b4e70030
JB
8788 echo "$as_me:$LINENO: result: $YACC" >&5
8789echo "${ECHO_T}$YACC" >&6
bec39cab 8790else
b4e70030
JB
8791 echo "$as_me:$LINENO: result: no" >&5
8792echo "${ECHO_T}no" >&6
bec39cab
AC
8793fi
8794
8795 test -n "$YACC" && break
8796done
8797test -n "$YACC" || YACC="yacc"
8798
8799
8800if test -n "$ac_tool_prefix"; then
8801 # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
8802set dummy ${ac_tool_prefix}ar; ac_word=$2
b4e70030
JB
8803echo "$as_me:$LINENO: checking for $ac_word" >&5
8804echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
bec39cab
AC
8805if test "${ac_cv_prog_AR+set}" = set; then
8806 echo $ECHO_N "(cached) $ECHO_C" >&6
8807else
8808 if test -n "$AR"; then
8809 ac_cv_prog_AR="$AR" # Let the user override the test.
8810else
8811as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8812for as_dir in $PATH
8813do
8814 IFS=$as_save_IFS
8815 test -z "$as_dir" && as_dir=.
8816 for ac_exec_ext in '' $ac_executable_extensions; do
b4e70030 8817 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
bec39cab
AC
8818 ac_cv_prog_AR="${ac_tool_prefix}ar"
8819 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
8820 break 2
8821 fi
8822done
8823done
8824
8825fi
8826fi
8827AR=$ac_cv_prog_AR
8828if test -n "$AR"; then
b4e70030
JB
8829 echo "$as_me:$LINENO: result: $AR" >&5
8830echo "${ECHO_T}$AR" >&6
bec39cab 8831else
b4e70030
JB
8832 echo "$as_me:$LINENO: result: no" >&5
8833echo "${ECHO_T}no" >&6
bec39cab
AC
8834fi
8835
8836fi
8837if test -z "$ac_cv_prog_AR"; then
8838 ac_ct_AR=$AR
8839 # Extract the first word of "ar", so it can be a program name with args.
8840set dummy ar; ac_word=$2
b4e70030
JB
8841echo "$as_me:$LINENO: checking for $ac_word" >&5
8842echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
bec39cab
AC
8843if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
8844 echo $ECHO_N "(cached) $ECHO_C" >&6
8845else
8846 if test -n "$ac_ct_AR"; then
8847 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
8848else
8849as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8850for as_dir in $PATH
8851do
8852 IFS=$as_save_IFS
8853 test -z "$as_dir" && as_dir=.
8854 for ac_exec_ext in '' $ac_executable_extensions; do
b4e70030 8855 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
bec39cab
AC
8856 ac_cv_prog_ac_ct_AR="ar"
8857 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
8858 break 2
8859 fi
8860done
8861done
8862
8863fi
8864fi
8865ac_ct_AR=$ac_cv_prog_ac_ct_AR
8866if test -n "$ac_ct_AR"; then
b4e70030
JB
8867 echo "$as_me:$LINENO: result: $ac_ct_AR" >&5
8868echo "${ECHO_T}$ac_ct_AR" >&6
bec39cab 8869else
b4e70030
JB
8870 echo "$as_me:$LINENO: result: no" >&5
8871echo "${ECHO_T}no" >&6
bec39cab
AC
8872fi
8873
b4e70030 8874 AR=$ac_ct_AR
bec39cab
AC
8875else
8876 AR="$ac_cv_prog_AR"
8877fi
8878
8879if test -n "$ac_tool_prefix"; then
8880 # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
8881set dummy ${ac_tool_prefix}dlltool; ac_word=$2
b4e70030
JB
8882echo "$as_me:$LINENO: checking for $ac_word" >&5
8883echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
bec39cab
AC
8884if test "${ac_cv_prog_DLLTOOL+set}" = set; then
8885 echo $ECHO_N "(cached) $ECHO_C" >&6
8886else
8887 if test -n "$DLLTOOL"; then
8888 ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
8889else
8890as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8891for as_dir in $PATH
8892do
8893 IFS=$as_save_IFS
8894 test -z "$as_dir" && as_dir=.
8895 for ac_exec_ext in '' $ac_executable_extensions; do
b4e70030 8896 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
bec39cab
AC
8897 ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
8898 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
8899 break 2
8900 fi
8901done
8902done
8903
8904fi
8905fi
8906DLLTOOL=$ac_cv_prog_DLLTOOL
8907if test -n "$DLLTOOL"; then
b4e70030
JB
8908 echo "$as_me:$LINENO: result: $DLLTOOL" >&5
8909echo "${ECHO_T}$DLLTOOL" >&6
bec39cab 8910else
b4e70030
JB
8911 echo "$as_me:$LINENO: result: no" >&5
8912echo "${ECHO_T}no" >&6
bec39cab
AC
8913fi
8914
8915fi
8916if test -z "$ac_cv_prog_DLLTOOL"; then
8917 ac_ct_DLLTOOL=$DLLTOOL
8918 # Extract the first word of "dlltool", so it can be a program name with args.
8919set dummy dlltool; ac_word=$2
b4e70030
JB
8920echo "$as_me:$LINENO: checking for $ac_word" >&5
8921echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
bec39cab
AC
8922if test "${ac_cv_prog_ac_ct_DLLTOOL+set}" = set; then
8923 echo $ECHO_N "(cached) $ECHO_C" >&6
8924else
8925 if test -n "$ac_ct_DLLTOOL"; then
8926 ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test.
8927else
8928as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8929for as_dir in $PATH
8930do
8931 IFS=$as_save_IFS
8932 test -z "$as_dir" && as_dir=.
8933 for ac_exec_ext in '' $ac_executable_extensions; do
b4e70030 8934 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
bec39cab
AC
8935 ac_cv_prog_ac_ct_DLLTOOL="dlltool"
8936 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
8937 break 2
8938 fi
8939done
8940done
8941
8942fi
8943fi
8944ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL
8945if test -n "$ac_ct_DLLTOOL"; then
b4e70030
JB
8946 echo "$as_me:$LINENO: result: $ac_ct_DLLTOOL" >&5
8947echo "${ECHO_T}$ac_ct_DLLTOOL" >&6
bec39cab 8948else
b4e70030
JB
8949 echo "$as_me:$LINENO: result: no" >&5
8950echo "${ECHO_T}no" >&6
bec39cab
AC
8951fi
8952
b4e70030 8953 DLLTOOL=$ac_ct_DLLTOOL
bec39cab
AC
8954else
8955 DLLTOOL="$ac_cv_prog_DLLTOOL"
8956fi
8957
8958if test -n "$ac_tool_prefix"; then
8959 # Extract the first word of "${ac_tool_prefix}windres", so it can be a program name with args.
8960set dummy ${ac_tool_prefix}windres; ac_word=$2
b4e70030
JB
8961echo "$as_me:$LINENO: checking for $ac_word" >&5
8962echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
bec39cab
AC
8963if test "${ac_cv_prog_WINDRES+set}" = set; then
8964 echo $ECHO_N "(cached) $ECHO_C" >&6
8965else
8966 if test -n "$WINDRES"; then
8967 ac_cv_prog_WINDRES="$WINDRES" # Let the user override the test.
8968else
8969as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8970for as_dir in $PATH
8971do
8972 IFS=$as_save_IFS
8973 test -z "$as_dir" && as_dir=.
8974 for ac_exec_ext in '' $ac_executable_extensions; do
b4e70030 8975 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
bec39cab
AC
8976 ac_cv_prog_WINDRES="${ac_tool_prefix}windres"
8977 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
8978 break 2
8979 fi
8980done
8981done
8982
8983fi
8984fi
8985WINDRES=$ac_cv_prog_WINDRES
8986if test -n "$WINDRES"; then
b4e70030
JB
8987 echo "$as_me:$LINENO: result: $WINDRES" >&5
8988echo "${ECHO_T}$WINDRES" >&6
bec39cab 8989else
b4e70030
JB
8990 echo "$as_me:$LINENO: result: no" >&5
8991echo "${ECHO_T}no" >&6
bec39cab
AC
8992fi
8993
8994fi
8995if test -z "$ac_cv_prog_WINDRES"; then
8996 ac_ct_WINDRES=$WINDRES
8997 # Extract the first word of "windres", so it can be a program name with args.
8998set dummy windres; ac_word=$2
b4e70030
JB
8999echo "$as_me:$LINENO: checking for $ac_word" >&5
9000echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
bec39cab
AC
9001if test "${ac_cv_prog_ac_ct_WINDRES+set}" = set; then
9002 echo $ECHO_N "(cached) $ECHO_C" >&6
9003else
9004 if test -n "$ac_ct_WINDRES"; then
9005 ac_cv_prog_ac_ct_WINDRES="$ac_ct_WINDRES" # Let the user override the test.
9006else
9007as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9008for as_dir in $PATH
9009do
9010 IFS=$as_save_IFS
9011 test -z "$as_dir" && as_dir=.
9012 for ac_exec_ext in '' $ac_executable_extensions; do
b4e70030 9013 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
bec39cab
AC
9014 ac_cv_prog_ac_ct_WINDRES="windres"
9015 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
9016 break 2
9017 fi
9018done
9019done
9020
9021fi
9022fi
9023ac_ct_WINDRES=$ac_cv_prog_ac_ct_WINDRES
9024if test -n "$ac_ct_WINDRES"; then
b4e70030
JB
9025 echo "$as_me:$LINENO: result: $ac_ct_WINDRES" >&5
9026echo "${ECHO_T}$ac_ct_WINDRES" >&6
bec39cab 9027else
b4e70030
JB
9028 echo "$as_me:$LINENO: result: no" >&5
9029echo "${ECHO_T}no" >&6
c906108c 9030fi
bec39cab 9031
b4e70030 9032 WINDRES=$ac_ct_WINDRES
c906108c 9033else
bec39cab 9034 WINDRES="$ac_cv_prog_WINDRES"
c906108c
SS
9035fi
9036
bec39cab
AC
9037
9038# Needed for GNU/Hurd.
9039if test -n "$ac_tool_prefix"; then
9040 # Extract the first word of "${ac_tool_prefix}mig", so it can be a program name with args.
9041set dummy ${ac_tool_prefix}mig; ac_word=$2
b4e70030
JB
9042echo "$as_me:$LINENO: checking for $ac_word" >&5
9043echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
bec39cab
AC
9044if test "${ac_cv_prog_MIG+set}" = set; then
9045 echo $ECHO_N "(cached) $ECHO_C" >&6
c906108c 9046else
bec39cab
AC
9047 if test -n "$MIG"; then
9048 ac_cv_prog_MIG="$MIG" # Let the user override the test.
9049else
9050as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9051for as_dir in $PATH
9052do
9053 IFS=$as_save_IFS
9054 test -z "$as_dir" && as_dir=.
9055 for ac_exec_ext in '' $ac_executable_extensions; do
b4e70030 9056 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
bec39cab
AC
9057 ac_cv_prog_MIG="${ac_tool_prefix}mig"
9058 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
9059 break 2
9060 fi
9061done
9062done
9063
c906108c 9064fi
bec39cab
AC
9065fi
9066MIG=$ac_cv_prog_MIG
9067if test -n "$MIG"; then
b4e70030
JB
9068 echo "$as_me:$LINENO: result: $MIG" >&5
9069echo "${ECHO_T}$MIG" >&6
c906108c 9070else
b4e70030
JB
9071 echo "$as_me:$LINENO: result: no" >&5
9072echo "${ECHO_T}no" >&6
c906108c
SS
9073fi
9074
bec39cab
AC
9075fi
9076if test -z "$ac_cv_prog_MIG"; then
9077 ac_ct_MIG=$MIG
9078 # Extract the first word of "mig", so it can be a program name with args.
9079set dummy mig; ac_word=$2
b4e70030
JB
9080echo "$as_me:$LINENO: checking for $ac_word" >&5
9081echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
bec39cab
AC
9082if test "${ac_cv_prog_ac_ct_MIG+set}" = set; then
9083 echo $ECHO_N "(cached) $ECHO_C" >&6
9084else
9085 if test -n "$ac_ct_MIG"; then
9086 ac_cv_prog_ac_ct_MIG="$ac_ct_MIG" # Let the user override the test.
9087else
9088as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9089for as_dir in $PATH
9090do
9091 IFS=$as_save_IFS
9092 test -z "$as_dir" && as_dir=.
9093 for ac_exec_ext in '' $ac_executable_extensions; do
b4e70030 9094 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
bec39cab
AC
9095 ac_cv_prog_ac_ct_MIG="mig"
9096 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
9097 break 2
9098 fi
9099done
9100done
c906108c 9101
bec39cab
AC
9102fi
9103fi
9104ac_ct_MIG=$ac_cv_prog_ac_ct_MIG
9105if test -n "$ac_ct_MIG"; then
b4e70030
JB
9106 echo "$as_me:$LINENO: result: $ac_ct_MIG" >&5
9107echo "${ECHO_T}$ac_ct_MIG" >&6
bec39cab 9108else
b4e70030
JB
9109 echo "$as_me:$LINENO: result: no" >&5
9110echo "${ECHO_T}no" >&6
bec39cab 9111fi
c906108c 9112
b4e70030 9113 MIG=$ac_ct_MIG
bec39cab
AC
9114else
9115 MIG="$ac_cv_prog_MIG"
9116fi
c906108c 9117
c906108c 9118
bec39cab
AC
9119# ---------------------- #
9120# Checks for libraries. #
9121# ---------------------- #
c906108c 9122
bec39cab 9123# We might need to link with -lm; most simulators need it.
c906108c 9124
b4e70030
JB
9125echo "$as_me:$LINENO: checking for main in -lm" >&5
9126echo $ECHO_N "checking for main in -lm... $ECHO_C" >&6
bec39cab
AC
9127if test "${ac_cv_lib_m_main+set}" = set; then
9128 echo $ECHO_N "(cached) $ECHO_C" >&6
9129else
9130 ac_check_lib_save_LIBS=$LIBS
9131LIBS="-lm $LIBS"
9132cat >conftest.$ac_ext <<_ACEOF
9133/* confdefs.h. */
9134_ACEOF
9135cat confdefs.h >>conftest.$ac_ext
9136cat >>conftest.$ac_ext <<_ACEOF
9137/* end confdefs.h. */
c906108c 9138
c906108c 9139
bec39cab
AC
9140int
9141main ()
9142{
b4e70030 9143main ();
bec39cab
AC
9144 ;
9145 return 0;
9146}
9147_ACEOF
9148rm -f conftest.$ac_objext conftest$ac_exeext
9149if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9150 (eval $ac_link) 2>conftest.er1
9151 ac_status=$?
9152 grep -v '^ *+' conftest.er1 >conftest.err
9153 rm -f conftest.er1
9154 cat conftest.err >&5
9155 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9156 (exit $ac_status); } &&
b4e70030
JB
9157 { ac_try='test -z "$ac_c_werror_flag"
9158 || test ! -s conftest.err'
bec39cab
AC
9159 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9160 (eval $ac_try) 2>&5
9161 ac_status=$?
9162 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9163 (exit $ac_status); }; } &&
9164 { ac_try='test -s conftest$ac_exeext'
9165 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9166 (eval $ac_try) 2>&5
9167 ac_status=$?
9168 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9169 (exit $ac_status); }; }; then
9170 ac_cv_lib_m_main=yes
9171else
9172 echo "$as_me: failed program was:" >&5
9173sed 's/^/| /' conftest.$ac_ext >&5
9174
b4e70030 9175ac_cv_lib_m_main=no
bec39cab
AC
9176fi
9177rm -f conftest.err conftest.$ac_objext \
9178 conftest$ac_exeext conftest.$ac_ext
9179LIBS=$ac_check_lib_save_LIBS
9180fi
b4e70030
JB
9181echo "$as_me:$LINENO: result: $ac_cv_lib_m_main" >&5
9182echo "${ECHO_T}$ac_cv_lib_m_main" >&6
bec39cab
AC
9183if test $ac_cv_lib_m_main = yes; then
9184 cat >>confdefs.h <<_ACEOF
9185#define HAVE_LIBM 1
9186_ACEOF
9187
9188 LIBS="-lm $LIBS"
c906108c 9189
c906108c 9190fi
bec39cab
AC
9191
9192
9193# We need to link with -lw to get `wctype' on Solaris before Solaris
9194# 2.6. Solaris 2.6 and beyond have this function in libc, and have a
9195# libw that some versions of the GNU linker cannot hanle (GNU ld 2.9.1
9196# is known to have this problem). Therefore we avoid libw if we can.
b4e70030
JB
9197echo "$as_me:$LINENO: checking for wctype" >&5
9198echo $ECHO_N "checking for wctype... $ECHO_C" >&6
bec39cab
AC
9199if test "${ac_cv_func_wctype+set}" = set; then
9200 echo $ECHO_N "(cached) $ECHO_C" >&6
9201else
9202 cat >conftest.$ac_ext <<_ACEOF
9203/* confdefs.h. */
9204_ACEOF
9205cat confdefs.h >>conftest.$ac_ext
9206cat >>conftest.$ac_ext <<_ACEOF
9207/* end confdefs.h. */
9208/* Define wctype to an innocuous variant, in case <limits.h> declares wctype.
9209 For example, HP-UX 11i <limits.h> declares gettimeofday. */
9210#define wctype innocuous_wctype
9211
9212/* System header to define __stub macros and hopefully few prototypes,
9213 which can conflict with char wctype (); below.
9214 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
9215 <limits.h> exists even on freestanding compilers. */
9216
9217#ifdef __STDC__
9218# include <limits.h>
9219#else
9220# include <assert.h>
9221#endif
9222
9223#undef wctype
9224
b4e70030 9225/* Override any gcc2 internal prototype to avoid an error. */
bec39cab
AC
9226#ifdef __cplusplus
9227extern "C"
b4e70030 9228{
bec39cab 9229#endif
b4e70030
JB
9230/* We use char because int might match the return type of a gcc2
9231 builtin and then its argument prototype would still apply. */
bec39cab
AC
9232char wctype ();
9233/* The GNU C library defines this for functions which it implements
9234 to always fail with ENOSYS. Some functions are actually named
9235 something starting with __ and the normal name is an alias. */
b4e70030 9236#if defined (__stub_wctype) || defined (__stub___wctype)
bec39cab 9237choke me
b4e70030
JB
9238#else
9239char (*f) () = wctype;
9240#endif
9241#ifdef __cplusplus
9242}
bec39cab
AC
9243#endif
9244
9245int
9246main ()
9247{
b4e70030 9248return f != wctype;
bec39cab
AC
9249 ;
9250 return 0;
9251}
9252_ACEOF
9253rm -f conftest.$ac_objext conftest$ac_exeext
9254if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9255 (eval $ac_link) 2>conftest.er1
9256 ac_status=$?
9257 grep -v '^ *+' conftest.er1 >conftest.err
9258 rm -f conftest.er1
9259 cat conftest.err >&5
9260 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9261 (exit $ac_status); } &&
b4e70030
JB
9262 { ac_try='test -z "$ac_c_werror_flag"
9263 || test ! -s conftest.err'
bec39cab
AC
9264 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9265 (eval $ac_try) 2>&5
9266 ac_status=$?
9267 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9268 (exit $ac_status); }; } &&
9269 { ac_try='test -s conftest$ac_exeext'
9270 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9271 (eval $ac_try) 2>&5
9272 ac_status=$?
9273 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9274 (exit $ac_status); }; }; then
9275 ac_cv_func_wctype=yes
9276else
9277 echo "$as_me: failed program was:" >&5
9278sed 's/^/| /' conftest.$ac_ext >&5
9279
b4e70030 9280ac_cv_func_wctype=no
bec39cab
AC
9281fi
9282rm -f conftest.err conftest.$ac_objext \
9283 conftest$ac_exeext conftest.$ac_ext
9284fi
b4e70030
JB
9285echo "$as_me:$LINENO: result: $ac_cv_func_wctype" >&5
9286echo "${ECHO_T}$ac_cv_func_wctype" >&6
bec39cab
AC
9287if test $ac_cv_func_wctype = yes; then
9288 :
c906108c 9289else
c906108c 9290
b4e70030
JB
9291echo "$as_me:$LINENO: checking for wctype in -lw" >&5
9292echo $ECHO_N "checking for wctype in -lw... $ECHO_C" >&6
bec39cab
AC
9293if test "${ac_cv_lib_w_wctype+set}" = set; then
9294 echo $ECHO_N "(cached) $ECHO_C" >&6
9295else
9296 ac_check_lib_save_LIBS=$LIBS
9297LIBS="-lw $LIBS"
9298cat >conftest.$ac_ext <<_ACEOF
9299/* confdefs.h. */
9300_ACEOF
9301cat confdefs.h >>conftest.$ac_ext
9302cat >>conftest.$ac_ext <<_ACEOF
9303/* end confdefs.h. */
c906108c 9304
b4e70030 9305/* Override any gcc2 internal prototype to avoid an error. */
bec39cab
AC
9306#ifdef __cplusplus
9307extern "C"
9308#endif
b4e70030
JB
9309/* We use char because int might match the return type of a gcc2
9310 builtin and then its argument prototype would still apply. */
bec39cab
AC
9311char wctype ();
9312int
9313main ()
9314{
b4e70030 9315wctype ();
bec39cab
AC
9316 ;
9317 return 0;
9318}
9319_ACEOF
9320rm -f conftest.$ac_objext conftest$ac_exeext
9321if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9322 (eval $ac_link) 2>conftest.er1
9323 ac_status=$?
9324 grep -v '^ *+' conftest.er1 >conftest.err
9325 rm -f conftest.er1
9326 cat conftest.err >&5
9327 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9328 (exit $ac_status); } &&
b4e70030
JB
9329 { ac_try='test -z "$ac_c_werror_flag"
9330 || test ! -s conftest.err'
bec39cab
AC
9331 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9332 (eval $ac_try) 2>&5
9333 ac_status=$?
9334 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9335 (exit $ac_status); }; } &&
9336 { ac_try='test -s conftest$ac_exeext'
9337 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9338 (eval $ac_try) 2>&5
9339 ac_status=$?
9340 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9341 (exit $ac_status); }; }; then
9342 ac_cv_lib_w_wctype=yes
9343else
9344 echo "$as_me: failed program was:" >&5
9345sed 's/^/| /' conftest.$ac_ext >&5
9346
b4e70030 9347ac_cv_lib_w_wctype=no
bec39cab
AC
9348fi
9349rm -f conftest.err conftest.$ac_objext \
9350 conftest$ac_exeext conftest.$ac_ext
9351LIBS=$ac_check_lib_save_LIBS
9352fi
b4e70030
JB
9353echo "$as_me:$LINENO: result: $ac_cv_lib_w_wctype" >&5
9354echo "${ECHO_T}$ac_cv_lib_w_wctype" >&6
bec39cab
AC
9355if test $ac_cv_lib_w_wctype = yes; then
9356 cat >>confdefs.h <<_ACEOF
9357#define HAVE_LIBW 1
9358_ACEOF
c906108c 9359
bec39cab 9360 LIBS="-lw $LIBS"
c906108c 9361
bec39cab 9362fi
c906108c 9363
bec39cab 9364fi
c906108c 9365
ddc9cd0f 9366
bec39cab 9367# Some systems (e.g. Solaris) have `gethostbyname' in libnsl.
b4e70030
JB
9368echo "$as_me:$LINENO: checking for library containing gethostbyname" >&5
9369echo $ECHO_N "checking for library containing gethostbyname... $ECHO_C" >&6
bec39cab
AC
9370if test "${ac_cv_search_gethostbyname+set}" = set; then
9371 echo $ECHO_N "(cached) $ECHO_C" >&6
9372else
9373 ac_func_search_save_LIBS=$LIBS
b4e70030 9374ac_cv_search_gethostbyname=no
bec39cab
AC
9375cat >conftest.$ac_ext <<_ACEOF
9376/* confdefs.h. */
9377_ACEOF
9378cat confdefs.h >>conftest.$ac_ext
9379cat >>conftest.$ac_ext <<_ACEOF
9380/* end confdefs.h. */
ddc9cd0f 9381
b4e70030 9382/* Override any gcc2 internal prototype to avoid an error. */
bec39cab
AC
9383#ifdef __cplusplus
9384extern "C"
9385#endif
b4e70030
JB
9386/* We use char because int might match the return type of a gcc2
9387 builtin and then its argument prototype would still apply. */
bec39cab
AC
9388char gethostbyname ();
9389int
9390main ()
9391{
b4e70030 9392gethostbyname ();
bec39cab
AC
9393 ;
9394 return 0;
9395}
9396_ACEOF
b4e70030 9397rm -f conftest.$ac_objext conftest$ac_exeext
bec39cab
AC
9398if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9399 (eval $ac_link) 2>conftest.er1
9400 ac_status=$?
9401 grep -v '^ *+' conftest.er1 >conftest.err
9402 rm -f conftest.er1
9403 cat conftest.err >&5
9404 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9405 (exit $ac_status); } &&
b4e70030
JB
9406 { ac_try='test -z "$ac_c_werror_flag"
9407 || test ! -s conftest.err'
bec39cab
AC
9408 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9409 (eval $ac_try) 2>&5
9410 ac_status=$?
9411 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9412 (exit $ac_status); }; } &&
9413 { ac_try='test -s conftest$ac_exeext'
9414 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9415 (eval $ac_try) 2>&5
9416 ac_status=$?
9417 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9418 (exit $ac_status); }; }; then
b4e70030 9419 ac_cv_search_gethostbyname="none required"
bec39cab
AC
9420else
9421 echo "$as_me: failed program was:" >&5
9422sed 's/^/| /' conftest.$ac_ext >&5
ddc9cd0f 9423
bec39cab
AC
9424fi
9425rm -f conftest.err conftest.$ac_objext \
b4e70030
JB
9426 conftest$ac_exeext conftest.$ac_ext
9427if test "$ac_cv_search_gethostbyname" = no; then
9428 for ac_lib in nsl; do
9429 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
9430 cat >conftest.$ac_ext <<_ACEOF
bec39cab
AC
9431/* confdefs.h. */
9432_ACEOF
9433cat confdefs.h >>conftest.$ac_ext
9434cat >>conftest.$ac_ext <<_ACEOF
9435/* end confdefs.h. */
ddc9cd0f 9436
b4e70030 9437/* Override any gcc2 internal prototype to avoid an error. */
bec39cab
AC
9438#ifdef __cplusplus
9439extern "C"
9440#endif
b4e70030
JB
9441/* We use char because int might match the return type of a gcc2
9442 builtin and then its argument prototype would still apply. */
9443char gethostbyname ();
bec39cab
AC
9444int
9445main ()
9446{
b4e70030 9447gethostbyname ();
bec39cab
AC
9448 ;
9449 return 0;
9450}
9451_ACEOF
b4e70030 9452rm -f conftest.$ac_objext conftest$ac_exeext
bec39cab
AC
9453if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9454 (eval $ac_link) 2>conftest.er1
9455 ac_status=$?
9456 grep -v '^ *+' conftest.er1 >conftest.err
9457 rm -f conftest.er1
9458 cat conftest.err >&5
9459 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9460 (exit $ac_status); } &&
b4e70030
JB
9461 { ac_try='test -z "$ac_c_werror_flag"
9462 || test ! -s conftest.err'
bec39cab
AC
9463 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9464 (eval $ac_try) 2>&5
9465 ac_status=$?
9466 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9467 (exit $ac_status); }; } &&
9468 { ac_try='test -s conftest$ac_exeext'
9469 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9470 (eval $ac_try) 2>&5
9471 ac_status=$?
9472 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9473 (exit $ac_status); }; }; then
b4e70030
JB
9474 ac_cv_search_gethostbyname="-l$ac_lib"
9475break
bec39cab
AC
9476else
9477 echo "$as_me: failed program was:" >&5
9478sed 's/^/| /' conftest.$ac_ext >&5
9479
9480fi
9481rm -f conftest.err conftest.$ac_objext \
b4e70030
JB
9482 conftest$ac_exeext conftest.$ac_ext
9483 done
bec39cab
AC
9484fi
9485LIBS=$ac_func_search_save_LIBS
9486fi
b4e70030
JB
9487echo "$as_me:$LINENO: result: $ac_cv_search_gethostbyname" >&5
9488echo "${ECHO_T}$ac_cv_search_gethostbyname" >&6
9489if test "$ac_cv_search_gethostbyname" != no; then
9490 test "$ac_cv_search_gethostbyname" = "none required" || LIBS="$ac_cv_search_gethostbyname $LIBS"
96baa820 9491
bec39cab 9492fi
96baa820 9493
c906108c 9494
b4e70030
JB
9495# Some systems (e.g. Solaris) have `socketpair' in libsocket.
9496echo "$as_me:$LINENO: checking for library containing socketpair" >&5
9497echo $ECHO_N "checking for library containing socketpair... $ECHO_C" >&6
9498if test "${ac_cv_search_socketpair+set}" = set; then
9499 echo $ECHO_N "(cached) $ECHO_C" >&6
9500else
9501 ac_func_search_save_LIBS=$LIBS
9502ac_cv_search_socketpair=no
9503cat >conftest.$ac_ext <<_ACEOF
9504/* confdefs.h. */
9505_ACEOF
9506cat confdefs.h >>conftest.$ac_ext
9507cat >>conftest.$ac_ext <<_ACEOF
9508/* end confdefs.h. */
9509
9510/* Override any gcc2 internal prototype to avoid an error. */
9511#ifdef __cplusplus
9512extern "C"
9513#endif
9514/* We use char because int might match the return type of a gcc2
9515 builtin and then its argument prototype would still apply. */
9516char socketpair ();
9517int
9518main ()
9519{
9520socketpair ();
9521 ;
9522 return 0;
9523}
9524_ACEOF
9525rm -f conftest.$ac_objext conftest$ac_exeext
9526if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9527 (eval $ac_link) 2>conftest.er1
9528 ac_status=$?
9529 grep -v '^ *+' conftest.er1 >conftest.err
9530 rm -f conftest.er1
9531 cat conftest.err >&5
9532 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9533 (exit $ac_status); } &&
9534 { ac_try='test -z "$ac_c_werror_flag"
9535 || test ! -s conftest.err'
9536 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9537 (eval $ac_try) 2>&5
9538 ac_status=$?
9539 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9540 (exit $ac_status); }; } &&
9541 { ac_try='test -s conftest$ac_exeext'
9542 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9543 (eval $ac_try) 2>&5
9544 ac_status=$?
9545 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9546 (exit $ac_status); }; }; then
9547 ac_cv_search_socketpair="none required"
9548else
9549 echo "$as_me: failed program was:" >&5
9550sed 's/^/| /' conftest.$ac_ext >&5
9551
9552fi
9553rm -f conftest.err conftest.$ac_objext \
9554 conftest$ac_exeext conftest.$ac_ext
9555if test "$ac_cv_search_socketpair" = no; then
9556 for ac_lib in socket; do
9557 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
9558 cat >conftest.$ac_ext <<_ACEOF
9559/* confdefs.h. */
9560_ACEOF
9561cat confdefs.h >>conftest.$ac_ext
9562cat >>conftest.$ac_ext <<_ACEOF
9563/* end confdefs.h. */
9564
9565/* Override any gcc2 internal prototype to avoid an error. */
9566#ifdef __cplusplus
9567extern "C"
9568#endif
9569/* We use char because int might match the return type of a gcc2
9570 builtin and then its argument prototype would still apply. */
9571char socketpair ();
9572int
9573main ()
9574{
9575socketpair ();
9576 ;
9577 return 0;
9578}
9579_ACEOF
9580rm -f conftest.$ac_objext conftest$ac_exeext
9581if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9582 (eval $ac_link) 2>conftest.er1
9583 ac_status=$?
9584 grep -v '^ *+' conftest.er1 >conftest.err
9585 rm -f conftest.er1
9586 cat conftest.err >&5
9587 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9588 (exit $ac_status); } &&
9589 { ac_try='test -z "$ac_c_werror_flag"
9590 || test ! -s conftest.err'
9591 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9592 (eval $ac_try) 2>&5
9593 ac_status=$?
9594 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9595 (exit $ac_status); }; } &&
9596 { ac_try='test -s conftest$ac_exeext'
9597 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9598 (eval $ac_try) 2>&5
9599 ac_status=$?
9600 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9601 (exit $ac_status); }; }; then
9602 ac_cv_search_socketpair="-l$ac_lib"
9603break
9604else
9605 echo "$as_me: failed program was:" >&5
9606sed 's/^/| /' conftest.$ac_ext >&5
9607
9608fi
9609rm -f conftest.err conftest.$ac_objext \
9610 conftest$ac_exeext conftest.$ac_ext
9611 done
9612fi
9613LIBS=$ac_func_search_save_LIBS
9614fi
9615echo "$as_me:$LINENO: result: $ac_cv_search_socketpair" >&5
9616echo "${ECHO_T}$ac_cv_search_socketpair" >&6
9617if test "$ac_cv_search_socketpair" != no; then
9618 test "$ac_cv_search_socketpair" = "none required" || LIBS="$ac_cv_search_socketpair $LIBS"
9619
9620fi
9621
9622
233a11ab
CS
9623# Link in zlib if we can. This allows us to read compressed debug sections.
9624echo "$as_me:$LINENO: checking for library containing zlibVersion" >&5
9625echo $ECHO_N "checking for library containing zlibVersion... $ECHO_C" >&6
9626if test "${ac_cv_search_zlibVersion+set}" = set; then
9627 echo $ECHO_N "(cached) $ECHO_C" >&6
9628else
9629 ac_func_search_save_LIBS=$LIBS
9630ac_cv_search_zlibVersion=no
9631cat >conftest.$ac_ext <<_ACEOF
9632/* confdefs.h. */
9633_ACEOF
9634cat confdefs.h >>conftest.$ac_ext
9635cat >>conftest.$ac_ext <<_ACEOF
9636/* end confdefs.h. */
9637
9638/* Override any gcc2 internal prototype to avoid an error. */
9639#ifdef __cplusplus
9640extern "C"
9641#endif
9642/* We use char because int might match the return type of a gcc2
9643 builtin and then its argument prototype would still apply. */
9644char zlibVersion ();
9645int
9646main ()
9647{
9648zlibVersion ();
9649 ;
9650 return 0;
9651}
9652_ACEOF
9653rm -f conftest.$ac_objext conftest$ac_exeext
9654if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9655 (eval $ac_link) 2>conftest.er1
9656 ac_status=$?
9657 grep -v '^ *+' conftest.er1 >conftest.err
9658 rm -f conftest.er1
9659 cat conftest.err >&5
9660 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9661 (exit $ac_status); } &&
9662 { ac_try='test -z "$ac_c_werror_flag"
9663 || test ! -s conftest.err'
9664 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9665 (eval $ac_try) 2>&5
9666 ac_status=$?
9667 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9668 (exit $ac_status); }; } &&
9669 { ac_try='test -s conftest$ac_exeext'
9670 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9671 (eval $ac_try) 2>&5
9672 ac_status=$?
9673 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9674 (exit $ac_status); }; }; then
9675 ac_cv_search_zlibVersion="none required"
9676else
9677 echo "$as_me: failed program was:" >&5
9678sed 's/^/| /' conftest.$ac_ext >&5
9679
9680fi
9681rm -f conftest.err conftest.$ac_objext \
9682 conftest$ac_exeext conftest.$ac_ext
9683if test "$ac_cv_search_zlibVersion" = no; then
9684 for ac_lib in z; do
9685 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
9686 cat >conftest.$ac_ext <<_ACEOF
9687/* confdefs.h. */
9688_ACEOF
9689cat confdefs.h >>conftest.$ac_ext
9690cat >>conftest.$ac_ext <<_ACEOF
9691/* end confdefs.h. */
9692
9693/* Override any gcc2 internal prototype to avoid an error. */
9694#ifdef __cplusplus
9695extern "C"
9696#endif
9697/* We use char because int might match the return type of a gcc2
9698 builtin and then its argument prototype would still apply. */
9699char zlibVersion ();
9700int
9701main ()
9702{
9703zlibVersion ();
9704 ;
9705 return 0;
9706}
9707_ACEOF
9708rm -f conftest.$ac_objext conftest$ac_exeext
9709if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9710 (eval $ac_link) 2>conftest.er1
9711 ac_status=$?
9712 grep -v '^ *+' conftest.er1 >conftest.err
9713 rm -f conftest.er1
9714 cat conftest.err >&5
9715 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9716 (exit $ac_status); } &&
9717 { ac_try='test -z "$ac_c_werror_flag"
9718 || test ! -s conftest.err'
9719 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9720 (eval $ac_try) 2>&5
9721 ac_status=$?
9722 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9723 (exit $ac_status); }; } &&
9724 { ac_try='test -s conftest$ac_exeext'
9725 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9726 (eval $ac_try) 2>&5
9727 ac_status=$?
9728 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9729 (exit $ac_status); }; }; then
9730 ac_cv_search_zlibVersion="-l$ac_lib"
9731break
9732else
9733 echo "$as_me: failed program was:" >&5
9734sed 's/^/| /' conftest.$ac_ext >&5
9735
9736fi
9737rm -f conftest.err conftest.$ac_objext \
9738 conftest$ac_exeext conftest.$ac_ext
9739 done
9740fi
9741LIBS=$ac_func_search_save_LIBS
9742fi
9743echo "$as_me:$LINENO: result: $ac_cv_search_zlibVersion" >&5
9744echo "${ECHO_T}$ac_cv_search_zlibVersion" >&6
9745if test "$ac_cv_search_zlibVersion" != no; then
9746 test "$ac_cv_search_zlibVersion" = "none required" || LIBS="$ac_cv_search_zlibVersion $LIBS"
9747
9748for ac_header in zlib.h
9749do
9750as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
9751if eval "test \"\${$as_ac_Header+set}\" = set"; then
9752 echo "$as_me:$LINENO: checking for $ac_header" >&5
9753echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
9754if eval "test \"\${$as_ac_Header+set}\" = set"; then
9755 echo $ECHO_N "(cached) $ECHO_C" >&6
9756fi
9757echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
9758echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
9759else
9760 # Is the header compilable?
9761echo "$as_me:$LINENO: checking $ac_header usability" >&5
9762echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
9763cat >conftest.$ac_ext <<_ACEOF
9764/* confdefs.h. */
9765_ACEOF
9766cat confdefs.h >>conftest.$ac_ext
9767cat >>conftest.$ac_ext <<_ACEOF
9768/* end confdefs.h. */
9769$ac_includes_default
9770#include <$ac_header>
9771_ACEOF
9772rm -f conftest.$ac_objext
9773if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9774 (eval $ac_compile) 2>conftest.er1
9775 ac_status=$?
9776 grep -v '^ *+' conftest.er1 >conftest.err
9777 rm -f conftest.er1
9778 cat conftest.err >&5
9779 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9780 (exit $ac_status); } &&
9781 { ac_try='test -z "$ac_c_werror_flag"
9782 || test ! -s conftest.err'
9783 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9784 (eval $ac_try) 2>&5
9785 ac_status=$?
9786 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9787 (exit $ac_status); }; } &&
9788 { ac_try='test -s conftest.$ac_objext'
9789 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9790 (eval $ac_try) 2>&5
9791 ac_status=$?
9792 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9793 (exit $ac_status); }; }; then
9794 ac_header_compiler=yes
9795else
9796 echo "$as_me: failed program was:" >&5
9797sed 's/^/| /' conftest.$ac_ext >&5
9798
9799ac_header_compiler=no
9800fi
9801rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
9802echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
9803echo "${ECHO_T}$ac_header_compiler" >&6
9804
9805# Is the header present?
9806echo "$as_me:$LINENO: checking $ac_header presence" >&5
9807echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
9808cat >conftest.$ac_ext <<_ACEOF
9809/* confdefs.h. */
9810_ACEOF
9811cat confdefs.h >>conftest.$ac_ext
9812cat >>conftest.$ac_ext <<_ACEOF
9813/* end confdefs.h. */
9814#include <$ac_header>
9815_ACEOF
9816if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
9817 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
9818 ac_status=$?
9819 grep -v '^ *+' conftest.er1 >conftest.err
9820 rm -f conftest.er1
9821 cat conftest.err >&5
9822 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9823 (exit $ac_status); } >/dev/null; then
9824 if test -s conftest.err; then
9825 ac_cpp_err=$ac_c_preproc_warn_flag
9826 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
9827 else
9828 ac_cpp_err=
9829 fi
9830else
9831 ac_cpp_err=yes
9832fi
9833if test -z "$ac_cpp_err"; then
9834 ac_header_preproc=yes
9835else
9836 echo "$as_me: failed program was:" >&5
9837sed 's/^/| /' conftest.$ac_ext >&5
9838
9839 ac_header_preproc=no
9840fi
9841rm -f conftest.err conftest.$ac_ext
9842echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
9843echo "${ECHO_T}$ac_header_preproc" >&6
9844
9845# So? What about this header?
9846case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
9847 yes:no: )
9848 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
9849echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
9850 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
9851echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
9852 ac_header_preproc=yes
9853 ;;
9854 no:yes:* )
9855 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
9856echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
9857 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
9858echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
9859 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
9860echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
9861 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
9862echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
9863 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
9864echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
9865 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
9866echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
9867 (
9868 cat <<\_ASBOX
9869## ------------------------------------------ ##
9870## Report this to the AC_PACKAGE_NAME lists. ##
9871## ------------------------------------------ ##
9872_ASBOX
9873 ) |
9874 sed "s/^/$as_me: WARNING: /" >&2
9875 ;;
9876esac
9877echo "$as_me:$LINENO: checking for $ac_header" >&5
9878echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
9879if eval "test \"\${$as_ac_Header+set}\" = set"; then
9880 echo $ECHO_N "(cached) $ECHO_C" >&6
9881else
9882 eval "$as_ac_Header=\$ac_header_preproc"
9883fi
9884echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
9885echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
9886
9887fi
9888if test `eval echo '${'$as_ac_Header'}'` = yes; then
9889 cat >>confdefs.h <<_ACEOF
9890#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
9891_ACEOF
9892
9893fi
9894
9895done
9896
9897fi
9898
9899
77f120bf
JB
9900# On HP/UX we may need libxpdl for dlgetmodinfo (used by solib-pa64.c).
9901echo "$as_me:$LINENO: checking for library containing dlgetmodinfo" >&5
9902echo $ECHO_N "checking for library containing dlgetmodinfo... $ECHO_C" >&6
9903if test "${ac_cv_search_dlgetmodinfo+set}" = set; then
bec39cab
AC
9904 echo $ECHO_N "(cached) $ECHO_C" >&6
9905else
9906 ac_func_search_save_LIBS=$LIBS
77f120bf 9907ac_cv_search_dlgetmodinfo=no
bec39cab
AC
9908cat >conftest.$ac_ext <<_ACEOF
9909/* confdefs.h. */
9910_ACEOF
9911cat confdefs.h >>conftest.$ac_ext
9912cat >>conftest.$ac_ext <<_ACEOF
9913/* end confdefs.h. */
c906108c 9914
b4e70030 9915/* Override any gcc2 internal prototype to avoid an error. */
bec39cab
AC
9916#ifdef __cplusplus
9917extern "C"
9918#endif
b4e70030
JB
9919/* We use char because int might match the return type of a gcc2
9920 builtin and then its argument prototype would still apply. */
77f120bf 9921char dlgetmodinfo ();
bec39cab
AC
9922int
9923main ()
9924{
77f120bf 9925dlgetmodinfo ();
bec39cab
AC
9926 ;
9927 return 0;
9928}
9929_ACEOF
b4e70030 9930rm -f conftest.$ac_objext conftest$ac_exeext
bec39cab
AC
9931if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9932 (eval $ac_link) 2>conftest.er1
9933 ac_status=$?
9934 grep -v '^ *+' conftest.er1 >conftest.err
9935 rm -f conftest.er1
9936 cat conftest.err >&5
9937 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9938 (exit $ac_status); } &&
b4e70030
JB
9939 { ac_try='test -z "$ac_c_werror_flag"
9940 || test ! -s conftest.err'
bec39cab
AC
9941 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9942 (eval $ac_try) 2>&5
9943 ac_status=$?
9944 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9945 (exit $ac_status); }; } &&
9946 { ac_try='test -s conftest$ac_exeext'
9947 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9948 (eval $ac_try) 2>&5
9949 ac_status=$?
9950 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9951 (exit $ac_status); }; }; then
77f120bf 9952 ac_cv_search_dlgetmodinfo="none required"
bec39cab
AC
9953else
9954 echo "$as_me: failed program was:" >&5
9955sed 's/^/| /' conftest.$ac_ext >&5
1ba607ad
AC
9956
9957fi
bec39cab 9958rm -f conftest.err conftest.$ac_objext \
b4e70030 9959 conftest$ac_exeext conftest.$ac_ext
77f120bf
JB
9960if test "$ac_cv_search_dlgetmodinfo" = no; then
9961 for ac_lib in dl xpdl; do
b4e70030
JB
9962 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
9963 cat >conftest.$ac_ext <<_ACEOF
9964/* confdefs.h. */
9965_ACEOF
9966cat confdefs.h >>conftest.$ac_ext
9967cat >>conftest.$ac_ext <<_ACEOF
9968/* end confdefs.h. */
9969
9970/* Override any gcc2 internal prototype to avoid an error. */
9971#ifdef __cplusplus
9972extern "C"
9973#endif
9974/* We use char because int might match the return type of a gcc2
9975 builtin and then its argument prototype would still apply. */
77f120bf 9976char dlgetmodinfo ();
b4e70030
JB
9977int
9978main ()
9979{
77f120bf 9980dlgetmodinfo ();
b4e70030
JB
9981 ;
9982 return 0;
9983}
9984_ACEOF
9985rm -f conftest.$ac_objext conftest$ac_exeext
9986if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9987 (eval $ac_link) 2>conftest.er1
9988 ac_status=$?
9989 grep -v '^ *+' conftest.er1 >conftest.err
9990 rm -f conftest.er1
9991 cat conftest.err >&5
9992 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9993 (exit $ac_status); } &&
9994 { ac_try='test -z "$ac_c_werror_flag"
9995 || test ! -s conftest.err'
9996 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9997 (eval $ac_try) 2>&5
9998 ac_status=$?
9999 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10000 (exit $ac_status); }; } &&
10001 { ac_try='test -s conftest$ac_exeext'
10002 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10003 (eval $ac_try) 2>&5
10004 ac_status=$?
10005 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10006 (exit $ac_status); }; }; then
77f120bf 10007 ac_cv_search_dlgetmodinfo="-l$ac_lib"
b4e70030 10008break
4e8d927d 10009else
b4e70030
JB
10010 echo "$as_me: failed program was:" >&5
10011sed 's/^/| /' conftest.$ac_ext >&5
10012
10013fi
10014rm -f conftest.err conftest.$ac_objext \
10015 conftest$ac_exeext conftest.$ac_ext
10016 done
1ba607ad 10017fi
bec39cab
AC
10018LIBS=$ac_func_search_save_LIBS
10019fi
77f120bf
JB
10020echo "$as_me:$LINENO: result: $ac_cv_search_dlgetmodinfo" >&5
10021echo "${ECHO_T}$ac_cv_search_dlgetmodinfo" >&6
10022if test "$ac_cv_search_dlgetmodinfo" != no; then
10023 test "$ac_cv_search_dlgetmodinfo" = "none required" || LIBS="$ac_cv_search_dlgetmodinfo $LIBS"
c906108c 10024
8bb2c122 10025fi
8bb2c122 10026
8bb2c122 10027
77f120bf 10028
77f120bf 10029
6c7a06a3
TT
10030
10031# Check whether --with-libiconv-prefix or --without-libiconv-prefix was given.
10032if test "${with_libiconv_prefix+set}" = set; then
10033 withval="$with_libiconv_prefix"
10034
10035 for dir in `echo "$withval" | tr : ' '`; do
94ae1714
TT
10036 if test -d $dir/include; then LIBICONV_INCLUDE="-I$dir/include"; fi
10037 if test -d $dir/lib; then LIBICONV_LIBDIR="-L$dir/lib"; fi
6c7a06a3
TT
10038 done
10039
10040fi;
10041
10042 BUILD_LIBICONV_LIBDIR="-L../libiconv/lib/.libs -L../libiconv/lib/_libs"
10043 BUILD_LIBICONV_INCLUDE="-I../libiconv/include"
10044
10045 echo "$as_me:$LINENO: checking for iconv" >&5
10046echo $ECHO_N "checking for iconv... $ECHO_C" >&6
10047if test "${am_cv_func_iconv+set}" = set; then
d542061a
UW
10048 echo $ECHO_N "(cached) $ECHO_C" >&6
10049else
6c7a06a3
TT
10050
10051 am_cv_func_iconv="no, consider installing GNU libiconv"
10052 am_cv_lib_iconv=no
10053 am_cv_use_build_libiconv=no
94ae1714 10054 # First, try to find iconv in libc.
6c7a06a3 10055 cat >conftest.$ac_ext <<_ACEOF
d542061a
UW
10056/* confdefs.h. */
10057_ACEOF
10058cat confdefs.h >>conftest.$ac_ext
10059cat >>conftest.$ac_ext <<_ACEOF
10060/* end confdefs.h. */
6c7a06a3
TT
10061#include <stdlib.h>
10062#include <iconv.h>
d542061a
UW
10063int
10064main ()
10065{
6c7a06a3
TT
10066iconv_t cd = iconv_open("","");
10067 iconv(cd,NULL,NULL,NULL,NULL);
10068 iconv_close(cd);
d542061a
UW
10069 ;
10070 return 0;
10071}
10072_ACEOF
10073rm -f conftest.$ac_objext conftest$ac_exeext
10074if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10075 (eval $ac_link) 2>conftest.er1
10076 ac_status=$?
10077 grep -v '^ *+' conftest.er1 >conftest.err
10078 rm -f conftest.er1
10079 cat conftest.err >&5
10080 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10081 (exit $ac_status); } &&
10082 { ac_try='test -z "$ac_c_werror_flag"
10083 || test ! -s conftest.err'
10084 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10085 (eval $ac_try) 2>&5
10086 ac_status=$?
10087 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10088 (exit $ac_status); }; } &&
10089 { ac_try='test -s conftest$ac_exeext'
10090 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10091 (eval $ac_try) 2>&5
10092 ac_status=$?
10093 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10094 (exit $ac_status); }; }; then
6c7a06a3 10095 am_cv_func_iconv=yes
d542061a
UW
10096else
10097 echo "$as_me: failed program was:" >&5
10098sed 's/^/| /' conftest.$ac_ext >&5
10099
10100fi
10101rm -f conftest.err conftest.$ac_objext \
10102 conftest$ac_exeext conftest.$ac_ext
94ae1714
TT
10103
10104 # If iconv was not in libc, try -liconv. In this case, arrange to
10105 # look in the libiconv prefix, if it was specified by the user.
6c7a06a3 10106 if test "$am_cv_func_iconv" != yes; then
94ae1714 10107 am_save_CPPFLAGS="$CPPFLAGS"
6c7a06a3 10108 am_save_LIBS="$LIBS"
94ae1714
TT
10109 if test -n "$LIBICONV_INCLUDE"; then
10110 CPPFLAGS="$CPPFLAGS $LIBICONV_INCLUDE"
10111 LIBS="$LIBS $LIBICONV_LIBDIR"
10112 fi
6c7a06a3
TT
10113 LIBS="$LIBS -liconv"
10114 cat >conftest.$ac_ext <<_ACEOF
d542061a
UW
10115/* confdefs.h. */
10116_ACEOF
10117cat confdefs.h >>conftest.$ac_ext
10118cat >>conftest.$ac_ext <<_ACEOF
10119/* end confdefs.h. */
6c7a06a3
TT
10120#include <stdlib.h>
10121#include <iconv.h>
d542061a
UW
10122int
10123main ()
10124{
6c7a06a3
TT
10125iconv_t cd = iconv_open("","");
10126 iconv(cd,NULL,NULL,NULL,NULL);
10127 iconv_close(cd);
d542061a
UW
10128 ;
10129 return 0;
10130}
10131_ACEOF
10132rm -f conftest.$ac_objext conftest$ac_exeext
10133if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10134 (eval $ac_link) 2>conftest.er1
10135 ac_status=$?
10136 grep -v '^ *+' conftest.er1 >conftest.err
10137 rm -f conftest.er1
10138 cat conftest.err >&5
10139 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10140 (exit $ac_status); } &&
10141 { ac_try='test -z "$ac_c_werror_flag"
10142 || test ! -s conftest.err'
10143 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10144 (eval $ac_try) 2>&5
10145 ac_status=$?
10146 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10147 (exit $ac_status); }; } &&
10148 { ac_try='test -s conftest$ac_exeext'
10149 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10150 (eval $ac_try) 2>&5
10151 ac_status=$?
10152 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10153 (exit $ac_status); }; }; then
6c7a06a3
TT
10154 am_cv_lib_iconv=yes
10155 am_cv_func_iconv=yes
d542061a
UW
10156else
10157 echo "$as_me: failed program was:" >&5
10158sed 's/^/| /' conftest.$ac_ext >&5
10159
10160fi
10161rm -f conftest.err conftest.$ac_objext \
10162 conftest$ac_exeext conftest.$ac_ext
6c7a06a3 10163 LIBS="$am_save_LIBS"
94ae1714 10164 CPPFLAGS="$am_save_CPPFLAGS"
77f120bf 10165 fi
94ae1714
TT
10166
10167 # If that didn't work, try to find libiconv in the build tree.
6c7a06a3
TT
10168 if test "$am_cv_func_iconv" != yes && test -d ../libiconv; then
10169 am_save_LIBS="$LIBS"
10170 am_save_CPPFLAGS="$CPPFLAGS"
10171 LIBS="$LIBS $BUILD_LIBICONV_LIBDIR -liconv"
10172 CPPFLAGS="$CPPFLAGS $BUILD_LIBICONV_INCLUDE"
10173 cat >conftest.$ac_ext <<_ACEOF
bec39cab
AC
10174/* confdefs.h. */
10175_ACEOF
10176cat confdefs.h >>conftest.$ac_ext
10177cat >>conftest.$ac_ext <<_ACEOF
10178/* end confdefs.h. */
6c7a06a3
TT
10179#include <stdlib.h>
10180#include <iconv.h>
bec39cab
AC
10181int
10182main ()
10183{
6c7a06a3
TT
10184iconv_t cd = iconv_open("","");
10185 iconv(cd,NULL,NULL,NULL,NULL);
10186 iconv_close(cd);
bec39cab
AC
10187 ;
10188 return 0;
10189}
10190_ACEOF
b4e70030 10191rm -f conftest.$ac_objext conftest$ac_exeext
bec39cab
AC
10192if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10193 (eval $ac_link) 2>conftest.er1
10194 ac_status=$?
10195 grep -v '^ *+' conftest.er1 >conftest.err
10196 rm -f conftest.er1
10197 cat conftest.err >&5
10198 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10199 (exit $ac_status); } &&
b4e70030
JB
10200 { ac_try='test -z "$ac_c_werror_flag"
10201 || test ! -s conftest.err'
bec39cab
AC
10202 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10203 (eval $ac_try) 2>&5
10204 ac_status=$?
10205 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10206 (exit $ac_status); }; } &&
10207 { ac_try='test -s conftest$ac_exeext'
10208 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10209 (eval $ac_try) 2>&5
10210 ac_status=$?
10211 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10212 (exit $ac_status); }; }; then
94ae1714
TT
10213 am_cv_use_build_libiconv=yes
10214 am_cv_lib_iconv=yes
6c7a06a3 10215 am_cv_func_iconv=yes
627af7ea 10216else
bec39cab
AC
10217 echo "$as_me: failed program was:" >&5
10218sed 's/^/| /' conftest.$ac_ext >&5
627af7ea 10219
627af7ea 10220fi
bec39cab 10221rm -f conftest.err conftest.$ac_objext \
b4e70030 10222 conftest$ac_exeext conftest.$ac_ext
6c7a06a3 10223 LIBS="$am_save_LIBS"
fc3b640d 10224 CPPFLAGS="$am_save_CPPFLAGS"
6c7a06a3
TT
10225 fi
10226
10227fi
10228echo "$as_me:$LINENO: result: $am_cv_func_iconv" >&5
10229echo "${ECHO_T}$am_cv_func_iconv" >&6
94ae1714
TT
10230
10231 # Set the various flags based on the cache variables. We can't rely
10232 # on the flags to remain set from the above code, due to caching.
fc3b640d
TT
10233 LIBICONV=
10234 if test "$am_cv_lib_iconv" = yes; then
10235 LIBICONV="-liconv"
94ae1714
TT
10236 else
10237 LIBICONV_LIBDIR=
10238 LIBICONV_INCLUDE=
fc3b640d
TT
10239 fi
10240 if test "$am_cv_use_build_libiconv" = yes; then
10241 LIBICONV_LIBDIR="$BUILD_LIBICONV_LIBDIR"
10242 LIBICONV_INCLUDE="$BUILD_LIBICONV_INCLUDE"
10243 fi
10244 CPPFLAGS="$CPPFLAGS $LIBICONV_INCLUDE"
10245 LIBS="$LIBS $LIBICONV_LIBDIR $LIBICONV"
94ae1714 10246
6c7a06a3
TT
10247 if test "$am_cv_func_iconv" = yes; then
10248
10249cat >>confdefs.h <<\_ACEOF
10250#define HAVE_ICONV 1
10251_ACEOF
10252
10253 echo "$as_me:$LINENO: checking for iconv declaration" >&5
10254echo $ECHO_N "checking for iconv declaration... $ECHO_C" >&6
10255 if test "${am_cv_proto_iconv+set}" = set; then
10256 echo $ECHO_N "(cached) $ECHO_C" >&6
10257else
10258
10259 cat >conftest.$ac_ext <<_ACEOF
b4e70030
JB
10260/* confdefs.h. */
10261_ACEOF
10262cat confdefs.h >>conftest.$ac_ext
10263cat >>conftest.$ac_ext <<_ACEOF
10264/* end confdefs.h. */
10265
6c7a06a3
TT
10266#include <stdlib.h>
10267#include <iconv.h>
10268extern
b4e70030 10269#ifdef __cplusplus
6c7a06a3 10270"C"
b4e70030 10271#endif
6c7a06a3
TT
10272#if defined(__STDC__) || defined(__cplusplus)
10273size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
10274#else
10275size_t iconv();
10276#endif
10277
b4e70030
JB
10278int
10279main ()
10280{
6c7a06a3 10281
b4e70030
JB
10282 ;
10283 return 0;
10284}
10285_ACEOF
6c7a06a3
TT
10286rm -f conftest.$ac_objext
10287if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10288 (eval $ac_compile) 2>conftest.er1
b4e70030
JB
10289 ac_status=$?
10290 grep -v '^ *+' conftest.er1 >conftest.err
10291 rm -f conftest.er1
10292 cat conftest.err >&5
10293 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10294 (exit $ac_status); } &&
10295 { ac_try='test -z "$ac_c_werror_flag"
10296 || test ! -s conftest.err'
10297 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10298 (eval $ac_try) 2>&5
10299 ac_status=$?
10300 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10301 (exit $ac_status); }; } &&
6c7a06a3 10302 { ac_try='test -s conftest.$ac_objext'
b4e70030
JB
10303 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10304 (eval $ac_try) 2>&5
10305 ac_status=$?
10306 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10307 (exit $ac_status); }; }; then
6c7a06a3 10308 am_cv_proto_iconv_arg1=""
4e8d927d 10309else
b4e70030
JB
10310 echo "$as_me: failed program was:" >&5
10311sed 's/^/| /' conftest.$ac_ext >&5
10312
6c7a06a3 10313am_cv_proto_iconv_arg1="const"
b4e70030 10314fi
6c7a06a3
TT
10315rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
10316 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);"
10317fi
10318
10319 am_cv_proto_iconv=`echo "$am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'`
10320 echo "$as_me:$LINENO: result: ${ac_t:-
10321 }$am_cv_proto_iconv" >&5
10322echo "${ECHO_T}${ac_t:-
10323 }$am_cv_proto_iconv" >&6
10324
10325cat >>confdefs.h <<_ACEOF
10326#define ICONV_CONST $am_cv_proto_iconv_arg1
10327_ACEOF
10328
10329 fi
6c7a06a3
TT
10330
10331
10332# On alpha-osf, it appears that libtermcap and libcurses are not compatible.
10333# There is a very specific comment in /usr/include/curses.h explaining that
10334# termcap routines built into libcurses must not be used.
10335#
10336# The symptoms we observed so far is GDB unexpectedly changing
10337# the terminal settings when tgetent is called - this is particularly
10338# visible as the output is missing carriage returns, and so rapidly
10339# becomes very hard to read.
10340#
10341# The readline configure script has already decided that libtermcap
10342# was enough for its purposes, and so decided to build readline using
10343# libtermcap. Since the TUI mode requires curses, building GDB with
10344# TUI enabled results in both libraries to be used at the same time,
10345# which is not allowed. This basically means that GDB with TUI is
10346# broken on alpha-osf.
10347
10348case $host_os in
10349 alpha*-*-osf* )
10350 if "$enable_tui" = "yes"; then
10351 { { echo "$as_me:$LINENO: error: Building GDB with TUI mode is not supported on this host" >&5
10352echo "$as_me: error: Building GDB with TUI mode is not supported on this host" >&2;}
10353 { (exit 1); exit 1; }; }
10354 fi
10355 if "$enable_tui" = "auto"; then
10356 enable_tui=no
10357 fi
10358 ;;
10359esac
10360
cb01cfba 10361# For the TUI, we need enhanced curses functionality.
bd8a8e1b 10362if test x"$enable_tui" != xno; then
cb01cfba
JB
10363 prefer_curses=yes
10364fi
10365
10366curses_found=no
10367if test x"$prefer_curses" = xyes; then
10368 # FIXME: kettenis/20040905: We prefer ncurses over the vendor-supplied
10369 # curses library because the latter might not provide all the
10370 # functionality we need. However, this leads to problems on systems
10371 # where the linker searches /usr/local/lib, but the compiler doesn't
10372 # search /usr/local/include, if ncurses is installed in /usr/local. A
10373 # default installation of ncurses on alpha*-dec-osf* will lead to such
10374 # a situation.
10375 echo "$as_me:$LINENO: checking for library containing waddstr" >&5
6c7a06a3
TT
10376echo $ECHO_N "checking for library containing waddstr... $ECHO_C" >&6
10377if test "${ac_cv_search_waddstr+set}" = set; then
10378 echo $ECHO_N "(cached) $ECHO_C" >&6
10379else
10380 ac_func_search_save_LIBS=$LIBS
10381ac_cv_search_waddstr=no
10382cat >conftest.$ac_ext <<_ACEOF
10383/* confdefs.h. */
10384_ACEOF
10385cat confdefs.h >>conftest.$ac_ext
10386cat >>conftest.$ac_ext <<_ACEOF
10387/* end confdefs.h. */
10388
10389/* Override any gcc2 internal prototype to avoid an error. */
10390#ifdef __cplusplus
10391extern "C"
10392#endif
10393/* We use char because int might match the return type of a gcc2
10394 builtin and then its argument prototype would still apply. */
10395char waddstr ();
10396int
10397main ()
10398{
10399waddstr ();
10400 ;
10401 return 0;
10402}
10403_ACEOF
10404rm -f conftest.$ac_objext conftest$ac_exeext
10405if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10406 (eval $ac_link) 2>conftest.er1
10407 ac_status=$?
10408 grep -v '^ *+' conftest.er1 >conftest.err
10409 rm -f conftest.er1
10410 cat conftest.err >&5
10411 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10412 (exit $ac_status); } &&
10413 { ac_try='test -z "$ac_c_werror_flag"
10414 || test ! -s conftest.err'
10415 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10416 (eval $ac_try) 2>&5
10417 ac_status=$?
10418 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10419 (exit $ac_status); }; } &&
10420 { ac_try='test -s conftest$ac_exeext'
10421 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10422 (eval $ac_try) 2>&5
10423 ac_status=$?
10424 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10425 (exit $ac_status); }; }; then
10426 ac_cv_search_waddstr="none required"
10427else
10428 echo "$as_me: failed program was:" >&5
10429sed 's/^/| /' conftest.$ac_ext >&5
10430
10431fi
10432rm -f conftest.err conftest.$ac_objext \
10433 conftest$ac_exeext conftest.$ac_ext
10434if test "$ac_cv_search_waddstr" = no; then
10435 for ac_lib in ncurses cursesX curses; do
10436 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
10437 cat >conftest.$ac_ext <<_ACEOF
10438/* confdefs.h. */
10439_ACEOF
10440cat confdefs.h >>conftest.$ac_ext
10441cat >>conftest.$ac_ext <<_ACEOF
10442/* end confdefs.h. */
10443
10444/* Override any gcc2 internal prototype to avoid an error. */
10445#ifdef __cplusplus
10446extern "C"
10447#endif
10448/* We use char because int might match the return type of a gcc2
10449 builtin and then its argument prototype would still apply. */
10450char waddstr ();
10451int
10452main ()
10453{
10454waddstr ();
10455 ;
10456 return 0;
10457}
10458_ACEOF
10459rm -f conftest.$ac_objext conftest$ac_exeext
10460if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10461 (eval $ac_link) 2>conftest.er1
10462 ac_status=$?
10463 grep -v '^ *+' conftest.er1 >conftest.err
10464 rm -f conftest.er1
10465 cat conftest.err >&5
10466 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10467 (exit $ac_status); } &&
10468 { ac_try='test -z "$ac_c_werror_flag"
10469 || test ! -s conftest.err'
10470 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10471 (eval $ac_try) 2>&5
10472 ac_status=$?
10473 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10474 (exit $ac_status); }; } &&
10475 { ac_try='test -s conftest$ac_exeext'
10476 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10477 (eval $ac_try) 2>&5
10478 ac_status=$?
10479 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10480 (exit $ac_status); }; }; then
10481 ac_cv_search_waddstr="-l$ac_lib"
10482break
10483else
10484 echo "$as_me: failed program was:" >&5
10485sed 's/^/| /' conftest.$ac_ext >&5
10486
10487fi
10488rm -f conftest.err conftest.$ac_objext \
10489 conftest$ac_exeext conftest.$ac_ext
10490 done
10491fi
10492LIBS=$ac_func_search_save_LIBS
10493fi
10494echo "$as_me:$LINENO: result: $ac_cv_search_waddstr" >&5
10495echo "${ECHO_T}$ac_cv_search_waddstr" >&6
10496if test "$ac_cv_search_waddstr" != no; then
10497 test "$ac_cv_search_waddstr" = "none required" || LIBS="$ac_cv_search_waddstr $LIBS"
10498
10499fi
10500
10501
cb01cfba
JB
10502 if test "$ac_cv_search_waddstr" != no; then
10503 curses_found=yes
10504 fi
10505fi
10506
10507# Check whether we should enable the TUI, but only do so if we really
10508# can.
10509if test x"$enable_tui" != xno; then
10510 if test -d $srcdir/tui; then
10511 if test "$curses_found" != no; then
6c7a06a3
TT
10512 CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_TUI_OBS)"
10513 CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_TUI_DEPS)"
10514 CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_TUI_SRCS)"
10515 ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_TUI_CFLAGS)"
10516 CONFIG_ALL="${CONFIG_ALL} all-tui"
10517 CONFIG_CLEAN="${CONFIG_CLEAN} clean-tui"
10518 CONFIG_INSTALL="${CONFIG_INSTALL} install-tui"
10519 CONFIG_UNINSTALL="${CONFIG_UNINSTALL} uninstall-tui"
10520 else
10521 if test x"$enable_tui" = xyes; then
10522 { { echo "$as_me:$LINENO: error: no enhanced curses library found; disable TUI" >&5
10523echo "$as_me: error: no enhanced curses library found; disable TUI" >&2;}
10524 { (exit 1); exit 1; }; }
10525 else
10526 { echo "$as_me:$LINENO: WARNING: no enhanced curses library found; disabling TUI" >&5
10527echo "$as_me: WARNING: no enhanced curses library found; disabling TUI" >&2;}
10528 fi
10529 fi
10530 fi
10531fi
10532
10533# Since GDB uses Readline, we need termcap functionality. In many
10534# cases this will be provided by the curses library, but some systems
10535# have a seperate termcap library, or no curses library at all.
10536
10537case $host_os in
10538 cygwin*)
10539 if test -d $srcdir/libtermcap; then
10540 LIBS="../libtermcap/libtermcap.a $LIBS"
10541 ac_cv_search_tgetent="../libtermcap/libtermcap.a"
10542 fi ;;
10543 go32* | *djgpp*)
10544 ac_cv_search_tgetent="none required"
10545 ;;
10546 *mingw32*)
10547 ac_cv_search_tgetent="none required"
10548 CONFIG_OBS="$CONFIG_OBS windows-termcap.o"
10549 ;;
10550esac
10551
10552# These are the libraries checked by Readline.
10553echo "$as_me:$LINENO: checking for library containing tgetent" >&5
10554echo $ECHO_N "checking for library containing tgetent... $ECHO_C" >&6
10555if test "${ac_cv_search_tgetent+set}" = set; then
10556 echo $ECHO_N "(cached) $ECHO_C" >&6
10557else
10558 ac_func_search_save_LIBS=$LIBS
10559ac_cv_search_tgetent=no
10560cat >conftest.$ac_ext <<_ACEOF
10561/* confdefs.h. */
10562_ACEOF
10563cat confdefs.h >>conftest.$ac_ext
10564cat >>conftest.$ac_ext <<_ACEOF
10565/* end confdefs.h. */
10566
10567/* Override any gcc2 internal prototype to avoid an error. */
10568#ifdef __cplusplus
10569extern "C"
10570#endif
10571/* We use char because int might match the return type of a gcc2
10572 builtin and then its argument prototype would still apply. */
10573char tgetent ();
10574int
10575main ()
10576{
10577tgetent ();
10578 ;
10579 return 0;
10580}
10581_ACEOF
10582rm -f conftest.$ac_objext conftest$ac_exeext
10583if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10584 (eval $ac_link) 2>conftest.er1
10585 ac_status=$?
10586 grep -v '^ *+' conftest.er1 >conftest.err
10587 rm -f conftest.er1
10588 cat conftest.err >&5
10589 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10590 (exit $ac_status); } &&
10591 { ac_try='test -z "$ac_c_werror_flag"
10592 || test ! -s conftest.err'
10593 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10594 (eval $ac_try) 2>&5
10595 ac_status=$?
10596 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10597 (exit $ac_status); }; } &&
10598 { ac_try='test -s conftest$ac_exeext'
10599 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10600 (eval $ac_try) 2>&5
10601 ac_status=$?
10602 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10603 (exit $ac_status); }; }; then
10604 ac_cv_search_tgetent="none required"
10605else
10606 echo "$as_me: failed program was:" >&5
10607sed 's/^/| /' conftest.$ac_ext >&5
10608
10609fi
10610rm -f conftest.err conftest.$ac_objext \
10611 conftest$ac_exeext conftest.$ac_ext
10612if test "$ac_cv_search_tgetent" = no; then
10613 for ac_lib in termcap tinfo curses ncurses; do
10614 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
10615 cat >conftest.$ac_ext <<_ACEOF
10616/* confdefs.h. */
10617_ACEOF
10618cat confdefs.h >>conftest.$ac_ext
10619cat >>conftest.$ac_ext <<_ACEOF
10620/* end confdefs.h. */
10621
10622/* Override any gcc2 internal prototype to avoid an error. */
10623#ifdef __cplusplus
10624extern "C"
10625#endif
10626/* We use char because int might match the return type of a gcc2
10627 builtin and then its argument prototype would still apply. */
10628char tgetent ();
10629int
10630main ()
10631{
10632tgetent ();
10633 ;
10634 return 0;
10635}
10636_ACEOF
10637rm -f conftest.$ac_objext conftest$ac_exeext
10638if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10639 (eval $ac_link) 2>conftest.er1
10640 ac_status=$?
10641 grep -v '^ *+' conftest.er1 >conftest.err
10642 rm -f conftest.er1
10643 cat conftest.err >&5
10644 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10645 (exit $ac_status); } &&
10646 { ac_try='test -z "$ac_c_werror_flag"
10647 || test ! -s conftest.err'
10648 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10649 (eval $ac_try) 2>&5
10650 ac_status=$?
10651 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10652 (exit $ac_status); }; } &&
10653 { ac_try='test -s conftest$ac_exeext'
10654 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10655 (eval $ac_try) 2>&5
10656 ac_status=$?
10657 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10658 (exit $ac_status); }; }; then
10659 ac_cv_search_tgetent="-l$ac_lib"
10660break
10661else
10662 echo "$as_me: failed program was:" >&5
10663sed 's/^/| /' conftest.$ac_ext >&5
10664
10665fi
10666rm -f conftest.err conftest.$ac_objext \
10667 conftest$ac_exeext conftest.$ac_ext
10668 done
10669fi
10670LIBS=$ac_func_search_save_LIBS
10671fi
10672echo "$as_me:$LINENO: result: $ac_cv_search_tgetent" >&5
10673echo "${ECHO_T}$ac_cv_search_tgetent" >&6
10674if test "$ac_cv_search_tgetent" != no; then
10675 test "$ac_cv_search_tgetent" = "none required" || LIBS="$ac_cv_search_tgetent $LIBS"
10676
06825bd1
MK
10677fi
10678
06825bd1 10679
bec39cab
AC
10680if test "$ac_cv_search_tgetent" = no; then
10681 { { echo "$as_me:$LINENO: error: no termcap library found" >&5
10682echo "$as_me: error: no termcap library found" >&2;}
10683 { (exit 1); exit 1; }; }
8ee53726
MK
10684fi
10685
3841debe 10686
6a30b0a5
AS
10687# Check whether --with-system-readline or --without-system-readline was given.
10688if test "${with_system_readline+set}" = set; then
10689 withval="$with_system_readline"
10690
10691fi;
10692
10693if test "$with_system_readline" = yes; then
10694 READLINE=-lreadline
10695 READLINE_DEPS=
10696 READLINE_CFLAGS=
10697else
10698 READLINE='$(READLINE_DIR)/libreadline.a'
10699 READLINE_DEPS='$(READLINE)'
10700 READLINE_CFLAGS='-I$(READLINE_SRC)/..'
10701fi
10702
10703
10704
10705
10706
5c39566f
DJ
10707# Check whether --with-expat or --without-expat was given.
10708if test "${with_expat+set}" = set; then
10709 withval="$with_expat"
10710
10711else
10712 with_expat=auto
10713fi;
10714echo "$as_me:$LINENO: checking whether to use expat" >&5
10715echo $ECHO_N "checking whether to use expat... $ECHO_C" >&6
10716echo "$as_me:$LINENO: result: $with_expat" >&5
10717echo "${ECHO_T}$with_expat" >&6
10718
10719if test "${with_expat}" = no; then
10720 { echo "$as_me:$LINENO: WARNING: expat support disabled; some features may be unavailable." >&5
10721echo "$as_me: WARNING: expat support disabled; some features may be unavailable." >&2;}
10722 HAVE_LIBEXPAT=no
10723else
10724
3841debe
DJ
10725 if test "X$prefix" = "XNONE"; then
10726 acl_final_prefix="$ac_default_prefix"
10727 else
10728 acl_final_prefix="$prefix"
10729 fi
10730 if test "X$exec_prefix" = "XNONE"; then
10731 acl_final_exec_prefix='${prefix}'
10732 else
10733 acl_final_exec_prefix="$exec_prefix"
10734 fi
10735 acl_save_prefix="$prefix"
10736 prefix="$acl_final_prefix"
10737 eval acl_final_exec_prefix=\"$acl_final_exec_prefix\"
10738 prefix="$acl_save_prefix"
10739
10740
10741# Check whether --with-gnu-ld or --without-gnu-ld was given.
10742if test "${with_gnu_ld+set}" = set; then
10743 withval="$with_gnu_ld"
10744 test "$withval" = no || with_gnu_ld=yes
10745else
10746 with_gnu_ld=no
10747fi;
10748# Prepare PATH_SEPARATOR.
10749# The user is always right.
10750if test "${PATH_SEPARATOR+set}" != set; then
10751 echo "#! /bin/sh" >conf$$.sh
10752 echo "exit 0" >>conf$$.sh
10753 chmod +x conf$$.sh
10754 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
10755 PATH_SEPARATOR=';'
10756 else
10757 PATH_SEPARATOR=:
10758 fi
10759 rm -f conf$$.sh
10760fi
10761ac_prog=ld
10762if test "$GCC" = yes; then
10763 # Check if gcc -print-prog-name=ld gives a path.
10764 echo "$as_me:$LINENO: checking for ld used by GCC" >&5
10765echo $ECHO_N "checking for ld used by GCC... $ECHO_C" >&6
10766 case $host in
10767 *-*-mingw*)
10768 # gcc leaves a trailing carriage return which upsets mingw
10769 ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
10770 *)
10771 ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
10772 esac
10773 case $ac_prog in
10774 # Accept absolute paths.
10775 [\\/]* | [A-Za-z]:[\\/]*)
10776 re_direlt='/[^/][^/]*/\.\./'
10777 # Canonicalize the path of ld
10778 ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
10779 while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
10780 ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
10781 done
10782 test -z "$LD" && LD="$ac_prog"
10783 ;;
10784 "")
10785 # If it fails, then pretend we aren't using GCC.
10786 ac_prog=ld
10787 ;;
10788 *)
10789 # If it is relative, then search for the first ld in PATH.
10790 with_gnu_ld=unknown
10791 ;;
10792 esac
10793elif test "$with_gnu_ld" = yes; then
10794 echo "$as_me:$LINENO: checking for GNU ld" >&5
10795echo $ECHO_N "checking for GNU ld... $ECHO_C" >&6
10796else
10797 echo "$as_me:$LINENO: checking for non-GNU ld" >&5
10798echo $ECHO_N "checking for non-GNU ld... $ECHO_C" >&6
10799fi
10800if test "${acl_cv_path_LD+set}" = set; then
10801 echo $ECHO_N "(cached) $ECHO_C" >&6
10802else
10803 if test -z "$LD"; then
10804 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
10805 for ac_dir in $PATH; do
10806 test -z "$ac_dir" && ac_dir=.
10807 if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
10808 acl_cv_path_LD="$ac_dir/$ac_prog"
10809 # Check to see if the program is GNU ld. I'd rather use --version,
10810 # but apparently some GNU ld's only accept -v.
10811 # Break only if it was the GNU/non-GNU ld that we prefer.
10812 if "$acl_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
10813 test "$with_gnu_ld" != no && break
10814 else
10815 test "$with_gnu_ld" != yes && break
10816 fi
10817 fi
10818 done
10819 IFS="$ac_save_ifs"
10820else
10821 acl_cv_path_LD="$LD" # Let the user override the test with a path.
10822fi
10823fi
10824
10825LD="$acl_cv_path_LD"
10826if test -n "$LD"; then
10827 echo "$as_me:$LINENO: result: $LD" >&5
10828echo "${ECHO_T}$LD" >&6
10829else
10830 echo "$as_me:$LINENO: result: no" >&5
10831echo "${ECHO_T}no" >&6
10832fi
10833test -z "$LD" && { { echo "$as_me:$LINENO: error: no acceptable ld found in \$PATH" >&5
10834echo "$as_me: error: no acceptable ld found in \$PATH" >&2;}
10835 { (exit 1); exit 1; }; }
10836echo "$as_me:$LINENO: checking if the linker ($LD) is GNU ld" >&5
10837echo $ECHO_N "checking if the linker ($LD) is GNU ld... $ECHO_C" >&6
10838if test "${acl_cv_prog_gnu_ld+set}" = set; then
10839 echo $ECHO_N "(cached) $ECHO_C" >&6
10840else
10841 # I'd rather use --version here, but apparently some GNU ld's only accept -v.
10842if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
10843 acl_cv_prog_gnu_ld=yes
10844else
10845 acl_cv_prog_gnu_ld=no
10846fi
10847fi
10848echo "$as_me:$LINENO: result: $acl_cv_prog_gnu_ld" >&5
10849echo "${ECHO_T}$acl_cv_prog_gnu_ld" >&6
10850with_gnu_ld=$acl_cv_prog_gnu_ld
10851
10852
10853
10854 echo "$as_me:$LINENO: checking for shared library run path origin" >&5
10855echo $ECHO_N "checking for shared library run path origin... $ECHO_C" >&6
10856if test "${acl_cv_rpath+set}" = set; then
10857 echo $ECHO_N "(cached) $ECHO_C" >&6
10858else
10859
10860 CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \
10861 ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh
10862 . ./conftest.sh
10863 rm -f ./conftest.sh
10864 acl_cv_rpath=done
10865
10866fi
10867echo "$as_me:$LINENO: result: $acl_cv_rpath" >&5
10868echo "${ECHO_T}$acl_cv_rpath" >&6
10869 wl="$acl_cv_wl"
10870 libext="$acl_cv_libext"
10871 shlibext="$acl_cv_shlibext"
10872 hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec"
10873 hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator"
10874 hardcode_direct="$acl_cv_hardcode_direct"
10875 hardcode_minus_L="$acl_cv_hardcode_minus_L"
10876 # Check whether --enable-rpath or --disable-rpath was given.
10877if test "${enable_rpath+set}" = set; then
10878 enableval="$enable_rpath"
10879 :
10880else
10881 enable_rpath=yes
10882fi;
10883
10884
10885
10886
10887
10888
10889
10890
10891
10892 use_additional=yes
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
10906# Check whether --with-libexpat-prefix or --without-libexpat-prefix was given.
10907if test "${with_libexpat_prefix+set}" = set; then
10908 withval="$with_libexpat_prefix"
10909
10910 if test "X$withval" = "Xno"; then
10911 use_additional=no
10912 else
10913 if test "X$withval" = "X"; then
10914
10915 acl_save_prefix="$prefix"
10916 prefix="$acl_final_prefix"
10917 acl_save_exec_prefix="$exec_prefix"
10918 exec_prefix="$acl_final_exec_prefix"
10919
10920 eval additional_includedir=\"$includedir\"
10921 eval additional_libdir=\"$libdir\"
10922
10923 exec_prefix="$acl_save_exec_prefix"
10924 prefix="$acl_save_prefix"
10925
10926 else
10927 additional_includedir="$withval/include"
10928 additional_libdir="$withval/lib"
10929 fi
10930 fi
10931
10932fi;
10933 LIBEXPAT=
10934 LTLIBEXPAT=
10935 INCEXPAT=
10936 rpathdirs=
10937 ltrpathdirs=
10938 names_already_handled=
10939 names_next_round='expat '
10940 while test -n "$names_next_round"; do
10941 names_this_round="$names_next_round"
10942 names_next_round=
10943 for name in $names_this_round; do
10944 already_handled=
10945 for n in $names_already_handled; do
10946 if test "$n" = "$name"; then
10947 already_handled=yes
10948 break
10949 fi
10950 done
10951 if test -z "$already_handled"; then
10952 names_already_handled="$names_already_handled $name"
10953 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
10954 eval value=\"\$HAVE_LIB$uppername\"
10955 if test -n "$value"; then
10956 if test "$value" = yes; then
10957 eval value=\"\$LIB$uppername\"
10958 test -z "$value" || LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$value"
10959 eval value=\"\$LTLIB$uppername\"
10960 test -z "$value" || LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }$value"
10961 else
10962 :
10963 fi
10964 else
10965 found_dir=
10966 found_la=
10967 found_so=
10968 found_a=
10969 if test $use_additional = yes; then
10970 if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then
10971 found_dir="$additional_libdir"
10972 found_so="$additional_libdir/lib$name.$shlibext"
10973 if test -f "$additional_libdir/lib$name.la"; then
10974 found_la="$additional_libdir/lib$name.la"
10975 fi
10976 else
10977 if test -f "$additional_libdir/lib$name.$libext"; then
10978 found_dir="$additional_libdir"
10979 found_a="$additional_libdir/lib$name.$libext"
10980 if test -f "$additional_libdir/lib$name.la"; then
10981 found_la="$additional_libdir/lib$name.la"
10982 fi
10983 fi
10984 fi
10985 fi
10986 if test "X$found_dir" = "X"; then
10987 for x in $LDFLAGS $LTLIBEXPAT; do
10988
10989 acl_save_prefix="$prefix"
10990 prefix="$acl_final_prefix"
10991 acl_save_exec_prefix="$exec_prefix"
10992 exec_prefix="$acl_final_exec_prefix"
10993 eval x=\"$x\"
10994 exec_prefix="$acl_save_exec_prefix"
10995 prefix="$acl_save_prefix"
10996
10997 case "$x" in
10998 -L*)
10999 dir=`echo "X$x" | sed -e 's/^X-L//'`
11000 if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then
11001 found_dir="$dir"
11002 found_so="$dir/lib$name.$shlibext"
11003 if test -f "$dir/lib$name.la"; then
11004 found_la="$dir/lib$name.la"
11005 fi
11006 else
11007 if test -f "$dir/lib$name.$libext"; then
11008 found_dir="$dir"
11009 found_a="$dir/lib$name.$libext"
11010 if test -f "$dir/lib$name.la"; then
11011 found_la="$dir/lib$name.la"
11012 fi
11013 fi
11014 fi
11015 ;;
11016 esac
11017 if test "X$found_dir" != "X"; then
11018 break
11019 fi
11020 done
11021 fi
11022 if test "X$found_dir" != "X"; then
11023 LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-L$found_dir -l$name"
11024 if test "X$found_so" != "X"; then
11025 if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
11026 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so"
11027 else
11028 haveit=
11029 for x in $ltrpathdirs; do
11030 if test "X$x" = "X$found_dir"; then
11031 haveit=yes
11032 break
11033 fi
11034 done
11035 if test -z "$haveit"; then
11036 ltrpathdirs="$ltrpathdirs $found_dir"
11037 fi
11038 if test "$hardcode_direct" = yes; then
11039 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so"
11040 else
11041 if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
11042 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so"
11043 haveit=
11044 for x in $rpathdirs; do
11045 if test "X$x" = "X$found_dir"; then
11046 haveit=yes
11047 break
11048 fi
11049 done
11050 if test -z "$haveit"; then
11051 rpathdirs="$rpathdirs $found_dir"
11052 fi
11053 else
11054 haveit=
11055 for x in $LDFLAGS $LIBEXPAT; do
11056
11057 acl_save_prefix="$prefix"
11058 prefix="$acl_final_prefix"
11059 acl_save_exec_prefix="$exec_prefix"
11060 exec_prefix="$acl_final_exec_prefix"
11061 eval x=\"$x\"
11062 exec_prefix="$acl_save_exec_prefix"
11063 prefix="$acl_save_prefix"
11064
11065 if test "X$x" = "X-L$found_dir"; then
11066 haveit=yes
11067 break
11068 fi
11069 done
11070 if test -z "$haveit"; then
11071 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-L$found_dir"
11072 fi
11073 if test "$hardcode_minus_L" != no; then
11074 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so"
11075 else
11076 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-l$name"
11077 fi
11078 fi
11079 fi
11080 fi
11081 else
11082 if test "X$found_a" != "X"; then
11083 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_a"
11084 else
11085 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-L$found_dir -l$name"
11086 fi
11087 fi
11088 additional_includedir=
11089 case "$found_dir" in
11090 */lib | */lib/)
11091 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
11092 additional_includedir="$basedir/include"
11093 ;;
11094 esac
11095 if test "X$additional_includedir" != "X"; then
11096 if test "X$additional_includedir" != "X/usr/include"; then
11097 haveit=
11098 if test "X$additional_includedir" = "X/usr/local/include"; then
11099 if test -n "$GCC"; then
11100 case $host_os in
11101 linux*) haveit=yes;;
11102 esac
11103 fi
11104 fi
11105 if test -z "$haveit"; then
11106 for x in $CPPFLAGS $INCEXPAT; do
11107
11108 acl_save_prefix="$prefix"
11109 prefix="$acl_final_prefix"
11110 acl_save_exec_prefix="$exec_prefix"
11111 exec_prefix="$acl_final_exec_prefix"
11112 eval x=\"$x\"
11113 exec_prefix="$acl_save_exec_prefix"
11114 prefix="$acl_save_prefix"
11115
11116 if test "X$x" = "X-I$additional_includedir"; then
11117 haveit=yes
11118 break
11119 fi
11120 done
11121 if test -z "$haveit"; then
11122 if test -d "$additional_includedir"; then
11123 INCEXPAT="${INCEXPAT}${INCEXPAT:+ }-I$additional_includedir"
11124 fi
11125 fi
11126 fi
11127 fi
11128 fi
11129 if test -n "$found_la"; then
11130 save_libdir="$libdir"
11131 case "$found_la" in
11132 */* | *\\*) . "$found_la" ;;
11133 *) . "./$found_la" ;;
11134 esac
11135 libdir="$save_libdir"
11136 for dep in $dependency_libs; do
11137 case "$dep" in
11138 -L*)
11139 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
11140 if test "X$additional_libdir" != "X/usr/lib"; then
11141 haveit=
11142 if test "X$additional_libdir" = "X/usr/local/lib"; then
11143 if test -n "$GCC"; then
11144 case $host_os in
11145 linux*) haveit=yes;;
11146 esac
11147 fi
11148 fi
11149 if test -z "$haveit"; then
11150 haveit=
11151 for x in $LDFLAGS $LIBEXPAT; 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 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-L$additional_libdir"
11169 fi
11170 fi
11171 haveit=
11172 for x in $LDFLAGS $LTLIBEXPAT; do
11173
11174 acl_save_prefix="$prefix"
11175 prefix="$acl_final_prefix"
11176 acl_save_exec_prefix="$exec_prefix"
11177 exec_prefix="$acl_final_exec_prefix"
11178 eval x=\"$x\"
11179 exec_prefix="$acl_save_exec_prefix"
11180 prefix="$acl_save_prefix"
11181
11182 if test "X$x" = "X-L$additional_libdir"; then
11183 haveit=yes
11184 break
11185 fi
11186 done
11187 if test -z "$haveit"; then
11188 if test -d "$additional_libdir"; then
11189 LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-L$additional_libdir"
11190 fi
11191 fi
11192 fi
11193 fi
11194 ;;
11195 -R*)
11196 dir=`echo "X$dep" | sed -e 's/^X-R//'`
11197 if test "$enable_rpath" != no; then
11198 haveit=
11199 for x in $rpathdirs; do
11200 if test "X$x" = "X$dir"; then
11201 haveit=yes
11202 break
11203 fi
11204 done
11205 if test -z "$haveit"; then
11206 rpathdirs="$rpathdirs $dir"
11207 fi
11208 haveit=
11209 for x in $ltrpathdirs; do
11210 if test "X$x" = "X$dir"; then
11211 haveit=yes
11212 break
11213 fi
11214 done
11215 if test -z "$haveit"; then
11216 ltrpathdirs="$ltrpathdirs $dir"
11217 fi
11218 fi
11219 ;;
11220 -l*)
11221 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
11222 ;;
11223 *.la)
11224 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
11225 ;;
11226 *)
11227 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$dep"
11228 LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }$dep"
11229 ;;
11230 esac
11231 done
11232 fi
11233 else
11234 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-l$name"
11235 LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-l$name"
11236 fi
11237 fi
11238 fi
11239 done
11240 done
11241 if test "X$rpathdirs" != "X"; then
11242 if test -n "$hardcode_libdir_separator"; then
11243 alldirs=
11244 for found_dir in $rpathdirs; do
11245 alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
11246 done
11247 acl_save_libdir="$libdir"
11248 libdir="$alldirs"
11249 eval flag=\"$hardcode_libdir_flag_spec\"
11250 libdir="$acl_save_libdir"
11251 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$flag"
11252 else
11253 for found_dir in $rpathdirs; do
11254 acl_save_libdir="$libdir"
11255 libdir="$found_dir"
11256 eval flag=\"$hardcode_libdir_flag_spec\"
11257 libdir="$acl_save_libdir"
11258 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$flag"
11259 done
11260 fi
11261 fi
11262 if test "X$ltrpathdirs" != "X"; then
11263 for found_dir in $ltrpathdirs; do
11264 LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-R$found_dir"
11265 done
11266 fi
11267
11268
11269 ac_save_CPPFLAGS="$CPPFLAGS"
11270
11271 for element in $INCEXPAT; do
11272 haveit=
11273 for x in $CPPFLAGS; do
11274
11275 acl_save_prefix="$prefix"
11276 prefix="$acl_final_prefix"
11277 acl_save_exec_prefix="$exec_prefix"
11278 exec_prefix="$acl_final_exec_prefix"
11279 eval x=\"$x\"
11280 exec_prefix="$acl_save_exec_prefix"
11281 prefix="$acl_save_prefix"
11282
11283 if test "X$x" = "X$element"; then
11284 haveit=yes
11285 break
11286 fi
11287 done
11288 if test -z "$haveit"; then
11289 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
11290 fi
11291 done
11292
11293
11294 echo "$as_me:$LINENO: checking for libexpat" >&5
11295echo $ECHO_N "checking for libexpat... $ECHO_C" >&6
11296if test "${ac_cv_libexpat+set}" = set; then
11297 echo $ECHO_N "(cached) $ECHO_C" >&6
11298else
11299
11300 ac_save_LIBS="$LIBS"
11301 LIBS="$LIBS $LIBEXPAT"
11302 cat >conftest.$ac_ext <<_ACEOF
11303/* confdefs.h. */
11304_ACEOF
11305cat confdefs.h >>conftest.$ac_ext
11306cat >>conftest.$ac_ext <<_ACEOF
11307/* end confdefs.h. */
11308#include "expat.h"
11309int
11310main ()
11311{
11312XML_Parser p = XML_ParserCreate (0);
11313 ;
11314 return 0;
11315}
11316_ACEOF
11317rm -f conftest.$ac_objext conftest$ac_exeext
11318if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11319 (eval $ac_link) 2>conftest.er1
11320 ac_status=$?
11321 grep -v '^ *+' conftest.er1 >conftest.err
11322 rm -f conftest.er1
11323 cat conftest.err >&5
11324 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11325 (exit $ac_status); } &&
11326 { ac_try='test -z "$ac_c_werror_flag"
11327 || test ! -s conftest.err'
11328 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11329 (eval $ac_try) 2>&5
11330 ac_status=$?
11331 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11332 (exit $ac_status); }; } &&
11333 { ac_try='test -s conftest$ac_exeext'
11334 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11335 (eval $ac_try) 2>&5
11336 ac_status=$?
11337 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11338 (exit $ac_status); }; }; then
11339 ac_cv_libexpat=yes
11340else
11341 echo "$as_me: failed program was:" >&5
11342sed 's/^/| /' conftest.$ac_ext >&5
11343
11344ac_cv_libexpat=no
11345fi
11346rm -f conftest.err conftest.$ac_objext \
11347 conftest$ac_exeext conftest.$ac_ext
11348 LIBS="$ac_save_LIBS"
11349
11350fi
11351echo "$as_me:$LINENO: result: $ac_cv_libexpat" >&5
11352echo "${ECHO_T}$ac_cv_libexpat" >&6
11353 if test "$ac_cv_libexpat" = yes; then
11354 HAVE_LIBEXPAT=yes
11355
11356cat >>confdefs.h <<\_ACEOF
11357#define HAVE_LIBEXPAT 1
11358_ACEOF
11359
11360 echo "$as_me:$LINENO: checking how to link with libexpat" >&5
11361echo $ECHO_N "checking how to link with libexpat... $ECHO_C" >&6
11362 echo "$as_me:$LINENO: result: $LIBEXPAT" >&5
11363echo "${ECHO_T}$LIBEXPAT" >&6
11364 else
11365 HAVE_LIBEXPAT=no
11366 CPPFLAGS="$ac_save_CPPFLAGS"
11367 LIBEXPAT=
11368 LTLIBEXPAT=
11369 fi
11370
11371
11372
11373
11374
11375
5c39566f
DJ
11376 if test "$HAVE_LIBEXPAT" != yes; then
11377 if test "$with_expat" = yes; then
11378 { { echo "$as_me:$LINENO: error: expat is missing or unusable" >&5
11379echo "$as_me: error: expat is missing or unusable" >&2;}
11380 { (exit 1); exit 1; }; }
11381 else
11382 { echo "$as_me:$LINENO: WARNING: expat is missing or unusable; some features may be unavailable." >&5
11383echo "$as_me: WARNING: expat is missing or unusable; some features may be unavailable." >&2;}
11384 fi
11385 else
11386 save_LIBS=$LIBS
11387 LIBS="$LIBS $LIBEXPAT"
ca4ca11e
DJ
11388
11389for ac_func in XML_StopParser
11390do
11391as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
11392echo "$as_me:$LINENO: checking for $ac_func" >&5
11393echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
11394if eval "test \"\${$as_ac_var+set}\" = set"; then
11395 echo $ECHO_N "(cached) $ECHO_C" >&6
11396else
11397 cat >conftest.$ac_ext <<_ACEOF
11398/* confdefs.h. */
11399_ACEOF
11400cat confdefs.h >>conftest.$ac_ext
11401cat >>conftest.$ac_ext <<_ACEOF
11402/* end confdefs.h. */
11403/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
11404 For example, HP-UX 11i <limits.h> declares gettimeofday. */
11405#define $ac_func innocuous_$ac_func
11406
11407/* System header to define __stub macros and hopefully few prototypes,
11408 which can conflict with char $ac_func (); below.
11409 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
11410 <limits.h> exists even on freestanding compilers. */
11411
11412#ifdef __STDC__
11413# include <limits.h>
11414#else
11415# include <assert.h>
11416#endif
11417
11418#undef $ac_func
11419
11420/* Override any gcc2 internal prototype to avoid an error. */
11421#ifdef __cplusplus
11422extern "C"
11423{
11424#endif
11425/* We use char because int might match the return type of a gcc2
11426 builtin and then its argument prototype would still apply. */
11427char $ac_func ();
11428/* The GNU C library defines this for functions which it implements
11429 to always fail with ENOSYS. Some functions are actually named
11430 something starting with __ and the normal name is an alias. */
11431#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
11432choke me
11433#else
11434char (*f) () = $ac_func;
11435#endif
11436#ifdef __cplusplus
11437}
11438#endif
11439
11440int
11441main ()
11442{
11443return f != $ac_func;
11444 ;
11445 return 0;
11446}
11447_ACEOF
11448rm -f conftest.$ac_objext conftest$ac_exeext
11449if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11450 (eval $ac_link) 2>conftest.er1
11451 ac_status=$?
11452 grep -v '^ *+' conftest.er1 >conftest.err
11453 rm -f conftest.er1
11454 cat conftest.err >&5
11455 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11456 (exit $ac_status); } &&
11457 { ac_try='test -z "$ac_c_werror_flag"
11458 || test ! -s conftest.err'
11459 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11460 (eval $ac_try) 2>&5
11461 ac_status=$?
11462 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11463 (exit $ac_status); }; } &&
11464 { ac_try='test -s conftest$ac_exeext'
11465 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11466 (eval $ac_try) 2>&5
11467 ac_status=$?
11468 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11469 (exit $ac_status); }; }; then
11470 eval "$as_ac_var=yes"
11471else
11472 echo "$as_me: failed program was:" >&5
11473sed 's/^/| /' conftest.$ac_ext >&5
11474
11475eval "$as_ac_var=no"
11476fi
11477rm -f conftest.err conftest.$ac_objext \
11478 conftest$ac_exeext conftest.$ac_ext
11479fi
11480echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
11481echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
11482if test `eval echo '${'$as_ac_var'}'` = yes; then
11483 cat >>confdefs.h <<_ACEOF
11484#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
11485_ACEOF
11486
11487fi
11488done
11489
5c39566f
DJ
11490 LIBS=$save_LIBS
11491 fi
3841debe
DJ
11492fi
11493
d57a3c85
TJB
11494
11495
11496
11497# Check whether --with-python or --without-python was given.
11498if test "${with_python+set}" = set; then
11499 withval="$with_python"
11500
11501else
11502 with_python=auto
11503fi;
11504echo "$as_me:$LINENO: checking whether to use python" >&5
11505echo $ECHO_N "checking whether to use python... $ECHO_C" >&6
11506echo "$as_me:$LINENO: result: $with_python" >&5
11507echo "${ECHO_T}$with_python" >&6
11508
11509if test "${with_python}" = no; then
11510 { echo "$as_me:$LINENO: WARNING: python support disabled; some features may be unavailable." >&5
11511echo "$as_me: WARNING: python support disabled; some features may be unavailable." >&2;}
11512 have_libpython=no
11513else
11514 case "${with_python}" in
11515 yes | auto)
11516 # Leave as empty, use defaults.
11517 python_includes=
11518 python_libs=
11519 ;;
11520 /*)
11521 python_includes="-I${with_python}/include"
11522 python_libs="-L${with_python}/lib"
11523 ;;
11524 *)
11525 { { echo "$as_me:$LINENO: error: invalid value for --with-python" >&5
11526echo "$as_me: error: invalid value for --with-python" >&2;}
11527 { (exit 1); exit 1; }; }
11528 ;;
11529 esac
11530
11531 save_CPPFLAGS=$CPPFLAGS
11532 CPPFLAGS="$CPPFLAGS ${python_includes}"
11533 save_LIBS=$LIBS
11534 LIBS="$LIBS ${python_libs}"
11535 have_libpython=no
11536 if test "${have_libpython}" = no; then
11537
11538 version=python2.6
11539
11540
11541 HAVE_LIBPYTHON2_6=no
11542 echo "$as_me:$LINENO: checking for ${version}" >&5
11543echo $ECHO_N "checking for ${version}... $ECHO_C" >&6
11544 save_LIBS=$LIBS
11545 LIBS="$LIBS -l${version}"
11546 cat >conftest.$ac_ext <<_ACEOF
11547/* confdefs.h. */
11548_ACEOF
11549cat confdefs.h >>conftest.$ac_ext
11550cat >>conftest.$ac_ext <<_ACEOF
11551/* end confdefs.h. */
11552#include "${version}/Python.h"
11553int
11554main ()
11555{
11556Py_Initialize ();
11557 ;
11558 return 0;
11559}
11560_ACEOF
11561rm -f conftest.$ac_objext conftest$ac_exeext
11562if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11563 (eval $ac_link) 2>conftest.er1
11564 ac_status=$?
11565 grep -v '^ *+' conftest.er1 >conftest.err
11566 rm -f conftest.er1
11567 cat conftest.err >&5
11568 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11569 (exit $ac_status); } &&
11570 { ac_try='test -z "$ac_c_werror_flag"
11571 || test ! -s conftest.err'
11572 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11573 (eval $ac_try) 2>&5
11574 ac_status=$?
11575 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11576 (exit $ac_status); }; } &&
11577 { ac_try='test -s conftest$ac_exeext'
11578 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11579 (eval $ac_try) 2>&5
11580 ac_status=$?
11581 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11582 (exit $ac_status); }; }; then
11583 HAVE_LIBPYTHON2_6=yes
11584 have_libpython=yes
11585else
11586 echo "$as_me: failed program was:" >&5
11587sed 's/^/| /' conftest.$ac_ext >&5
11588
11589LIBS=$save_LIBS
11590fi
11591rm -f conftest.err conftest.$ac_objext \
11592 conftest$ac_exeext conftest.$ac_ext
11593 echo "$as_me:$LINENO: result: $HAVE_LIBPYTHON2_6" >&5
11594echo "${ECHO_T}$HAVE_LIBPYTHON2_6" >&6
11595
11596 if test "${HAVE_LIBPYTHON2_6}" = yes; then
11597
11598cat >>confdefs.h <<\_ACEOF
11599#define HAVE_LIBPYTHON2_6 1
11600_ACEOF
11601
11602 fi
11603 fi
11604 if test ${have_libpython} = no; then
11605
11606 version=python2.5
11607
11608
11609 HAVE_LIBPYTHON2_5=no
11610 echo "$as_me:$LINENO: checking for ${version}" >&5
11611echo $ECHO_N "checking for ${version}... $ECHO_C" >&6
11612 save_LIBS=$LIBS
11613 LIBS="$LIBS -l${version}"
11614 cat >conftest.$ac_ext <<_ACEOF
11615/* confdefs.h. */
11616_ACEOF
11617cat confdefs.h >>conftest.$ac_ext
11618cat >>conftest.$ac_ext <<_ACEOF
11619/* end confdefs.h. */
11620#include "${version}/Python.h"
11621int
11622main ()
11623{
11624Py_Initialize ();
11625 ;
11626 return 0;
11627}
11628_ACEOF
11629rm -f conftest.$ac_objext conftest$ac_exeext
11630if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11631 (eval $ac_link) 2>conftest.er1
11632 ac_status=$?
11633 grep -v '^ *+' conftest.er1 >conftest.err
11634 rm -f conftest.er1
11635 cat conftest.err >&5
11636 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11637 (exit $ac_status); } &&
11638 { ac_try='test -z "$ac_c_werror_flag"
11639 || test ! -s conftest.err'
11640 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11641 (eval $ac_try) 2>&5
11642 ac_status=$?
11643 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11644 (exit $ac_status); }; } &&
11645 { ac_try='test -s conftest$ac_exeext'
11646 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11647 (eval $ac_try) 2>&5
11648 ac_status=$?
11649 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11650 (exit $ac_status); }; }; then
11651 HAVE_LIBPYTHON2_5=yes
11652 have_libpython=yes
11653else
11654 echo "$as_me: failed program was:" >&5
11655sed 's/^/| /' conftest.$ac_ext >&5
11656
11657LIBS=$save_LIBS
11658fi
11659rm -f conftest.err conftest.$ac_objext \
11660 conftest$ac_exeext conftest.$ac_ext
11661 echo "$as_me:$LINENO: result: $HAVE_LIBPYTHON2_5" >&5
11662echo "${ECHO_T}$HAVE_LIBPYTHON2_5" >&6
11663
11664 if test "${HAVE_LIBPYTHON2_5}" = yes; then
11665
11666cat >>confdefs.h <<\_ACEOF
11667#define HAVE_LIBPYTHON2_5 1
11668_ACEOF
11669
11670 fi
11671 fi
11672 if test ${have_libpython} = no; then
11673
11674 version=python2.4
11675
11676
11677 HAVE_LIBPYTHON2_4=no
11678 echo "$as_me:$LINENO: checking for ${version}" >&5
11679echo $ECHO_N "checking for ${version}... $ECHO_C" >&6
11680 save_LIBS=$LIBS
11681 LIBS="$LIBS -l${version}"
11682 cat >conftest.$ac_ext <<_ACEOF
11683/* confdefs.h. */
11684_ACEOF
11685cat confdefs.h >>conftest.$ac_ext
11686cat >>conftest.$ac_ext <<_ACEOF
11687/* end confdefs.h. */
11688#include "${version}/Python.h"
11689int
11690main ()
11691{
11692Py_Initialize ();
11693 ;
11694 return 0;
11695}
11696_ACEOF
11697rm -f conftest.$ac_objext conftest$ac_exeext
11698if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11699 (eval $ac_link) 2>conftest.er1
11700 ac_status=$?
11701 grep -v '^ *+' conftest.er1 >conftest.err
11702 rm -f conftest.er1
11703 cat conftest.err >&5
11704 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11705 (exit $ac_status); } &&
11706 { ac_try='test -z "$ac_c_werror_flag"
11707 || test ! -s conftest.err'
11708 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11709 (eval $ac_try) 2>&5
11710 ac_status=$?
11711 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11712 (exit $ac_status); }; } &&
11713 { ac_try='test -s conftest$ac_exeext'
11714 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11715 (eval $ac_try) 2>&5
11716 ac_status=$?
11717 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11718 (exit $ac_status); }; }; then
11719 HAVE_LIBPYTHON2_4=yes
11720 have_libpython=yes
11721else
11722 echo "$as_me: failed program was:" >&5
11723sed 's/^/| /' conftest.$ac_ext >&5
11724
11725LIBS=$save_LIBS
11726fi
11727rm -f conftest.err conftest.$ac_objext \
11728 conftest$ac_exeext conftest.$ac_ext
11729 echo "$as_me:$LINENO: result: $HAVE_LIBPYTHON2_4" >&5
11730echo "${ECHO_T}$HAVE_LIBPYTHON2_4" >&6
11731
11732 if test "${HAVE_LIBPYTHON2_4}" = yes; then
11733
11734cat >>confdefs.h <<\_ACEOF
11735#define HAVE_LIBPYTHON2_4 1
11736_ACEOF
11737
11738 fi
11739 fi
11740 if test ${have_libpython} = no; then
11741 case "${with_python}" in
11742 yes)
11743 { { echo "$as_me:$LINENO: error: python is missing or unusable" >&5
11744echo "$as_me: error: python is missing or unusable" >&2;}
11745 { (exit 1); exit 1; }; }
11746 ;;
11747 auto)
11748 { echo "$as_me:$LINENO: WARNING: python is missing or unusable; some features may be unavailable." >&5
11749echo "$as_me: WARNING: python is missing or unusable; some features may be unavailable." >&2;}
11750 ;;
11751 *)
11752 { { echo "$as_me:$LINENO: error: no usable python found at ${with_python}" >&5
11753echo "$as_me: error: no usable python found at ${with_python}" >&2;}
11754 { (exit 1); exit 1; }; }
11755 ;;
11756 esac
11757 CPPFLAGS=$save_CPPFLAGS
11758 LIBS=$save_LIBS
11759 fi
11760fi
11761
11762if test "${have_libpython}" = yes; then
11763
11764cat >>confdefs.h <<\_ACEOF
11765#define HAVE_PYTHON 1
11766_ACEOF
11767
11768 CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_PYTHON_OBS)"
11769 CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_PYTHON_DEPS)"
11770 CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_PYTHON_SRCS)"
11771 ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_PYTHON_CFLAGS)"
11772
11773 # Flags needed to compile Python code (taken from python-config --cflags).
11774 # We cannot call python-config directly because it will output whatever was
11775 # used when compiling the Python interpreter itself, including flags which
11776 # would make the python-related objects be compiled differently from the
11777 # rest of GDB (e.g., -O2 and -fPIC).
11778 if test "${GCC}" = yes; then
11779 tentative_python_cflags="-fno-strict-aliasing -DNDEBUG -fwrapv"
11780 fi
11781
11782 if test "x${tentative_python_cflags}" != x; then
11783 echo "$as_me:$LINENO: checking compiler flags for python code" >&5
11784echo $ECHO_N "checking compiler flags for python code... $ECHO_C" >&6
11785 for flag in ${tentative_python_cflags}; do
11786 # Check that the compiler accepts it
11787 saved_CFLAGS="$CFLAGS"
11788 CFLAGS="$CFLAGS $flag"
11789 cat >conftest.$ac_ext <<_ACEOF
11790/* confdefs.h. */
11791_ACEOF
11792cat confdefs.h >>conftest.$ac_ext
11793cat >>conftest.$ac_ext <<_ACEOF
11794/* end confdefs.h. */
11795
11796int
11797main ()
11798{
11799
11800 ;
11801 return 0;
11802}
11803_ACEOF
11804rm -f conftest.$ac_objext
11805if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11806 (eval $ac_compile) 2>conftest.er1
11807 ac_status=$?
11808 grep -v '^ *+' conftest.er1 >conftest.err
11809 rm -f conftest.er1
11810 cat conftest.err >&5
11811 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11812 (exit $ac_status); } &&
11813 { ac_try='test -z "$ac_c_werror_flag"
11814 || test ! -s conftest.err'
11815 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11816 (eval $ac_try) 2>&5
11817 ac_status=$?
11818 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11819 (exit $ac_status); }; } &&
11820 { ac_try='test -s conftest.$ac_objext'
11821 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11822 (eval $ac_try) 2>&5
11823 ac_status=$?
11824 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11825 (exit $ac_status); }; }; then
11826 PYTHON_CFLAGS="${PYTHON_CFLAGS} $flag"
11827else
11828 echo "$as_me: failed program was:" >&5
11829sed 's/^/| /' conftest.$ac_ext >&5
11830
11831fi
11832rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
11833 CFLAGS="$saved_CFLAGS"
11834 done
11835 echo "$as_me:$LINENO: result: ${PYTHON_CFLAGS}" >&5
11836echo "${ECHO_T}${PYTHON_CFLAGS}" >&6
11837 fi
11838else
a08702d6 11839 # Even if Python support is not compiled in, we need to have these files
d57a3c85 11840 # included in order to recognize the GDB command "python".
a08702d6
TJB
11841 CONFIG_OBS="$CONFIG_OBS python.o python-value.o"
11842 CONFIG_SRCS="$CONFIG_SRCS python/python.c python/python-value.c"
d57a3c85
TJB
11843fi
11844
11845
bec39cab
AC
11846# ------------------------- #
11847# Checks for header files. #
11848# ------------------------- #
8ee53726 11849
0e5d83e3 11850
bec39cab
AC
11851
11852
11853
11854
11855ac_header_dirent=no
11856for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
11857 as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
b4e70030
JB
11858echo "$as_me:$LINENO: checking for $ac_hdr that defines DIR" >&5
11859echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6
11860if eval "test \"\${$as_ac_Header+set}\" = set"; then
bec39cab
AC
11861 echo $ECHO_N "(cached) $ECHO_C" >&6
11862else
11863 cat >conftest.$ac_ext <<_ACEOF
11864/* confdefs.h. */
11865_ACEOF
11866cat confdefs.h >>conftest.$ac_ext
11867cat >>conftest.$ac_ext <<_ACEOF
11868/* end confdefs.h. */
11869#include <sys/types.h>
0e5d83e3 11870#include <$ac_hdr>
bec39cab
AC
11871
11872int
11873main ()
11874{
11875if ((DIR *) 0)
11876return 0;
11877 ;
11878 return 0;
11879}
11880_ACEOF
11881rm -f conftest.$ac_objext
11882if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11883 (eval $ac_compile) 2>conftest.er1
11884 ac_status=$?
11885 grep -v '^ *+' conftest.er1 >conftest.err
11886 rm -f conftest.er1
11887 cat conftest.err >&5
11888 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11889 (exit $ac_status); } &&
b4e70030
JB
11890 { ac_try='test -z "$ac_c_werror_flag"
11891 || test ! -s conftest.err'
bec39cab
AC
11892 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11893 (eval $ac_try) 2>&5
11894 ac_status=$?
11895 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11896 (exit $ac_status); }; } &&
11897 { ac_try='test -s conftest.$ac_objext'
11898 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11899 (eval $ac_try) 2>&5
11900 ac_status=$?
11901 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11902 (exit $ac_status); }; }; then
11903 eval "$as_ac_Header=yes"
11904else
11905 echo "$as_me: failed program was:" >&5
11906sed 's/^/| /' conftest.$ac_ext >&5
11907
b4e70030 11908eval "$as_ac_Header=no"
bec39cab
AC
11909fi
11910rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
11911fi
b4e70030
JB
11912echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
11913echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
bec39cab
AC
11914if test `eval echo '${'$as_ac_Header'}'` = yes; then
11915 cat >>confdefs.h <<_ACEOF
11916#define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
11917_ACEOF
11918
11919ac_header_dirent=$ac_hdr; break
0e5d83e3 11920fi
0e5d83e3 11921
bec39cab
AC
11922done
11923# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
11924if test $ac_header_dirent = dirent.h; then
b4e70030
JB
11925 echo "$as_me:$LINENO: checking for library containing opendir" >&5
11926echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6
bec39cab
AC
11927if test "${ac_cv_search_opendir+set}" = set; then
11928 echo $ECHO_N "(cached) $ECHO_C" >&6
11929else
11930 ac_func_search_save_LIBS=$LIBS
b4e70030 11931ac_cv_search_opendir=no
bec39cab
AC
11932cat >conftest.$ac_ext <<_ACEOF
11933/* confdefs.h. */
11934_ACEOF
11935cat confdefs.h >>conftest.$ac_ext
11936cat >>conftest.$ac_ext <<_ACEOF
11937/* end confdefs.h. */
0e5d83e3 11938
b4e70030 11939/* Override any gcc2 internal prototype to avoid an error. */
bec39cab
AC
11940#ifdef __cplusplus
11941extern "C"
11942#endif
b4e70030
JB
11943/* We use char because int might match the return type of a gcc2
11944 builtin and then its argument prototype would still apply. */
bec39cab
AC
11945char opendir ();
11946int
11947main ()
11948{
b4e70030 11949opendir ();
bec39cab
AC
11950 ;
11951 return 0;
11952}
11953_ACEOF
b4e70030 11954rm -f conftest.$ac_objext conftest$ac_exeext
bec39cab
AC
11955if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11956 (eval $ac_link) 2>conftest.er1
11957 ac_status=$?
11958 grep -v '^ *+' conftest.er1 >conftest.err
11959 rm -f conftest.er1
11960 cat conftest.err >&5
11961 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11962 (exit $ac_status); } &&
b4e70030
JB
11963 { ac_try='test -z "$ac_c_werror_flag"
11964 || test ! -s conftest.err'
bec39cab
AC
11965 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11966 (eval $ac_try) 2>&5
11967 ac_status=$?
11968 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11969 (exit $ac_status); }; } &&
11970 { ac_try='test -s conftest$ac_exeext'
11971 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11972 (eval $ac_try) 2>&5
11973 ac_status=$?
11974 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11975 (exit $ac_status); }; }; then
b4e70030 11976 ac_cv_search_opendir="none required"
bec39cab
AC
11977else
11978 echo "$as_me: failed program was:" >&5
11979sed 's/^/| /' conftest.$ac_ext >&5
11980
11981fi
bec39cab 11982rm -f conftest.err conftest.$ac_objext \
b4e70030
JB
11983 conftest$ac_exeext conftest.$ac_ext
11984if test "$ac_cv_search_opendir" = no; then
11985 for ac_lib in dir; do
11986 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
11987 cat >conftest.$ac_ext <<_ACEOF
11988/* confdefs.h. */
11989_ACEOF
11990cat confdefs.h >>conftest.$ac_ext
11991cat >>conftest.$ac_ext <<_ACEOF
11992/* end confdefs.h. */
11993
11994/* Override any gcc2 internal prototype to avoid an error. */
11995#ifdef __cplusplus
11996extern "C"
11997#endif
11998/* We use char because int might match the return type of a gcc2
11999 builtin and then its argument prototype would still apply. */
12000char opendir ();
12001int
12002main ()
12003{
12004opendir ();
12005 ;
12006 return 0;
12007}
12008_ACEOF
12009rm -f conftest.$ac_objext conftest$ac_exeext
12010if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12011 (eval $ac_link) 2>conftest.er1
12012 ac_status=$?
12013 grep -v '^ *+' conftest.er1 >conftest.err
12014 rm -f conftest.er1
12015 cat conftest.err >&5
12016 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12017 (exit $ac_status); } &&
12018 { ac_try='test -z "$ac_c_werror_flag"
12019 || test ! -s conftest.err'
12020 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12021 (eval $ac_try) 2>&5
12022 ac_status=$?
12023 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12024 (exit $ac_status); }; } &&
12025 { ac_try='test -s conftest$ac_exeext'
12026 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12027 (eval $ac_try) 2>&5
12028 ac_status=$?
12029 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12030 (exit $ac_status); }; }; then
12031 ac_cv_search_opendir="-l$ac_lib"
12032break
4e8d927d 12033else
b4e70030
JB
12034 echo "$as_me: failed program was:" >&5
12035sed 's/^/| /' conftest.$ac_ext >&5
12036
12037fi
12038rm -f conftest.err conftest.$ac_objext \
12039 conftest$ac_exeext conftest.$ac_ext
12040 done
0e5d83e3 12041fi
bec39cab 12042LIBS=$ac_func_search_save_LIBS
0e5d83e3 12043fi
b4e70030
JB
12044echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
12045echo "${ECHO_T}$ac_cv_search_opendir" >&6
12046if test "$ac_cv_search_opendir" != no; then
12047 test "$ac_cv_search_opendir" = "none required" || LIBS="$ac_cv_search_opendir $LIBS"
0e5d83e3 12048
0e5d83e3
JJ
12049fi
12050
d28f9cdf 12051else
b4e70030
JB
12052 echo "$as_me:$LINENO: checking for library containing opendir" >&5
12053echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6
bec39cab
AC
12054if test "${ac_cv_search_opendir+set}" = set; then
12055 echo $ECHO_N "(cached) $ECHO_C" >&6
12056else
12057 ac_func_search_save_LIBS=$LIBS
b4e70030 12058ac_cv_search_opendir=no
bec39cab
AC
12059cat >conftest.$ac_ext <<_ACEOF
12060/* confdefs.h. */
12061_ACEOF
12062cat confdefs.h >>conftest.$ac_ext
12063cat >>conftest.$ac_ext <<_ACEOF
12064/* end confdefs.h. */
d28f9cdf 12065
b4e70030 12066/* Override any gcc2 internal prototype to avoid an error. */
bec39cab
AC
12067#ifdef __cplusplus
12068extern "C"
d28f9cdf 12069#endif
b4e70030
JB
12070/* We use char because int might match the return type of a gcc2
12071 builtin and then its argument prototype would still apply. */
bec39cab
AC
12072char opendir ();
12073int
12074main ()
12075{
b4e70030 12076opendir ();
bec39cab
AC
12077 ;
12078 return 0;
12079}
12080_ACEOF
b4e70030 12081rm -f conftest.$ac_objext conftest$ac_exeext
bec39cab
AC
12082if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12083 (eval $ac_link) 2>conftest.er1
12084 ac_status=$?
12085 grep -v '^ *+' conftest.er1 >conftest.err
12086 rm -f conftest.er1
12087 cat conftest.err >&5
12088 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12089 (exit $ac_status); } &&
b4e70030
JB
12090 { ac_try='test -z "$ac_c_werror_flag"
12091 || test ! -s conftest.err'
bec39cab
AC
12092 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12093 (eval $ac_try) 2>&5
12094 ac_status=$?
12095 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12096 (exit $ac_status); }; } &&
12097 { ac_try='test -s conftest$ac_exeext'
12098 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12099 (eval $ac_try) 2>&5
12100 ac_status=$?
12101 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12102 (exit $ac_status); }; }; then
b4e70030 12103 ac_cv_search_opendir="none required"
d28f9cdf 12104else
bec39cab
AC
12105 echo "$as_me: failed program was:" >&5
12106sed 's/^/| /' conftest.$ac_ext >&5
12107
d28f9cdf 12108fi
bec39cab 12109rm -f conftest.err conftest.$ac_objext \
b4e70030
JB
12110 conftest$ac_exeext conftest.$ac_ext
12111if test "$ac_cv_search_opendir" = no; then
12112 for ac_lib in x; do
12113 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
12114 cat >conftest.$ac_ext <<_ACEOF
12115/* confdefs.h. */
12116_ACEOF
12117cat confdefs.h >>conftest.$ac_ext
12118cat >>conftest.$ac_ext <<_ACEOF
12119/* end confdefs.h. */
12120
12121/* Override any gcc2 internal prototype to avoid an error. */
12122#ifdef __cplusplus
12123extern "C"
12124#endif
12125/* We use char because int might match the return type of a gcc2
12126 builtin and then its argument prototype would still apply. */
12127char opendir ();
12128int
12129main ()
12130{
12131opendir ();
12132 ;
12133 return 0;
12134}
12135_ACEOF
12136rm -f conftest.$ac_objext conftest$ac_exeext
12137if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12138 (eval $ac_link) 2>conftest.er1
12139 ac_status=$?
12140 grep -v '^ *+' conftest.er1 >conftest.err
12141 rm -f conftest.er1
12142 cat conftest.err >&5
12143 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12144 (exit $ac_status); } &&
12145 { ac_try='test -z "$ac_c_werror_flag"
12146 || test ! -s conftest.err'
12147 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12148 (eval $ac_try) 2>&5
12149 ac_status=$?
12150 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12151 (exit $ac_status); }; } &&
12152 { ac_try='test -s conftest$ac_exeext'
12153 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12154 (eval $ac_try) 2>&5
12155 ac_status=$?
12156 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12157 (exit $ac_status); }; }; then
12158 ac_cv_search_opendir="-l$ac_lib"
12159break
4e8d927d 12160else
b4e70030
JB
12161 echo "$as_me: failed program was:" >&5
12162sed 's/^/| /' conftest.$ac_ext >&5
12163
12164fi
12165rm -f conftest.err conftest.$ac_objext \
12166 conftest$ac_exeext conftest.$ac_ext
12167 done
bec39cab
AC
12168fi
12169LIBS=$ac_func_search_save_LIBS
d28f9cdf 12170fi
b4e70030
JB
12171echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
12172echo "${ECHO_T}$ac_cv_search_opendir" >&6
12173if test "$ac_cv_search_opendir" != no; then
12174 test "$ac_cv_search_opendir" = "none required" || LIBS="$ac_cv_search_opendir $LIBS"
d28f9cdf 12175
d28f9cdf
DJ
12176fi
12177
bec39cab 12178fi
b0b1c2c0 12179
b4e70030
JB
12180echo "$as_me:$LINENO: checking whether stat file-mode macros are broken" >&5
12181echo $ECHO_N "checking whether stat file-mode macros are broken... $ECHO_C" >&6
bec39cab
AC
12182if test "${ac_cv_header_stat_broken+set}" = set; then
12183 echo $ECHO_N "(cached) $ECHO_C" >&6
b0b1c2c0 12184else
bec39cab
AC
12185 cat >conftest.$ac_ext <<_ACEOF
12186/* confdefs.h. */
12187_ACEOF
12188cat confdefs.h >>conftest.$ac_ext
12189cat >>conftest.$ac_ext <<_ACEOF
12190/* end confdefs.h. */
12191#include <sys/types.h>
12192#include <sys/stat.h>
b0b1c2c0 12193
b4e70030 12194#if defined(S_ISBLK) && defined(S_IFDIR)
bec39cab
AC
12195# if S_ISBLK (S_IFDIR)
12196You lose.
12197# endif
12198#endif
b0b1c2c0 12199
b4e70030 12200#if defined(S_ISBLK) && defined(S_IFCHR)
bec39cab
AC
12201# if S_ISBLK (S_IFCHR)
12202You lose.
12203# endif
12204#endif
d28f9cdf 12205
b4e70030 12206#if defined(S_ISLNK) && defined(S_IFREG)
bec39cab
AC
12207# if S_ISLNK (S_IFREG)
12208You lose.
12209# endif
12210#endif
d28f9cdf 12211
b4e70030 12212#if defined(S_ISSOCK) && defined(S_IFREG)
bec39cab
AC
12213# if S_ISSOCK (S_IFREG)
12214You lose.
12215# endif
12216#endif
12217
12218_ACEOF
12219if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12220 $EGREP "You lose" >/dev/null 2>&1; then
12221 ac_cv_header_stat_broken=yes
d28f9cdf 12222else
bec39cab 12223 ac_cv_header_stat_broken=no
d28f9cdf
DJ
12224fi
12225rm -f conftest*
d28f9cdf 12226
d28f9cdf 12227fi
b4e70030
JB
12228echo "$as_me:$LINENO: result: $ac_cv_header_stat_broken" >&5
12229echo "${ECHO_T}$ac_cv_header_stat_broken" >&6
bec39cab 12230if test $ac_cv_header_stat_broken = yes; then
d28f9cdf 12231
bec39cab
AC
12232cat >>confdefs.h <<\_ACEOF
12233#define STAT_MACROS_BROKEN 1
12234_ACEOF
8bb2c122 12235
7a292a7a 12236fi
bec39cab 12237
b4e70030
JB
12238echo "$as_me:$LINENO: checking for ANSI C header files" >&5
12239echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
bec39cab
AC
12240if test "${ac_cv_header_stdc+set}" = set; then
12241 echo $ECHO_N "(cached) $ECHO_C" >&6
7a292a7a 12242else
bec39cab
AC
12243 cat >conftest.$ac_ext <<_ACEOF
12244/* confdefs.h. */
12245_ACEOF
12246cat confdefs.h >>conftest.$ac_ext
12247cat >>conftest.$ac_ext <<_ACEOF
12248/* end confdefs.h. */
12249#include <stdlib.h>
12250#include <stdarg.h>
12251#include <string.h>
12252#include <float.h>
7a292a7a 12253
bec39cab
AC
12254int
12255main ()
12256{
7a292a7a 12257
bec39cab
AC
12258 ;
12259 return 0;
12260}
12261_ACEOF
12262rm -f conftest.$ac_objext
12263if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12264 (eval $ac_compile) 2>conftest.er1
12265 ac_status=$?
12266 grep -v '^ *+' conftest.er1 >conftest.err
12267 rm -f conftest.er1
12268 cat conftest.err >&5
12269 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12270 (exit $ac_status); } &&
b4e70030
JB
12271 { ac_try='test -z "$ac_c_werror_flag"
12272 || test ! -s conftest.err'
bec39cab
AC
12273 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12274 (eval $ac_try) 2>&5
12275 ac_status=$?
12276 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12277 (exit $ac_status); }; } &&
12278 { ac_try='test -s conftest.$ac_objext'
12279 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12280 (eval $ac_try) 2>&5
12281 ac_status=$?
12282 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12283 (exit $ac_status); }; }; then
12284 ac_cv_header_stdc=yes
c906108c 12285else
bec39cab
AC
12286 echo "$as_me: failed program was:" >&5
12287sed 's/^/| /' conftest.$ac_ext >&5
c906108c 12288
b4e70030 12289ac_cv_header_stdc=no
c906108c 12290fi
bec39cab 12291rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c 12292
bec39cab
AC
12293if test $ac_cv_header_stdc = yes; then
12294 # SunOS 4.x string.h does not declare mem*, 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 <string.h>
c906108c 12302
bec39cab
AC
12303_ACEOF
12304if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12305 $EGREP "memchr" >/dev/null 2>&1; then
12306 :
8bb2c122 12307else
bec39cab 12308 ac_cv_header_stdc=no
8bb2c122 12309fi
bec39cab
AC
12310rm -f conftest*
12311
c906108c
SS
12312fi
12313
bec39cab
AC
12314if test $ac_cv_header_stdc = yes; then
12315 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
12316 cat >conftest.$ac_ext <<_ACEOF
12317/* confdefs.h. */
12318_ACEOF
12319cat confdefs.h >>conftest.$ac_ext
12320cat >>conftest.$ac_ext <<_ACEOF
12321/* end confdefs.h. */
12322#include <stdlib.h>
12323
12324_ACEOF
12325if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12326 $EGREP "free" >/dev/null 2>&1; then
12327 :
c906108c 12328else
bec39cab 12329 ac_cv_header_stdc=no
c906108c 12330fi
bec39cab
AC
12331rm -f conftest*
12332
c906108c
SS
12333fi
12334
bec39cab
AC
12335if test $ac_cv_header_stdc = yes; then
12336 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
12337 if test "$cross_compiling" = yes; then
12338 :
c906108c 12339else
bec39cab
AC
12340 cat >conftest.$ac_ext <<_ACEOF
12341/* confdefs.h. */
12342_ACEOF
12343cat confdefs.h >>conftest.$ac_ext
12344cat >>conftest.$ac_ext <<_ACEOF
12345/* end confdefs.h. */
12346#include <ctype.h>
12347#if ((' ' & 0x0FF) == 0x020)
12348# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
12349# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
12350#else
12351# define ISLOWER(c) \
12352 (('a' <= (c) && (c) <= 'i') \
12353 || ('j' <= (c) && (c) <= 'r') \
12354 || ('s' <= (c) && (c) <= 'z'))
12355# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
12356#endif
12357
12358#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
12359int
12360main ()
12361{
12362 int i;
12363 for (i = 0; i < 256; i++)
12364 if (XOR (islower (i), ISLOWER (i))
12365 || toupper (i) != TOUPPER (i))
b4e70030
JB
12366 exit(2);
12367 exit (0);
bec39cab
AC
12368}
12369_ACEOF
12370rm -f conftest$ac_exeext
12371if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12372 (eval $ac_link) 2>&5
12373 ac_status=$?
12374 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12375 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
12376 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12377 (eval $ac_try) 2>&5
12378 ac_status=$?
12379 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12380 (exit $ac_status); }; }; then
12381 :
12382else
12383 echo "$as_me: program exited with status $ac_status" >&5
12384echo "$as_me: failed program was:" >&5
12385sed 's/^/| /' conftest.$ac_ext >&5
12386
12387( exit $ac_status )
12388ac_cv_header_stdc=no
c906108c 12389fi
b4e70030 12390rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
c906108c 12391fi
c906108c 12392fi
bec39cab 12393fi
b4e70030
JB
12394echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
12395echo "${ECHO_T}$ac_cv_header_stdc" >&6
bec39cab 12396if test $ac_cv_header_stdc = yes; then
c906108c 12397
bec39cab
AC
12398cat >>confdefs.h <<\_ACEOF
12399#define STDC_HEADERS 1
12400_ACEOF
c906108c 12401
bec39cab 12402fi
8bb2c122 12403
a9322a30
TT
12404# elf_hp.h is for HP/UX 64-bit shared library support.
12405# FIXME: kettenis/20030102: In most cases we include these (ctype.h, time.h)
12406# unconditionally, so what's the point in checking these?
12407
12408
12409
12410
12411
12412
12413
12414
12415
12416
12417
12418
12419
12420
12421
12422
12423
bec39cab 12424
a9322a30
TT
12425
12426
12427
12428
12429
12430
12431
12432
12433
12434
12435
12436
12437
12438
12439
12440
a8111142 12441
a9322a30
TT
12442
12443
12444for ac_header in nlist.h machine/reg.h poll.h sys/poll.h proc_service.h \
12445 thread_db.h gnu/libc-version.h signal.h stddef.h \
12446 stdlib.h string.h memory.h strings.h sys/fault.h \
12447 sys/file.h sys/filio.h sys/ioctl.h sys/param.h \
12448 sys/resource.h sys/procfs.h sys/ptrace.h ptrace.h \
12449 sys/reg.h sys/debugreg.h sys/select.h sys/syscall.h \
12450 sys/types.h sys/wait.h wait.h termios.h termio.h \
a8111142 12451 sgtty.h unistd.h elf_hp.h ctype.h time.h locale.h
bec39cab
AC
12452do
12453as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
b4e70030
JB
12454if eval "test \"\${$as_ac_Header+set}\" = set"; then
12455 echo "$as_me:$LINENO: checking for $ac_header" >&5
12456echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
12457if eval "test \"\${$as_ac_Header+set}\" = set"; then
bec39cab
AC
12458 echo $ECHO_N "(cached) $ECHO_C" >&6
12459fi
b4e70030
JB
12460echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
12461echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
bec39cab
AC
12462else
12463 # Is the header compilable?
b4e70030
JB
12464echo "$as_me:$LINENO: checking $ac_header usability" >&5
12465echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
bec39cab
AC
12466cat >conftest.$ac_ext <<_ACEOF
12467/* confdefs.h. */
12468_ACEOF
12469cat confdefs.h >>conftest.$ac_ext
12470cat >>conftest.$ac_ext <<_ACEOF
12471/* end confdefs.h. */
12472$ac_includes_default
12473#include <$ac_header>
12474_ACEOF
12475rm -f conftest.$ac_objext
12476if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12477 (eval $ac_compile) 2>conftest.er1
12478 ac_status=$?
12479 grep -v '^ *+' conftest.er1 >conftest.err
12480 rm -f conftest.er1
12481 cat conftest.err >&5
12482 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12483 (exit $ac_status); } &&
b4e70030
JB
12484 { ac_try='test -z "$ac_c_werror_flag"
12485 || test ! -s conftest.err'
bec39cab
AC
12486 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12487 (eval $ac_try) 2>&5
12488 ac_status=$?
12489 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12490 (exit $ac_status); }; } &&
12491 { ac_try='test -s conftest.$ac_objext'
12492 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12493 (eval $ac_try) 2>&5
12494 ac_status=$?
12495 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12496 (exit $ac_status); }; }; then
12497 ac_header_compiler=yes
12498else
12499 echo "$as_me: failed program was:" >&5
12500sed 's/^/| /' conftest.$ac_ext >&5
12501
b4e70030 12502ac_header_compiler=no
bec39cab
AC
12503fi
12504rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
b4e70030
JB
12505echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
12506echo "${ECHO_T}$ac_header_compiler" >&6
bec39cab
AC
12507
12508# Is the header present?
b4e70030
JB
12509echo "$as_me:$LINENO: checking $ac_header presence" >&5
12510echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
bec39cab
AC
12511cat >conftest.$ac_ext <<_ACEOF
12512/* confdefs.h. */
12513_ACEOF
12514cat confdefs.h >>conftest.$ac_ext
12515cat >>conftest.$ac_ext <<_ACEOF
12516/* end confdefs.h. */
12517#include <$ac_header>
12518_ACEOF
12519if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
12520 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
12521 ac_status=$?
12522 grep -v '^ *+' conftest.er1 >conftest.err
12523 rm -f conftest.er1
12524 cat conftest.err >&5
12525 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12526 (exit $ac_status); } >/dev/null; then
12527 if test -s conftest.err; then
12528 ac_cpp_err=$ac_c_preproc_warn_flag
12529 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
12530 else
12531 ac_cpp_err=
12532 fi
c906108c 12533else
bec39cab 12534 ac_cpp_err=yes
c906108c 12535fi
bec39cab
AC
12536if test -z "$ac_cpp_err"; then
12537 ac_header_preproc=yes
c906108c 12538else
bec39cab
AC
12539 echo "$as_me: failed program was:" >&5
12540sed 's/^/| /' conftest.$ac_ext >&5
8bb2c122 12541
bec39cab
AC
12542 ac_header_preproc=no
12543fi
12544rm -f conftest.err conftest.$ac_ext
b4e70030
JB
12545echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
12546echo "${ECHO_T}$ac_header_preproc" >&6
c906108c 12547
bec39cab
AC
12548# So? What about this header?
12549case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
12550 yes:no: )
12551 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
12552echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
12553 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
12554echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
12555 ac_header_preproc=yes
12556 ;;
12557 no:yes:* )
12558 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
12559echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
12560 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
12561echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
12562 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
12563echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
12564 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
12565echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
12566 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
12567echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
12568 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
12569echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
b4e70030
JB
12570 (
12571 cat <<\_ASBOX
12572## ------------------------------------------ ##
12573## Report this to the AC_PACKAGE_NAME lists. ##
12574## ------------------------------------------ ##
12575_ASBOX
12576 ) |
12577 sed "s/^/$as_me: WARNING: /" >&2
bec39cab
AC
12578 ;;
12579esac
b4e70030
JB
12580echo "$as_me:$LINENO: checking for $ac_header" >&5
12581echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
12582if eval "test \"\${$as_ac_Header+set}\" = set"; then
bec39cab 12583 echo $ECHO_N "(cached) $ECHO_C" >&6
95ca63c4 12584else
bec39cab 12585 eval "$as_ac_Header=\$ac_header_preproc"
95ca63c4 12586fi
b4e70030
JB
12587echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
12588echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
bec39cab 12589
95ca63c4 12590fi
bec39cab
AC
12591if test `eval echo '${'$as_ac_Header'}'` = yes; then
12592 cat >>confdefs.h <<_ACEOF
12593#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
12594_ACEOF
12595
95ca63c4
CF
12596fi
12597
bec39cab 12598done
95ca63c4
CF
12599
12600
7cb9022a 12601for ac_header in link.h
bec39cab
AC
12602do
12603as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
b4e70030
JB
12604echo "$as_me:$LINENO: checking for $ac_header" >&5
12605echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
12606if eval "test \"\${$as_ac_Header+set}\" = set"; then
bec39cab 12607 echo $ECHO_N "(cached) $ECHO_C" >&6
bec39cab 12608else
7cb9022a 12609 cat >conftest.$ac_ext <<_ACEOF
bec39cab
AC
12610/* confdefs.h. */
12611_ACEOF
12612cat confdefs.h >>conftest.$ac_ext
12613cat >>conftest.$ac_ext <<_ACEOF
12614/* end confdefs.h. */
7cb9022a
MK
12615#if HAVE_SYS_TYPES_H
12616# include <sys/types.h>
12617#endif
12618#if HAVE_NLIST_H
12619# include <nlist.h>
12620#endif
12621
12622
bec39cab
AC
12623#include <$ac_header>
12624_ACEOF
12625rm -f conftest.$ac_objext
12626if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12627 (eval $ac_compile) 2>conftest.er1
12628 ac_status=$?
12629 grep -v '^ *+' conftest.er1 >conftest.err
12630 rm -f conftest.er1
12631 cat conftest.err >&5
12632 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12633 (exit $ac_status); } &&
b4e70030
JB
12634 { ac_try='test -z "$ac_c_werror_flag"
12635 || test ! -s conftest.err'
bec39cab
AC
12636 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12637 (eval $ac_try) 2>&5
12638 ac_status=$?
12639 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12640 (exit $ac_status); }; } &&
12641 { ac_try='test -s conftest.$ac_objext'
12642 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12643 (eval $ac_try) 2>&5
12644 ac_status=$?
12645 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12646 (exit $ac_status); }; }; then
7cb9022a 12647 eval "$as_ac_Header=yes"
bec39cab
AC
12648else
12649 echo "$as_me: failed program was:" >&5
12650sed 's/^/| /' conftest.$ac_ext >&5
12651
b4e70030 12652eval "$as_ac_Header=no"
bec39cab
AC
12653fi
12654rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
bec39cab 12655fi
b4e70030
JB
12656echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
12657echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
bec39cab
AC
12658if test `eval echo '${'$as_ac_Header'}'` = yes; then
12659 cat >>confdefs.h <<_ACEOF
12660#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
12661_ACEOF
95ca63c4 12662
bec39cab 12663fi
95ca63c4 12664
bec39cab 12665done
95ca63c4 12666
c906108c 12667
a9322a30 12668for ac_header in sys/proc.h
bec39cab
AC
12669do
12670as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
a9322a30 12671echo "$as_me:$LINENO: checking for $ac_header" >&5
b4e70030
JB
12672echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
12673if eval "test \"\${$as_ac_Header+set}\" = set"; then
bec39cab 12674 echo $ECHO_N "(cached) $ECHO_C" >&6
bec39cab 12675else
a9322a30 12676 cat >conftest.$ac_ext <<_ACEOF
bec39cab
AC
12677/* confdefs.h. */
12678_ACEOF
12679cat confdefs.h >>conftest.$ac_ext
12680cat >>conftest.$ac_ext <<_ACEOF
12681/* end confdefs.h. */
a9322a30
TT
12682#if HAVE_SYS_PARAM_H
12683# include <sys/param.h>
12684#endif
12685
12686
bec39cab
AC
12687#include <$ac_header>
12688_ACEOF
12689rm -f conftest.$ac_objext
12690if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12691 (eval $ac_compile) 2>conftest.er1
12692 ac_status=$?
12693 grep -v '^ *+' conftest.er1 >conftest.err
12694 rm -f conftest.er1
12695 cat conftest.err >&5
12696 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12697 (exit $ac_status); } &&
b4e70030
JB
12698 { ac_try='test -z "$ac_c_werror_flag"
12699 || test ! -s conftest.err'
bec39cab
AC
12700 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12701 (eval $ac_try) 2>&5
12702 ac_status=$?
12703 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12704 (exit $ac_status); }; } &&
12705 { ac_try='test -s conftest.$ac_objext'
12706 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12707 (eval $ac_try) 2>&5
12708 ac_status=$?
12709 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12710 (exit $ac_status); }; }; then
a9322a30 12711 eval "$as_ac_Header=yes"
bec39cab
AC
12712else
12713 echo "$as_me: failed program was:" >&5
12714sed 's/^/| /' conftest.$ac_ext >&5
12715
a9322a30 12716eval "$as_ac_Header=no"
bec39cab
AC
12717fi
12718rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
a9322a30
TT
12719fi
12720echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
12721echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
12722if test `eval echo '${'$as_ac_Header'}'` = yes; then
12723 cat >>confdefs.h <<_ACEOF
12724#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
12725_ACEOF
bec39cab 12726
a9322a30
TT
12727fi
12728
12729done
12730
12731
12732for ac_header in sys/user.h
12733do
12734as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
12735echo "$as_me:$LINENO: checking for $ac_header" >&5
12736echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
12737if eval "test \"\${$as_ac_Header+set}\" = set"; then
12738 echo $ECHO_N "(cached) $ECHO_C" >&6
12739else
12740 cat >conftest.$ac_ext <<_ACEOF
bec39cab
AC
12741/* confdefs.h. */
12742_ACEOF
12743cat confdefs.h >>conftest.$ac_ext
12744cat >>conftest.$ac_ext <<_ACEOF
12745/* end confdefs.h. */
a9322a30
TT
12746#if HAVE_SYS_PARAM_H
12747# include <sys/param.h>
12748#endif
12749
12750
bec39cab
AC
12751#include <$ac_header>
12752_ACEOF
a9322a30
TT
12753rm -f conftest.$ac_objext
12754if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12755 (eval $ac_compile) 2>conftest.er1
bec39cab
AC
12756 ac_status=$?
12757 grep -v '^ *+' conftest.er1 >conftest.err
12758 rm -f conftest.er1
12759 cat conftest.err >&5
12760 echo "$as_me:$LINENO: \$? = $ac_status" >&5
a9322a30
TT
12761 (exit $ac_status); } &&
12762 { ac_try='test -z "$ac_c_werror_flag"
12763 || test ! -s conftest.err'
12764 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12765 (eval $ac_try) 2>&5
12766 ac_status=$?
12767 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12768 (exit $ac_status); }; } &&
12769 { ac_try='test -s conftest.$ac_objext'
12770 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12771 (eval $ac_try) 2>&5
12772 ac_status=$?
12773 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12774 (exit $ac_status); }; }; then
12775 eval "$as_ac_Header=yes"
bec39cab
AC
12776else
12777 echo "$as_me: failed program was:" >&5
12778sed 's/^/| /' conftest.$ac_ext >&5
12779
a9322a30 12780eval "$as_ac_Header=no"
75c6e08a 12781fi
a9322a30
TT
12782rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
12783fi
12784echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
12785echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
12786if test `eval echo '${'$as_ac_Header'}'` = yes; then
12787 cat >>confdefs.h <<_ACEOF
12788#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
12789_ACEOF
bec39cab 12790
bec39cab 12791fi
bec39cab 12792
a9322a30
TT
12793done
12794
12795
12796# On Solaris 2.[789], we need to define _MSE_INT_H to avoid a clash
12797# between <widec.h> and <wchar.h> that would cause AC_CHECK_HEADERS to
12798# think that we don't have <curses.h> if we're using GCC.
12799case $host_os in
12800 solaris2.[789])
12801 if test "$GCC" = yes; then
12802
12803cat >>confdefs.h <<\_ACEOF
12804#define _MSE_INT_H 1
bec39cab 12805_ACEOF
75c6e08a 12806
a9322a30
TT
12807 fi ;;
12808esac
12809
75c6e08a
MK
12810
12811
12812
9a156167 12813
a9322a30 12814for ac_header in curses.h cursesX.h ncurses.h ncurses/ncurses.h ncurses/term.h
bec39cab
AC
12815do
12816as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
b4e70030
JB
12817if eval "test \"\${$as_ac_Header+set}\" = set"; then
12818 echo "$as_me:$LINENO: checking for $ac_header" >&5
12819echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
12820if eval "test \"\${$as_ac_Header+set}\" = set"; then
bec39cab
AC
12821 echo $ECHO_N "(cached) $ECHO_C" >&6
12822fi
b4e70030
JB
12823echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
12824echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
bec39cab
AC
12825else
12826 # Is the header compilable?
b4e70030
JB
12827echo "$as_me:$LINENO: checking $ac_header usability" >&5
12828echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
bec39cab
AC
12829cat >conftest.$ac_ext <<_ACEOF
12830/* confdefs.h. */
12831_ACEOF
12832cat confdefs.h >>conftest.$ac_ext
12833cat >>conftest.$ac_ext <<_ACEOF
12834/* end confdefs.h. */
12835$ac_includes_default
12836#include <$ac_header>
12837_ACEOF
12838rm -f conftest.$ac_objext
12839if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12840 (eval $ac_compile) 2>conftest.er1
12841 ac_status=$?
12842 grep -v '^ *+' conftest.er1 >conftest.err
12843 rm -f conftest.er1
12844 cat conftest.err >&5
12845 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12846 (exit $ac_status); } &&
b4e70030
JB
12847 { ac_try='test -z "$ac_c_werror_flag"
12848 || test ! -s conftest.err'
bec39cab
AC
12849 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12850 (eval $ac_try) 2>&5
12851 ac_status=$?
12852 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12853 (exit $ac_status); }; } &&
12854 { ac_try='test -s conftest.$ac_objext'
12855 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12856 (eval $ac_try) 2>&5
12857 ac_status=$?
12858 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12859 (exit $ac_status); }; }; then
12860 ac_header_compiler=yes
12861else
12862 echo "$as_me: failed program was:" >&5
12863sed 's/^/| /' conftest.$ac_ext >&5
12864
b4e70030 12865ac_header_compiler=no
bec39cab
AC
12866fi
12867rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
b4e70030
JB
12868echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
12869echo "${ECHO_T}$ac_header_compiler" >&6
bec39cab
AC
12870
12871# Is the header present?
b4e70030
JB
12872echo "$as_me:$LINENO: checking $ac_header presence" >&5
12873echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
bec39cab
AC
12874cat >conftest.$ac_ext <<_ACEOF
12875/* confdefs.h. */
12876_ACEOF
12877cat confdefs.h >>conftest.$ac_ext
12878cat >>conftest.$ac_ext <<_ACEOF
12879/* end confdefs.h. */
12880#include <$ac_header>
12881_ACEOF
12882if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
12883 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
12884 ac_status=$?
12885 grep -v '^ *+' conftest.er1 >conftest.err
12886 rm -f conftest.er1
12887 cat conftest.err >&5
12888 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12889 (exit $ac_status); } >/dev/null; then
12890 if test -s conftest.err; then
12891 ac_cpp_err=$ac_c_preproc_warn_flag
12892 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
12893 else
12894 ac_cpp_err=
12895 fi
9a156167 12896else
bec39cab 12897 ac_cpp_err=yes
9a156167 12898fi
bec39cab
AC
12899if test -z "$ac_cpp_err"; then
12900 ac_header_preproc=yes
12901else
12902 echo "$as_me: failed program was:" >&5
12903sed 's/^/| /' conftest.$ac_ext >&5
9a156167 12904
bec39cab 12905 ac_header_preproc=no
9a156167 12906fi
bec39cab 12907rm -f conftest.err conftest.$ac_ext
b4e70030
JB
12908echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
12909echo "${ECHO_T}$ac_header_preproc" >&6
9a156167 12910
bec39cab
AC
12911# So? What about this header?
12912case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
12913 yes:no: )
12914 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
12915echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
12916 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
12917echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
12918 ac_header_preproc=yes
12919 ;;
12920 no:yes:* )
12921 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
12922echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
12923 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
12924echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
12925 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
12926echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
12927 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
12928echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
12929 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
12930echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
12931 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
12932echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
b4e70030
JB
12933 (
12934 cat <<\_ASBOX
12935## ------------------------------------------ ##
12936## Report this to the AC_PACKAGE_NAME lists. ##
12937## ------------------------------------------ ##
12938_ASBOX
12939 ) |
12940 sed "s/^/$as_me: WARNING: /" >&2
bec39cab
AC
12941 ;;
12942esac
b4e70030
JB
12943echo "$as_me:$LINENO: checking for $ac_header" >&5
12944echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
12945if eval "test \"\${$as_ac_Header+set}\" = set"; then
bec39cab 12946 echo $ECHO_N "(cached) $ECHO_C" >&6
9a156167 12947else
bec39cab 12948 eval "$as_ac_Header=\$ac_header_preproc"
9a156167 12949fi
b4e70030
JB
12950echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
12951echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
9a156167 12952
bec39cab
AC
12953fi
12954if test `eval echo '${'$as_ac_Header'}'` = yes; then
12955 cat >>confdefs.h <<_ACEOF
12956#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
12957_ACEOF
9a156167 12958
bec39cab 12959fi
9a156167 12960
bec39cab 12961done
9a156167 12962
9a156167 12963
a9322a30 12964for ac_header in term.h
bec39cab
AC
12965do
12966as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
a9322a30 12967echo "$as_me:$LINENO: checking for $ac_header" >&5
b4e70030
JB
12968echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
12969if eval "test \"\${$as_ac_Header+set}\" = set"; then
bec39cab 12970 echo $ECHO_N "(cached) $ECHO_C" >&6
bec39cab 12971else
a9322a30 12972 cat >conftest.$ac_ext <<_ACEOF
bec39cab
AC
12973/* confdefs.h. */
12974_ACEOF
12975cat confdefs.h >>conftest.$ac_ext
12976cat >>conftest.$ac_ext <<_ACEOF
436868fb 12977/* end confdefs.h. */
a9322a30
TT
12978#if HAVE_CURSES_H
12979# include <curses.h>
12980#endif
12981
12982
436868fb
DP
12983#include <$ac_header>
12984_ACEOF
12985rm -f conftest.$ac_objext
12986if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12987 (eval $ac_compile) 2>conftest.er1
12988 ac_status=$?
12989 grep -v '^ *+' conftest.er1 >conftest.err
12990 rm -f conftest.er1
12991 cat conftest.err >&5
12992 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12993 (exit $ac_status); } &&
12994 { ac_try='test -z "$ac_c_werror_flag"
12995 || test ! -s conftest.err'
12996 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12997 (eval $ac_try) 2>&5
12998 ac_status=$?
12999 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13000 (exit $ac_status); }; } &&
13001 { ac_try='test -s conftest.$ac_objext'
13002 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13003 (eval $ac_try) 2>&5
13004 ac_status=$?
13005 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13006 (exit $ac_status); }; }; then
a9322a30 13007 eval "$as_ac_Header=yes"
436868fb
DP
13008else
13009 echo "$as_me: failed program was:" >&5
13010sed 's/^/| /' conftest.$ac_ext >&5
13011
a9322a30 13012eval "$as_ac_Header=no"
436868fb
DP
13013fi
13014rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
a9322a30
TT
13015fi
13016echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
13017echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
13018if test `eval echo '${'$as_ac_Header'}'` = yes; then
13019 cat >>confdefs.h <<_ACEOF
13020#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
13021_ACEOF
436868fb 13022
a9322a30
TT
13023fi
13024
13025done
13026
13027
13028# ------------------------- #
13029# Checks for declarations. #
13030# ------------------------- #
13031
13032echo "$as_me:$LINENO: checking whether free is declared" >&5
13033echo $ECHO_N "checking whether free is declared... $ECHO_C" >&6
13034if test "${ac_cv_have_decl_free+set}" = set; then
13035 echo $ECHO_N "(cached) $ECHO_C" >&6
13036else
13037 cat >conftest.$ac_ext <<_ACEOF
436868fb
DP
13038/* confdefs.h. */
13039_ACEOF
13040cat confdefs.h >>conftest.$ac_ext
13041cat >>conftest.$ac_ext <<_ACEOF
13042/* end confdefs.h. */
a9322a30
TT
13043$ac_includes_default
13044int
13045main ()
13046{
13047#ifndef free
13048 char *p = (char *) free;
13049#endif
13050
13051 ;
13052 return 0;
13053}
436868fb 13054_ACEOF
a9322a30
TT
13055rm -f conftest.$ac_objext
13056if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13057 (eval $ac_compile) 2>conftest.er1
436868fb
DP
13058 ac_status=$?
13059 grep -v '^ *+' conftest.er1 >conftest.err
13060 rm -f conftest.er1
13061 cat conftest.err >&5
13062 echo "$as_me:$LINENO: \$? = $ac_status" >&5
a9322a30
TT
13063 (exit $ac_status); } &&
13064 { ac_try='test -z "$ac_c_werror_flag"
13065 || test ! -s conftest.err'
13066 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13067 (eval $ac_try) 2>&5
13068 ac_status=$?
13069 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13070 (exit $ac_status); }; } &&
13071 { ac_try='test -s conftest.$ac_objext'
13072 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13073 (eval $ac_try) 2>&5
13074 ac_status=$?
13075 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13076 (exit $ac_status); }; }; then
13077 ac_cv_have_decl_free=yes
436868fb
DP
13078else
13079 echo "$as_me: failed program was:" >&5
13080sed 's/^/| /' conftest.$ac_ext >&5
13081
a9322a30 13082ac_cv_have_decl_free=no
436868fb 13083fi
a9322a30 13084rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
436868fb 13085fi
a9322a30
TT
13086echo "$as_me:$LINENO: result: $ac_cv_have_decl_free" >&5
13087echo "${ECHO_T}$ac_cv_have_decl_free" >&6
13088if test $ac_cv_have_decl_free = yes; then
436868fb 13089
a9322a30
TT
13090cat >>confdefs.h <<_ACEOF
13091#define HAVE_DECL_FREE 1
436868fb
DP
13092_ACEOF
13093
436868fb 13094
a9322a30
TT
13095else
13096 cat >>confdefs.h <<_ACEOF
13097#define HAVE_DECL_FREE 0
13098_ACEOF
436868fb
DP
13099
13100
436868fb 13101fi
a9322a30
TT
13102echo "$as_me:$LINENO: checking whether malloc is declared" >&5
13103echo $ECHO_N "checking whether malloc is declared... $ECHO_C" >&6
13104if test "${ac_cv_have_decl_malloc+set}" = set; then
13105 echo $ECHO_N "(cached) $ECHO_C" >&6
436868fb 13106else
a9322a30 13107 cat >conftest.$ac_ext <<_ACEOF
436868fb
DP
13108/* confdefs.h. */
13109_ACEOF
13110cat confdefs.h >>conftest.$ac_ext
13111cat >>conftest.$ac_ext <<_ACEOF
bec39cab
AC
13112/* end confdefs.h. */
13113$ac_includes_default
a9322a30
TT
13114int
13115main ()
13116{
13117#ifndef malloc
13118 char *p = (char *) malloc;
13119#endif
13120
13121 ;
13122 return 0;
13123}
bec39cab
AC
13124_ACEOF
13125rm -f conftest.$ac_objext
13126if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13127 (eval $ac_compile) 2>conftest.er1
13128 ac_status=$?
13129 grep -v '^ *+' conftest.er1 >conftest.err
13130 rm -f conftest.er1
13131 cat conftest.err >&5
13132 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13133 (exit $ac_status); } &&
b4e70030
JB
13134 { ac_try='test -z "$ac_c_werror_flag"
13135 || test ! -s conftest.err'
bec39cab
AC
13136 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13137 (eval $ac_try) 2>&5
13138 ac_status=$?
13139 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13140 (exit $ac_status); }; } &&
13141 { ac_try='test -s conftest.$ac_objext'
13142 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13143 (eval $ac_try) 2>&5
13144 ac_status=$?
13145 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13146 (exit $ac_status); }; }; then
a9322a30 13147 ac_cv_have_decl_malloc=yes
bec39cab
AC
13148else
13149 echo "$as_me: failed program was:" >&5
13150sed 's/^/| /' conftest.$ac_ext >&5
13151
a9322a30 13152ac_cv_have_decl_malloc=no
bec39cab
AC
13153fi
13154rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
a9322a30
TT
13155fi
13156echo "$as_me:$LINENO: result: $ac_cv_have_decl_malloc" >&5
13157echo "${ECHO_T}$ac_cv_have_decl_malloc" >&6
13158if test $ac_cv_have_decl_malloc = yes; then
bec39cab 13159
a9322a30
TT
13160cat >>confdefs.h <<_ACEOF
13161#define HAVE_DECL_MALLOC 1
bec39cab 13162_ACEOF
9a156167 13163
9a156167
MK
13164
13165else
bec39cab 13166 cat >>confdefs.h <<_ACEOF
a9322a30 13167#define HAVE_DECL_MALLOC 0
bec39cab 13168_ACEOF
9a156167 13169
c890192f 13170
bec39cab 13171fi
a9322a30
TT
13172echo "$as_me:$LINENO: checking whether realloc is declared" >&5
13173echo $ECHO_N "checking whether realloc is declared... $ECHO_C" >&6
13174if test "${ac_cv_have_decl_realloc+set}" = set; then
13175 echo $ECHO_N "(cached) $ECHO_C" >&6
bec39cab 13176else
a9322a30 13177 cat >conftest.$ac_ext <<_ACEOF
bec39cab
AC
13178/* confdefs.h. */
13179_ACEOF
13180cat confdefs.h >>conftest.$ac_ext
13181cat >>conftest.$ac_ext <<_ACEOF
13182/* end confdefs.h. */
13183$ac_includes_default
a9322a30
TT
13184int
13185main ()
13186{
13187#ifndef realloc
13188 char *p = (char *) realloc;
13189#endif
13190
13191 ;
13192 return 0;
13193}
bec39cab
AC
13194_ACEOF
13195rm -f conftest.$ac_objext
13196if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13197 (eval $ac_compile) 2>conftest.er1
13198 ac_status=$?
13199 grep -v '^ *+' conftest.er1 >conftest.err
13200 rm -f conftest.er1
13201 cat conftest.err >&5
13202 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13203 (exit $ac_status); } &&
b4e70030
JB
13204 { ac_try='test -z "$ac_c_werror_flag"
13205 || test ! -s conftest.err'
bec39cab
AC
13206 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13207 (eval $ac_try) 2>&5
13208 ac_status=$?
13209 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13210 (exit $ac_status); }; } &&
13211 { ac_try='test -s conftest.$ac_objext'
13212 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13213 (eval $ac_try) 2>&5
13214 ac_status=$?
13215 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13216 (exit $ac_status); }; }; then
a9322a30 13217 ac_cv_have_decl_realloc=yes
bec39cab
AC
13218else
13219 echo "$as_me: failed program was:" >&5
13220sed 's/^/| /' conftest.$ac_ext >&5
13221
a9322a30 13222ac_cv_have_decl_realloc=no
bec39cab
AC
13223fi
13224rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
a9322a30
TT
13225fi
13226echo "$as_me:$LINENO: result: $ac_cv_have_decl_realloc" >&5
13227echo "${ECHO_T}$ac_cv_have_decl_realloc" >&6
13228if test $ac_cv_have_decl_realloc = yes; then
bec39cab 13229
a9322a30
TT
13230cat >>confdefs.h <<_ACEOF
13231#define HAVE_DECL_REALLOC 1
bec39cab 13232_ACEOF
bec39cab 13233
bec39cab 13234
c890192f 13235else
bec39cab 13236 cat >>confdefs.h <<_ACEOF
a9322a30 13237#define HAVE_DECL_REALLOC 0
bec39cab 13238_ACEOF
c890192f 13239
bec39cab 13240
bec39cab 13241fi
a9322a30
TT
13242echo "$as_me:$LINENO: checking whether strerror is declared" >&5
13243echo $ECHO_N "checking whether strerror is declared... $ECHO_C" >&6
13244if test "${ac_cv_have_decl_strerror+set}" = set; then
13245 echo $ECHO_N "(cached) $ECHO_C" >&6
bec39cab 13246else
a9322a30 13247 cat >conftest.$ac_ext <<_ACEOF
bec39cab
AC
13248/* confdefs.h. */
13249_ACEOF
13250cat confdefs.h >>conftest.$ac_ext
13251cat >>conftest.$ac_ext <<_ACEOF
13252/* end confdefs.h. */
13253$ac_includes_default
a9322a30
TT
13254int
13255main ()
13256{
13257#ifndef strerror
13258 char *p = (char *) strerror;
13259#endif
13260
13261 ;
13262 return 0;
13263}
bec39cab
AC
13264_ACEOF
13265rm -f conftest.$ac_objext
13266if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13267 (eval $ac_compile) 2>conftest.er1
13268 ac_status=$?
13269 grep -v '^ *+' conftest.er1 >conftest.err
13270 rm -f conftest.er1
13271 cat conftest.err >&5
13272 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13273 (exit $ac_status); } &&
b4e70030
JB
13274 { ac_try='test -z "$ac_c_werror_flag"
13275 || test ! -s conftest.err'
bec39cab
AC
13276 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13277 (eval $ac_try) 2>&5
13278 ac_status=$?
13279 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13280 (exit $ac_status); }; } &&
13281 { ac_try='test -s conftest.$ac_objext'
13282 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13283 (eval $ac_try) 2>&5
13284 ac_status=$?
13285 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13286 (exit $ac_status); }; }; then
a9322a30 13287 ac_cv_have_decl_strerror=yes
bec39cab
AC
13288else
13289 echo "$as_me: failed program was:" >&5
13290sed 's/^/| /' conftest.$ac_ext >&5
13291
a9322a30 13292ac_cv_have_decl_strerror=no
bec39cab
AC
13293fi
13294rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
a9322a30
TT
13295fi
13296echo "$as_me:$LINENO: result: $ac_cv_have_decl_strerror" >&5
13297echo "${ECHO_T}$ac_cv_have_decl_strerror" >&6
13298if test $ac_cv_have_decl_strerror = yes; then
bec39cab 13299
a9322a30
TT
13300cat >>confdefs.h <<_ACEOF
13301#define HAVE_DECL_STRERROR 1
bec39cab 13302_ACEOF
bec39cab 13303
bec39cab 13304
9a156167 13305else
bec39cab 13306 cat >>confdefs.h <<_ACEOF
a9322a30 13307#define HAVE_DECL_STRERROR 0
bec39cab 13308_ACEOF
9a156167 13309
06825bd1 13310
bec39cab 13311fi
a9322a30
TT
13312echo "$as_me:$LINENO: checking whether strstr is declared" >&5
13313echo $ECHO_N "checking whether strstr is declared... $ECHO_C" >&6
13314if test "${ac_cv_have_decl_strstr+set}" = set; then
13315 echo $ECHO_N "(cached) $ECHO_C" >&6
bec39cab 13316else
a9322a30 13317 cat >conftest.$ac_ext <<_ACEOF
bec39cab
AC
13318/* confdefs.h. */
13319_ACEOF
13320cat confdefs.h >>conftest.$ac_ext
13321cat >>conftest.$ac_ext <<_ACEOF
13322/* end confdefs.h. */
13323$ac_includes_default
a9322a30
TT
13324int
13325main ()
13326{
13327#ifndef strstr
13328 char *p = (char *) strstr;
13329#endif
13330
13331 ;
13332 return 0;
13333}
bec39cab
AC
13334_ACEOF
13335rm -f conftest.$ac_objext
13336if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13337 (eval $ac_compile) 2>conftest.er1
13338 ac_status=$?
13339 grep -v '^ *+' conftest.er1 >conftest.err
13340 rm -f conftest.er1
13341 cat conftest.err >&5
13342 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13343 (exit $ac_status); } &&
b4e70030
JB
13344 { ac_try='test -z "$ac_c_werror_flag"
13345 || test ! -s conftest.err'
bec39cab
AC
13346 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13347 (eval $ac_try) 2>&5
13348 ac_status=$?
13349 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13350 (exit $ac_status); }; } &&
13351 { ac_try='test -s conftest.$ac_objext'
13352 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13353 (eval $ac_try) 2>&5
13354 ac_status=$?
13355 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13356 (exit $ac_status); }; }; then
a9322a30 13357 ac_cv_have_decl_strstr=yes
bec39cab
AC
13358else
13359 echo "$as_me: failed program was:" >&5
13360sed 's/^/| /' conftest.$ac_ext >&5
13361
a9322a30 13362ac_cv_have_decl_strstr=no
bec39cab
AC
13363fi
13364rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
a9322a30
TT
13365fi
13366echo "$as_me:$LINENO: result: $ac_cv_have_decl_strstr" >&5
13367echo "${ECHO_T}$ac_cv_have_decl_strstr" >&6
13368if test $ac_cv_have_decl_strstr = yes; then
bec39cab 13369
a9322a30
TT
13370cat >>confdefs.h <<_ACEOF
13371#define HAVE_DECL_STRSTR 1
bec39cab 13372_ACEOF
bec39cab 13373
bec39cab 13374
bec39cab 13375else
bec39cab 13376 cat >>confdefs.h <<_ACEOF
a9322a30 13377#define HAVE_DECL_STRSTR 0
bec39cab 13378_ACEOF
06825bd1 13379
bec39cab 13380
bec39cab 13381fi
a9322a30
TT
13382echo "$as_me:$LINENO: checking whether getopt is declared" >&5
13383echo $ECHO_N "checking whether getopt is declared... $ECHO_C" >&6
13384if test "${ac_cv_have_decl_getopt+set}" = set; then
13385 echo $ECHO_N "(cached) $ECHO_C" >&6
bec39cab 13386else
a9322a30 13387 cat >conftest.$ac_ext <<_ACEOF
bec39cab
AC
13388/* confdefs.h. */
13389_ACEOF
13390cat confdefs.h >>conftest.$ac_ext
13391cat >>conftest.$ac_ext <<_ACEOF
13392/* end confdefs.h. */
13393$ac_includes_default
a9322a30
TT
13394int
13395main ()
13396{
13397#ifndef getopt
13398 char *p = (char *) getopt;
13399#endif
13400
13401 ;
13402 return 0;
13403}
bec39cab
AC
13404_ACEOF
13405rm -f conftest.$ac_objext
13406if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13407 (eval $ac_compile) 2>conftest.er1
13408 ac_status=$?
13409 grep -v '^ *+' conftest.er1 >conftest.err
13410 rm -f conftest.er1
13411 cat conftest.err >&5
13412 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13413 (exit $ac_status); } &&
b4e70030
JB
13414 { ac_try='test -z "$ac_c_werror_flag"
13415 || test ! -s conftest.err'
bec39cab
AC
13416 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13417 (eval $ac_try) 2>&5
13418 ac_status=$?
13419 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13420 (exit $ac_status); }; } &&
13421 { ac_try='test -s conftest.$ac_objext'
13422 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13423 (eval $ac_try) 2>&5
13424 ac_status=$?
13425 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13426 (exit $ac_status); }; }; then
a9322a30 13427 ac_cv_have_decl_getopt=yes
bec39cab
AC
13428else
13429 echo "$as_me: failed program was:" >&5
13430sed 's/^/| /' conftest.$ac_ext >&5
13431
a9322a30 13432ac_cv_have_decl_getopt=no
bec39cab
AC
13433fi
13434rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
a9322a30
TT
13435fi
13436echo "$as_me:$LINENO: result: $ac_cv_have_decl_getopt" >&5
13437echo "${ECHO_T}$ac_cv_have_decl_getopt" >&6
13438if test $ac_cv_have_decl_getopt = yes; then
bec39cab 13439
a9322a30
TT
13440cat >>confdefs.h <<_ACEOF
13441#define HAVE_DECL_GETOPT 1
bec39cab 13442_ACEOF
5ee754fc 13443
bec39cab 13444
5ee754fc 13445else
bec39cab 13446 cat >>confdefs.h <<_ACEOF
a9322a30 13447#define HAVE_DECL_GETOPT 0
bec39cab 13448_ACEOF
c906108c 13449
bec39cab 13450
bec39cab 13451fi
a9322a30
TT
13452echo "$as_me:$LINENO: checking whether snprintf is declared" >&5
13453echo $ECHO_N "checking whether snprintf is declared... $ECHO_C" >&6
13454if test "${ac_cv_have_decl_snprintf+set}" = set; then
13455 echo $ECHO_N "(cached) $ECHO_C" >&6
bec39cab 13456else
a9322a30 13457 cat >conftest.$ac_ext <<_ACEOF
bec39cab
AC
13458/* confdefs.h. */
13459_ACEOF
13460cat confdefs.h >>conftest.$ac_ext
13461cat >>conftest.$ac_ext <<_ACEOF
13462/* end confdefs.h. */
13463$ac_includes_default
a9322a30
TT
13464int
13465main ()
13466{
13467#ifndef snprintf
13468 char *p = (char *) snprintf;
13469#endif
13470
13471 ;
13472 return 0;
13473}
bec39cab
AC
13474_ACEOF
13475rm -f conftest.$ac_objext
13476if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13477 (eval $ac_compile) 2>conftest.er1
13478 ac_status=$?
13479 grep -v '^ *+' conftest.er1 >conftest.err
13480 rm -f conftest.er1
13481 cat conftest.err >&5
13482 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13483 (exit $ac_status); } &&
b4e70030
JB
13484 { ac_try='test -z "$ac_c_werror_flag"
13485 || test ! -s conftest.err'
bec39cab
AC
13486 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13487 (eval $ac_try) 2>&5
13488 ac_status=$?
13489 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13490 (exit $ac_status); }; } &&
13491 { ac_try='test -s conftest.$ac_objext'
13492 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13493 (eval $ac_try) 2>&5
13494 ac_status=$?
13495 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13496 (exit $ac_status); }; }; then
a9322a30 13497 ac_cv_have_decl_snprintf=yes
bec39cab
AC
13498else
13499 echo "$as_me: failed program was:" >&5
13500sed 's/^/| /' conftest.$ac_ext >&5
13501
a9322a30 13502ac_cv_have_decl_snprintf=no
bec39cab
AC
13503fi
13504rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
a9322a30
TT
13505fi
13506echo "$as_me:$LINENO: result: $ac_cv_have_decl_snprintf" >&5
13507echo "${ECHO_T}$ac_cv_have_decl_snprintf" >&6
13508if test $ac_cv_have_decl_snprintf = yes; then
bec39cab 13509
a9322a30
TT
13510cat >>confdefs.h <<_ACEOF
13511#define HAVE_DECL_SNPRINTF 1
bec39cab 13512_ACEOF
c906108c
SS
13513
13514
9608ab8b 13515else
bec39cab 13516 cat >>confdefs.h <<_ACEOF
a9322a30 13517#define HAVE_DECL_SNPRINTF 0
bec39cab 13518_ACEOF
5ee754fc 13519
5ee754fc 13520
bec39cab 13521fi
a9322a30
TT
13522echo "$as_me:$LINENO: checking whether vsnprintf is declared" >&5
13523echo $ECHO_N "checking whether vsnprintf is declared... $ECHO_C" >&6
13524if test "${ac_cv_have_decl_vsnprintf+set}" = set; then
13525 echo $ECHO_N "(cached) $ECHO_C" >&6
bec39cab 13526else
a9322a30 13527 cat >conftest.$ac_ext <<_ACEOF
bec39cab
AC
13528/* confdefs.h. */
13529_ACEOF
13530cat confdefs.h >>conftest.$ac_ext
13531cat >>conftest.$ac_ext <<_ACEOF
13532/* end confdefs.h. */
13533$ac_includes_default
a9322a30
TT
13534int
13535main ()
13536{
13537#ifndef vsnprintf
13538 char *p = (char *) vsnprintf;
13539#endif
13540
13541 ;
13542 return 0;
13543}
bec39cab
AC
13544_ACEOF
13545rm -f conftest.$ac_objext
13546if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13547 (eval $ac_compile) 2>conftest.er1
13548 ac_status=$?
13549 grep -v '^ *+' conftest.er1 >conftest.err
13550 rm -f conftest.er1
13551 cat conftest.err >&5
13552 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13553 (exit $ac_status); } &&
b4e70030
JB
13554 { ac_try='test -z "$ac_c_werror_flag"
13555 || test ! -s conftest.err'
bec39cab
AC
13556 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13557 (eval $ac_try) 2>&5
13558 ac_status=$?
13559 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13560 (exit $ac_status); }; } &&
13561 { ac_try='test -s conftest.$ac_objext'
13562 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13563 (eval $ac_try) 2>&5
13564 ac_status=$?
13565 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13566 (exit $ac_status); }; }; then
a9322a30 13567 ac_cv_have_decl_vsnprintf=yes
bec39cab
AC
13568else
13569 echo "$as_me: failed program was:" >&5
13570sed 's/^/| /' conftest.$ac_ext >&5
13571
a9322a30 13572ac_cv_have_decl_vsnprintf=no
bec39cab
AC
13573fi
13574rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
a9322a30
TT
13575fi
13576echo "$as_me:$LINENO: result: $ac_cv_have_decl_vsnprintf" >&5
13577echo "${ECHO_T}$ac_cv_have_decl_vsnprintf" >&6
13578if test $ac_cv_have_decl_vsnprintf = yes; then
bec39cab 13579
a9322a30
TT
13580cat >>confdefs.h <<_ACEOF
13581#define HAVE_DECL_VSNPRINTF 1
bec39cab 13582_ACEOF
5ee754fc 13583
5ee754fc 13584
5ee754fc 13585else
bec39cab 13586 cat >>confdefs.h <<_ACEOF
a9322a30 13587#define HAVE_DECL_VSNPRINTF 0
bec39cab 13588_ACEOF
5ee754fc 13589
a9322a30 13590
5ee754fc
MK
13591fi
13592
bec39cab
AC
13593
13594
a8111142
TT
13595 echo "$as_me:$LINENO: checking for LC_MESSAGES" >&5
13596echo $ECHO_N "checking for LC_MESSAGES... $ECHO_C" >&6
13597if test "${am_cv_val_LC_MESSAGES+set}" = set; then
13598 echo $ECHO_N "(cached) $ECHO_C" >&6
13599else
13600 cat >conftest.$ac_ext <<_ACEOF
13601/* confdefs.h. */
13602_ACEOF
13603cat confdefs.h >>conftest.$ac_ext
13604cat >>conftest.$ac_ext <<_ACEOF
13605/* end confdefs.h. */
13606#include <locale.h>
13607int
13608main ()
13609{
13610return LC_MESSAGES
13611 ;
13612 return 0;
13613}
13614_ACEOF
13615rm -f conftest.$ac_objext conftest$ac_exeext
13616if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13617 (eval $ac_link) 2>conftest.er1
13618 ac_status=$?
13619 grep -v '^ *+' conftest.er1 >conftest.err
13620 rm -f conftest.er1
13621 cat conftest.err >&5
13622 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13623 (exit $ac_status); } &&
13624 { ac_try='test -z "$ac_c_werror_flag"
13625 || test ! -s conftest.err'
13626 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13627 (eval $ac_try) 2>&5
13628 ac_status=$?
13629 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13630 (exit $ac_status); }; } &&
13631 { ac_try='test -s conftest$ac_exeext'
13632 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13633 (eval $ac_try) 2>&5
13634 ac_status=$?
13635 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13636 (exit $ac_status); }; }; then
13637 am_cv_val_LC_MESSAGES=yes
13638else
13639 echo "$as_me: failed program was:" >&5
13640sed 's/^/| /' conftest.$ac_ext >&5
13641
13642am_cv_val_LC_MESSAGES=no
13643fi
13644rm -f conftest.err conftest.$ac_objext \
13645 conftest$ac_exeext conftest.$ac_ext
13646fi
13647echo "$as_me:$LINENO: result: $am_cv_val_LC_MESSAGES" >&5
13648echo "${ECHO_T}$am_cv_val_LC_MESSAGES" >&6
13649 if test $am_cv_val_LC_MESSAGES = yes; then
13650
13651cat >>confdefs.h <<\_ACEOF
13652#define HAVE_LC_MESSAGES 1
13653_ACEOF
13654
13655 fi
13656
13657
a9322a30
TT
13658# ----------------------- #
13659# Checks for structures. #
13660# ----------------------- #
13661
13662echo "$as_me:$LINENO: checking for struct stat.st_blocks" >&5
13663echo $ECHO_N "checking for struct stat.st_blocks... $ECHO_C" >&6
13664if test "${ac_cv_member_struct_stat_st_blocks+set}" = set; then
bec39cab 13665 echo $ECHO_N "(cached) $ECHO_C" >&6
bec39cab 13666else
a9322a30 13667 cat >conftest.$ac_ext <<_ACEOF
bec39cab
AC
13668/* confdefs.h. */
13669_ACEOF
13670cat confdefs.h >>conftest.$ac_ext
13671cat >>conftest.$ac_ext <<_ACEOF
13672/* end confdefs.h. */
13673$ac_includes_default
a9322a30
TT
13674int
13675main ()
13676{
13677static struct stat ac_aggr;
13678if (ac_aggr.st_blocks)
13679return 0;
13680 ;
13681 return 0;
13682}
bec39cab
AC
13683_ACEOF
13684rm -f conftest.$ac_objext
13685if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13686 (eval $ac_compile) 2>conftest.er1
13687 ac_status=$?
13688 grep -v '^ *+' conftest.er1 >conftest.err
13689 rm -f conftest.er1
13690 cat conftest.err >&5
13691 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13692 (exit $ac_status); } &&
b4e70030
JB
13693 { ac_try='test -z "$ac_c_werror_flag"
13694 || test ! -s conftest.err'
bec39cab
AC
13695 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13696 (eval $ac_try) 2>&5
13697 ac_status=$?
13698 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13699 (exit $ac_status); }; } &&
13700 { ac_try='test -s conftest.$ac_objext'
13701 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13702 (eval $ac_try) 2>&5
13703 ac_status=$?
13704 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13705 (exit $ac_status); }; }; then
a9322a30 13706 ac_cv_member_struct_stat_st_blocks=yes
bec39cab
AC
13707else
13708 echo "$as_me: failed program was:" >&5
13709sed 's/^/| /' conftest.$ac_ext >&5
13710
bec39cab
AC
13711cat >conftest.$ac_ext <<_ACEOF
13712/* confdefs.h. */
13713_ACEOF
13714cat confdefs.h >>conftest.$ac_ext
13715cat >>conftest.$ac_ext <<_ACEOF
13716/* end confdefs.h. */
a9322a30
TT
13717$ac_includes_default
13718int
13719main ()
13720{
13721static struct stat ac_aggr;
13722if (sizeof ac_aggr.st_blocks)
13723return 0;
13724 ;
13725 return 0;
13726}
bec39cab 13727_ACEOF
a9322a30
TT
13728rm -f conftest.$ac_objext
13729if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13730 (eval $ac_compile) 2>conftest.er1
bec39cab
AC
13731 ac_status=$?
13732 grep -v '^ *+' conftest.er1 >conftest.err
13733 rm -f conftest.er1
13734 cat conftest.err >&5
13735 echo "$as_me:$LINENO: \$? = $ac_status" >&5
a9322a30
TT
13736 (exit $ac_status); } &&
13737 { ac_try='test -z "$ac_c_werror_flag"
13738 || test ! -s conftest.err'
13739 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13740 (eval $ac_try) 2>&5
13741 ac_status=$?
13742 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13743 (exit $ac_status); }; } &&
13744 { ac_try='test -s conftest.$ac_objext'
13745 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13746 (eval $ac_try) 2>&5
13747 ac_status=$?
13748 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13749 (exit $ac_status); }; }; then
13750 ac_cv_member_struct_stat_st_blocks=yes
bec39cab
AC
13751else
13752 echo "$as_me: failed program was:" >&5
13753sed 's/^/| /' conftest.$ac_ext >&5
5ee754fc 13754
a9322a30 13755ac_cv_member_struct_stat_st_blocks=no
5ee754fc 13756fi
a9322a30 13757rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
5ee754fc 13758fi
a9322a30 13759rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
5ee754fc 13760fi
a9322a30
TT
13761echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blocks" >&5
13762echo "${ECHO_T}$ac_cv_member_struct_stat_st_blocks" >&6
13763if test $ac_cv_member_struct_stat_st_blocks = yes; then
5ee754fc 13764
a9322a30
TT
13765cat >>confdefs.h <<_ACEOF
13766#define HAVE_STRUCT_STAT_ST_BLOCKS 1
13767_ACEOF
5ee754fc 13768
5ee754fc 13769
bec39cab 13770fi
a9322a30
TT
13771echo "$as_me:$LINENO: checking for struct stat.st_blksize" >&5
13772echo $ECHO_N "checking for struct stat.st_blksize... $ECHO_C" >&6
13773if test "${ac_cv_member_struct_stat_st_blksize+set}" = set; then
13774 echo $ECHO_N "(cached) $ECHO_C" >&6
bec39cab 13775else
a9322a30 13776 cat >conftest.$ac_ext <<_ACEOF
bec39cab
AC
13777/* confdefs.h. */
13778_ACEOF
13779cat confdefs.h >>conftest.$ac_ext
13780cat >>conftest.$ac_ext <<_ACEOF
13781/* end confdefs.h. */
13782$ac_includes_default
a9322a30
TT
13783int
13784main ()
13785{
13786static struct stat ac_aggr;
13787if (ac_aggr.st_blksize)
13788return 0;
13789 ;
13790 return 0;
13791}
bec39cab
AC
13792_ACEOF
13793rm -f conftest.$ac_objext
13794if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13795 (eval $ac_compile) 2>conftest.er1
13796 ac_status=$?
13797 grep -v '^ *+' conftest.er1 >conftest.err
13798 rm -f conftest.er1
13799 cat conftest.err >&5
13800 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13801 (exit $ac_status); } &&
b4e70030
JB
13802 { ac_try='test -z "$ac_c_werror_flag"
13803 || test ! -s conftest.err'
bec39cab
AC
13804 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13805 (eval $ac_try) 2>&5
13806 ac_status=$?
13807 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13808 (exit $ac_status); }; } &&
13809 { ac_try='test -s conftest.$ac_objext'
13810 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13811 (eval $ac_try) 2>&5
13812 ac_status=$?
13813 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13814 (exit $ac_status); }; }; then
a9322a30 13815 ac_cv_member_struct_stat_st_blksize=yes
bec39cab
AC
13816else
13817 echo "$as_me: failed program was:" >&5
13818sed 's/^/| /' conftest.$ac_ext >&5
13819
7eb368b3
NR
13820cat >conftest.$ac_ext <<_ACEOF
13821/* confdefs.h. */
13822_ACEOF
13823cat confdefs.h >>conftest.$ac_ext
13824cat >>conftest.$ac_ext <<_ACEOF
13825/* end confdefs.h. */
13826$ac_includes_default
a9322a30
TT
13827int
13828main ()
13829{
13830static struct stat ac_aggr;
13831if (sizeof ac_aggr.st_blksize)
13832return 0;
13833 ;
13834 return 0;
13835}
7eb368b3
NR
13836_ACEOF
13837rm -f conftest.$ac_objext
13838if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13839 (eval $ac_compile) 2>conftest.er1
13840 ac_status=$?
13841 grep -v '^ *+' conftest.er1 >conftest.err
13842 rm -f conftest.er1
13843 cat conftest.err >&5
13844 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13845 (exit $ac_status); } &&
13846 { ac_try='test -z "$ac_c_werror_flag"
13847 || test ! -s conftest.err'
13848 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13849 (eval $ac_try) 2>&5
13850 ac_status=$?
13851 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13852 (exit $ac_status); }; } &&
13853 { ac_try='test -s conftest.$ac_objext'
13854 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13855 (eval $ac_try) 2>&5
13856 ac_status=$?
13857 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13858 (exit $ac_status); }; }; then
a9322a30 13859 ac_cv_member_struct_stat_st_blksize=yes
7eb368b3
NR
13860else
13861 echo "$as_me: failed program was:" >&5
13862sed 's/^/| /' conftest.$ac_ext >&5
13863
a9322a30 13864ac_cv_member_struct_stat_st_blksize=no
7eb368b3
NR
13865fi
13866rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
7eb368b3 13867fi
a9322a30 13868rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
7eb368b3 13869fi
a9322a30
TT
13870echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blksize" >&5
13871echo "${ECHO_T}$ac_cv_member_struct_stat_st_blksize" >&6
13872if test $ac_cv_member_struct_stat_st_blksize = yes; then
7eb368b3 13873
a9322a30
TT
13874cat >>confdefs.h <<_ACEOF
13875#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
7eb368b3
NR
13876_ACEOF
13877
a9322a30 13878
7eb368b3
NR
13879fi
13880
7eb368b3 13881
a9322a30
TT
13882# ------------------ #
13883# Checks for types. #
13884# ------------------ #
7eb368b3 13885
a9322a30
TT
13886echo "$as_me:$LINENO: checking return type of signal handlers" >&5
13887echo $ECHO_N "checking return type of signal handlers... $ECHO_C" >&6
13888if test "${ac_cv_type_signal+set}" = set; then
bec39cab 13889 echo $ECHO_N "(cached) $ECHO_C" >&6
bec39cab 13890else
7cb9022a 13891 cat >conftest.$ac_ext <<_ACEOF
bec39cab
AC
13892/* confdefs.h. */
13893_ACEOF
13894cat confdefs.h >>conftest.$ac_ext
13895cat >>conftest.$ac_ext <<_ACEOF
13896/* end confdefs.h. */
a9322a30
TT
13897#include <sys/types.h>
13898#include <signal.h>
13899#ifdef signal
13900# undef signal
13901#endif
13902#ifdef __cplusplus
13903extern "C" void (*signal (int, void (*)(int)))(int);
13904#else
13905void (*signal ()) ();
7cb9022a
MK
13906#endif
13907
a9322a30
TT
13908int
13909main ()
13910{
13911int i;
13912 ;
13913 return 0;
13914}
bec39cab
AC
13915_ACEOF
13916rm -f conftest.$ac_objext
13917if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13918 (eval $ac_compile) 2>conftest.er1
13919 ac_status=$?
13920 grep -v '^ *+' conftest.er1 >conftest.err
13921 rm -f conftest.er1
13922 cat conftest.err >&5
13923 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13924 (exit $ac_status); } &&
b4e70030
JB
13925 { ac_try='test -z "$ac_c_werror_flag"
13926 || test ! -s conftest.err'
bec39cab
AC
13927 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13928 (eval $ac_try) 2>&5
13929 ac_status=$?
13930 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13931 (exit $ac_status); }; } &&
13932 { ac_try='test -s conftest.$ac_objext'
13933 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13934 (eval $ac_try) 2>&5
13935 ac_status=$?
13936 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13937 (exit $ac_status); }; }; then
a9322a30 13938 ac_cv_type_signal=void
bec39cab
AC
13939else
13940 echo "$as_me: failed program was:" >&5
13941sed 's/^/| /' conftest.$ac_ext >&5
13942
a9322a30 13943ac_cv_type_signal=int
bec39cab
AC
13944fi
13945rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
5ee754fc 13946fi
a9322a30
TT
13947echo "$as_me:$LINENO: result: $ac_cv_type_signal" >&5
13948echo "${ECHO_T}$ac_cv_type_signal" >&6
bec39cab 13949
a9322a30
TT
13950cat >>confdefs.h <<_ACEOF
13951#define RETSIGTYPE $ac_cv_type_signal
13952_ACEOF
5ee754fc 13953
bec39cab 13954
a9322a30
TT
13955echo "$as_me:$LINENO: checking for socklen_t" >&5
13956echo $ECHO_N "checking for socklen_t... $ECHO_C" >&6
13957if test "${ac_cv_type_socklen_t+set}" = set; then
bec39cab 13958 echo $ECHO_N "(cached) $ECHO_C" >&6
bec39cab 13959else
a9322a30 13960 cat >conftest.$ac_ext <<_ACEOF
bec39cab
AC
13961/* confdefs.h. */
13962_ACEOF
13963cat confdefs.h >>conftest.$ac_ext
13964cat >>conftest.$ac_ext <<_ACEOF
13965/* end confdefs.h. */
a9322a30
TT
13966#include <sys/types.h>
13967#include <sys/socket.h>
13968
13969
13970int
13971main ()
13972{
13973if ((socklen_t *) 0)
13974 return 0;
13975if (sizeof (socklen_t))
13976 return 0;
13977 ;
13978 return 0;
13979}
bec39cab
AC
13980_ACEOF
13981rm -f conftest.$ac_objext
13982if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13983 (eval $ac_compile) 2>conftest.er1
13984 ac_status=$?
13985 grep -v '^ *+' conftest.er1 >conftest.err
13986 rm -f conftest.er1
13987 cat conftest.err >&5
13988 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13989 (exit $ac_status); } &&
b4e70030
JB
13990 { ac_try='test -z "$ac_c_werror_flag"
13991 || test ! -s conftest.err'
bec39cab
AC
13992 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13993 (eval $ac_try) 2>&5
13994 ac_status=$?
13995 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13996 (exit $ac_status); }; } &&
13997 { ac_try='test -s conftest.$ac_objext'
13998 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13999 (eval $ac_try) 2>&5
14000 ac_status=$?
14001 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14002 (exit $ac_status); }; }; then
a9322a30 14003 ac_cv_type_socklen_t=yes
bec39cab
AC
14004else
14005 echo "$as_me: failed program was:" >&5
14006sed 's/^/| /' conftest.$ac_ext >&5
14007
a9322a30 14008ac_cv_type_socklen_t=no
bec39cab
AC
14009fi
14010rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
a9322a30
TT
14011fi
14012echo "$as_me:$LINENO: result: $ac_cv_type_socklen_t" >&5
14013echo "${ECHO_T}$ac_cv_type_socklen_t" >&6
14014if test $ac_cv_type_socklen_t = yes; then
bec39cab 14015
a9322a30
TT
14016cat >>confdefs.h <<_ACEOF
14017#define HAVE_SOCKLEN_T 1
14018_ACEOF
14019
14020
14021fi
14022
14023
14024# ------------------------------------- #
14025# Checks for compiler characteristics. #
14026# ------------------------------------- #
14027
14028echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5
14029echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
14030if test "${ac_cv_c_const+set}" = set; then
14031 echo $ECHO_N "(cached) $ECHO_C" >&6
14032else
14033 cat >conftest.$ac_ext <<_ACEOF
bec39cab
AC
14034/* confdefs.h. */
14035_ACEOF
14036cat confdefs.h >>conftest.$ac_ext
14037cat >>conftest.$ac_ext <<_ACEOF
14038/* end confdefs.h. */
a9322a30
TT
14039
14040int
14041main ()
14042{
14043/* FIXME: Include the comments suggested by Paul. */
14044#ifndef __cplusplus
14045 /* Ultrix mips cc rejects this. */
14046 typedef int charset[2];
14047 const charset x;
14048 /* SunOS 4.1.1 cc rejects this. */
14049 char const *const *ccp;
14050 char **p;
14051 /* NEC SVR4.0.2 mips cc rejects this. */
14052 struct point {int x, y;};
14053 static struct point const zero = {0,0};
14054 /* AIX XL C 1.02.0.0 rejects this.
14055 It does not let you subtract one const X* pointer from another in
14056 an arm of an if-expression whose if-part is not a constant
14057 expression */
14058 const char *g = "string";
14059 ccp = &g + (g ? g-g : 0);
14060 /* HPUX 7.0 cc rejects these. */
14061 ++ccp;
14062 p = (char**) ccp;
14063 ccp = (char const *const *) p;
14064 { /* SCO 3.2v4 cc rejects this. */
14065 char *t;
14066 char const *s = 0 ? (char *) 0 : (char const *) 0;
14067
14068 *t++ = 0;
14069 }
14070 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
14071 int x[] = {25, 17};
14072 const int *foo = &x[0];
14073 ++foo;
14074 }
14075 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
14076 typedef const int *iptr;
14077 iptr p = 0;
14078 ++p;
14079 }
14080 { /* AIX XL C 1.02.0.0 rejects this saying
14081 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
14082 struct s { int j; const int *ap[3]; };
14083 struct s *b; b->j = 5;
14084 }
14085 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
14086 const int foo = 10;
14087 }
14088#endif
14089
14090 ;
14091 return 0;
14092}
bec39cab 14093_ACEOF
a9322a30
TT
14094rm -f conftest.$ac_objext
14095if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14096 (eval $ac_compile) 2>conftest.er1
bec39cab
AC
14097 ac_status=$?
14098 grep -v '^ *+' conftest.er1 >conftest.err
14099 rm -f conftest.er1
14100 cat conftest.err >&5
14101 echo "$as_me:$LINENO: \$? = $ac_status" >&5
a9322a30
TT
14102 (exit $ac_status); } &&
14103 { ac_try='test -z "$ac_c_werror_flag"
14104 || test ! -s conftest.err'
14105 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14106 (eval $ac_try) 2>&5
14107 ac_status=$?
14108 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14109 (exit $ac_status); }; } &&
14110 { ac_try='test -s conftest.$ac_objext'
14111 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14112 (eval $ac_try) 2>&5
14113 ac_status=$?
14114 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14115 (exit $ac_status); }; }; then
14116 ac_cv_c_const=yes
5ee754fc 14117else
bec39cab
AC
14118 echo "$as_me: failed program was:" >&5
14119sed 's/^/| /' conftest.$ac_ext >&5
14120
a9322a30 14121ac_cv_c_const=no
5ee754fc 14122fi
a9322a30 14123rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
5ee754fc 14124fi
a9322a30
TT
14125echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5
14126echo "${ECHO_T}$ac_cv_c_const" >&6
14127if test $ac_cv_c_const = no; then
bec39cab 14128
a9322a30
TT
14129cat >>confdefs.h <<\_ACEOF
14130#define const
bec39cab
AC
14131_ACEOF
14132
5ee754fc 14133fi
bec39cab 14134
a9322a30
TT
14135echo "$as_me:$LINENO: checking for inline" >&5
14136echo $ECHO_N "checking for inline... $ECHO_C" >&6
14137if test "${ac_cv_c_inline+set}" = set; then
bec39cab 14138 echo $ECHO_N "(cached) $ECHO_C" >&6
bec39cab 14139else
a9322a30
TT
14140 ac_cv_c_inline=no
14141for ac_kw in inline __inline__ __inline; do
14142 cat >conftest.$ac_ext <<_ACEOF
bec39cab
AC
14143/* confdefs.h. */
14144_ACEOF
14145cat confdefs.h >>conftest.$ac_ext
14146cat >>conftest.$ac_ext <<_ACEOF
14147/* end confdefs.h. */
a9322a30
TT
14148#ifndef __cplusplus
14149typedef int foo_t;
14150static $ac_kw foo_t static_foo () {return 0; }
14151$ac_kw foo_t foo () {return 0; }
14152#endif
14153
bec39cab
AC
14154_ACEOF
14155rm -f conftest.$ac_objext
14156if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14157 (eval $ac_compile) 2>conftest.er1
14158 ac_status=$?
14159 grep -v '^ *+' conftest.er1 >conftest.err
14160 rm -f conftest.er1
14161 cat conftest.err >&5
14162 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14163 (exit $ac_status); } &&
b4e70030
JB
14164 { ac_try='test -z "$ac_c_werror_flag"
14165 || test ! -s conftest.err'
bec39cab
AC
14166 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14167 (eval $ac_try) 2>&5
14168 ac_status=$?
14169 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14170 (exit $ac_status); }; } &&
14171 { ac_try='test -s conftest.$ac_objext'
14172 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14173 (eval $ac_try) 2>&5
14174 ac_status=$?
14175 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14176 (exit $ac_status); }; }; then
a9322a30 14177 ac_cv_c_inline=$ac_kw; break
bec39cab
AC
14178else
14179 echo "$as_me: failed program was:" >&5
14180sed 's/^/| /' conftest.$ac_ext >&5
14181
bec39cab
AC
14182fi
14183rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
a9322a30 14184done
bec39cab 14185
5ee754fc 14186fi
a9322a30
TT
14187echo "$as_me:$LINENO: result: $ac_cv_c_inline" >&5
14188echo "${ECHO_T}$ac_cv_c_inline" >&6
bec39cab 14189
5ee754fc 14190
a9322a30
TT
14191case $ac_cv_c_inline in
14192 inline | yes) ;;
14193 *)
14194 case $ac_cv_c_inline in
14195 no) ac_val=;;
14196 *) ac_val=$ac_cv_c_inline;;
14197 esac
14198 cat >>confdefs.h <<_ACEOF
14199#ifndef __cplusplus
14200#define inline $ac_val
14201#endif
14202_ACEOF
bec39cab
AC
14203 ;;
14204esac
bec39cab 14205
a9322a30
TT
14206echo "$as_me:$LINENO: checking whether byte ordering is bigendian" >&5
14207echo $ECHO_N "checking whether byte ordering is bigendian... $ECHO_C" >&6
14208if test "${ac_cv_c_bigendian+set}" = set; then
bec39cab 14209 echo $ECHO_N "(cached) $ECHO_C" >&6
bec39cab 14210else
a9322a30 14211 # See if sys/param.h defines the BYTE_ORDER macro.
bec39cab
AC
14212cat >conftest.$ac_ext <<_ACEOF
14213/* confdefs.h. */
14214_ACEOF
14215cat confdefs.h >>conftest.$ac_ext
14216cat >>conftest.$ac_ext <<_ACEOF
14217/* end confdefs.h. */
a9322a30
TT
14218#include <sys/types.h>
14219#include <sys/param.h>
14220
14221int
14222main ()
14223{
14224#if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
14225 bogus endian macros
14226#endif
14227
14228 ;
14229 return 0;
14230}
bec39cab
AC
14231_ACEOF
14232rm -f conftest.$ac_objext
14233if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14234 (eval $ac_compile) 2>conftest.er1
14235 ac_status=$?
14236 grep -v '^ *+' conftest.er1 >conftest.err
14237 rm -f conftest.er1
14238 cat conftest.err >&5
14239 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14240 (exit $ac_status); } &&
b4e70030
JB
14241 { ac_try='test -z "$ac_c_werror_flag"
14242 || test ! -s conftest.err'
bec39cab
AC
14243 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14244 (eval $ac_try) 2>&5
14245 ac_status=$?
14246 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14247 (exit $ac_status); }; } &&
14248 { ac_try='test -s conftest.$ac_objext'
14249 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14250 (eval $ac_try) 2>&5
14251 ac_status=$?
14252 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14253 (exit $ac_status); }; }; then
a9322a30 14254 # It does; now see whether it defined to BIG_ENDIAN or not.
bec39cab
AC
14255cat >conftest.$ac_ext <<_ACEOF
14256/* confdefs.h. */
14257_ACEOF
14258cat confdefs.h >>conftest.$ac_ext
14259cat >>conftest.$ac_ext <<_ACEOF
14260/* end confdefs.h. */
a9322a30
TT
14261#include <sys/types.h>
14262#include <sys/param.h>
14263
14264int
14265main ()
14266{
14267#if BYTE_ORDER != BIG_ENDIAN
14268 not big endian
14269#endif
14270
14271 ;
14272 return 0;
14273}
bec39cab 14274_ACEOF
a9322a30
TT
14275rm -f conftest.$ac_objext
14276if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14277 (eval $ac_compile) 2>conftest.er1
bec39cab
AC
14278 ac_status=$?
14279 grep -v '^ *+' conftest.er1 >conftest.err
14280 rm -f conftest.er1
14281 cat conftest.err >&5
14282 echo "$as_me:$LINENO: \$? = $ac_status" >&5
a9322a30
TT
14283 (exit $ac_status); } &&
14284 { ac_try='test -z "$ac_c_werror_flag"
14285 || test ! -s conftest.err'
14286 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14287 (eval $ac_try) 2>&5
14288 ac_status=$?
14289 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14290 (exit $ac_status); }; } &&
14291 { ac_try='test -s conftest.$ac_objext'
14292 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14293 (eval $ac_try) 2>&5
14294 ac_status=$?
14295 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14296 (exit $ac_status); }; }; then
14297 ac_cv_c_bigendian=yes
5ee754fc 14298else
bec39cab
AC
14299 echo "$as_me: failed program was:" >&5
14300sed 's/^/| /' conftest.$ac_ext >&5
14301
a9322a30 14302ac_cv_c_bigendian=no
5ee754fc 14303fi
a9322a30 14304rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
bec39cab 14305else
a9322a30
TT
14306 echo "$as_me: failed program was:" >&5
14307sed 's/^/| /' conftest.$ac_ext >&5
bec39cab 14308
a9322a30
TT
14309# It does not; compile a test program.
14310if test "$cross_compiling" = yes; then
14311 # try to guess the endianness by grepping values into an object file
14312 ac_cv_c_bigendian=unknown
14313 cat >conftest.$ac_ext <<_ACEOF
14314/* confdefs.h. */
7eb368b3
NR
14315_ACEOF
14316cat confdefs.h >>conftest.$ac_ext
14317cat >>conftest.$ac_ext <<_ACEOF
14318/* end confdefs.h. */
a9322a30
TT
14319short ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
14320short ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
14321void _ascii () { char *s = (char *) ascii_mm; s = (char *) ascii_ii; }
14322short ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
14323short ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
14324void _ebcdic () { char *s = (char *) ebcdic_mm; s = (char *) ebcdic_ii; }
7eb368b3
NR
14325int
14326main ()
14327{
a9322a30 14328 _ascii (); _ebcdic ();
7eb368b3
NR
14329 ;
14330 return 0;
14331}
14332_ACEOF
a9322a30
TT
14333rm -f conftest.$ac_objext
14334if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14335 (eval $ac_compile) 2>conftest.er1
7eb368b3
NR
14336 ac_status=$?
14337 grep -v '^ *+' conftest.er1 >conftest.err
14338 rm -f conftest.er1
14339 cat conftest.err >&5
14340 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14341 (exit $ac_status); } &&
14342 { ac_try='test -z "$ac_c_werror_flag"
14343 || test ! -s conftest.err'
14344 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14345 (eval $ac_try) 2>&5
14346 ac_status=$?
14347 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14348 (exit $ac_status); }; } &&
a9322a30 14349 { ac_try='test -s conftest.$ac_objext'
7eb368b3
NR
14350 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14351 (eval $ac_try) 2>&5
14352 ac_status=$?
14353 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14354 (exit $ac_status); }; }; then
a9322a30
TT
14355 if grep BIGenDianSyS conftest.$ac_objext >/dev/null ; then
14356 ac_cv_c_bigendian=yes
14357fi
14358if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
14359 if test "$ac_cv_c_bigendian" = unknown; then
14360 ac_cv_c_bigendian=no
14361 else
14362 # finding both strings is unlikely to happen, but who knows?
14363 ac_cv_c_bigendian=unknown
14364 fi
14365fi
7eb368b3
NR
14366else
14367 echo "$as_me: failed program was:" >&5
14368sed 's/^/| /' conftest.$ac_ext >&5
14369
7eb368b3 14370fi
a9322a30 14371rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
bec39cab
AC
14372else
14373 cat >conftest.$ac_ext <<_ACEOF
14374/* confdefs.h. */
14375_ACEOF
14376cat confdefs.h >>conftest.$ac_ext
14377cat >>conftest.$ac_ext <<_ACEOF
14378/* end confdefs.h. */
d3ea6809
MM
14379int
14380main ()
14381{
a9322a30
TT
14382 /* Are we little or big endian? From Harbison&Steele. */
14383 union
14384 {
14385 long l;
14386 char c[sizeof (long)];
14387 } u;
14388 u.l = 1;
14389 exit (u.c[sizeof (long) - 1] == 1);
d3ea6809
MM
14390}
14391_ACEOF
a9322a30 14392rm -f conftest$ac_exeext
d3ea6809 14393if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
a9322a30 14394 (eval $ac_link) 2>&5
d3ea6809
MM
14395 ac_status=$?
14396 echo "$as_me:$LINENO: \$? = $ac_status" >&5
a9322a30 14397 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
d3ea6809
MM
14398 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14399 (eval $ac_try) 2>&5
14400 ac_status=$?
14401 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14402 (exit $ac_status); }; }; then
a9322a30 14403 ac_cv_c_bigendian=no
d3ea6809 14404else
a9322a30
TT
14405 echo "$as_me: program exited with status $ac_status" >&5
14406echo "$as_me: failed program was:" >&5
d3ea6809
MM
14407sed 's/^/| /' conftest.$ac_ext >&5
14408
a9322a30
TT
14409( exit $ac_status )
14410ac_cv_c_bigendian=yes
d3ea6809 14411fi
a9322a30 14412rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
d3ea6809 14413fi
d3ea6809 14414fi
a9322a30
TT
14415rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
14416fi
14417echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5
14418echo "${ECHO_T}$ac_cv_c_bigendian" >&6
14419case $ac_cv_c_bigendian in
14420 yes)
14421
14422cat >>confdefs.h <<\_ACEOF
14423#define WORDS_BIGENDIAN 1
14424_ACEOF
14425 ;;
14426 no)
14427 ;;
14428 *)
14429 { { echo "$as_me:$LINENO: error: unknown endianness
14430presetting ac_cv_c_bigendian=no (or yes) will help" >&5
14431echo "$as_me: error: unknown endianness
14432presetting ac_cv_c_bigendian=no (or yes) will help" >&2;}
14433 { (exit 1); exit 1; }; } ;;
14434esac
d3ea6809
MM
14435
14436
a9322a30
TT
14437# ------------------------------ #
14438# Checks for library functions. #
14439# ------------------------------ #
d3ea6809 14440
a9322a30
TT
14441# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
14442# for constant arguments. Useless!
14443echo "$as_me:$LINENO: checking for working alloca.h" >&5
14444echo $ECHO_N "checking for working alloca.h... $ECHO_C" >&6
14445if test "${ac_cv_working_alloca_h+set}" = set; then
d3ea6809
MM
14446 echo $ECHO_N "(cached) $ECHO_C" >&6
14447else
14448 cat >conftest.$ac_ext <<_ACEOF
14449/* confdefs.h. */
14450_ACEOF
14451cat confdefs.h >>conftest.$ac_ext
14452cat >>conftest.$ac_ext <<_ACEOF
14453/* end confdefs.h. */
a9322a30 14454#include <alloca.h>
bec39cab
AC
14455int
14456main ()
14457{
a9322a30 14458char *p = (char *) alloca (2 * sizeof (int));
bec39cab
AC
14459 ;
14460 return 0;
14461}
14462_ACEOF
14463rm -f conftest.$ac_objext conftest$ac_exeext
14464if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14465 (eval $ac_link) 2>conftest.er1
14466 ac_status=$?
14467 grep -v '^ *+' conftest.er1 >conftest.err
14468 rm -f conftest.er1
14469 cat conftest.err >&5
14470 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14471 (exit $ac_status); } &&
b4e70030
JB
14472 { ac_try='test -z "$ac_c_werror_flag"
14473 || test ! -s conftest.err'
bec39cab
AC
14474 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14475 (eval $ac_try) 2>&5
14476 ac_status=$?
14477 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14478 (exit $ac_status); }; } &&
14479 { ac_try='test -s conftest$ac_exeext'
14480 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14481 (eval $ac_try) 2>&5
14482 ac_status=$?
14483 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14484 (exit $ac_status); }; }; then
a9322a30 14485 ac_cv_working_alloca_h=yes
bec39cab
AC
14486else
14487 echo "$as_me: failed program was:" >&5
14488sed 's/^/| /' conftest.$ac_ext >&5
14489
a9322a30 14490ac_cv_working_alloca_h=no
bec39cab
AC
14491fi
14492rm -f conftest.err conftest.$ac_objext \
14493 conftest$ac_exeext conftest.$ac_ext
14494fi
a9322a30
TT
14495echo "$as_me:$LINENO: result: $ac_cv_working_alloca_h" >&5
14496echo "${ECHO_T}$ac_cv_working_alloca_h" >&6
14497if test $ac_cv_working_alloca_h = yes; then
14498
14499cat >>confdefs.h <<\_ACEOF
14500#define HAVE_ALLOCA_H 1
bec39cab 14501_ACEOF
c906108c 14502
c906108c 14503fi
bec39cab 14504
a9322a30
TT
14505echo "$as_me:$LINENO: checking for alloca" >&5
14506echo $ECHO_N "checking for alloca... $ECHO_C" >&6
14507if test "${ac_cv_func_alloca_works+set}" = set; then
bec39cab
AC
14508 echo $ECHO_N "(cached) $ECHO_C" >&6
14509else
14510 cat >conftest.$ac_ext <<_ACEOF
14511/* confdefs.h. */
14512_ACEOF
14513cat confdefs.h >>conftest.$ac_ext
14514cat >>conftest.$ac_ext <<_ACEOF
14515/* end confdefs.h. */
a9322a30
TT
14516#ifdef __GNUC__
14517# define alloca __builtin_alloca
b4e70030 14518#else
a9322a30
TT
14519# ifdef _MSC_VER
14520# include <malloc.h>
14521# define alloca _alloca
14522# else
14523# if HAVE_ALLOCA_H
14524# include <alloca.h>
14525# else
14526# ifdef _AIX
14527 #pragma alloca
14528# else
14529# ifndef alloca /* predefined by HP cc +Olibcalls */
14530char *alloca ();
14531# endif
14532# endif
14533# endif
14534# endif
c906108c 14535#endif
97bf5e38 14536
bec39cab
AC
14537int
14538main ()
14539{
a9322a30 14540char *p = (char *) alloca (1);
bec39cab
AC
14541 ;
14542 return 0;
14543}
14544_ACEOF
14545rm -f conftest.$ac_objext conftest$ac_exeext
14546if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14547 (eval $ac_link) 2>conftest.er1
14548 ac_status=$?
14549 grep -v '^ *+' conftest.er1 >conftest.err
14550 rm -f conftest.er1
14551 cat conftest.err >&5
14552 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14553 (exit $ac_status); } &&
b4e70030
JB
14554 { ac_try='test -z "$ac_c_werror_flag"
14555 || test ! -s conftest.err'
bec39cab
AC
14556 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14557 (eval $ac_try) 2>&5
14558 ac_status=$?
14559 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14560 (exit $ac_status); }; } &&
14561 { ac_try='test -s conftest$ac_exeext'
14562 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14563 (eval $ac_try) 2>&5
14564 ac_status=$?
14565 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14566 (exit $ac_status); }; }; then
a9322a30 14567 ac_cv_func_alloca_works=yes
bec39cab
AC
14568else
14569 echo "$as_me: failed program was:" >&5
14570sed 's/^/| /' conftest.$ac_ext >&5
14571
a9322a30 14572ac_cv_func_alloca_works=no
bec39cab
AC
14573fi
14574rm -f conftest.err conftest.$ac_objext \
14575 conftest$ac_exeext conftest.$ac_ext
14576fi
a9322a30
TT
14577echo "$as_me:$LINENO: result: $ac_cv_func_alloca_works" >&5
14578echo "${ECHO_T}$ac_cv_func_alloca_works" >&6
14579
14580if test $ac_cv_func_alloca_works = yes; then
14581
14582cat >>confdefs.h <<\_ACEOF
14583#define HAVE_ALLOCA 1
bec39cab 14584_ACEOF
c906108c 14585
a9322a30
TT
14586else
14587 # The SVR3 libPW and SVR4 libucb both contain incompatible functions
14588# that cause trouble. Some versions do not even contain alloca or
14589# contain a buggy version. If you still want to use their alloca,
14590# use ar to extract alloca.o from them instead of compiling alloca.c.
14591
14592ALLOCA=alloca.$ac_objext
14593
14594cat >>confdefs.h <<\_ACEOF
14595#define C_ALLOCA 1
14596_ACEOF
c906108c 14597
bec39cab 14598
a9322a30
TT
14599echo "$as_me:$LINENO: checking whether \`alloca.c' needs Cray hooks" >&5
14600echo $ECHO_N "checking whether \`alloca.c' needs Cray hooks... $ECHO_C" >&6
14601if test "${ac_cv_os_cray+set}" = set; then
14602 echo $ECHO_N "(cached) $ECHO_C" >&6
14603else
14604 cat >conftest.$ac_ext <<_ACEOF
14605/* confdefs.h. */
14606_ACEOF
14607cat confdefs.h >>conftest.$ac_ext
14608cat >>conftest.$ac_ext <<_ACEOF
14609/* end confdefs.h. */
14610#if defined(CRAY) && ! defined(CRAY2)
14611webecray
14612#else
14613wenotbecray
14614#endif
14615
14616_ACEOF
14617if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14618 $EGREP "webecray" >/dev/null 2>&1; then
14619 ac_cv_os_cray=yes
14620else
14621 ac_cv_os_cray=no
14622fi
14623rm -f conftest*
14624
14625fi
14626echo "$as_me:$LINENO: result: $ac_cv_os_cray" >&5
14627echo "${ECHO_T}$ac_cv_os_cray" >&6
14628if test $ac_cv_os_cray = yes; then
14629 for ac_func in _getb67 GETB67 getb67; do
14630 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
b4e70030
JB
14631echo "$as_me:$LINENO: checking for $ac_func" >&5
14632echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
14633if eval "test \"\${$as_ac_var+set}\" = set"; then
bec39cab
AC
14634 echo $ECHO_N "(cached) $ECHO_C" >&6
14635else
14636 cat >conftest.$ac_ext <<_ACEOF
14637/* confdefs.h. */
14638_ACEOF
14639cat confdefs.h >>conftest.$ac_ext
14640cat >>conftest.$ac_ext <<_ACEOF
14641/* end confdefs.h. */
14642/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
14643 For example, HP-UX 11i <limits.h> declares gettimeofday. */
14644#define $ac_func innocuous_$ac_func
14645
97bf5e38 14646/* System header to define __stub macros and hopefully few prototypes,
bec39cab
AC
14647 which can conflict with char $ac_func (); below.
14648 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
14649 <limits.h> exists even on freestanding compilers. */
14650
14651#ifdef __STDC__
14652# include <limits.h>
14653#else
14654# include <assert.h>
14655#endif
c906108c 14656
bec39cab 14657#undef $ac_func
97bf5e38 14658
b4e70030 14659/* Override any gcc2 internal prototype to avoid an error. */
bec39cab
AC
14660#ifdef __cplusplus
14661extern "C"
b4e70030 14662{
bec39cab 14663#endif
b4e70030
JB
14664/* We use char because int might match the return type of a gcc2
14665 builtin and then its argument prototype would still apply. */
bec39cab 14666char $ac_func ();
97bf5e38
MK
14667/* The GNU C library defines this for functions which it implements
14668 to always fail with ENOSYS. Some functions are actually named
14669 something starting with __ and the normal name is an alias. */
b4e70030 14670#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
97bf5e38 14671choke me
b4e70030
JB
14672#else
14673char (*f) () = $ac_func;
14674#endif
14675#ifdef __cplusplus
14676}
c906108c 14677#endif
97bf5e38 14678
bec39cab
AC
14679int
14680main ()
14681{
b4e70030 14682return f != $ac_func;
bec39cab
AC
14683 ;
14684 return 0;
14685}
14686_ACEOF
14687rm -f conftest.$ac_objext conftest$ac_exeext
14688if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14689 (eval $ac_link) 2>conftest.er1
14690 ac_status=$?
14691 grep -v '^ *+' conftest.er1 >conftest.err
14692 rm -f conftest.er1
14693 cat conftest.err >&5
14694 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14695 (exit $ac_status); } &&
b4e70030
JB
14696 { ac_try='test -z "$ac_c_werror_flag"
14697 || test ! -s conftest.err'
bec39cab
AC
14698 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14699 (eval $ac_try) 2>&5
14700 ac_status=$?
14701 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14702 (exit $ac_status); }; } &&
14703 { ac_try='test -s conftest$ac_exeext'
14704 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14705 (eval $ac_try) 2>&5
14706 ac_status=$?
14707 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14708 (exit $ac_status); }; }; then
14709 eval "$as_ac_var=yes"
14710else
14711 echo "$as_me: failed program was:" >&5
14712sed 's/^/| /' conftest.$ac_ext >&5
14713
b4e70030 14714eval "$as_ac_var=no"
bec39cab
AC
14715fi
14716rm -f conftest.err conftest.$ac_objext \
14717 conftest$ac_exeext conftest.$ac_ext
14718fi
b4e70030
JB
14719echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
14720echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
bec39cab 14721if test `eval echo '${'$as_ac_var'}'` = yes; then
a9322a30
TT
14722
14723cat >>confdefs.h <<_ACEOF
14724#define CRAY_STACKSEG_END $ac_func
bec39cab 14725_ACEOF
c906108c 14726
a9322a30 14727 break
c906108c
SS
14728fi
14729
a9322a30
TT
14730 done
14731fi
bec39cab 14732
a9322a30
TT
14733echo "$as_me:$LINENO: checking stack direction for C alloca" >&5
14734echo $ECHO_N "checking stack direction for C alloca... $ECHO_C" >&6
14735if test "${ac_cv_c_stack_direction+set}" = set; then
bec39cab 14736 echo $ECHO_N "(cached) $ECHO_C" >&6
a9322a30
TT
14737else
14738 if test "$cross_compiling" = yes; then
14739 ac_cv_c_stack_direction=0
bec39cab
AC
14740else
14741 cat >conftest.$ac_ext <<_ACEOF
14742/* confdefs.h. */
14743_ACEOF
14744cat confdefs.h >>conftest.$ac_ext
14745cat >>conftest.$ac_ext <<_ACEOF
14746/* end confdefs.h. */
a9322a30
TT
14747int
14748find_stack_direction ()
b4e70030 14749{
a9322a30
TT
14750 static char *addr = 0;
14751 auto char dummy;
14752 if (addr == 0)
14753 {
14754 addr = &dummy;
14755 return find_stack_direction ();
14756 }
14757 else
14758 return (&dummy > addr) ? 1 : -1;
b4e70030 14759}
b757528f 14760
bec39cab
AC
14761int
14762main ()
14763{
a9322a30 14764 exit (find_stack_direction () < 0);
bec39cab
AC
14765}
14766_ACEOF
a9322a30 14767rm -f conftest$ac_exeext
bec39cab 14768if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
a9322a30
TT
14769 (eval $ac_link) 2>&5
14770 ac_status=$?
14771 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14772 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
14773 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14774 (eval $ac_try) 2>&5
14775 ac_status=$?
14776 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14777 (exit $ac_status); }; }; then
14778 ac_cv_c_stack_direction=1
14779else
14780 echo "$as_me: program exited with status $ac_status" >&5
14781echo "$as_me: failed program was:" >&5
14782sed 's/^/| /' conftest.$ac_ext >&5
14783
14784( exit $ac_status )
14785ac_cv_c_stack_direction=-1
14786fi
14787rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
14788fi
14789fi
14790echo "$as_me:$LINENO: result: $ac_cv_c_stack_direction" >&5
14791echo "${ECHO_T}$ac_cv_c_stack_direction" >&6
14792
14793cat >>confdefs.h <<_ACEOF
14794#define STACK_DIRECTION $ac_cv_c_stack_direction
14795_ACEOF
14796
14797
14798fi
14799
14800
14801
14802for ac_header in stdlib.h unistd.h
14803do
14804as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
14805if eval "test \"\${$as_ac_Header+set}\" = set"; then
14806 echo "$as_me:$LINENO: checking for $ac_header" >&5
14807echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
14808if eval "test \"\${$as_ac_Header+set}\" = set"; then
14809 echo $ECHO_N "(cached) $ECHO_C" >&6
14810fi
14811echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
14812echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
14813else
14814 # Is the header compilable?
14815echo "$as_me:$LINENO: checking $ac_header usability" >&5
14816echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
14817cat >conftest.$ac_ext <<_ACEOF
14818/* confdefs.h. */
14819_ACEOF
14820cat confdefs.h >>conftest.$ac_ext
14821cat >>conftest.$ac_ext <<_ACEOF
14822/* end confdefs.h. */
14823$ac_includes_default
14824#include <$ac_header>
14825_ACEOF
14826rm -f conftest.$ac_objext
14827if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14828 (eval $ac_compile) 2>conftest.er1
bec39cab
AC
14829 ac_status=$?
14830 grep -v '^ *+' conftest.er1 >conftest.err
14831 rm -f conftest.er1
14832 cat conftest.err >&5
14833 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14834 (exit $ac_status); } &&
b4e70030
JB
14835 { ac_try='test -z "$ac_c_werror_flag"
14836 || test ! -s conftest.err'
bec39cab
AC
14837 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14838 (eval $ac_try) 2>&5
14839 ac_status=$?
14840 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14841 (exit $ac_status); }; } &&
a9322a30 14842 { ac_try='test -s conftest.$ac_objext'
bec39cab
AC
14843 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14844 (eval $ac_try) 2>&5
14845 ac_status=$?
14846 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14847 (exit $ac_status); }; }; then
a9322a30
TT
14848 ac_header_compiler=yes
14849else
14850 echo "$as_me: failed program was:" >&5
14851sed 's/^/| /' conftest.$ac_ext >&5
14852
14853ac_header_compiler=no
14854fi
14855rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
14856echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
14857echo "${ECHO_T}$ac_header_compiler" >&6
14858
14859# Is the header present?
14860echo "$as_me:$LINENO: checking $ac_header presence" >&5
14861echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
14862cat >conftest.$ac_ext <<_ACEOF
14863/* confdefs.h. */
14864_ACEOF
14865cat confdefs.h >>conftest.$ac_ext
14866cat >>conftest.$ac_ext <<_ACEOF
14867/* end confdefs.h. */
14868#include <$ac_header>
14869_ACEOF
14870if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
14871 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
14872 ac_status=$?
14873 grep -v '^ *+' conftest.er1 >conftest.err
14874 rm -f conftest.er1
14875 cat conftest.err >&5
14876 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14877 (exit $ac_status); } >/dev/null; then
14878 if test -s conftest.err; then
14879 ac_cpp_err=$ac_c_preproc_warn_flag
14880 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
14881 else
14882 ac_cpp_err=
14883 fi
14884else
14885 ac_cpp_err=yes
14886fi
14887if test -z "$ac_cpp_err"; then
14888 ac_header_preproc=yes
bec39cab
AC
14889else
14890 echo "$as_me: failed program was:" >&5
14891sed 's/^/| /' conftest.$ac_ext >&5
14892
a9322a30
TT
14893 ac_header_preproc=no
14894fi
14895rm -f conftest.err conftest.$ac_ext
14896echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
14897echo "${ECHO_T}$ac_header_preproc" >&6
14898
14899# So? What about this header?
14900case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
14901 yes:no: )
14902 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
14903echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
14904 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
14905echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
14906 ac_header_preproc=yes
14907 ;;
14908 no:yes:* )
14909 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
14910echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
14911 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
14912echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
14913 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
14914echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
14915 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
14916echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
14917 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
14918echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
14919 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
14920echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
14921 (
14922 cat <<\_ASBOX
14923## ------------------------------------------ ##
14924## Report this to the AC_PACKAGE_NAME lists. ##
14925## ------------------------------------------ ##
14926_ASBOX
14927 ) |
14928 sed "s/^/$as_me: WARNING: /" >&2
14929 ;;
14930esac
14931echo "$as_me:$LINENO: checking for $ac_header" >&5
14932echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
14933if eval "test \"\${$as_ac_Header+set}\" = set"; then
14934 echo $ECHO_N "(cached) $ECHO_C" >&6
14935else
14936 eval "$as_ac_Header=\$ac_header_preproc"
bec39cab 14937fi
a9322a30
TT
14938echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
14939echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
14940
bec39cab 14941fi
a9322a30 14942if test `eval echo '${'$as_ac_Header'}'` = yes; then
bec39cab 14943 cat >>confdefs.h <<_ACEOF
a9322a30 14944#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
bec39cab 14945_ACEOF
b757528f 14946
b757528f 14947fi
bec39cab 14948
a9322a30 14949done
a3828db0 14950
83116857 14951
a9322a30 14952for ac_func in getpagesize
bcb3dc3d 14953do
bec39cab 14954as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
b4e70030
JB
14955echo "$as_me:$LINENO: checking for $ac_func" >&5
14956echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
14957if eval "test \"\${$as_ac_var+set}\" = set"; then
bec39cab
AC
14958 echo $ECHO_N "(cached) $ECHO_C" >&6
14959else
14960 cat >conftest.$ac_ext <<_ACEOF
14961/* confdefs.h. */
14962_ACEOF
14963cat confdefs.h >>conftest.$ac_ext
14964cat >>conftest.$ac_ext <<_ACEOF
14965/* end confdefs.h. */
14966/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
14967 For example, HP-UX 11i <limits.h> declares gettimeofday. */
14968#define $ac_func innocuous_$ac_func
14969
bcb3dc3d 14970/* System header to define __stub macros and hopefully few prototypes,
bec39cab
AC
14971 which can conflict with char $ac_func (); below.
14972 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
14973 <limits.h> exists even on freestanding compilers. */
14974
14975#ifdef __STDC__
14976# include <limits.h>
14977#else
14978# include <assert.h>
14979#endif
bcb3dc3d 14980
bec39cab 14981#undef $ac_func
bcb3dc3d 14982
b4e70030 14983/* Override any gcc2 internal prototype to avoid an error. */
bec39cab
AC
14984#ifdef __cplusplus
14985extern "C"
b4e70030 14986{
bec39cab 14987#endif
b4e70030
JB
14988/* We use char because int might match the return type of a gcc2
14989 builtin and then its argument prototype would still apply. */
bec39cab 14990char $ac_func ();
bcb3dc3d
MK
14991/* The GNU C library defines this for functions which it implements
14992 to always fail with ENOSYS. Some functions are actually named
14993 something starting with __ and the normal name is an alias. */
b4e70030 14994#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
bcb3dc3d 14995choke me
b4e70030
JB
14996#else
14997char (*f) () = $ac_func;
14998#endif
14999#ifdef __cplusplus
15000}
bcb3dc3d
MK
15001#endif
15002
bec39cab
AC
15003int
15004main ()
15005{
b4e70030 15006return f != $ac_func;
bec39cab
AC
15007 ;
15008 return 0;
15009}
15010_ACEOF
15011rm -f conftest.$ac_objext conftest$ac_exeext
15012if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15013 (eval $ac_link) 2>conftest.er1
15014 ac_status=$?
15015 grep -v '^ *+' conftest.er1 >conftest.err
15016 rm -f conftest.er1
15017 cat conftest.err >&5
15018 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15019 (exit $ac_status); } &&
b4e70030
JB
15020 { ac_try='test -z "$ac_c_werror_flag"
15021 || test ! -s conftest.err'
bec39cab
AC
15022 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15023 (eval $ac_try) 2>&5
15024 ac_status=$?
15025 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15026 (exit $ac_status); }; } &&
15027 { ac_try='test -s conftest$ac_exeext'
15028 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15029 (eval $ac_try) 2>&5
15030 ac_status=$?
15031 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15032 (exit $ac_status); }; }; then
15033 eval "$as_ac_var=yes"
15034else
15035 echo "$as_me: failed program was:" >&5
15036sed 's/^/| /' conftest.$ac_ext >&5
15037
b4e70030 15038eval "$as_ac_var=no"
bec39cab
AC
15039fi
15040rm -f conftest.err conftest.$ac_objext \
15041 conftest$ac_exeext conftest.$ac_ext
15042fi
b4e70030
JB
15043echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
15044echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
bec39cab
AC
15045if test `eval echo '${'$as_ac_var'}'` = yes; then
15046 cat >>confdefs.h <<_ACEOF
15047#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
15048_ACEOF
bcb3dc3d 15049
bcb3dc3d
MK
15050fi
15051done
15052
a9322a30
TT
15053echo "$as_me:$LINENO: checking for working mmap" >&5
15054echo $ECHO_N "checking for working mmap... $ECHO_C" >&6
15055if test "${ac_cv_func_mmap_fixed_mapped+set}" = set; then
bec39cab 15056 echo $ECHO_N "(cached) $ECHO_C" >&6
a9322a30
TT
15057else
15058 if test "$cross_compiling" = yes; then
15059 ac_cv_func_mmap_fixed_mapped=no
bec39cab
AC
15060else
15061 cat >conftest.$ac_ext <<_ACEOF
15062/* confdefs.h. */
15063_ACEOF
15064cat confdefs.h >>conftest.$ac_ext
15065cat >>conftest.$ac_ext <<_ACEOF
15066/* end confdefs.h. */
a9322a30
TT
15067$ac_includes_default
15068/* malloc might have been renamed as rpl_malloc. */
15069#undef malloc
bec39cab 15070
a9322a30
TT
15071/* Thanks to Mike Haertel and Jim Avera for this test.
15072 Here is a matrix of mmap possibilities:
15073 mmap private not fixed
15074 mmap private fixed at somewhere currently unmapped
15075 mmap private fixed at somewhere already mapped
15076 mmap shared not fixed
15077 mmap shared fixed at somewhere currently unmapped
15078 mmap shared fixed at somewhere already mapped
15079 For private mappings, we should verify that changes cannot be read()
15080 back from the file, nor mmap's back from the file at a different
15081 address. (There have been systems where private was not correctly
15082 implemented like the infamous i386 svr4.0, and systems where the
15083 VM page cache was not coherent with the file system buffer cache
15084 like early versions of FreeBSD and possibly contemporary NetBSD.)
15085 For shared mappings, we should conversely verify that changes get
15086 propagated back to all the places they're supposed to be.
bec39cab 15087
a9322a30
TT
15088 Grep wants private fixed already mapped.
15089 The main things grep needs to know about mmap are:
15090 * does it exist and is it safe to write into the mmap'd area
15091 * how to use it (BSD variants) */
8b9cf735 15092
a9322a30
TT
15093#include <fcntl.h>
15094#include <sys/mman.h>
8b9cf735 15095
a9322a30
TT
15096#if !STDC_HEADERS && !HAVE_STDLIB_H
15097char *malloc ();
a3828db0
MK
15098#endif
15099
a9322a30
TT
15100/* This mess was copied from the GNU getpagesize.h. */
15101#if !HAVE_GETPAGESIZE
15102/* Assume that all systems that can run configure have sys/param.h. */
15103# if !HAVE_SYS_PARAM_H
15104# define HAVE_SYS_PARAM_H 1
15105# endif
15106
15107# ifdef _SC_PAGESIZE
15108# define getpagesize() sysconf(_SC_PAGESIZE)
15109# else /* no _SC_PAGESIZE */
15110# if HAVE_SYS_PARAM_H
15111# include <sys/param.h>
15112# ifdef EXEC_PAGESIZE
15113# define getpagesize() EXEC_PAGESIZE
15114# else /* no EXEC_PAGESIZE */
15115# ifdef NBPG
15116# define getpagesize() NBPG * CLSIZE
15117# ifndef CLSIZE
15118# define CLSIZE 1
15119# endif /* no CLSIZE */
15120# else /* no NBPG */
15121# ifdef NBPC
15122# define getpagesize() NBPC
15123# else /* no NBPC */
15124# ifdef PAGESIZE
15125# define getpagesize() PAGESIZE
15126# endif /* PAGESIZE */
15127# endif /* no NBPC */
15128# endif /* no NBPG */
15129# endif /* no EXEC_PAGESIZE */
15130# else /* no HAVE_SYS_PARAM_H */
15131# define getpagesize() 8192 /* punt totally */
15132# endif /* no HAVE_SYS_PARAM_H */
15133# endif /* no _SC_PAGESIZE */
15134
15135#endif /* no HAVE_GETPAGESIZE */
15136
bec39cab
AC
15137int
15138main ()
15139{
a9322a30
TT
15140 char *data, *data2, *data3;
15141 int i, pagesize;
15142 int fd;
15143
15144 pagesize = getpagesize ();
15145
15146 /* First, make a file with some known garbage in it. */
15147 data = (char *) malloc (pagesize);
15148 if (!data)
15149 exit (1);
15150 for (i = 0; i < pagesize; ++i)
15151 *(data + i) = rand ();
15152 umask (0);
15153 fd = creat ("conftest.mmap", 0600);
15154 if (fd < 0)
15155 exit (1);
15156 if (write (fd, data, pagesize) != pagesize)
15157 exit (1);
15158 close (fd);
15159
15160 /* Next, try to mmap the file at a fixed address which already has
15161 something else allocated at it. If we can, also make sure that
15162 we see the same garbage. */
15163 fd = open ("conftest.mmap", O_RDWR);
15164 if (fd < 0)
15165 exit (1);
15166 data2 = (char *) malloc (2 * pagesize);
15167 if (!data2)
15168 exit (1);
15169 data2 += (pagesize - ((long) data2 & (pagesize - 1))) & (pagesize - 1);
15170 if (data2 != mmap (data2, pagesize, PROT_READ | PROT_WRITE,
15171 MAP_PRIVATE | MAP_FIXED, fd, 0L))
15172 exit (1);
15173 for (i = 0; i < pagesize; ++i)
15174 if (*(data + i) != *(data2 + i))
15175 exit (1);
15176
15177 /* Finally, make sure that changes to the mapped area do not
15178 percolate back to the file as seen by read(). (This is a bug on
15179 some variants of i386 svr4.0.) */
15180 for (i = 0; i < pagesize; ++i)
15181 *(data2 + i) = *(data2 + i) + 1;
15182 data3 = (char *) malloc (pagesize);
15183 if (!data3)
15184 exit (1);
15185 if (read (fd, data3, pagesize) != pagesize)
15186 exit (1);
15187 for (i = 0; i < pagesize; ++i)
15188 if (*(data + i) != *(data3 + i))
15189 exit (1);
15190 close (fd);
15191 exit (0);
bec39cab
AC
15192}
15193_ACEOF
a9322a30 15194rm -f conftest$ac_exeext
a3828db0 15195if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
a9322a30 15196 (eval $ac_link) 2>&5
bec39cab
AC
15197 ac_status=$?
15198 echo "$as_me:$LINENO: \$? = $ac_status" >&5
a9322a30 15199 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
bec39cab
AC
15200 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15201 (eval $ac_try) 2>&5
15202 ac_status=$?
15203 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15204 (exit $ac_status); }; }; then
a9322a30 15205 ac_cv_func_mmap_fixed_mapped=yes
086ec9eb 15206else
a9322a30
TT
15207 echo "$as_me: program exited with status $ac_status" >&5
15208echo "$as_me: failed program was:" >&5
bec39cab
AC
15209sed 's/^/| /' conftest.$ac_ext >&5
15210
a9322a30
TT
15211( exit $ac_status )
15212ac_cv_func_mmap_fixed_mapped=no
a3828db0 15213fi
a9322a30 15214rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
a3828db0 15215fi
a9322a30
TT
15216fi
15217echo "$as_me:$LINENO: result: $ac_cv_func_mmap_fixed_mapped" >&5
15218echo "${ECHO_T}$ac_cv_func_mmap_fixed_mapped" >&6
15219if test $ac_cv_func_mmap_fixed_mapped = yes; then
15220
15221cat >>confdefs.h <<\_ACEOF
15222#define HAVE_MMAP 1
a3828db0
MK
15223_ACEOF
15224
086ec9eb 15225fi
a9322a30 15226rm -f conftest.mmap
a3828db0 15227
a9322a30
TT
15228echo "$as_me:$LINENO: checking for pid_t" >&5
15229echo $ECHO_N "checking for pid_t... $ECHO_C" >&6
15230if test "${ac_cv_type_pid_t+set}" = set; then
a3828db0
MK
15231 echo $ECHO_N "(cached) $ECHO_C" >&6
15232else
15233 cat >conftest.$ac_ext <<_ACEOF
bec39cab
AC
15234/* confdefs.h. */
15235_ACEOF
15236cat confdefs.h >>conftest.$ac_ext
15237cat >>conftest.$ac_ext <<_ACEOF
15238/* end confdefs.h. */
a9322a30 15239$ac_includes_default
bec39cab
AC
15240int
15241main ()
15242{
a9322a30
TT
15243if ((pid_t *) 0)
15244 return 0;
15245if (sizeof (pid_t))
15246 return 0;
bec39cab
AC
15247 ;
15248 return 0;
15249}
15250_ACEOF
a9322a30
TT
15251rm -f conftest.$ac_objext
15252if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15253 (eval $ac_compile) 2>conftest.er1
bec39cab
AC
15254 ac_status=$?
15255 grep -v '^ *+' conftest.er1 >conftest.err
15256 rm -f conftest.er1
15257 cat conftest.err >&5
15258 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15259 (exit $ac_status); } &&
b4e70030
JB
15260 { ac_try='test -z "$ac_c_werror_flag"
15261 || test ! -s conftest.err'
bec39cab
AC
15262 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15263 (eval $ac_try) 2>&5
15264 ac_status=$?
15265 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15266 (exit $ac_status); }; } &&
a9322a30 15267 { ac_try='test -s conftest.$ac_objext'
bec39cab
AC
15268 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15269 (eval $ac_try) 2>&5
15270 ac_status=$?
15271 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15272 (exit $ac_status); }; }; then
a9322a30 15273 ac_cv_type_pid_t=yes
086ec9eb 15274else
bec39cab
AC
15275 echo "$as_me: failed program was:" >&5
15276sed 's/^/| /' conftest.$ac_ext >&5
15277
a9322a30 15278ac_cv_type_pid_t=no
086ec9eb 15279fi
a9322a30 15280rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
086ec9eb 15281fi
a9322a30
TT
15282echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5
15283echo "${ECHO_T}$ac_cv_type_pid_t" >&6
15284if test $ac_cv_type_pid_t = yes; then
15285 :
15286else
15287
15288cat >>confdefs.h <<_ACEOF
15289#define pid_t int
bec39cab 15290_ACEOF
086ec9eb
MK
15291
15292fi
15293
a3828db0 15294
a9322a30
TT
15295
15296for ac_header in unistd.h vfork.h
a3828db0 15297do
a9322a30
TT
15298as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
15299if eval "test \"\${$as_ac_Header+set}\" = set"; then
15300 echo "$as_me:$LINENO: checking for $ac_header" >&5
15301echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
15302if eval "test \"\${$as_ac_Header+set}\" = set"; then
bec39cab 15303 echo $ECHO_N "(cached) $ECHO_C" >&6
a9322a30
TT
15304fi
15305echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
15306echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
bec39cab 15307else
a9322a30
TT
15308 # Is the header compilable?
15309echo "$as_me:$LINENO: checking $ac_header usability" >&5
15310echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
15311cat >conftest.$ac_ext <<_ACEOF
bec39cab
AC
15312/* confdefs.h. */
15313_ACEOF
15314cat confdefs.h >>conftest.$ac_ext
15315cat >>conftest.$ac_ext <<_ACEOF
15316/* end confdefs.h. */
a9322a30
TT
15317$ac_includes_default
15318#include <$ac_header>
bec39cab 15319_ACEOF
a9322a30
TT
15320rm -f conftest.$ac_objext
15321if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15322 (eval $ac_compile) 2>conftest.er1
bec39cab 15323 ac_status=$?
a3828db0
MK
15324 grep -v '^ *+' conftest.er1 >conftest.err
15325 rm -f conftest.er1
15326 cat conftest.err >&5
bec39cab 15327 echo "$as_me:$LINENO: \$? = $ac_status" >&5
a3828db0 15328 (exit $ac_status); } &&
b4e70030
JB
15329 { ac_try='test -z "$ac_c_werror_flag"
15330 || test ! -s conftest.err'
a3828db0
MK
15331 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15332 (eval $ac_try) 2>&5
15333 ac_status=$?
15334 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15335 (exit $ac_status); }; } &&
a9322a30 15336 { ac_try='test -s conftest.$ac_objext'
bec39cab
AC
15337 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15338 (eval $ac_try) 2>&5
15339 ac_status=$?
15340 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15341 (exit $ac_status); }; }; then
a9322a30 15342 ac_header_compiler=yes
c906108c 15343else
a3828db0 15344 echo "$as_me: failed program was:" >&5
bec39cab
AC
15345sed 's/^/| /' conftest.$ac_ext >&5
15346
a9322a30 15347ac_header_compiler=no
97bf5e38 15348fi
a9322a30
TT
15349rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
15350echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
15351echo "${ECHO_T}$ac_header_compiler" >&6
15352
15353# Is the header present?
15354echo "$as_me:$LINENO: checking $ac_header presence" >&5
15355echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
15356cat >conftest.$ac_ext <<_ACEOF
15357/* confdefs.h. */
15358_ACEOF
15359cat confdefs.h >>conftest.$ac_ext
15360cat >>conftest.$ac_ext <<_ACEOF
15361/* end confdefs.h. */
15362#include <$ac_header>
15363_ACEOF
15364if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
15365 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
15366 ac_status=$?
15367 grep -v '^ *+' conftest.er1 >conftest.err
15368 rm -f conftest.er1
15369 cat conftest.err >&5
15370 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15371 (exit $ac_status); } >/dev/null; then
15372 if test -s conftest.err; then
15373 ac_cpp_err=$ac_c_preproc_warn_flag
15374 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
15375 else
15376 ac_cpp_err=
15377 fi
15378else
15379 ac_cpp_err=yes
a3828db0 15380fi
a9322a30
TT
15381if test -z "$ac_cpp_err"; then
15382 ac_header_preproc=yes
15383else
15384 echo "$as_me: failed program was:" >&5
15385sed 's/^/| /' conftest.$ac_ext >&5
15386
15387 ac_header_preproc=no
15388fi
15389rm -f conftest.err conftest.$ac_ext
15390echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
15391echo "${ECHO_T}$ac_header_preproc" >&6
15392
15393# So? What about this header?
15394case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
15395 yes:no: )
15396 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
15397echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
15398 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
15399echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
15400 ac_header_preproc=yes
15401 ;;
15402 no:yes:* )
15403 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
15404echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
15405 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
15406echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
15407 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
15408echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
15409 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
15410echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
15411 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
15412echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
15413 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
15414echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
15415 (
15416 cat <<\_ASBOX
15417## ------------------------------------------ ##
15418## Report this to the AC_PACKAGE_NAME lists. ##
15419## ------------------------------------------ ##
15420_ASBOX
15421 ) |
15422 sed "s/^/$as_me: WARNING: /" >&2
15423 ;;
15424esac
15425echo "$as_me:$LINENO: checking for $ac_header" >&5
15426echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
15427if eval "test \"\${$as_ac_Header+set}\" = set"; then
15428 echo $ECHO_N "(cached) $ECHO_C" >&6
15429else
15430 eval "$as_ac_Header=\$ac_header_preproc"
15431fi
15432echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
15433echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
15434
15435fi
15436if test `eval echo '${'$as_ac_Header'}'` = yes; then
a3828db0 15437 cat >>confdefs.h <<_ACEOF
a9322a30 15438#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
bec39cab 15439_ACEOF
c906108c
SS
15440
15441fi
a9322a30 15442
a3828db0 15443done
c906108c 15444
a3828db0 15445
a9322a30
TT
15446
15447for ac_func in fork vfork
a3828db0
MK
15448do
15449as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
b4e70030
JB
15450echo "$as_me:$LINENO: checking for $ac_func" >&5
15451echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
15452if eval "test \"\${$as_ac_var+set}\" = set"; then
bec39cab 15453 echo $ECHO_N "(cached) $ECHO_C" >&6
b83266a0 15454else
bec39cab
AC
15455 cat >conftest.$ac_ext <<_ACEOF
15456/* confdefs.h. */
15457_ACEOF
15458cat confdefs.h >>conftest.$ac_ext
15459cat >>conftest.$ac_ext <<_ACEOF
15460/* end confdefs.h. */
a3828db0
MK
15461/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
15462 For example, HP-UX 11i <limits.h> declares gettimeofday. */
15463#define $ac_func innocuous_$ac_func
b83266a0 15464
a3828db0
MK
15465/* System header to define __stub macros and hopefully few prototypes,
15466 which can conflict with char $ac_func (); below.
15467 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
15468 <limits.h> exists even on freestanding compilers. */
15469
15470#ifdef __STDC__
15471# include <limits.h>
15472#else
15473# include <assert.h>
15474#endif
15475
15476#undef $ac_func
15477
b4e70030 15478/* Override any gcc2 internal prototype to avoid an error. */
a3828db0
MK
15479#ifdef __cplusplus
15480extern "C"
b4e70030 15481{
a3828db0 15482#endif
b4e70030
JB
15483/* We use char because int might match the return type of a gcc2
15484 builtin and then its argument prototype would still apply. */
a3828db0
MK
15485char $ac_func ();
15486/* The GNU C library defines this for functions which it implements
15487 to always fail with ENOSYS. Some functions are actually named
15488 something starting with __ and the normal name is an alias. */
b4e70030 15489#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
a3828db0 15490choke me
b4e70030
JB
15491#else
15492char (*f) () = $ac_func;
15493#endif
15494#ifdef __cplusplus
15495}
a3828db0 15496#endif
97bf5e38 15497
bec39cab
AC
15498int
15499main ()
15500{
b4e70030 15501return f != $ac_func;
bec39cab
AC
15502 ;
15503 return 0;
15504}
15505_ACEOF
a3828db0
MK
15506rm -f conftest.$ac_objext conftest$ac_exeext
15507if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15508 (eval $ac_link) 2>conftest.er1
bec39cab
AC
15509 ac_status=$?
15510 grep -v '^ *+' conftest.er1 >conftest.err
15511 rm -f conftest.er1
15512 cat conftest.err >&5
15513 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15514 (exit $ac_status); } &&
b4e70030
JB
15515 { ac_try='test -z "$ac_c_werror_flag"
15516 || test ! -s conftest.err'
bec39cab
AC
15517 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15518 (eval $ac_try) 2>&5
15519 ac_status=$?
15520 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15521 (exit $ac_status); }; } &&
a3828db0 15522 { ac_try='test -s conftest$ac_exeext'
bec39cab
AC
15523 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15524 (eval $ac_try) 2>&5
15525 ac_status=$?
15526 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15527 (exit $ac_status); }; }; then
a3828db0 15528 eval "$as_ac_var=yes"
b83266a0 15529else
bec39cab
AC
15530 echo "$as_me: failed program was:" >&5
15531sed 's/^/| /' conftest.$ac_ext >&5
15532
b4e70030 15533eval "$as_ac_var=no"
b83266a0 15534fi
a3828db0
MK
15535rm -f conftest.err conftest.$ac_objext \
15536 conftest$ac_exeext conftest.$ac_ext
b83266a0 15537fi
b4e70030
JB
15538echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
15539echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
a3828db0
MK
15540if test `eval echo '${'$as_ac_var'}'` = yes; then
15541 cat >>confdefs.h <<_ACEOF
15542#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
bec39cab 15543_ACEOF
b83266a0 15544
97bf5e38 15545fi
a3828db0 15546done
b83266a0 15547
a9322a30
TT
15548if test "x$ac_cv_func_fork" = xyes; then
15549 echo "$as_me:$LINENO: checking for working fork" >&5
15550echo $ECHO_N "checking for working fork... $ECHO_C" >&6
15551if test "${ac_cv_func_fork_works+set}" = set; then
15552 echo $ECHO_N "(cached) $ECHO_C" >&6
15553else
15554 if test "$cross_compiling" = yes; then
15555 ac_cv_func_fork_works=cross
15556else
15557 cat >conftest.$ac_ext <<_ACEOF
15558/* By Ruediger Kuhlmann. */
15559 #include <sys/types.h>
15560 #if HAVE_UNISTD_H
15561 # include <unistd.h>
15562 #endif
15563 /* Some systems only have a dummy stub for fork() */
15564 int main ()
15565 {
15566 if (fork() < 0)
15567 exit (1);
15568 exit (0);
15569 }
15570_ACEOF
15571rm -f conftest$ac_exeext
15572if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15573 (eval $ac_link) 2>&5
15574 ac_status=$?
15575 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15576 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
15577 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15578 (eval $ac_try) 2>&5
15579 ac_status=$?
15580 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15581 (exit $ac_status); }; }; then
15582 ac_cv_func_fork_works=yes
15583else
15584 echo "$as_me: program exited with status $ac_status" >&5
15585echo "$as_me: failed program was:" >&5
15586sed 's/^/| /' conftest.$ac_ext >&5
15587
15588( exit $ac_status )
15589ac_cv_func_fork_works=no
15590fi
15591rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
15592fi
15593fi
15594echo "$as_me:$LINENO: result: $ac_cv_func_fork_works" >&5
15595echo "${ECHO_T}$ac_cv_func_fork_works" >&6
15596
15597else
15598 ac_cv_func_fork_works=$ac_cv_func_fork
15599fi
15600if test "x$ac_cv_func_fork_works" = xcross; then
15601 case $host in
15602 *-*-amigaos* | *-*-msdosdjgpp*)
15603 # Override, as these systems have only a dummy fork() stub
15604 ac_cv_func_fork_works=no
15605 ;;
15606 *)
15607 ac_cv_func_fork_works=yes
15608 ;;
15609 esac
15610 { echo "$as_me:$LINENO: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&5
15611echo "$as_me: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&2;}
15612fi
15613ac_cv_func_vfork_works=$ac_cv_func_vfork
15614if test "x$ac_cv_func_vfork" = xyes; then
15615 echo "$as_me:$LINENO: checking for working vfork" >&5
15616echo $ECHO_N "checking for working vfork... $ECHO_C" >&6
15617if test "${ac_cv_func_vfork_works+set}" = set; then
15618 echo $ECHO_N "(cached) $ECHO_C" >&6
15619else
15620 if test "$cross_compiling" = yes; then
15621 ac_cv_func_vfork_works=cross
15622else
15623 cat >conftest.$ac_ext <<_ACEOF
15624/* confdefs.h. */
15625_ACEOF
15626cat confdefs.h >>conftest.$ac_ext
15627cat >>conftest.$ac_ext <<_ACEOF
15628/* end confdefs.h. */
15629/* Thanks to Paul Eggert for this test. */
15630#include <stdio.h>
15631#include <stdlib.h>
15632#include <sys/types.h>
15633#include <sys/stat.h>
15634#include <sys/wait.h>
15635#if HAVE_UNISTD_H
15636# include <unistd.h>
15637#endif
15638#if HAVE_VFORK_H
15639# include <vfork.h>
15640#endif
15641/* On some sparc systems, changes by the child to local and incoming
15642 argument registers are propagated back to the parent. The compiler
15643 is told about this with #include <vfork.h>, but some compilers
15644 (e.g. gcc -O) don't grok <vfork.h>. Test for this by using a
15645 static variable whose address is put into a register that is
15646 clobbered by the vfork. */
15647static void
15648#ifdef __cplusplus
15649sparc_address_test (int arg)
15650# else
15651sparc_address_test (arg) int arg;
15652#endif
15653{
15654 static pid_t child;
15655 if (!child) {
15656 child = vfork ();
15657 if (child < 0) {
15658 perror ("vfork");
15659 _exit(2);
15660 }
15661 if (!child) {
15662 arg = getpid();
15663 write(-1, "", 0);
15664 _exit (arg);
15665 }
15666 }
15667}
15668
15669int
15670main ()
15671{
15672 pid_t parent = getpid ();
15673 pid_t child;
15674
15675 sparc_address_test (0);
15676
15677 child = vfork ();
15678
15679 if (child == 0) {
15680 /* Here is another test for sparc vfork register problems. This
15681 test uses lots of local variables, at least as many local
15682 variables as main has allocated so far including compiler
15683 temporaries. 4 locals are enough for gcc 1.40.3 on a Solaris
15684 4.1.3 sparc, but we use 8 to be safe. A buggy compiler should
15685 reuse the register of parent for one of the local variables,
15686 since it will think that parent can't possibly be used any more
15687 in this routine. Assigning to the local variable will thus
15688 munge parent in the parent process. */
15689 pid_t
15690 p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
15691 p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
15692 /* Convince the compiler that p..p7 are live; otherwise, it might
15693 use the same hardware register for all 8 local variables. */
15694 if (p != p1 || p != p2 || p != p3 || p != p4
15695 || p != p5 || p != p6 || p != p7)
15696 _exit(1);
15697
15698 /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent
15699 from child file descriptors. If the child closes a descriptor
15700 before it execs or exits, this munges the parent's descriptor
15701 as well. Test for this by closing stdout in the child. */
15702 _exit(close(fileno(stdout)) != 0);
15703 } else {
15704 int status;
15705 struct stat st;
15706
15707 while (wait(&status) != child)
15708 ;
15709 exit(
15710 /* Was there some problem with vforking? */
15711 child < 0
15712
15713 /* Did the child fail? (This shouldn't happen.) */
15714 || status
15715
15716 /* Did the vfork/compiler bug occur? */
15717 || parent != getpid()
15718
15719 /* Did the file descriptor bug occur? */
15720 || fstat(fileno(stdout), &st) != 0
15721 );
15722 }
15723}
15724_ACEOF
15725rm -f conftest$ac_exeext
15726if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15727 (eval $ac_link) 2>&5
15728 ac_status=$?
15729 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15730 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
15731 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15732 (eval $ac_try) 2>&5
15733 ac_status=$?
15734 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15735 (exit $ac_status); }; }; then
15736 ac_cv_func_vfork_works=yes
15737else
15738 echo "$as_me: program exited with status $ac_status" >&5
15739echo "$as_me: failed program was:" >&5
15740sed 's/^/| /' conftest.$ac_ext >&5
15741
15742( exit $ac_status )
15743ac_cv_func_vfork_works=no
15744fi
15745rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
15746fi
15747fi
15748echo "$as_me:$LINENO: result: $ac_cv_func_vfork_works" >&5
15749echo "${ECHO_T}$ac_cv_func_vfork_works" >&6
15750
15751fi;
15752if test "x$ac_cv_func_fork_works" = xcross; then
15753 ac_cv_func_vfork_works=$ac_cv_func_vfork
15754 { echo "$as_me:$LINENO: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&5
15755echo "$as_me: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&2;}
15756fi
15757
15758if test "x$ac_cv_func_vfork_works" = xyes; then
15759
15760cat >>confdefs.h <<\_ACEOF
15761#define HAVE_WORKING_VFORK 1
15762_ACEOF
15763
15764else
15765
15766cat >>confdefs.h <<\_ACEOF
15767#define vfork fork
15768_ACEOF
15769
15770fi
15771if test "x$ac_cv_func_fork_works" = xyes; then
15772
15773cat >>confdefs.h <<\_ACEOF
15774#define HAVE_WORKING_FORK 1
15775_ACEOF
15776
15777fi
15778
15779
15780
15781
15782
15783
15784
15785
15786
15787
15788
15789
15790
15791
15792
15793
15794
15795
a3828db0 15796
fc3b640d 15797
732f6a93 15798
6c7a06a3 15799
a8111142 15800
a9322a30
TT
15801for ac_func in canonicalize_file_name realpath getrusage getuid \
15802 getgid poll pread64 sbrk setpgid setpgrp setsid \
15803 sigaction sigprocmask sigsetmask socketpair syscall \
732f6a93 15804 ttrace wborder setlocale iconvlist libiconvlist btowc
a3828db0
MK
15805do
15806as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
b4e70030
JB
15807echo "$as_me:$LINENO: checking for $ac_func" >&5
15808echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
15809if eval "test \"\${$as_ac_var+set}\" = set"; then
bec39cab
AC
15810 echo $ECHO_N "(cached) $ECHO_C" >&6
15811else
15812 cat >conftest.$ac_ext <<_ACEOF
15813/* confdefs.h. */
15814_ACEOF
15815cat confdefs.h >>conftest.$ac_ext
15816cat >>conftest.$ac_ext <<_ACEOF
15817/* end confdefs.h. */
a3828db0
MK
15818/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
15819 For example, HP-UX 11i <limits.h> declares gettimeofday. */
15820#define $ac_func innocuous_$ac_func
a4db0f07 15821
a3828db0
MK
15822/* System header to define __stub macros and hopefully few prototypes,
15823 which can conflict with char $ac_func (); below.
15824 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
15825 <limits.h> exists even on freestanding compilers. */
15826
15827#ifdef __STDC__
15828# include <limits.h>
15829#else
15830# include <assert.h>
15831#endif
15832
15833#undef $ac_func
15834
b4e70030 15835/* Override any gcc2 internal prototype to avoid an error. */
a3828db0
MK
15836#ifdef __cplusplus
15837extern "C"
b4e70030 15838{
a3828db0 15839#endif
b4e70030
JB
15840/* We use char because int might match the return type of a gcc2
15841 builtin and then its argument prototype would still apply. */
a3828db0
MK
15842char $ac_func ();
15843/* The GNU C library defines this for functions which it implements
15844 to always fail with ENOSYS. Some functions are actually named
15845 something starting with __ and the normal name is an alias. */
b4e70030 15846#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
a3828db0 15847choke me
b4e70030
JB
15848#else
15849char (*f) () = $ac_func;
15850#endif
15851#ifdef __cplusplus
15852}
a3828db0 15853#endif
97bf5e38 15854
bec39cab
AC
15855int
15856main ()
15857{
6c7a06a3
TT
15858return f != $ac_func;
15859 ;
15860 return 0;
15861}
15862_ACEOF
15863rm -f conftest.$ac_objext conftest$ac_exeext
15864if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15865 (eval $ac_link) 2>conftest.er1
15866 ac_status=$?
15867 grep -v '^ *+' conftest.er1 >conftest.err
15868 rm -f conftest.er1
15869 cat conftest.err >&5
15870 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15871 (exit $ac_status); } &&
15872 { ac_try='test -z "$ac_c_werror_flag"
15873 || test ! -s conftest.err'
15874 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15875 (eval $ac_try) 2>&5
15876 ac_status=$?
15877 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15878 (exit $ac_status); }; } &&
15879 { ac_try='test -s conftest$ac_exeext'
15880 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15881 (eval $ac_try) 2>&5
15882 ac_status=$?
15883 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15884 (exit $ac_status); }; }; then
15885 eval "$as_ac_var=yes"
15886else
15887 echo "$as_me: failed program was:" >&5
15888sed 's/^/| /' conftest.$ac_ext >&5
15889
15890eval "$as_ac_var=no"
15891fi
15892rm -f conftest.err conftest.$ac_objext \
15893 conftest$ac_exeext conftest.$ac_ext
15894fi
15895echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
15896echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
15897if test `eval echo '${'$as_ac_var'}'` = yes; then
15898 cat >>confdefs.h <<_ACEOF
15899#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
15900_ACEOF
15901
15902fi
15903done
15904
15905
15906 echo "$as_me:$LINENO: checking for nl_langinfo and CODESET" >&5
15907echo $ECHO_N "checking for nl_langinfo and CODESET... $ECHO_C" >&6
15908if test "${am_cv_langinfo_codeset+set}" = set; then
15909 echo $ECHO_N "(cached) $ECHO_C" >&6
15910else
15911 cat >conftest.$ac_ext <<_ACEOF
15912/* confdefs.h. */
15913_ACEOF
15914cat confdefs.h >>conftest.$ac_ext
15915cat >>conftest.$ac_ext <<_ACEOF
15916/* end confdefs.h. */
15917#include <langinfo.h>
15918int
15919main ()
15920{
15921char* cs = nl_langinfo(CODESET);
bec39cab
AC
15922 ;
15923 return 0;
15924}
15925_ACEOF
a3828db0
MK
15926rm -f conftest.$ac_objext conftest$ac_exeext
15927if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15928 (eval $ac_link) 2>conftest.er1
bec39cab
AC
15929 ac_status=$?
15930 grep -v '^ *+' conftest.er1 >conftest.err
15931 rm -f conftest.er1
15932 cat conftest.err >&5
15933 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15934 (exit $ac_status); } &&
b4e70030
JB
15935 { ac_try='test -z "$ac_c_werror_flag"
15936 || test ! -s conftest.err'
bec39cab
AC
15937 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15938 (eval $ac_try) 2>&5
15939 ac_status=$?
15940 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15941 (exit $ac_status); }; } &&
a3828db0 15942 { ac_try='test -s conftest$ac_exeext'
bec39cab
AC
15943 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15944 (eval $ac_try) 2>&5
15945 ac_status=$?
15946 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15947 (exit $ac_status); }; }; then
6c7a06a3 15948 am_cv_langinfo_codeset=yes
a4db0f07 15949else
bec39cab
AC
15950 echo "$as_me: failed program was:" >&5
15951sed 's/^/| /' conftest.$ac_ext >&5
15952
6c7a06a3 15953am_cv_langinfo_codeset=no
a4db0f07 15954fi
a3828db0
MK
15955rm -f conftest.err conftest.$ac_objext \
15956 conftest$ac_exeext conftest.$ac_ext
6c7a06a3 15957
a4db0f07 15958fi
6c7a06a3
TT
15959echo "$as_me:$LINENO: result: $am_cv_langinfo_codeset" >&5
15960echo "${ECHO_T}$am_cv_langinfo_codeset" >&6
15961 if test $am_cv_langinfo_codeset = yes; then
15962
15963cat >>confdefs.h <<\_ACEOF
15964#define HAVE_LANGINFO_CODESET 1
bec39cab 15965_ACEOF
a4db0f07 15966
6c7a06a3 15967 fi
c906108c 15968
06825bd1 15969
a3828db0
MK
15970# Check the return and argument types of ptrace. No canned test for
15971# this, so roll our own.
15972gdb_ptrace_headers='
15973#if HAVE_SYS_TYPES_H
15974# include <sys/types.h>
15975#endif
15976#if HAVE_SYS_PTRACE_H
15977# include <sys/ptrace.h>
15978#endif
15979#if HAVE_UNISTD_H
15980# include <unistd.h>
15981#endif
15982'
15983# There is no point in checking if we don't have a prototype.
b4e70030
JB
15984echo "$as_me:$LINENO: checking whether ptrace is declared" >&5
15985echo $ECHO_N "checking whether ptrace is declared... $ECHO_C" >&6
a3828db0 15986if test "${ac_cv_have_decl_ptrace+set}" = set; then
bec39cab
AC
15987 echo $ECHO_N "(cached) $ECHO_C" >&6
15988else
15989 cat >conftest.$ac_ext <<_ACEOF
15990/* confdefs.h. */
15991_ACEOF
15992cat confdefs.h >>conftest.$ac_ext
15993cat >>conftest.$ac_ext <<_ACEOF
15994/* end confdefs.h. */
a3828db0
MK
15995$gdb_ptrace_headers
15996
bec39cab
AC
15997int
15998main ()
15999{
a3828db0
MK
16000#ifndef ptrace
16001 char *p = (char *) ptrace;
06825bd1 16002#endif
a3828db0 16003
bec39cab
AC
16004 ;
16005 return 0;
16006}
16007_ACEOF
16008rm -f conftest.$ac_objext
16009if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16010 (eval $ac_compile) 2>conftest.er1
16011 ac_status=$?
16012 grep -v '^ *+' conftest.er1 >conftest.err
16013 rm -f conftest.er1
16014 cat conftest.err >&5
16015 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16016 (exit $ac_status); } &&
b4e70030
JB
16017 { ac_try='test -z "$ac_c_werror_flag"
16018 || test ! -s conftest.err'
bec39cab
AC
16019 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16020 (eval $ac_try) 2>&5
16021 ac_status=$?
16022 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16023 (exit $ac_status); }; } &&
16024 { ac_try='test -s conftest.$ac_objext'
16025 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16026 (eval $ac_try) 2>&5
16027 ac_status=$?
16028 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16029 (exit $ac_status); }; }; then
a3828db0 16030 ac_cv_have_decl_ptrace=yes
06825bd1 16031else
bec39cab
AC
16032 echo "$as_me: failed program was:" >&5
16033sed 's/^/| /' conftest.$ac_ext >&5
16034
b4e70030 16035ac_cv_have_decl_ptrace=no
06825bd1 16036fi
bec39cab 16037rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
06825bd1 16038fi
b4e70030
JB
16039echo "$as_me:$LINENO: result: $ac_cv_have_decl_ptrace" >&5
16040echo "${ECHO_T}$ac_cv_have_decl_ptrace" >&6
a3828db0 16041if test $ac_cv_have_decl_ptrace = yes; then
06825bd1 16042
a3828db0
MK
16043cat >>confdefs.h <<_ACEOF
16044#define HAVE_DECL_PTRACE 1
16045_ACEOF
bec39cab 16046
bec39cab 16047
a3828db0
MK
16048else
16049 cat >>confdefs.h <<_ACEOF
16050#define HAVE_DECL_PTRACE 0
bec39cab 16051_ACEOF
06825bd1 16052
a3828db0
MK
16053
16054 : ${gdb_cv_func_ptrace_ret='int'}
16055 : ${gdb_cv_func_ptrace_args='int,int,long,long'}
16056
06825bd1
MK
16057fi
16058
a3828db0 16059
064ef605
DJ
16060# Check return type. Varargs (used on GNU/Linux) conflict with the
16061# empty argument list, so check for that explicitly.
b4e70030
JB
16062echo "$as_me:$LINENO: checking return type of ptrace" >&5
16063echo $ECHO_N "checking return type of ptrace... $ECHO_C" >&6
a3828db0 16064if test "${gdb_cv_func_ptrace_ret+set}" = set; then
bec39cab
AC
16065 echo $ECHO_N "(cached) $ECHO_C" >&6
16066else
16067 cat >conftest.$ac_ext <<_ACEOF
16068/* confdefs.h. */
16069_ACEOF
16070cat confdefs.h >>conftest.$ac_ext
16071cat >>conftest.$ac_ext <<_ACEOF
16072/* end confdefs.h. */
a3828db0 16073$gdb_ptrace_headers
bec39cab
AC
16074int
16075main ()
16076{
064ef605
DJ
16077extern long ptrace (enum __ptrace_request, ...);
16078 ;
16079 return 0;
16080}
16081_ACEOF
16082rm -f conftest.$ac_objext
16083if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16084 (eval $ac_compile) 2>conftest.er1
16085 ac_status=$?
16086 grep -v '^ *+' conftest.er1 >conftest.err
16087 rm -f conftest.er1
16088 cat conftest.err >&5
16089 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16090 (exit $ac_status); } &&
16091 { ac_try='test -z "$ac_c_werror_flag"
16092 || test ! -s conftest.err'
16093 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16094 (eval $ac_try) 2>&5
16095 ac_status=$?
16096 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16097 (exit $ac_status); }; } &&
16098 { ac_try='test -s conftest.$ac_objext'
16099 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16100 (eval $ac_try) 2>&5
16101 ac_status=$?
16102 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16103 (exit $ac_status); }; }; then
16104 gdb_cv_func_ptrace_ret='long'
16105else
16106 echo "$as_me: failed program was:" >&5
16107sed 's/^/| /' conftest.$ac_ext >&5
16108
16109cat >conftest.$ac_ext <<_ACEOF
16110/* confdefs.h. */
16111_ACEOF
16112cat confdefs.h >>conftest.$ac_ext
16113cat >>conftest.$ac_ext <<_ACEOF
16114/* end confdefs.h. */
16115$gdb_ptrace_headers
16116int
16117main ()
16118{
a3828db0 16119extern int ptrace ();
bec39cab
AC
16120 ;
16121 return 0;
16122}
16123_ACEOF
16124rm -f conftest.$ac_objext
16125if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16126 (eval $ac_compile) 2>conftest.er1
16127 ac_status=$?
16128 grep -v '^ *+' conftest.er1 >conftest.err
16129 rm -f conftest.er1
16130 cat conftest.err >&5
16131 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16132 (exit $ac_status); } &&
b4e70030
JB
16133 { ac_try='test -z "$ac_c_werror_flag"
16134 || test ! -s conftest.err'
bec39cab
AC
16135 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16136 (eval $ac_try) 2>&5
16137 ac_status=$?
16138 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16139 (exit $ac_status); }; } &&
16140 { ac_try='test -s conftest.$ac_objext'
16141 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16142 (eval $ac_try) 2>&5
16143 ac_status=$?
16144 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16145 (exit $ac_status); }; }; then
a3828db0 16146 gdb_cv_func_ptrace_ret='int'
70f9f479 16147else
bec39cab
AC
16148 echo "$as_me: failed program was:" >&5
16149sed 's/^/| /' conftest.$ac_ext >&5
16150
b4e70030 16151gdb_cv_func_ptrace_ret='long'
70f9f479 16152fi
bec39cab 16153rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
70f9f479 16154fi
064ef605
DJ
16155rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
16156fi
b4e70030
JB
16157echo "$as_me:$LINENO: result: $gdb_cv_func_ptrace_ret" >&5
16158echo "${ECHO_T}$gdb_cv_func_ptrace_ret" >&6
bec39cab 16159
a3828db0
MK
16160cat >>confdefs.h <<_ACEOF
16161#define PTRACE_TYPE_RET $gdb_cv_func_ptrace_ret
bec39cab 16162_ACEOF
70f9f479 16163
a3828db0 16164# Check argument types.
b4e70030
JB
16165echo "$as_me:$LINENO: checking types of arguments for ptrace" >&5
16166echo $ECHO_N "checking types of arguments for ptrace... $ECHO_C" >&6
a3828db0 16167if test "${gdb_cv_func_ptrace_args+set}" = set; then
bec39cab
AC
16168 echo $ECHO_N "(cached) $ECHO_C" >&6
16169else
a3828db0 16170
064ef605
DJ
16171 cat >conftest.$ac_ext <<_ACEOF
16172/* confdefs.h. */
16173_ACEOF
16174cat confdefs.h >>conftest.$ac_ext
16175cat >>conftest.$ac_ext <<_ACEOF
16176/* end confdefs.h. */
16177$gdb_ptrace_headers
16178int
16179main ()
16180{
16181extern long ptrace (enum __ptrace_request, ...);
16182 ;
16183 return 0;
16184}
16185_ACEOF
16186rm -f conftest.$ac_objext
16187if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16188 (eval $ac_compile) 2>conftest.er1
16189 ac_status=$?
16190 grep -v '^ *+' conftest.er1 >conftest.err
16191 rm -f conftest.er1
16192 cat conftest.err >&5
16193 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16194 (exit $ac_status); } &&
16195 { ac_try='test -z "$ac_c_werror_flag"
16196 || test ! -s conftest.err'
16197 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16198 (eval $ac_try) 2>&5
16199 ac_status=$?
16200 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16201 (exit $ac_status); }; } &&
16202 { ac_try='test -s conftest.$ac_objext'
16203 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16204 (eval $ac_try) 2>&5
16205 ac_status=$?
16206 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16207 (exit $ac_status); }; }; then
16208 gdb_cv_func_ptrace_args='int,int,long,long'
16209else
16210 echo "$as_me: failed program was:" >&5
16211sed 's/^/| /' conftest.$ac_ext >&5
16212
16213
a3828db0
MK
16214for gdb_arg1 in 'int' 'long'; do
16215 for gdb_arg2 in 'pid_t' 'int' 'long'; do
5ed10e6e 16216 for gdb_arg3 in 'int *' 'caddr_t' 'int' 'long' 'void *'; do
a3828db0
MK
16217 for gdb_arg4 in 'int' 'long'; do
16218 cat >conftest.$ac_ext <<_ACEOF
bec39cab
AC
16219/* confdefs.h. */
16220_ACEOF
16221cat confdefs.h >>conftest.$ac_ext
16222cat >>conftest.$ac_ext <<_ACEOF
16223/* end confdefs.h. */
a3828db0 16224$gdb_ptrace_headers
bec39cab
AC
16225int
16226main ()
16227{
a3828db0
MK
16228
16229extern $gdb_cv_func_ptrace_ret
16230 ptrace ($gdb_arg1, $gdb_arg2, $gdb_arg3, $gdb_arg4);
16231
bec39cab
AC
16232 ;
16233 return 0;
16234}
16235_ACEOF
16236rm -f conftest.$ac_objext
16237if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16238 (eval $ac_compile) 2>conftest.er1
16239 ac_status=$?
16240 grep -v '^ *+' conftest.er1 >conftest.err
16241 rm -f conftest.er1
16242 cat conftest.err >&5
16243 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16244 (exit $ac_status); } &&
b4e70030
JB
16245 { ac_try='test -z "$ac_c_werror_flag"
16246 || test ! -s conftest.err'
bec39cab
AC
16247 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16248 (eval $ac_try) 2>&5
16249 ac_status=$?
16250 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16251 (exit $ac_status); }; } &&
16252 { ac_try='test -s conftest.$ac_objext'
16253 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16254 (eval $ac_try) 2>&5
16255 ac_status=$?
16256 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16257 (exit $ac_status); }; }; then
a3828db0
MK
16258 gdb_cv_func_ptrace_args="$gdb_arg1,$gdb_arg2,$gdb_arg3,$gdb_arg4";
16259 break 4;
5c7f2947 16260else
bec39cab
AC
16261 echo "$as_me: failed program was:" >&5
16262sed 's/^/| /' conftest.$ac_ext >&5
16263
5c7f2947 16264fi
bec39cab 16265rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
a3828db0
MK
16266 for gdb_arg5 in 'int *' 'int' 'long'; do
16267 cat >conftest.$ac_ext <<_ACEOF
bec39cab
AC
16268/* confdefs.h. */
16269_ACEOF
16270cat confdefs.h >>conftest.$ac_ext
16271cat >>conftest.$ac_ext <<_ACEOF
16272/* end confdefs.h. */
a3828db0 16273$gdb_ptrace_headers
bec39cab
AC
16274int
16275main ()
16276{
a3828db0
MK
16277
16278extern $gdb_cv_func_ptrace_ret
16279 ptrace ($gdb_arg1, $gdb_arg2, $gdb_arg3, $gdb_arg4, $gdb_arg5);
16280
bec39cab
AC
16281 ;
16282 return 0;
16283}
16284_ACEOF
16285rm -f conftest.$ac_objext
16286if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16287 (eval $ac_compile) 2>conftest.er1
16288 ac_status=$?
16289 grep -v '^ *+' conftest.er1 >conftest.err
16290 rm -f conftest.er1
16291 cat conftest.err >&5
16292 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16293 (exit $ac_status); } &&
b4e70030
JB
16294 { ac_try='test -z "$ac_c_werror_flag"
16295 || test ! -s conftest.err'
bec39cab
AC
16296 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16297 (eval $ac_try) 2>&5
16298 ac_status=$?
16299 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16300 (exit $ac_status); }; } &&
16301 { ac_try='test -s conftest.$ac_objext'
16302 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16303 (eval $ac_try) 2>&5
16304 ac_status=$?
16305 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16306 (exit $ac_status); }; }; then
a3828db0
MK
16307
16308gdb_cv_func_ptrace_args="$gdb_arg1,$gdb_arg2,$gdb_arg3,$gdb_arg4,$gdb_arg5";
16309 break 5;
78434e59 16310else
bec39cab
AC
16311 echo "$as_me: failed program was:" >&5
16312sed 's/^/| /' conftest.$ac_ext >&5
16313
78434e59 16314fi
bec39cab 16315rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
a3828db0
MK
16316 done
16317 done
16318 done
16319 done
16320done
16321# Provide a safe default value.
16322: ${gdb_cv_func_ptrace_args='int,int,long,long'}
16323
064ef605
DJ
16324fi
16325rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
78434e59 16326fi
b4e70030
JB
16327echo "$as_me:$LINENO: result: $gdb_cv_func_ptrace_args" >&5
16328echo "${ECHO_T}$gdb_cv_func_ptrace_args" >&6
a3828db0
MK
16329ac_save_IFS=$IFS; IFS=','
16330set dummy `echo "$gdb_cv_func_ptrace_args" | sed 's/\*/\*/g'`
16331IFS=$ac_save_IFS
16332shift
bec39cab 16333
a3828db0
MK
16334cat >>confdefs.h <<_ACEOF
16335#define PTRACE_TYPE_ARG3 $3
16336_ACEOF
16337
16338if test -n "$5"; then
16339
16340cat >>confdefs.h <<_ACEOF
16341#define PTRACE_TYPE_ARG5 $5
bec39cab 16342_ACEOF
78434e59
MK
16343
16344fi
16345
a3828db0 16346if test "$cross_compiling" = no; then
b4e70030
JB
16347 echo "$as_me:$LINENO: checking whether setpgrp takes no argument" >&5
16348echo $ECHO_N "checking whether setpgrp takes no argument... $ECHO_C" >&6
a3828db0 16349if test "${ac_cv_func_setpgrp_void+set}" = set; then
bec39cab 16350 echo $ECHO_N "(cached) $ECHO_C" >&6
a3828db0
MK
16351else
16352 if test "$cross_compiling" = yes; then
16353 { { echo "$as_me:$LINENO: error: cannot check setpgrp when cross compiling" >&5
16354echo "$as_me: error: cannot check setpgrp when cross compiling" >&2;}
16355 { (exit 1); exit 1; }; }
bec39cab
AC
16356else
16357 cat >conftest.$ac_ext <<_ACEOF
16358/* confdefs.h. */
16359_ACEOF
16360cat confdefs.h >>conftest.$ac_ext
16361cat >>conftest.$ac_ext <<_ACEOF
16362/* end confdefs.h. */
b4e70030
JB
16363#if HAVE_UNISTD_H
16364# include <unistd.h>
16365#endif
16366
bec39cab
AC
16367int
16368main ()
16369{
a3828db0
MK
16370/* If this system has a BSD-style setpgrp which takes arguments,
16371 setpgrp(1, 1) will fail with ESRCH and return -1, in that case
16372 exit successfully. */
b4e70030 16373 exit (setpgrp (1,1) == -1 ? 0 : 1);
bec39cab
AC
16374 ;
16375 return 0;
16376}
16377_ACEOF
a3828db0
MK
16378rm -f conftest$ac_exeext
16379if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16380 (eval $ac_link) 2>&5
bec39cab
AC
16381 ac_status=$?
16382 echo "$as_me:$LINENO: \$? = $ac_status" >&5
a3828db0 16383 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
bec39cab
AC
16384 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16385 (eval $ac_try) 2>&5
16386 ac_status=$?
16387 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16388 (exit $ac_status); }; }; then
a3828db0 16389 ac_cv_func_setpgrp_void=no
c906108c 16390else
a3828db0
MK
16391 echo "$as_me: program exited with status $ac_status" >&5
16392echo "$as_me: failed program was:" >&5
bec39cab
AC
16393sed 's/^/| /' conftest.$ac_ext >&5
16394
a3828db0
MK
16395( exit $ac_status )
16396ac_cv_func_setpgrp_void=yes
c906108c 16397fi
b4e70030 16398rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
97bf5e38 16399fi
a3828db0 16400fi
b4e70030
JB
16401echo "$as_me:$LINENO: result: $ac_cv_func_setpgrp_void" >&5
16402echo "${ECHO_T}$ac_cv_func_setpgrp_void" >&6
a3828db0
MK
16403if test $ac_cv_func_setpgrp_void = yes; then
16404
16405cat >>confdefs.h <<\_ACEOF
16406#define SETPGRP_VOID 1
bec39cab 16407_ACEOF
97bf5e38
MK
16408
16409fi
a3828db0
MK
16410
16411else
b4e70030
JB
16412 echo "$as_me:$LINENO: checking whether setpgrp takes no argument" >&5
16413echo $ECHO_N "checking whether setpgrp takes no argument... $ECHO_C" >&6
a3828db0 16414if test "${ac_cv_func_setpgrp_void+set}" = set; then
bec39cab 16415 echo $ECHO_N "(cached) $ECHO_C" >&6
97bf5e38 16416else
bec39cab
AC
16417 cat >conftest.$ac_ext <<_ACEOF
16418/* confdefs.h. */
16419_ACEOF
16420cat confdefs.h >>conftest.$ac_ext
16421cat >>conftest.$ac_ext <<_ACEOF
16422/* end confdefs.h. */
a3828db0
MK
16423
16424#include <unistd.h>
16425
bec39cab
AC
16426int
16427main ()
16428{
a3828db0
MK
16429
16430 if (setpgrp(1,1) == -1)
16431 exit (0);
16432 else
16433 exit (1);
16434
bec39cab
AC
16435 ;
16436 return 0;
16437}
16438_ACEOF
16439rm -f conftest.$ac_objext
16440if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16441 (eval $ac_compile) 2>conftest.er1
16442 ac_status=$?
16443 grep -v '^ *+' conftest.er1 >conftest.err
16444 rm -f conftest.er1
16445 cat conftest.err >&5
16446 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16447 (exit $ac_status); } &&
b4e70030
JB
16448 { ac_try='test -z "$ac_c_werror_flag"
16449 || test ! -s conftest.err'
bec39cab
AC
16450 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16451 (eval $ac_try) 2>&5
16452 ac_status=$?
16453 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16454 (exit $ac_status); }; } &&
16455 { ac_try='test -s conftest.$ac_objext'
16456 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16457 (eval $ac_try) 2>&5
16458 ac_status=$?
16459 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16460 (exit $ac_status); }; }; then
a3828db0 16461 ac_cv_func_setpgrp_void=no
c906108c 16462else
bec39cab
AC
16463 echo "$as_me: failed program was:" >&5
16464sed 's/^/| /' conftest.$ac_ext >&5
16465
b4e70030 16466ac_cv_func_setpgrp_void=yes
c906108c 16467fi
bec39cab 16468rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c 16469fi
b4e70030
JB
16470echo "$as_me:$LINENO: result: $ac_cv_func_setpgrp_void" >&5
16471echo "${ECHO_T}$ac_cv_func_setpgrp_void" >&6
a3828db0 16472if test $ac_cv_func_setpgrp_void = yes; then
bec39cab 16473 cat >>confdefs.h <<\_ACEOF
a3828db0 16474#define SETPGRP_VOID 1
bec39cab 16475_ACEOF
c3f6f71d 16476
a3828db0 16477fi
c906108c
SS
16478fi
16479
a3828db0
MK
16480# Check if sigsetjmp is available. Using AC_CHECK_FUNCS won't do
16481# since sigsetjmp might only be defined as a macro.
b4e70030
JB
16482echo "$as_me:$LINENO: checking for sigsetjmp" >&5
16483echo $ECHO_N "checking for sigsetjmp... $ECHO_C" >&6
a3828db0 16484if test "${gdb_cv_func_sigsetjmp+set}" = set; then
bec39cab
AC
16485 echo $ECHO_N "(cached) $ECHO_C" >&6
16486else
16487 cat >conftest.$ac_ext <<_ACEOF
16488/* confdefs.h. */
16489_ACEOF
16490cat confdefs.h >>conftest.$ac_ext
16491cat >>conftest.$ac_ext <<_ACEOF
16492/* end confdefs.h. */
a3828db0
MK
16493
16494#include <setjmp.h>
16495
bec39cab
AC
16496int
16497main ()
16498{
a3828db0 16499sigjmp_buf env; while (! sigsetjmp (env, 1)) siglongjmp (env, 1);
bec39cab
AC
16500 ;
16501 return 0;
16502}
16503_ACEOF
16504rm -f conftest.$ac_objext
16505if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16506 (eval $ac_compile) 2>conftest.er1
16507 ac_status=$?
16508 grep -v '^ *+' conftest.er1 >conftest.err
16509 rm -f conftest.er1
16510 cat conftest.err >&5
16511 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16512 (exit $ac_status); } &&
b4e70030
JB
16513 { ac_try='test -z "$ac_c_werror_flag"
16514 || test ! -s conftest.err'
bec39cab
AC
16515 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16516 (eval $ac_try) 2>&5
16517 ac_status=$?
16518 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16519 (exit $ac_status); }; } &&
16520 { ac_try='test -s conftest.$ac_objext'
16521 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16522 (eval $ac_try) 2>&5
16523 ac_status=$?
16524 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16525 (exit $ac_status); }; }; then
a3828db0 16526 gdb_cv_func_sigsetjmp=yes
c906108c 16527else
bec39cab
AC
16528 echo "$as_me: failed program was:" >&5
16529sed 's/^/| /' conftest.$ac_ext >&5
16530
b4e70030 16531gdb_cv_func_sigsetjmp=no
c906108c 16532fi
bec39cab 16533rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c 16534fi
b4e70030
JB
16535echo "$as_me:$LINENO: result: $gdb_cv_func_sigsetjmp" >&5
16536echo "${ECHO_T}$gdb_cv_func_sigsetjmp" >&6
a3828db0 16537if test $gdb_cv_func_sigsetjmp = yes; then
c906108c 16538
a3828db0
MK
16539cat >>confdefs.h <<\_ACEOF
16540#define HAVE_SIGSETJMP 1
bec39cab 16541_ACEOF
c906108c 16542
97bf5e38 16543fi
c906108c 16544
a3828db0
MK
16545# Assume we'll default to using the included libiberty regex.
16546gdb_use_included_regex=yes
16547
16548# However, if the system regex is GNU regex, then default to *not*
16549# using the included regex.
b4e70030
JB
16550echo "$as_me:$LINENO: checking for GNU regex" >&5
16551echo $ECHO_N "checking for GNU regex... $ECHO_C" >&6
a3828db0 16552if test "${gdb_cv_have_gnu_regex+set}" = set; then
bec39cab
AC
16553 echo $ECHO_N "(cached) $ECHO_C" >&6
16554else
16555 cat >conftest.$ac_ext <<_ACEOF
16556/* confdefs.h. */
16557_ACEOF
16558cat confdefs.h >>conftest.$ac_ext
16559cat >>conftest.$ac_ext <<_ACEOF
16560/* end confdefs.h. */
a3828db0 16561#include <gnu-versions.h>
bec39cab
AC
16562int
16563main ()
16564{
a3828db0
MK
16565#define REGEX_INTERFACE_VERSION 1
16566#if _GNU_REGEX_INTERFACE_VERSION != REGEX_INTERFACE_VERSION
16567# error "Version mismatch"
16568#endif
bec39cab
AC
16569 ;
16570 return 0;
16571}
16572_ACEOF
16573rm -f conftest.$ac_objext
16574if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16575 (eval $ac_compile) 2>conftest.er1
16576 ac_status=$?
16577 grep -v '^ *+' conftest.er1 >conftest.err
16578 rm -f conftest.er1
16579 cat conftest.err >&5
16580 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16581 (exit $ac_status); } &&
b4e70030
JB
16582 { ac_try='test -z "$ac_c_werror_flag"
16583 || test ! -s conftest.err'
bec39cab
AC
16584 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16585 (eval $ac_try) 2>&5
16586 ac_status=$?
16587 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16588 (exit $ac_status); }; } &&
16589 { ac_try='test -s conftest.$ac_objext'
16590 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16591 (eval $ac_try) 2>&5
16592 ac_status=$?
16593 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16594 (exit $ac_status); }; }; then
a3828db0 16595 gdb_cv_have_gnu_regex=yes
c906108c 16596else
bec39cab
AC
16597 echo "$as_me: failed program was:" >&5
16598sed 's/^/| /' conftest.$ac_ext >&5
16599
b4e70030 16600gdb_cv_have_gnu_regex=no
c906108c 16601fi
bec39cab 16602rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c 16603fi
b4e70030
JB
16604echo "$as_me:$LINENO: result: $gdb_cv_have_gnu_regex" >&5
16605echo "${ECHO_T}$gdb_cv_have_gnu_regex" >&6
a3828db0
MK
16606if test $gdb_cv_have_gnu_regex = yes; then
16607 gdb_use_included_regex=no
16608fi
c906108c 16609
a3828db0 16610
b4e70030 16611# Check whether --with-included-regex or --without-included-regex was given.
a3828db0 16612if test "${with_included_regex+set}" = set; then
b4e70030
JB
16613 withval="$with_included_regex"
16614 gdb_with_regex=$withval
a3828db0
MK
16615else
16616 gdb_with_regex=$gdb_use_included_regex
b4e70030 16617fi;
a3828db0
MK
16618if test "$gdb_with_regex" = yes; then
16619
16620cat >>confdefs.h <<\_ACEOF
16621#define USE_INCLUDED_REGEX 1
bec39cab 16622_ACEOF
c906108c 16623
97bf5e38 16624fi
c906108c 16625
5c45e068 16626# Check if <sys/proc.h> defines `struct thread' with a td_pcb member.
b4e70030
JB
16627echo "$as_me:$LINENO: checking for struct thread.td_pcb" >&5
16628echo $ECHO_N "checking for struct thread.td_pcb... $ECHO_C" >&6
5c45e068 16629if test "${ac_cv_member_struct_thread_td_pcb+set}" = set; then
bec39cab
AC
16630 echo $ECHO_N "(cached) $ECHO_C" >&6
16631else
16632 cat >conftest.$ac_ext <<_ACEOF
16633/* confdefs.h. */
16634_ACEOF
16635cat confdefs.h >>conftest.$ac_ext
16636cat >>conftest.$ac_ext <<_ACEOF
16637/* end confdefs.h. */
a3828db0
MK
16638#include <sys/param.h>
16639#include <sys/proc.h>
5c45e068
MK
16640
16641
bec39cab
AC
16642int
16643main ()
16644{
5c45e068
MK
16645static struct thread ac_aggr;
16646if (ac_aggr.td_pcb)
16647return 0;
bec39cab
AC
16648 ;
16649 return 0;
16650}
16651_ACEOF
16652rm -f conftest.$ac_objext
16653if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16654 (eval $ac_compile) 2>conftest.er1
16655 ac_status=$?
16656 grep -v '^ *+' conftest.er1 >conftest.err
16657 rm -f conftest.er1
16658 cat conftest.err >&5
16659 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16660 (exit $ac_status); } &&
b4e70030
JB
16661 { ac_try='test -z "$ac_c_werror_flag"
16662 || test ! -s conftest.err'
bec39cab
AC
16663 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16664 (eval $ac_try) 2>&5
16665 ac_status=$?
16666 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16667 (exit $ac_status); }; } &&
16668 { ac_try='test -s conftest.$ac_objext'
16669 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16670 (eval $ac_try) 2>&5
16671 ac_status=$?
16672 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16673 (exit $ac_status); }; }; then
5c45e068 16674 ac_cv_member_struct_thread_td_pcb=yes
c906108c 16675else
bec39cab
AC
16676 echo "$as_me: failed program was:" >&5
16677sed 's/^/| /' conftest.$ac_ext >&5
16678
b4e70030 16679cat >conftest.$ac_ext <<_ACEOF
5c45e068
MK
16680/* confdefs.h. */
16681_ACEOF
16682cat confdefs.h >>conftest.$ac_ext
16683cat >>conftest.$ac_ext <<_ACEOF
16684/* end confdefs.h. */
16685#include <sys/param.h>
16686#include <sys/proc.h>
16687
16688
16689int
16690main ()
16691{
16692static struct thread ac_aggr;
16693if (sizeof ac_aggr.td_pcb)
16694return 0;
16695 ;
16696 return 0;
16697}
16698_ACEOF
16699rm -f conftest.$ac_objext
16700if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16701 (eval $ac_compile) 2>conftest.er1
16702 ac_status=$?
16703 grep -v '^ *+' conftest.er1 >conftest.err
16704 rm -f conftest.er1
16705 cat conftest.err >&5
16706 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16707 (exit $ac_status); } &&
b4e70030
JB
16708 { ac_try='test -z "$ac_c_werror_flag"
16709 || test ! -s conftest.err'
5c45e068
MK
16710 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16711 (eval $ac_try) 2>&5
16712 ac_status=$?
16713 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16714 (exit $ac_status); }; } &&
16715 { ac_try='test -s conftest.$ac_objext'
16716 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16717 (eval $ac_try) 2>&5
16718 ac_status=$?
16719 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16720 (exit $ac_status); }; }; then
16721 ac_cv_member_struct_thread_td_pcb=yes
16722else
16723 echo "$as_me: failed program was:" >&5
16724sed 's/^/| /' conftest.$ac_ext >&5
16725
b4e70030 16726ac_cv_member_struct_thread_td_pcb=no
5c45e068
MK
16727fi
16728rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c 16729fi
bec39cab 16730rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c 16731fi
b4e70030
JB
16732echo "$as_me:$LINENO: result: $ac_cv_member_struct_thread_td_pcb" >&5
16733echo "${ECHO_T}$ac_cv_member_struct_thread_td_pcb" >&6
5c45e068 16734if test $ac_cv_member_struct_thread_td_pcb = yes; then
c906108c 16735
5c45e068 16736cat >>confdefs.h <<_ACEOF
a3828db0 16737#define HAVE_STRUCT_THREAD_TD_PCB 1
bec39cab 16738_ACEOF
c906108c 16739
5c45e068 16740
97bf5e38 16741fi
c906108c 16742
5c45e068 16743
a3828db0 16744# See if <sys/lwp.h> defines `struct lwp`.
b4e70030
JB
16745echo "$as_me:$LINENO: checking for struct lwp" >&5
16746echo $ECHO_N "checking for struct lwp... $ECHO_C" >&6
a3828db0 16747if test "${gdb_cv_struct_lwp+set}" = set; then
bec39cab
AC
16748 echo $ECHO_N "(cached) $ECHO_C" >&6
16749else
16750 cat >conftest.$ac_ext <<_ACEOF
16751/* confdefs.h. */
16752_ACEOF
16753cat confdefs.h >>conftest.$ac_ext
16754cat >>conftest.$ac_ext <<_ACEOF
16755/* end confdefs.h. */
a3828db0
MK
16756#include <sys/param.h>
16757#include <sys/lwp.h>
bec39cab
AC
16758int
16759main ()
16760{
a3828db0 16761struct lwp l;
bec39cab
AC
16762 ;
16763 return 0;
16764}
16765_ACEOF
16766rm -f conftest.$ac_objext
16767if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16768 (eval $ac_compile) 2>conftest.er1
16769 ac_status=$?
16770 grep -v '^ *+' conftest.er1 >conftest.err
16771 rm -f conftest.er1
16772 cat conftest.err >&5
16773 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16774 (exit $ac_status); } &&
b4e70030
JB
16775 { ac_try='test -z "$ac_c_werror_flag"
16776 || test ! -s conftest.err'
bec39cab
AC
16777 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16778 (eval $ac_try) 2>&5
16779 ac_status=$?
16780 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16781 (exit $ac_status); }; } &&
16782 { ac_try='test -s conftest.$ac_objext'
16783 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16784 (eval $ac_try) 2>&5
16785 ac_status=$?
16786 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16787 (exit $ac_status); }; }; then
a3828db0 16788 gdb_cv_struct_lwp=yes
c906108c 16789else
bec39cab
AC
16790 echo "$as_me: failed program was:" >&5
16791sed 's/^/| /' conftest.$ac_ext >&5
16792
b4e70030 16793gdb_cv_struct_lwp=no
c906108c 16794fi
bec39cab 16795rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c 16796fi
b4e70030
JB
16797echo "$as_me:$LINENO: result: $gdb_cv_struct_lwp" >&5
16798echo "${ECHO_T}$gdb_cv_struct_lwp" >&6
a3828db0 16799if test $gdb_cv_struct_lwp = yes; then
c906108c 16800
a3828db0
MK
16801cat >>confdefs.h <<\_ACEOF
16802#define HAVE_STRUCT_LWP 1
bec39cab 16803_ACEOF
c906108c 16804
97bf5e38 16805fi
c906108c 16806
a3828db0 16807# See if <machine/reg.h> degines `struct reg'.
b4e70030
JB
16808echo "$as_me:$LINENO: checking for struct reg in machine/reg.h" >&5
16809echo $ECHO_N "checking for struct reg in machine/reg.h... $ECHO_C" >&6
a3828db0 16810if test "${gdb_cv_struct_reg+set}" = set; then
bec39cab
AC
16811 echo $ECHO_N "(cached) $ECHO_C" >&6
16812else
16813 cat >conftest.$ac_ext <<_ACEOF
16814/* confdefs.h. */
16815_ACEOF
16816cat confdefs.h >>conftest.$ac_ext
16817cat >>conftest.$ac_ext <<_ACEOF
16818/* end confdefs.h. */
a3828db0
MK
16819#include <sys/types.h>
16820#include <machine/reg.h>
bec39cab
AC
16821int
16822main ()
16823{
a3828db0 16824struct reg r;
bec39cab
AC
16825 ;
16826 return 0;
16827}
16828_ACEOF
16829rm -f conftest.$ac_objext
16830if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16831 (eval $ac_compile) 2>conftest.er1
16832 ac_status=$?
16833 grep -v '^ *+' conftest.er1 >conftest.err
16834 rm -f conftest.er1
16835 cat conftest.err >&5
16836 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16837 (exit $ac_status); } &&
b4e70030
JB
16838 { ac_try='test -z "$ac_c_werror_flag"
16839 || test ! -s conftest.err'
bec39cab
AC
16840 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16841 (eval $ac_try) 2>&5
16842 ac_status=$?
16843 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16844 (exit $ac_status); }; } &&
16845 { ac_try='test -s conftest.$ac_objext'
16846 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16847 (eval $ac_try) 2>&5
16848 ac_status=$?
16849 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16850 (exit $ac_status); }; }; then
a3828db0 16851 gdb_cv_struct_reg=yes
27ca5dad 16852else
bec39cab
AC
16853 echo "$as_me: failed program was:" >&5
16854sed 's/^/| /' conftest.$ac_ext >&5
16855
b4e70030 16856gdb_cv_struct_reg=no
27ca5dad 16857fi
bec39cab 16858rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
27ca5dad 16859fi
b4e70030
JB
16860echo "$as_me:$LINENO: result: $gdb_cv_struct_reg" >&5
16861echo "${ECHO_T}$gdb_cv_struct_reg" >&6
a3828db0 16862if test $gdb_cv_struct_reg = yes; then
bec39cab
AC
16863
16864cat >>confdefs.h <<\_ACEOF
a3828db0 16865#define HAVE_STRUCT_REG 1
bec39cab 16866_ACEOF
27ca5dad
MC
16867
16868fi
97bf5e38 16869
a3828db0
MK
16870# See if <machine/reg.h> supports the %fs and %gs i386 segment registers.
16871# Older i386 BSD's don't have the r_fs and r_gs members of `struct reg'.
b4e70030
JB
16872echo "$as_me:$LINENO: checking for struct reg.r_fs" >&5
16873echo $ECHO_N "checking for struct reg.r_fs... $ECHO_C" >&6
5c45e068 16874if test "${ac_cv_member_struct_reg_r_fs+set}" = set; then
bec39cab 16875 echo $ECHO_N "(cached) $ECHO_C" >&6
3862412b 16876else
bec39cab
AC
16877 cat >conftest.$ac_ext <<_ACEOF
16878/* confdefs.h. */
16879_ACEOF
16880cat confdefs.h >>conftest.$ac_ext
16881cat >>conftest.$ac_ext <<_ACEOF
16882/* end confdefs.h. */
a3828db0 16883#include <machine/reg.h>
5c45e068
MK
16884
16885int
16886main ()
16887{
16888static struct reg ac_aggr;
16889if (ac_aggr.r_fs)
16890return 0;
16891 ;
16892 return 0;
16893}
16894_ACEOF
16895rm -f conftest.$ac_objext
16896if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16897 (eval $ac_compile) 2>conftest.er1
16898 ac_status=$?
16899 grep -v '^ *+' conftest.er1 >conftest.err
16900 rm -f conftest.er1
16901 cat conftest.err >&5
16902 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16903 (exit $ac_status); } &&
b4e70030
JB
16904 { ac_try='test -z "$ac_c_werror_flag"
16905 || test ! -s conftest.err'
5c45e068
MK
16906 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16907 (eval $ac_try) 2>&5
16908 ac_status=$?
16909 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16910 (exit $ac_status); }; } &&
16911 { ac_try='test -s conftest.$ac_objext'
16912 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16913 (eval $ac_try) 2>&5
16914 ac_status=$?
16915 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16916 (exit $ac_status); }; }; then
16917 ac_cv_member_struct_reg_r_fs=yes
16918else
16919 echo "$as_me: failed program was:" >&5
16920sed 's/^/| /' conftest.$ac_ext >&5
16921
b4e70030 16922cat >conftest.$ac_ext <<_ACEOF
5c45e068
MK
16923/* confdefs.h. */
16924_ACEOF
16925cat confdefs.h >>conftest.$ac_ext
16926cat >>conftest.$ac_ext <<_ACEOF
16927/* end confdefs.h. */
16928#include <machine/reg.h>
16929
bec39cab
AC
16930int
16931main ()
16932{
5c45e068
MK
16933static struct reg ac_aggr;
16934if (sizeof ac_aggr.r_fs)
16935return 0;
bec39cab
AC
16936 ;
16937 return 0;
16938}
16939_ACEOF
16940rm -f conftest.$ac_objext
16941if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16942 (eval $ac_compile) 2>conftest.er1
16943 ac_status=$?
16944 grep -v '^ *+' conftest.er1 >conftest.err
16945 rm -f conftest.er1
16946 cat conftest.err >&5
16947 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16948 (exit $ac_status); } &&
b4e70030
JB
16949 { ac_try='test -z "$ac_c_werror_flag"
16950 || test ! -s conftest.err'
bec39cab
AC
16951 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16952 (eval $ac_try) 2>&5
16953 ac_status=$?
16954 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16955 (exit $ac_status); }; } &&
16956 { ac_try='test -s conftest.$ac_objext'
16957 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16958 (eval $ac_try) 2>&5
16959 ac_status=$?
16960 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16961 (exit $ac_status); }; }; then
5c45e068 16962 ac_cv_member_struct_reg_r_fs=yes
3862412b 16963else
bec39cab
AC
16964 echo "$as_me: failed program was:" >&5
16965sed 's/^/| /' conftest.$ac_ext >&5
16966
b4e70030 16967ac_cv_member_struct_reg_r_fs=no
3862412b 16968fi
bec39cab 16969rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
3862412b 16970fi
5c45e068
MK
16971rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
16972fi
b4e70030
JB
16973echo "$as_me:$LINENO: result: $ac_cv_member_struct_reg_r_fs" >&5
16974echo "${ECHO_T}$ac_cv_member_struct_reg_r_fs" >&6
5c45e068
MK
16975if test $ac_cv_member_struct_reg_r_fs = yes; then
16976
16977cat >>confdefs.h <<_ACEOF
a3828db0 16978#define HAVE_STRUCT_REG_R_FS 1
bec39cab 16979_ACEOF
3862412b 16980
5c45e068 16981
97bf5e38 16982fi
b4e70030
JB
16983echo "$as_me:$LINENO: checking for struct reg.r_gs" >&5
16984echo $ECHO_N "checking for struct reg.r_gs... $ECHO_C" >&6
5c45e068 16985if test "${ac_cv_member_struct_reg_r_gs+set}" = set; then
bec39cab 16986 echo $ECHO_N "(cached) $ECHO_C" >&6
3862412b 16987else
bec39cab
AC
16988 cat >conftest.$ac_ext <<_ACEOF
16989/* confdefs.h. */
16990_ACEOF
16991cat confdefs.h >>conftest.$ac_ext
16992cat >>conftest.$ac_ext <<_ACEOF
16993/* end confdefs.h. */
a3828db0 16994#include <machine/reg.h>
5c45e068 16995
bec39cab
AC
16996int
16997main ()
16998{
5c45e068
MK
16999static struct reg ac_aggr;
17000if (ac_aggr.r_gs)
17001return 0;
bec39cab
AC
17002 ;
17003 return 0;
17004}
17005_ACEOF
17006rm -f conftest.$ac_objext
17007if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17008 (eval $ac_compile) 2>conftest.er1
17009 ac_status=$?
17010 grep -v '^ *+' conftest.er1 >conftest.err
17011 rm -f conftest.er1
17012 cat conftest.err >&5
17013 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17014 (exit $ac_status); } &&
b4e70030
JB
17015 { ac_try='test -z "$ac_c_werror_flag"
17016 || test ! -s conftest.err'
bec39cab
AC
17017 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17018 (eval $ac_try) 2>&5
17019 ac_status=$?
17020 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17021 (exit $ac_status); }; } &&
17022 { ac_try='test -s conftest.$ac_objext'
17023 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17024 (eval $ac_try) 2>&5
17025 ac_status=$?
17026 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17027 (exit $ac_status); }; }; then
5c45e068 17028 ac_cv_member_struct_reg_r_gs=yes
3862412b 17029else
bec39cab
AC
17030 echo "$as_me: failed program was:" >&5
17031sed 's/^/| /' conftest.$ac_ext >&5
17032
b4e70030 17033cat >conftest.$ac_ext <<_ACEOF
5c45e068
MK
17034/* confdefs.h. */
17035_ACEOF
17036cat confdefs.h >>conftest.$ac_ext
17037cat >>conftest.$ac_ext <<_ACEOF
17038/* end confdefs.h. */
17039#include <machine/reg.h>
17040
17041int
17042main ()
17043{
17044static struct reg ac_aggr;
17045if (sizeof ac_aggr.r_gs)
17046return 0;
17047 ;
17048 return 0;
17049}
17050_ACEOF
17051rm -f conftest.$ac_objext
17052if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17053 (eval $ac_compile) 2>conftest.er1
17054 ac_status=$?
17055 grep -v '^ *+' conftest.er1 >conftest.err
17056 rm -f conftest.er1
17057 cat conftest.err >&5
17058 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17059 (exit $ac_status); } &&
b4e70030
JB
17060 { ac_try='test -z "$ac_c_werror_flag"
17061 || test ! -s conftest.err'
5c45e068
MK
17062 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17063 (eval $ac_try) 2>&5
17064 ac_status=$?
17065 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17066 (exit $ac_status); }; } &&
17067 { ac_try='test -s conftest.$ac_objext'
17068 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17069 (eval $ac_try) 2>&5
17070 ac_status=$?
17071 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17072 (exit $ac_status); }; }; then
17073 ac_cv_member_struct_reg_r_gs=yes
17074else
17075 echo "$as_me: failed program was:" >&5
17076sed 's/^/| /' conftest.$ac_ext >&5
17077
b4e70030 17078ac_cv_member_struct_reg_r_gs=no
3862412b 17079fi
bec39cab 17080rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
3862412b 17081fi
5c45e068
MK
17082rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
17083fi
b4e70030
JB
17084echo "$as_me:$LINENO: result: $ac_cv_member_struct_reg_r_gs" >&5
17085echo "${ECHO_T}$ac_cv_member_struct_reg_r_gs" >&6
5c45e068
MK
17086if test $ac_cv_member_struct_reg_r_gs = yes; then
17087
17088cat >>confdefs.h <<_ACEOF
a3828db0 17089#define HAVE_STRUCT_REG_R_GS 1
bec39cab 17090_ACEOF
3862412b 17091
5c45e068 17092
97bf5e38 17093fi
3862412b 17094
5c45e068 17095
a3828db0 17096# See if <sys/ptrace.h> provides the PTRACE_GETREGS request.
b4e70030
JB
17097echo "$as_me:$LINENO: checking for PTRACE_GETREGS" >&5
17098echo $ECHO_N "checking for PTRACE_GETREGS... $ECHO_C" >&6
a3828db0 17099if test "${gdb_cv_have_ptrace_getregs+set}" = set; then
bec39cab 17100 echo $ECHO_N "(cached) $ECHO_C" >&6
451928c5 17101else
bec39cab
AC
17102 cat >conftest.$ac_ext <<_ACEOF
17103/* confdefs.h. */
17104_ACEOF
17105cat confdefs.h >>conftest.$ac_ext
17106cat >>conftest.$ac_ext <<_ACEOF
17107/* end confdefs.h. */
a3828db0 17108#include <sys/ptrace.h>
bec39cab
AC
17109int
17110main ()
17111{
a3828db0 17112PTRACE_GETREGS;
bec39cab
AC
17113 ;
17114 return 0;
17115}
17116_ACEOF
17117rm -f conftest.$ac_objext
17118if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17119 (eval $ac_compile) 2>conftest.er1
17120 ac_status=$?
17121 grep -v '^ *+' conftest.er1 >conftest.err
17122 rm -f conftest.er1
17123 cat conftest.err >&5
17124 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17125 (exit $ac_status); } &&
b4e70030
JB
17126 { ac_try='test -z "$ac_c_werror_flag"
17127 || test ! -s conftest.err'
bec39cab
AC
17128 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17129 (eval $ac_try) 2>&5
17130 ac_status=$?
17131 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17132 (exit $ac_status); }; } &&
17133 { ac_try='test -s conftest.$ac_objext'
17134 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17135 (eval $ac_try) 2>&5
17136 ac_status=$?
17137 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17138 (exit $ac_status); }; }; then
a3828db0 17139 gdb_cv_have_ptrace_getregs=yes
451928c5 17140else
bec39cab
AC
17141 echo "$as_me: failed program was:" >&5
17142sed 's/^/| /' conftest.$ac_ext >&5
17143
b4e70030 17144gdb_cv_have_ptrace_getregs=no
451928c5 17145fi
bec39cab 17146rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
451928c5
AC
17147fi
17148
b4e70030
JB
17149echo "$as_me:$LINENO: result: $gdb_cv_have_ptrace_getregs" >&5
17150echo "${ECHO_T}$gdb_cv_have_ptrace_getregs" >&6
a3828db0 17151if test $gdb_cv_have_ptrace_getregs = yes; then
60ca704f
SE
17152
17153cat >>confdefs.h <<\_ACEOF
a3828db0 17154#define HAVE_PTRACE_GETREGS 1
bec39cab 17155_ACEOF
451928c5 17156
97bf5e38 17157fi
451928c5 17158
a3828db0 17159# See if <sys/ptrace.h> provides the PTRACE_GETFPXREGS request.
b4e70030
JB
17160echo "$as_me:$LINENO: checking for PTRACE_GETFPXREGS" >&5
17161echo $ECHO_N "checking for PTRACE_GETFPXREGS... $ECHO_C" >&6
a3828db0 17162if test "${gdb_cv_have_ptrace_getfpxregs+set}" = set; then
bec39cab 17163 echo $ECHO_N "(cached) $ECHO_C" >&6
451928c5 17164else
bec39cab
AC
17165 cat >conftest.$ac_ext <<_ACEOF
17166/* confdefs.h. */
17167_ACEOF
17168cat confdefs.h >>conftest.$ac_ext
17169cat >>conftest.$ac_ext <<_ACEOF
17170/* end confdefs.h. */
a3828db0 17171#include <sys/ptrace.h>
bec39cab
AC
17172int
17173main ()
17174{
a3828db0 17175PTRACE_GETFPXREGS;
bec39cab
AC
17176 ;
17177 return 0;
17178}
17179_ACEOF
17180rm -f conftest.$ac_objext
17181if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17182 (eval $ac_compile) 2>conftest.er1
17183 ac_status=$?
17184 grep -v '^ *+' conftest.er1 >conftest.err
17185 rm -f conftest.er1
17186 cat conftest.err >&5
17187 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17188 (exit $ac_status); } &&
b4e70030
JB
17189 { ac_try='test -z "$ac_c_werror_flag"
17190 || test ! -s conftest.err'
bec39cab
AC
17191 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17192 (eval $ac_try) 2>&5
17193 ac_status=$?
17194 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17195 (exit $ac_status); }; } &&
17196 { ac_try='test -s conftest.$ac_objext'
17197 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17198 (eval $ac_try) 2>&5
17199 ac_status=$?
17200 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17201 (exit $ac_status); }; }; then
a3828db0 17202 gdb_cv_have_ptrace_getfpxregs=yes
451928c5 17203else
bec39cab
AC
17204 echo "$as_me: failed program was:" >&5
17205sed 's/^/| /' conftest.$ac_ext >&5
17206
b4e70030 17207gdb_cv_have_ptrace_getfpxregs=no
451928c5 17208fi
bec39cab 17209rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
451928c5
AC
17210fi
17211
b4e70030
JB
17212echo "$as_me:$LINENO: result: $gdb_cv_have_ptrace_getfpxregs" >&5
17213echo "${ECHO_T}$gdb_cv_have_ptrace_getfpxregs" >&6
a3828db0 17214if test $gdb_cv_have_ptrace_getfpxregs = yes; then
60ca704f
SE
17215
17216cat >>confdefs.h <<\_ACEOF
a3828db0 17217#define HAVE_PTRACE_GETFPXREGS 1
bec39cab 17218_ACEOF
451928c5 17219
97bf5e38 17220fi
451928c5 17221
a3828db0 17222# See if <sys/ptrace.h> provides the PT_GETDBREGS request.
b4e70030
JB
17223echo "$as_me:$LINENO: checking for PT_GETDBREGS" >&5
17224echo $ECHO_N "checking for PT_GETDBREGS... $ECHO_C" >&6
a3828db0 17225if test "${gdb_cv_have_pt_getdbregs+set}" = set; then
bec39cab 17226 echo $ECHO_N "(cached) $ECHO_C" >&6
3862412b 17227else
bec39cab
AC
17228 cat >conftest.$ac_ext <<_ACEOF
17229/* confdefs.h. */
17230_ACEOF
17231cat confdefs.h >>conftest.$ac_ext
17232cat >>conftest.$ac_ext <<_ACEOF
17233/* end confdefs.h. */
a3828db0
MK
17234#include <sys/types.h>
17235#include <sys/ptrace.h>
bec39cab
AC
17236int
17237main ()
17238{
a3828db0 17239PT_GETDBREGS;
bec39cab
AC
17240 ;
17241 return 0;
17242}
17243_ACEOF
17244rm -f conftest.$ac_objext
17245if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17246 (eval $ac_compile) 2>conftest.er1
17247 ac_status=$?
17248 grep -v '^ *+' conftest.er1 >conftest.err
17249 rm -f conftest.er1
17250 cat conftest.err >&5
17251 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17252 (exit $ac_status); } &&
b4e70030
JB
17253 { ac_try='test -z "$ac_c_werror_flag"
17254 || test ! -s conftest.err'
bec39cab
AC
17255 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17256 (eval $ac_try) 2>&5
17257 ac_status=$?
17258 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17259 (exit $ac_status); }; } &&
17260 { ac_try='test -s conftest.$ac_objext'
17261 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17262 (eval $ac_try) 2>&5
17263 ac_status=$?
17264 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17265 (exit $ac_status); }; }; then
a3828db0 17266 gdb_cv_have_pt_getdbregs=yes
3862412b 17267else
bec39cab
AC
17268 echo "$as_me: failed program was:" >&5
17269sed 's/^/| /' conftest.$ac_ext >&5
17270
b4e70030 17271gdb_cv_have_pt_getdbregs=no
3862412b 17272fi
bec39cab 17273rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
3862412b
MK
17274fi
17275
b4e70030
JB
17276echo "$as_me:$LINENO: result: $gdb_cv_have_pt_getdbregs" >&5
17277echo "${ECHO_T}$gdb_cv_have_pt_getdbregs" >&6
a3828db0 17278if test $gdb_cv_have_pt_getdbregs = yes; then
60ca704f
SE
17279
17280cat >>confdefs.h <<\_ACEOF
a3828db0 17281#define HAVE_PT_GETDBREGS 1
bec39cab 17282_ACEOF
3862412b 17283
97bf5e38 17284fi
3862412b 17285
a3828db0 17286# See if <sys/ptrace.h> provides the PT_GETXMMREGS request.
b4e70030
JB
17287echo "$as_me:$LINENO: checking for PT_GETXMMREGS" >&5
17288echo $ECHO_N "checking for PT_GETXMMREGS... $ECHO_C" >&6
a3828db0 17289if test "${gdb_cv_have_pt_getxmmregs+set}" = set; then
bec39cab 17290 echo $ECHO_N "(cached) $ECHO_C" >&6
3862412b 17291else
bec39cab
AC
17292 cat >conftest.$ac_ext <<_ACEOF
17293/* confdefs.h. */
17294_ACEOF
17295cat confdefs.h >>conftest.$ac_ext
17296cat >>conftest.$ac_ext <<_ACEOF
17297/* end confdefs.h. */
a3828db0
MK
17298#include <sys/types.h>
17299#include <sys/ptrace.h>
bec39cab
AC
17300int
17301main ()
17302{
a3828db0 17303PT_GETXMMREGS;
bec39cab
AC
17304 ;
17305 return 0;
17306}
17307_ACEOF
17308rm -f conftest.$ac_objext
17309if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17310 (eval $ac_compile) 2>conftest.er1
17311 ac_status=$?
17312 grep -v '^ *+' conftest.er1 >conftest.err
17313 rm -f conftest.er1
17314 cat conftest.err >&5
17315 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17316 (exit $ac_status); } &&
b4e70030
JB
17317 { ac_try='test -z "$ac_c_werror_flag"
17318 || test ! -s conftest.err'
bec39cab
AC
17319 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17320 (eval $ac_try) 2>&5
17321 ac_status=$?
17322 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17323 (exit $ac_status); }; } &&
17324 { ac_try='test -s conftest.$ac_objext'
17325 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17326 (eval $ac_try) 2>&5
17327 ac_status=$?
17328 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17329 (exit $ac_status); }; }; then
a3828db0 17330 gdb_cv_have_pt_getxmmregs=yes
3862412b 17331else
bec39cab
AC
17332 echo "$as_me: failed program was:" >&5
17333sed 's/^/| /' conftest.$ac_ext >&5
17334
b4e70030 17335gdb_cv_have_pt_getxmmregs=no
3862412b 17336fi
bec39cab 17337rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
3862412b
MK
17338fi
17339
b4e70030
JB
17340echo "$as_me:$LINENO: result: $gdb_cv_have_pt_getxmmregs" >&5
17341echo "${ECHO_T}$gdb_cv_have_pt_getxmmregs" >&6
a3828db0 17342if test $gdb_cv_have_pt_getxmmregs = yes; then
60ca704f
SE
17343
17344cat >>confdefs.h <<\_ACEOF
a3828db0 17345#define HAVE_PT_GETXMMREGS 1
bec39cab 17346_ACEOF
3862412b 17347
97bf5e38 17348fi
3862412b 17349
eb368090 17350# Detect which type of /proc is in use, such as for Unixware or Solaris.
97bf5e38
MK
17351
17352if test "${target}" = "${host}"; then
17353 case "${host}" in
97bf5e38 17354 *-*-unixware* | *-*-sysv4.2* | *-*-sysv5* | *-*-interix* )
60ca704f
SE
17355
17356cat >>confdefs.h <<\_ACEOF
97bf5e38 17357#define NEW_PROC_API 1
bec39cab 17358_ACEOF
97bf5e38
MK
17359
17360 ;;
c162e8c9 17361 *-*-solaris2.[6789] | *-*-solaris2.1[0-9]*)
60ca704f
SE
17362
17363cat >>confdefs.h <<\_ACEOF
97bf5e38 17364#define NEW_PROC_API 1
bec39cab 17365_ACEOF
c960c18f
AC
17366
17367 ;;
17368 mips-sgi-irix5*)
17369 # Work around <sys/proc.h> needing _KMEMUSER problem on IRIX 5.
60ca704f
SE
17370
17371cat >>confdefs.h <<\_ACEOF
c960c18f 17372#define _KMEMUSER 1
bec39cab 17373_ACEOF
97bf5e38
MK
17374
17375 ;;
17376 esac
17377fi
17378
17379if test "$ac_cv_header_sys_procfs_h" = yes; then
b4e70030
JB
17380 echo "$as_me:$LINENO: checking for pstatus_t in sys/procfs.h" >&5
17381echo $ECHO_N "checking for pstatus_t in sys/procfs.h... $ECHO_C" >&6
bec39cab
AC
17382 if test "${bfd_cv_have_sys_procfs_type_pstatus_t+set}" = set; then
17383 echo $ECHO_N "(cached) $ECHO_C" >&6
17384else
17385 cat >conftest.$ac_ext <<_ACEOF
17386/* confdefs.h. */
17387_ACEOF
17388cat confdefs.h >>conftest.$ac_ext
17389cat >>conftest.$ac_ext <<_ACEOF
17390/* end confdefs.h. */
596c9d4b
KB
17391
17392#define _SYSCALL32
17393#include <sys/procfs.h>
bec39cab
AC
17394int
17395main ()
17396{
97bf5e38 17397pstatus_t avar
bec39cab
AC
17398 ;
17399 return 0;
17400}
17401_ACEOF
17402rm -f conftest.$ac_objext
17403if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17404 (eval $ac_compile) 2>conftest.er1
17405 ac_status=$?
17406 grep -v '^ *+' conftest.er1 >conftest.err
17407 rm -f conftest.er1
17408 cat conftest.err >&5
17409 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17410 (exit $ac_status); } &&
b4e70030
JB
17411 { ac_try='test -z "$ac_c_werror_flag"
17412 || test ! -s conftest.err'
bec39cab
AC
17413 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17414 (eval $ac_try) 2>&5
17415 ac_status=$?
17416 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17417 (exit $ac_status); }; } &&
17418 { ac_try='test -s conftest.$ac_objext'
17419 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17420 (eval $ac_try) 2>&5
17421 ac_status=$?
17422 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17423 (exit $ac_status); }; }; then
97bf5e38 17424 bfd_cv_have_sys_procfs_type_pstatus_t=yes
596c9d4b 17425else
bec39cab
AC
17426 echo "$as_me: failed program was:" >&5
17427sed 's/^/| /' conftest.$ac_ext >&5
17428
b4e70030 17429bfd_cv_have_sys_procfs_type_pstatus_t=no
bec39cab 17430
596c9d4b 17431fi
bec39cab 17432rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
596c9d4b
KB
17433fi
17434
97bf5e38 17435 if test $bfd_cv_have_sys_procfs_type_pstatus_t = yes; then
bec39cab
AC
17436
17437cat >>confdefs.h <<\_ACEOF
97bf5e38 17438#define HAVE_PSTATUS_T 1
bec39cab 17439_ACEOF
596c9d4b
KB
17440
17441 fi
b4e70030
JB
17442 echo "$as_me:$LINENO: result: $bfd_cv_have_sys_procfs_type_pstatus_t" >&5
17443echo "${ECHO_T}$bfd_cv_have_sys_procfs_type_pstatus_t" >&6
596c9d4b 17444
b4e70030
JB
17445 echo "$as_me:$LINENO: checking for prrun_t in sys/procfs.h" >&5
17446echo $ECHO_N "checking for prrun_t in sys/procfs.h... $ECHO_C" >&6
bec39cab
AC
17447 if test "${bfd_cv_have_sys_procfs_type_prrun_t+set}" = set; then
17448 echo $ECHO_N "(cached) $ECHO_C" >&6
596c9d4b 17449else
bec39cab
AC
17450 cat >conftest.$ac_ext <<_ACEOF
17451/* confdefs.h. */
17452_ACEOF
17453cat confdefs.h >>conftest.$ac_ext
17454cat >>conftest.$ac_ext <<_ACEOF
17455/* end confdefs.h. */
596c9d4b
KB
17456
17457#define _SYSCALL32
17458#include <sys/procfs.h>
bec39cab
AC
17459int
17460main ()
17461{
97bf5e38 17462prrun_t avar
bec39cab
AC
17463 ;
17464 return 0;
17465}
17466_ACEOF
17467rm -f conftest.$ac_objext
17468if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17469 (eval $ac_compile) 2>conftest.er1
17470 ac_status=$?
17471 grep -v '^ *+' conftest.er1 >conftest.err
17472 rm -f conftest.er1
17473 cat conftest.err >&5
17474 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17475 (exit $ac_status); } &&
b4e70030
JB
17476 { ac_try='test -z "$ac_c_werror_flag"
17477 || test ! -s conftest.err'
bec39cab
AC
17478 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17479 (eval $ac_try) 2>&5
17480 ac_status=$?
17481 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17482 (exit $ac_status); }; } &&
17483 { ac_try='test -s conftest.$ac_objext'
17484 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17485 (eval $ac_try) 2>&5
17486 ac_status=$?
17487 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17488 (exit $ac_status); }; }; then
97bf5e38 17489 bfd_cv_have_sys_procfs_type_prrun_t=yes
596c9d4b 17490else
bec39cab
AC
17491 echo "$as_me: failed program was:" >&5
17492sed 's/^/| /' conftest.$ac_ext >&5
17493
b4e70030 17494bfd_cv_have_sys_procfs_type_prrun_t=no
bec39cab 17495
596c9d4b 17496fi
bec39cab 17497rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
596c9d4b
KB
17498fi
17499
97bf5e38 17500 if test $bfd_cv_have_sys_procfs_type_prrun_t = yes; then
bec39cab
AC
17501
17502cat >>confdefs.h <<\_ACEOF
97bf5e38 17503#define HAVE_PRRUN_T 1
bec39cab 17504_ACEOF
596c9d4b
KB
17505
17506 fi
b4e70030
JB
17507 echo "$as_me:$LINENO: result: $bfd_cv_have_sys_procfs_type_prrun_t" >&5
17508echo "${ECHO_T}$bfd_cv_have_sys_procfs_type_prrun_t" >&6
596c9d4b 17509
b4e70030
JB
17510 echo "$as_me:$LINENO: checking for gregset_t in sys/procfs.h" >&5
17511echo $ECHO_N "checking for gregset_t in sys/procfs.h... $ECHO_C" >&6
bec39cab
AC
17512 if test "${bfd_cv_have_sys_procfs_type_gregset_t+set}" = set; then
17513 echo $ECHO_N "(cached) $ECHO_C" >&6
596c9d4b 17514else
bec39cab
AC
17515 cat >conftest.$ac_ext <<_ACEOF
17516/* confdefs.h. */
17517_ACEOF
17518cat confdefs.h >>conftest.$ac_ext
17519cat >>conftest.$ac_ext <<_ACEOF
17520/* end confdefs.h. */
596c9d4b
KB
17521
17522#define _SYSCALL32
17523#include <sys/procfs.h>
bec39cab
AC
17524int
17525main ()
17526{
97bf5e38 17527gregset_t avar
bec39cab
AC
17528 ;
17529 return 0;
17530}
17531_ACEOF
17532rm -f conftest.$ac_objext
17533if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17534 (eval $ac_compile) 2>conftest.er1
17535 ac_status=$?
17536 grep -v '^ *+' conftest.er1 >conftest.err
17537 rm -f conftest.er1
17538 cat conftest.err >&5
17539 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17540 (exit $ac_status); } &&
b4e70030
JB
17541 { ac_try='test -z "$ac_c_werror_flag"
17542 || test ! -s conftest.err'
bec39cab
AC
17543 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17544 (eval $ac_try) 2>&5
17545 ac_status=$?
17546 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17547 (exit $ac_status); }; } &&
17548 { ac_try='test -s conftest.$ac_objext'
17549 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17550 (eval $ac_try) 2>&5
17551 ac_status=$?
17552 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17553 (exit $ac_status); }; }; then
97bf5e38 17554 bfd_cv_have_sys_procfs_type_gregset_t=yes
596c9d4b 17555else
bec39cab
AC
17556 echo "$as_me: failed program was:" >&5
17557sed 's/^/| /' conftest.$ac_ext >&5
17558
b4e70030 17559bfd_cv_have_sys_procfs_type_gregset_t=no
bec39cab 17560
596c9d4b 17561fi
bec39cab 17562rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
596c9d4b
KB
17563fi
17564
97bf5e38 17565 if test $bfd_cv_have_sys_procfs_type_gregset_t = yes; then
bec39cab
AC
17566
17567cat >>confdefs.h <<\_ACEOF
97bf5e38 17568#define HAVE_GREGSET_T 1
bec39cab 17569_ACEOF
596c9d4b
KB
17570
17571 fi
b4e70030
JB
17572 echo "$as_me:$LINENO: result: $bfd_cv_have_sys_procfs_type_gregset_t" >&5
17573echo "${ECHO_T}$bfd_cv_have_sys_procfs_type_gregset_t" >&6
451928c5 17574
b4e70030
JB
17575 echo "$as_me:$LINENO: checking for fpregset_t in sys/procfs.h" >&5
17576echo $ECHO_N "checking for fpregset_t in sys/procfs.h... $ECHO_C" >&6
bec39cab
AC
17577 if test "${bfd_cv_have_sys_procfs_type_fpregset_t+set}" = set; then
17578 echo $ECHO_N "(cached) $ECHO_C" >&6
d84dd0c5 17579else
bec39cab
AC
17580 cat >conftest.$ac_ext <<_ACEOF
17581/* confdefs.h. */
17582_ACEOF
17583cat confdefs.h >>conftest.$ac_ext
17584cat >>conftest.$ac_ext <<_ACEOF
17585/* end confdefs.h. */
97bf5e38
MK
17586
17587#define _SYSCALL32
d84dd0c5 17588#include <sys/procfs.h>
bec39cab
AC
17589int
17590main ()
17591{
97bf5e38 17592fpregset_t avar
bec39cab
AC
17593 ;
17594 return 0;
17595}
17596_ACEOF
17597rm -f conftest.$ac_objext
17598if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17599 (eval $ac_compile) 2>conftest.er1
17600 ac_status=$?
17601 grep -v '^ *+' conftest.er1 >conftest.err
17602 rm -f conftest.er1
17603 cat conftest.err >&5
17604 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17605 (exit $ac_status); } &&
b4e70030
JB
17606 { ac_try='test -z "$ac_c_werror_flag"
17607 || test ! -s conftest.err'
bec39cab
AC
17608 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17609 (eval $ac_try) 2>&5
17610 ac_status=$?
17611 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17612 (exit $ac_status); }; } &&
17613 { ac_try='test -s conftest.$ac_objext'
17614 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17615 (eval $ac_try) 2>&5
17616 ac_status=$?
17617 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17618 (exit $ac_status); }; }; then
97bf5e38 17619 bfd_cv_have_sys_procfs_type_fpregset_t=yes
d84dd0c5 17620else
bec39cab
AC
17621 echo "$as_me: failed program was:" >&5
17622sed 's/^/| /' conftest.$ac_ext >&5
17623
b4e70030 17624bfd_cv_have_sys_procfs_type_fpregset_t=no
bec39cab 17625
d84dd0c5 17626fi
bec39cab 17627rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
d84dd0c5
MK
17628fi
17629
97bf5e38 17630 if test $bfd_cv_have_sys_procfs_type_fpregset_t = yes; then
bec39cab
AC
17631
17632cat >>confdefs.h <<\_ACEOF
97bf5e38 17633#define HAVE_FPREGSET_T 1
bec39cab 17634_ACEOF
d84dd0c5 17635
97bf5e38 17636 fi
b4e70030
JB
17637 echo "$as_me:$LINENO: result: $bfd_cv_have_sys_procfs_type_fpregset_t" >&5
17638echo "${ECHO_T}$bfd_cv_have_sys_procfs_type_fpregset_t" >&6
d84dd0c5 17639
b4e70030
JB
17640 echo "$as_me:$LINENO: checking for prgregset_t in sys/procfs.h" >&5
17641echo $ECHO_N "checking for prgregset_t in sys/procfs.h... $ECHO_C" >&6
bec39cab
AC
17642 if test "${bfd_cv_have_sys_procfs_type_prgregset_t+set}" = set; then
17643 echo $ECHO_N "(cached) $ECHO_C" >&6
c906108c 17644else
bec39cab
AC
17645 cat >conftest.$ac_ext <<_ACEOF
17646/* confdefs.h. */
17647_ACEOF
17648cat confdefs.h >>conftest.$ac_ext
17649cat >>conftest.$ac_ext <<_ACEOF
17650/* end confdefs.h. */
c906108c 17651
97bf5e38
MK
17652#define _SYSCALL32
17653#include <sys/procfs.h>
bec39cab
AC
17654int
17655main ()
17656{
97bf5e38 17657prgregset_t avar
bec39cab
AC
17658 ;
17659 return 0;
17660}
17661_ACEOF
17662rm -f conftest.$ac_objext
17663if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17664 (eval $ac_compile) 2>conftest.er1
17665 ac_status=$?
17666 grep -v '^ *+' conftest.er1 >conftest.err
17667 rm -f conftest.er1
17668 cat conftest.err >&5
17669 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17670 (exit $ac_status); } &&
b4e70030
JB
17671 { ac_try='test -z "$ac_c_werror_flag"
17672 || test ! -s conftest.err'
bec39cab
AC
17673 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17674 (eval $ac_try) 2>&5
17675 ac_status=$?
17676 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17677 (exit $ac_status); }; } &&
17678 { ac_try='test -s conftest.$ac_objext'
17679 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17680 (eval $ac_try) 2>&5
17681 ac_status=$?
17682 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17683 (exit $ac_status); }; }; then
97bf5e38 17684 bfd_cv_have_sys_procfs_type_prgregset_t=yes
c906108c 17685else
bec39cab
AC
17686 echo "$as_me: failed program was:" >&5
17687sed 's/^/| /' conftest.$ac_ext >&5
17688
b4e70030 17689bfd_cv_have_sys_procfs_type_prgregset_t=no
bec39cab 17690
c906108c 17691fi
bec39cab 17692rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c
SS
17693fi
17694
97bf5e38 17695 if test $bfd_cv_have_sys_procfs_type_prgregset_t = yes; then
bec39cab
AC
17696
17697cat >>confdefs.h <<\_ACEOF
97bf5e38 17698#define HAVE_PRGREGSET_T 1
bec39cab 17699_ACEOF
c906108c 17700
97bf5e38 17701 fi
b4e70030
JB
17702 echo "$as_me:$LINENO: result: $bfd_cv_have_sys_procfs_type_prgregset_t" >&5
17703echo "${ECHO_T}$bfd_cv_have_sys_procfs_type_prgregset_t" >&6
c906108c 17704
b4e70030
JB
17705 echo "$as_me:$LINENO: checking for prfpregset_t in sys/procfs.h" >&5
17706echo $ECHO_N "checking for prfpregset_t in sys/procfs.h... $ECHO_C" >&6
bec39cab
AC
17707 if test "${bfd_cv_have_sys_procfs_type_prfpregset_t+set}" = set; then
17708 echo $ECHO_N "(cached) $ECHO_C" >&6
d45fe813 17709else
bec39cab
AC
17710 cat >conftest.$ac_ext <<_ACEOF
17711/* confdefs.h. */
17712_ACEOF
17713cat confdefs.h >>conftest.$ac_ext
17714cat >>conftest.$ac_ext <<_ACEOF
17715/* end confdefs.h. */
97bf5e38
MK
17716
17717#define _SYSCALL32
17718#include <sys/procfs.h>
bec39cab
AC
17719int
17720main ()
17721{
97bf5e38 17722prfpregset_t avar
bec39cab
AC
17723 ;
17724 return 0;
17725}
17726_ACEOF
17727rm -f conftest.$ac_objext
17728if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17729 (eval $ac_compile) 2>conftest.er1
17730 ac_status=$?
17731 grep -v '^ *+' conftest.er1 >conftest.err
17732 rm -f conftest.er1
17733 cat conftest.err >&5
17734 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17735 (exit $ac_status); } &&
b4e70030
JB
17736 { ac_try='test -z "$ac_c_werror_flag"
17737 || test ! -s conftest.err'
bec39cab
AC
17738 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17739 (eval $ac_try) 2>&5
17740 ac_status=$?
17741 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17742 (exit $ac_status); }; } &&
17743 { ac_try='test -s conftest.$ac_objext'
17744 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17745 (eval $ac_try) 2>&5
17746 ac_status=$?
17747 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17748 (exit $ac_status); }; }; then
97bf5e38 17749 bfd_cv_have_sys_procfs_type_prfpregset_t=yes
d45fe813 17750else
bec39cab
AC
17751 echo "$as_me: failed program was:" >&5
17752sed 's/^/| /' conftest.$ac_ext >&5
17753
b4e70030 17754bfd_cv_have_sys_procfs_type_prfpregset_t=no
bec39cab 17755
d45fe813 17756fi
bec39cab 17757rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
d45fe813
KB
17758fi
17759
97bf5e38 17760 if test $bfd_cv_have_sys_procfs_type_prfpregset_t = yes; then
bec39cab
AC
17761
17762cat >>confdefs.h <<\_ACEOF
97bf5e38 17763#define HAVE_PRFPREGSET_T 1
bec39cab 17764_ACEOF
d45fe813 17765
97bf5e38 17766 fi
b4e70030
JB
17767 echo "$as_me:$LINENO: result: $bfd_cv_have_sys_procfs_type_prfpregset_t" >&5
17768echo "${ECHO_T}$bfd_cv_have_sys_procfs_type_prfpregset_t" >&6
d45fe813 17769
b4e70030
JB
17770 echo "$as_me:$LINENO: checking for prgregset32_t in sys/procfs.h" >&5
17771echo $ECHO_N "checking for prgregset32_t in sys/procfs.h... $ECHO_C" >&6
bec39cab
AC
17772 if test "${bfd_cv_have_sys_procfs_type_prgregset32_t+set}" = set; then
17773 echo $ECHO_N "(cached) $ECHO_C" >&6
d45fe813 17774else
bec39cab
AC
17775 cat >conftest.$ac_ext <<_ACEOF
17776/* confdefs.h. */
17777_ACEOF
17778cat confdefs.h >>conftest.$ac_ext
17779cat >>conftest.$ac_ext <<_ACEOF
17780/* end confdefs.h. */
97bf5e38
MK
17781
17782#define _SYSCALL32
17783#include <sys/procfs.h>
bec39cab
AC
17784int
17785main ()
17786{
97bf5e38 17787prgregset32_t avar
bec39cab
AC
17788 ;
17789 return 0;
17790}
17791_ACEOF
17792rm -f conftest.$ac_objext
17793if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17794 (eval $ac_compile) 2>conftest.er1
17795 ac_status=$?
17796 grep -v '^ *+' conftest.er1 >conftest.err
17797 rm -f conftest.er1
17798 cat conftest.err >&5
17799 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17800 (exit $ac_status); } &&
b4e70030
JB
17801 { ac_try='test -z "$ac_c_werror_flag"
17802 || test ! -s conftest.err'
bec39cab
AC
17803 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17804 (eval $ac_try) 2>&5
17805 ac_status=$?
17806 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17807 (exit $ac_status); }; } &&
17808 { ac_try='test -s conftest.$ac_objext'
17809 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17810 (eval $ac_try) 2>&5
17811 ac_status=$?
17812 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17813 (exit $ac_status); }; }; then
97bf5e38 17814 bfd_cv_have_sys_procfs_type_prgregset32_t=yes
d45fe813 17815else
bec39cab
AC
17816 echo "$as_me: failed program was:" >&5
17817sed 's/^/| /' conftest.$ac_ext >&5
17818
b4e70030 17819bfd_cv_have_sys_procfs_type_prgregset32_t=no
bec39cab 17820
d45fe813 17821fi
bec39cab 17822rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
d45fe813
KB
17823fi
17824
97bf5e38 17825 if test $bfd_cv_have_sys_procfs_type_prgregset32_t = yes; then
bec39cab
AC
17826
17827cat >>confdefs.h <<\_ACEOF
97bf5e38 17828#define HAVE_PRGREGSET32_T 1
bec39cab 17829_ACEOF
d45fe813 17830
97bf5e38 17831 fi
b4e70030
JB
17832 echo "$as_me:$LINENO: result: $bfd_cv_have_sys_procfs_type_prgregset32_t" >&5
17833echo "${ECHO_T}$bfd_cv_have_sys_procfs_type_prgregset32_t" >&6
d45fe813 17834
b4e70030
JB
17835 echo "$as_me:$LINENO: checking for prfpregset32_t in sys/procfs.h" >&5
17836echo $ECHO_N "checking for prfpregset32_t in sys/procfs.h... $ECHO_C" >&6
bec39cab
AC
17837 if test "${bfd_cv_have_sys_procfs_type_prfpregset32_t+set}" = set; then
17838 echo $ECHO_N "(cached) $ECHO_C" >&6
d45fe813 17839else
bec39cab
AC
17840 cat >conftest.$ac_ext <<_ACEOF
17841/* confdefs.h. */
17842_ACEOF
17843cat confdefs.h >>conftest.$ac_ext
17844cat >>conftest.$ac_ext <<_ACEOF
17845/* end confdefs.h. */
97bf5e38
MK
17846
17847#define _SYSCALL32
17848#include <sys/procfs.h>
bec39cab
AC
17849int
17850main ()
17851{
97bf5e38 17852prfpregset32_t avar
bec39cab
AC
17853 ;
17854 return 0;
17855}
17856_ACEOF
17857rm -f conftest.$ac_objext
17858if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17859 (eval $ac_compile) 2>conftest.er1
17860 ac_status=$?
17861 grep -v '^ *+' conftest.er1 >conftest.err
17862 rm -f conftest.er1
17863 cat conftest.err >&5
17864 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17865 (exit $ac_status); } &&
b4e70030
JB
17866 { ac_try='test -z "$ac_c_werror_flag"
17867 || test ! -s conftest.err'
bec39cab
AC
17868 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17869 (eval $ac_try) 2>&5
17870 ac_status=$?
17871 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17872 (exit $ac_status); }; } &&
17873 { ac_try='test -s conftest.$ac_objext'
17874 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17875 (eval $ac_try) 2>&5
17876 ac_status=$?
17877 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17878 (exit $ac_status); }; }; then
97bf5e38 17879 bfd_cv_have_sys_procfs_type_prfpregset32_t=yes
d45fe813 17880else
bec39cab
AC
17881 echo "$as_me: failed program was:" >&5
17882sed 's/^/| /' conftest.$ac_ext >&5
17883
b4e70030 17884bfd_cv_have_sys_procfs_type_prfpregset32_t=no
bec39cab 17885
d45fe813 17886fi
bec39cab 17887rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
d45fe813
KB
17888fi
17889
97bf5e38 17890 if test $bfd_cv_have_sys_procfs_type_prfpregset32_t = yes; then
bec39cab
AC
17891
17892cat >>confdefs.h <<\_ACEOF
97bf5e38 17893#define HAVE_PRFPREGSET32_T 1
bec39cab 17894_ACEOF
d45fe813 17895
97bf5e38 17896 fi
b4e70030
JB
17897 echo "$as_me:$LINENO: result: $bfd_cv_have_sys_procfs_type_prfpregset32_t" >&5
17898echo "${ECHO_T}$bfd_cv_have_sys_procfs_type_prfpregset32_t" >&6
d45fe813 17899
b4e70030
JB
17900 echo "$as_me:$LINENO: checking for lwpid_t in sys/procfs.h" >&5
17901echo $ECHO_N "checking for lwpid_t in sys/procfs.h... $ECHO_C" >&6
bec39cab
AC
17902 if test "${bfd_cv_have_sys_procfs_type_lwpid_t+set}" = set; then
17903 echo $ECHO_N "(cached) $ECHO_C" >&6
d45fe813 17904else
bec39cab
AC
17905 cat >conftest.$ac_ext <<_ACEOF
17906/* confdefs.h. */
17907_ACEOF
17908cat confdefs.h >>conftest.$ac_ext
17909cat >>conftest.$ac_ext <<_ACEOF
17910/* end confdefs.h. */
97bf5e38 17911
d45fe813 17912#define _SYSCALL32
97bf5e38 17913#include <sys/procfs.h>
bec39cab
AC
17914int
17915main ()
17916{
97bf5e38 17917lwpid_t avar
bec39cab
AC
17918 ;
17919 return 0;
17920}
17921_ACEOF
17922rm -f conftest.$ac_objext
17923if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17924 (eval $ac_compile) 2>conftest.er1
17925 ac_status=$?
17926 grep -v '^ *+' conftest.er1 >conftest.err
17927 rm -f conftest.er1
17928 cat conftest.err >&5
17929 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17930 (exit $ac_status); } &&
b4e70030
JB
17931 { ac_try='test -z "$ac_c_werror_flag"
17932 || test ! -s conftest.err'
bec39cab
AC
17933 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17934 (eval $ac_try) 2>&5
17935 ac_status=$?
17936 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17937 (exit $ac_status); }; } &&
17938 { ac_try='test -s conftest.$ac_objext'
17939 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17940 (eval $ac_try) 2>&5
17941 ac_status=$?
17942 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17943 (exit $ac_status); }; }; then
97bf5e38 17944 bfd_cv_have_sys_procfs_type_lwpid_t=yes
d45fe813 17945else
bec39cab
AC
17946 echo "$as_me: failed program was:" >&5
17947sed 's/^/| /' conftest.$ac_ext >&5
17948
b4e70030 17949bfd_cv_have_sys_procfs_type_lwpid_t=no
bec39cab 17950
d45fe813 17951fi
bec39cab 17952rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
d45fe813
KB
17953fi
17954
97bf5e38 17955 if test $bfd_cv_have_sys_procfs_type_lwpid_t = yes; then
bec39cab
AC
17956
17957cat >>confdefs.h <<\_ACEOF
97bf5e38 17958#define HAVE_LWPID_T 1
bec39cab 17959_ACEOF
d45fe813 17960
97bf5e38 17961 fi
b4e70030
JB
17962 echo "$as_me:$LINENO: result: $bfd_cv_have_sys_procfs_type_lwpid_t" >&5
17963echo "${ECHO_T}$bfd_cv_have_sys_procfs_type_lwpid_t" >&6
c906108c 17964
b4e70030
JB
17965 echo "$as_me:$LINENO: checking for psaddr_t in sys/procfs.h" >&5
17966echo $ECHO_N "checking for psaddr_t in sys/procfs.h... $ECHO_C" >&6
bec39cab
AC
17967 if test "${bfd_cv_have_sys_procfs_type_psaddr_t+set}" = set; then
17968 echo $ECHO_N "(cached) $ECHO_C" >&6
c906108c 17969else
bec39cab
AC
17970 cat >conftest.$ac_ext <<_ACEOF
17971/* confdefs.h. */
17972_ACEOF
17973cat confdefs.h >>conftest.$ac_ext
17974cat >>conftest.$ac_ext <<_ACEOF
17975/* end confdefs.h. */
c906108c 17976
97bf5e38
MK
17977#define _SYSCALL32
17978#include <sys/procfs.h>
bec39cab
AC
17979int
17980main ()
17981{
97bf5e38 17982psaddr_t avar
bec39cab
AC
17983 ;
17984 return 0;
17985}
17986_ACEOF
17987rm -f conftest.$ac_objext
17988if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17989 (eval $ac_compile) 2>conftest.er1
17990 ac_status=$?
17991 grep -v '^ *+' conftest.er1 >conftest.err
17992 rm -f conftest.er1
17993 cat conftest.err >&5
17994 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17995 (exit $ac_status); } &&
b4e70030
JB
17996 { ac_try='test -z "$ac_c_werror_flag"
17997 || test ! -s conftest.err'
bec39cab
AC
17998 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17999 (eval $ac_try) 2>&5
18000 ac_status=$?
18001 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18002 (exit $ac_status); }; } &&
18003 { ac_try='test -s conftest.$ac_objext'
18004 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18005 (eval $ac_try) 2>&5
18006 ac_status=$?
18007 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18008 (exit $ac_status); }; }; then
97bf5e38 18009 bfd_cv_have_sys_procfs_type_psaddr_t=yes
c906108c 18010else
bec39cab
AC
18011 echo "$as_me: failed program was:" >&5
18012sed 's/^/| /' conftest.$ac_ext >&5
18013
b4e70030 18014bfd_cv_have_sys_procfs_type_psaddr_t=no
bec39cab 18015
c906108c 18016fi
bec39cab 18017rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c
SS
18018fi
18019
97bf5e38 18020 if test $bfd_cv_have_sys_procfs_type_psaddr_t = yes; then
bec39cab
AC
18021
18022cat >>confdefs.h <<\_ACEOF
97bf5e38 18023#define HAVE_PSADDR_T 1
bec39cab 18024_ACEOF
c906108c 18025
97bf5e38 18026 fi
b4e70030
JB
18027 echo "$as_me:$LINENO: result: $bfd_cv_have_sys_procfs_type_psaddr_t" >&5
18028echo "${ECHO_T}$bfd_cv_have_sys_procfs_type_psaddr_t" >&6
c906108c 18029
b4e70030
JB
18030 echo "$as_me:$LINENO: checking for prsysent_t in sys/procfs.h" >&5
18031echo $ECHO_N "checking for prsysent_t in sys/procfs.h... $ECHO_C" >&6
bec39cab
AC
18032 if test "${bfd_cv_have_sys_procfs_type_prsysent_t+set}" = set; then
18033 echo $ECHO_N "(cached) $ECHO_C" >&6
c906108c 18034else
bec39cab
AC
18035 cat >conftest.$ac_ext <<_ACEOF
18036/* confdefs.h. */
18037_ACEOF
18038cat confdefs.h >>conftest.$ac_ext
18039cat >>conftest.$ac_ext <<_ACEOF
18040/* end confdefs.h. */
c906108c 18041
97bf5e38
MK
18042#define _SYSCALL32
18043#include <sys/procfs.h>
bec39cab
AC
18044int
18045main ()
18046{
97bf5e38 18047prsysent_t avar
bec39cab
AC
18048 ;
18049 return 0;
18050}
18051_ACEOF
18052rm -f conftest.$ac_objext
18053if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
18054 (eval $ac_compile) 2>conftest.er1
18055 ac_status=$?
18056 grep -v '^ *+' conftest.er1 >conftest.err
18057 rm -f conftest.er1
18058 cat conftest.err >&5
18059 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18060 (exit $ac_status); } &&
b4e70030
JB
18061 { ac_try='test -z "$ac_c_werror_flag"
18062 || test ! -s conftest.err'
bec39cab
AC
18063 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18064 (eval $ac_try) 2>&5
18065 ac_status=$?
18066 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18067 (exit $ac_status); }; } &&
18068 { ac_try='test -s conftest.$ac_objext'
18069 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18070 (eval $ac_try) 2>&5
18071 ac_status=$?
18072 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18073 (exit $ac_status); }; }; then
97bf5e38 18074 bfd_cv_have_sys_procfs_type_prsysent_t=yes
c906108c 18075else
bec39cab
AC
18076 echo "$as_me: failed program was:" >&5
18077sed 's/^/| /' conftest.$ac_ext >&5
18078
b4e70030 18079bfd_cv_have_sys_procfs_type_prsysent_t=no
bec39cab 18080
c906108c 18081fi
bec39cab 18082rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c
SS
18083fi
18084
97bf5e38 18085 if test $bfd_cv_have_sys_procfs_type_prsysent_t = yes; then
bec39cab
AC
18086
18087cat >>confdefs.h <<\_ACEOF
97bf5e38 18088#define HAVE_PRSYSENT_T 1
bec39cab 18089_ACEOF
c906108c 18090
97bf5e38 18091 fi
b4e70030
JB
18092 echo "$as_me:$LINENO: result: $bfd_cv_have_sys_procfs_type_prsysent_t" >&5
18093echo "${ECHO_T}$bfd_cv_have_sys_procfs_type_prsysent_t" >&6
c906108c 18094
b4e70030
JB
18095 echo "$as_me:$LINENO: checking for pr_sigset_t in sys/procfs.h" >&5
18096echo $ECHO_N "checking for pr_sigset_t in sys/procfs.h... $ECHO_C" >&6
bec39cab
AC
18097 if test "${bfd_cv_have_sys_procfs_type_pr_sigset_t+set}" = set; then
18098 echo $ECHO_N "(cached) $ECHO_C" >&6
c906108c 18099else
bec39cab
AC
18100 cat >conftest.$ac_ext <<_ACEOF
18101/* confdefs.h. */
18102_ACEOF
18103cat confdefs.h >>conftest.$ac_ext
18104cat >>conftest.$ac_ext <<_ACEOF
18105/* end confdefs.h. */
c906108c 18106
97bf5e38
MK
18107#define _SYSCALL32
18108#include <sys/procfs.h>
bec39cab
AC
18109int
18110main ()
18111{
97bf5e38 18112pr_sigset_t avar
bec39cab
AC
18113 ;
18114 return 0;
18115}
18116_ACEOF
18117rm -f conftest.$ac_objext
18118if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
18119 (eval $ac_compile) 2>conftest.er1
18120 ac_status=$?
18121 grep -v '^ *+' conftest.er1 >conftest.err
18122 rm -f conftest.er1
18123 cat conftest.err >&5
18124 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18125 (exit $ac_status); } &&
b4e70030
JB
18126 { ac_try='test -z "$ac_c_werror_flag"
18127 || test ! -s conftest.err'
bec39cab
AC
18128 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18129 (eval $ac_try) 2>&5
18130 ac_status=$?
18131 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18132 (exit $ac_status); }; } &&
18133 { ac_try='test -s conftest.$ac_objext'
18134 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18135 (eval $ac_try) 2>&5
18136 ac_status=$?
18137 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18138 (exit $ac_status); }; }; then
97bf5e38 18139 bfd_cv_have_sys_procfs_type_pr_sigset_t=yes
c906108c 18140else
bec39cab
AC
18141 echo "$as_me: failed program was:" >&5
18142sed 's/^/| /' conftest.$ac_ext >&5
18143
b4e70030 18144bfd_cv_have_sys_procfs_type_pr_sigset_t=no
bec39cab 18145
c906108c 18146fi
bec39cab 18147rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c
SS
18148fi
18149
97bf5e38 18150 if test $bfd_cv_have_sys_procfs_type_pr_sigset_t = yes; then
bec39cab
AC
18151
18152cat >>confdefs.h <<\_ACEOF
97bf5e38 18153#define HAVE_PR_SIGSET_T 1
bec39cab 18154_ACEOF
c906108c 18155
97bf5e38 18156 fi
b4e70030
JB
18157 echo "$as_me:$LINENO: result: $bfd_cv_have_sys_procfs_type_pr_sigset_t" >&5
18158echo "${ECHO_T}$bfd_cv_have_sys_procfs_type_pr_sigset_t" >&6
c906108c 18159
b4e70030
JB
18160 echo "$as_me:$LINENO: checking for pr_sigaction64_t in sys/procfs.h" >&5
18161echo $ECHO_N "checking for pr_sigaction64_t in sys/procfs.h... $ECHO_C" >&6
bec39cab
AC
18162 if test "${bfd_cv_have_sys_procfs_type_pr_sigaction64_t+set}" = set; then
18163 echo $ECHO_N "(cached) $ECHO_C" >&6
c906108c 18164else
bec39cab
AC
18165 cat >conftest.$ac_ext <<_ACEOF
18166/* confdefs.h. */
18167_ACEOF
18168cat confdefs.h >>conftest.$ac_ext
18169cat >>conftest.$ac_ext <<_ACEOF
18170/* end confdefs.h. */
c906108c 18171
97bf5e38
MK
18172#define _SYSCALL32
18173#include <sys/procfs.h>
bec39cab
AC
18174int
18175main ()
18176{
97bf5e38 18177pr_sigaction64_t avar
bec39cab
AC
18178 ;
18179 return 0;
18180}
18181_ACEOF
18182rm -f conftest.$ac_objext
18183if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
18184 (eval $ac_compile) 2>conftest.er1
18185 ac_status=$?
18186 grep -v '^ *+' conftest.er1 >conftest.err
18187 rm -f conftest.er1
18188 cat conftest.err >&5
18189 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18190 (exit $ac_status); } &&
b4e70030
JB
18191 { ac_try='test -z "$ac_c_werror_flag"
18192 || test ! -s conftest.err'
bec39cab
AC
18193 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18194 (eval $ac_try) 2>&5
18195 ac_status=$?
18196 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18197 (exit $ac_status); }; } &&
18198 { ac_try='test -s conftest.$ac_objext'
18199 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18200 (eval $ac_try) 2>&5
18201 ac_status=$?
18202 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18203 (exit $ac_status); }; }; then
97bf5e38 18204 bfd_cv_have_sys_procfs_type_pr_sigaction64_t=yes
c906108c 18205else
bec39cab
AC
18206 echo "$as_me: failed program was:" >&5
18207sed 's/^/| /' conftest.$ac_ext >&5
18208
b4e70030 18209bfd_cv_have_sys_procfs_type_pr_sigaction64_t=no
bec39cab 18210
c906108c 18211fi
bec39cab 18212rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c
SS
18213fi
18214
97bf5e38 18215 if test $bfd_cv_have_sys_procfs_type_pr_sigaction64_t = yes; then
bec39cab
AC
18216
18217cat >>confdefs.h <<\_ACEOF
97bf5e38 18218#define HAVE_PR_SIGACTION64_T 1
bec39cab 18219_ACEOF
c906108c 18220
97bf5e38 18221 fi
b4e70030
JB
18222 echo "$as_me:$LINENO: result: $bfd_cv_have_sys_procfs_type_pr_sigaction64_t" >&5
18223echo "${ECHO_T}$bfd_cv_have_sys_procfs_type_pr_sigaction64_t" >&6
97bf5e38 18224
b4e70030
JB
18225 echo "$as_me:$LINENO: checking for pr_siginfo64_t in sys/procfs.h" >&5
18226echo $ECHO_N "checking for pr_siginfo64_t in sys/procfs.h... $ECHO_C" >&6
bec39cab
AC
18227 if test "${bfd_cv_have_sys_procfs_type_pr_siginfo64_t+set}" = set; then
18228 echo $ECHO_N "(cached) $ECHO_C" >&6
97bf5e38 18229else
bec39cab
AC
18230 cat >conftest.$ac_ext <<_ACEOF
18231/* confdefs.h. */
18232_ACEOF
18233cat confdefs.h >>conftest.$ac_ext
18234cat >>conftest.$ac_ext <<_ACEOF
18235/* end confdefs.h. */
97bf5e38
MK
18236
18237#define _SYSCALL32
18238#include <sys/procfs.h>
bec39cab
AC
18239int
18240main ()
18241{
97bf5e38 18242pr_siginfo64_t avar
bec39cab
AC
18243 ;
18244 return 0;
18245}
18246_ACEOF
18247rm -f conftest.$ac_objext
18248if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
18249 (eval $ac_compile) 2>conftest.er1
18250 ac_status=$?
18251 grep -v '^ *+' conftest.er1 >conftest.err
18252 rm -f conftest.er1
18253 cat conftest.err >&5
18254 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18255 (exit $ac_status); } &&
b4e70030
JB
18256 { ac_try='test -z "$ac_c_werror_flag"
18257 || test ! -s conftest.err'
bec39cab
AC
18258 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18259 (eval $ac_try) 2>&5
18260 ac_status=$?
18261 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18262 (exit $ac_status); }; } &&
18263 { ac_try='test -s conftest.$ac_objext'
18264 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18265 (eval $ac_try) 2>&5
18266 ac_status=$?
18267 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18268 (exit $ac_status); }; }; then
97bf5e38
MK
18269 bfd_cv_have_sys_procfs_type_pr_siginfo64_t=yes
18270else
bec39cab
AC
18271 echo "$as_me: failed program was:" >&5
18272sed 's/^/| /' conftest.$ac_ext >&5
18273
b4e70030 18274bfd_cv_have_sys_procfs_type_pr_siginfo64_t=no
bec39cab 18275
97bf5e38 18276fi
bec39cab 18277rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c 18278fi
c906108c 18279
97bf5e38 18280 if test $bfd_cv_have_sys_procfs_type_pr_siginfo64_t = yes; then
bec39cab
AC
18281
18282cat >>confdefs.h <<\_ACEOF
97bf5e38 18283#define HAVE_PR_SIGINFO64_T 1
bec39cab 18284_ACEOF
c906108c 18285
97bf5e38 18286 fi
b4e70030
JB
18287 echo "$as_me:$LINENO: result: $bfd_cv_have_sys_procfs_type_pr_siginfo64_t" >&5
18288echo "${ECHO_T}$bfd_cv_have_sys_procfs_type_pr_siginfo64_t" >&6
bec39cab
AC
18289
18290
97bf5e38
MK
18291
18292
18293
97bf5e38 18294 if test $bfd_cv_have_sys_procfs_type_prfpregset_t = yes; then
b4e70030
JB
18295 echo "$as_me:$LINENO: checking whether prfpregset_t type is broken" >&5
18296echo $ECHO_N "checking whether prfpregset_t type is broken... $ECHO_C" >&6
bec39cab
AC
18297 if test "${gdb_cv_prfpregset_t_broken+set}" = set; then
18298 echo $ECHO_N "(cached) $ECHO_C" >&6
c906108c
SS
18299else
18300 if test "$cross_compiling" = yes; then
97bf5e38 18301 gdb_cv_prfpregset_t_broken=yes
c906108c 18302else
bec39cab
AC
18303 cat >conftest.$ac_ext <<_ACEOF
18304/* confdefs.h. */
18305_ACEOF
18306cat confdefs.h >>conftest.$ac_ext
18307cat >>conftest.$ac_ext <<_ACEOF
18308/* end confdefs.h. */
97bf5e38
MK
18309#include <sys/procfs.h>
18310 int main ()
18311 {
18312 if (sizeof (prfpregset_t) == sizeof (void *))
18313 return 1;
18314 return 0;
18315 }
bec39cab
AC
18316_ACEOF
18317rm -f conftest$ac_exeext
18318if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
18319 (eval $ac_link) 2>&5
18320 ac_status=$?
18321 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18322 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
18323 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18324 (eval $ac_try) 2>&5
18325 ac_status=$?
18326 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18327 (exit $ac_status); }; }; then
97bf5e38 18328 gdb_cv_prfpregset_t_broken=no
c906108c 18329else
bec39cab
AC
18330 echo "$as_me: program exited with status $ac_status" >&5
18331echo "$as_me: failed program was:" >&5
18332sed 's/^/| /' conftest.$ac_ext >&5
18333
18334( exit $ac_status )
18335gdb_cv_prfpregset_t_broken=yes
c906108c 18336fi
b4e70030 18337rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
c906108c 18338fi
c906108c
SS
18339fi
18340
b4e70030
JB
18341 echo "$as_me:$LINENO: result: $gdb_cv_prfpregset_t_broken" >&5
18342echo "${ECHO_T}$gdb_cv_prfpregset_t_broken" >&6
97bf5e38 18343 if test $gdb_cv_prfpregset_t_broken = yes; then
60ca704f
SE
18344
18345cat >>confdefs.h <<\_ACEOF
97bf5e38 18346#define PRFPREGSET_T_BROKEN 1
bec39cab 18347_ACEOF
c906108c 18348
97bf5e38
MK
18349 fi
18350 fi
c906108c 18351
bec39cab 18352
b4e70030
JB
18353 echo "$as_me:$LINENO: checking for PIOCSET ioctl entry in sys/procfs.h" >&5
18354echo $ECHO_N "checking for PIOCSET ioctl entry in sys/procfs.h... $ECHO_C" >&6
bec39cab
AC
18355 if test "${gdb_cv_have_procfs_piocset+set}" = set; then
18356 echo $ECHO_N "(cached) $ECHO_C" >&6
c906108c 18357else
bec39cab
AC
18358 cat >conftest.$ac_ext <<_ACEOF
18359/* confdefs.h. */
18360_ACEOF
18361cat confdefs.h >>conftest.$ac_ext
18362cat >>conftest.$ac_ext <<_ACEOF
18363/* end confdefs.h. */
97bf5e38
MK
18364#include <unistd.h>
18365#include <sys/types.h>
18366#include <sys/procfs.h>
18367
bec39cab
AC
18368int
18369main ()
18370{
97bf5e38
MK
18371
18372 int dummy;;
18373 dummy = ioctl(0, PIOCSET, &dummy);
bec39cab
AC
18374
18375 ;
18376 return 0;
18377}
18378_ACEOF
18379rm -f conftest.$ac_objext
18380if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
18381 (eval $ac_compile) 2>conftest.er1
18382 ac_status=$?
18383 grep -v '^ *+' conftest.er1 >conftest.err
18384 rm -f conftest.er1
18385 cat conftest.err >&5
18386 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18387 (exit $ac_status); } &&
b4e70030
JB
18388 { ac_try='test -z "$ac_c_werror_flag"
18389 || test ! -s conftest.err'
bec39cab
AC
18390 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18391 (eval $ac_try) 2>&5
18392 ac_status=$?
18393 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18394 (exit $ac_status); }; } &&
18395 { ac_try='test -s conftest.$ac_objext'
18396 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18397 (eval $ac_try) 2>&5
18398 ac_status=$?
18399 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18400 (exit $ac_status); }; }; then
97bf5e38 18401 gdb_cv_have_procfs_piocset=yes
c906108c 18402else
bec39cab
AC
18403 echo "$as_me: failed program was:" >&5
18404sed 's/^/| /' conftest.$ac_ext >&5
18405
b4e70030 18406gdb_cv_have_procfs_piocset=no
c906108c 18407fi
bec39cab 18408rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c 18409fi
97bf5e38 18410
b4e70030
JB
18411 echo "$as_me:$LINENO: result: $gdb_cv_have_procfs_piocset" >&5
18412echo "${ECHO_T}$gdb_cv_have_procfs_piocset" >&6
97bf5e38 18413 if test $gdb_cv_have_procfs_piocset = yes; then
60ca704f
SE
18414
18415cat >>confdefs.h <<\_ACEOF
97bf5e38 18416#define HAVE_PROCFS_PIOCSET 1
bec39cab 18417_ACEOF
97bf5e38
MK
18418
18419 fi
c906108c 18420fi
c906108c 18421
97bf5e38 18422if test ${host} = ${target} ; then
bec39cab 18423
b4e70030
JB
18424 echo "$as_me:$LINENO: checking for member l_addr in struct link_map" >&5
18425echo $ECHO_N "checking for member l_addr in struct link_map... $ECHO_C" >&6
bec39cab
AC
18426 if test "${gdb_cv_have_struct_link_map_with_l_members+set}" = set; then
18427 echo $ECHO_N "(cached) $ECHO_C" >&6
18428else
18429 cat >conftest.$ac_ext <<_ACEOF
18430/* confdefs.h. */
18431_ACEOF
18432cat confdefs.h >>conftest.$ac_ext
18433cat >>conftest.$ac_ext <<_ACEOF
18434/* end confdefs.h. */
97bf5e38 18435#include <link.h>
bec39cab
AC
18436int
18437main ()
18438{
97bf5e38 18439struct link_map lm; (void) lm.l_addr;
bec39cab
AC
18440 ;
18441 return 0;
18442}
18443_ACEOF
18444rm -f conftest.$ac_objext
18445if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
18446 (eval $ac_compile) 2>conftest.er1
18447 ac_status=$?
18448 grep -v '^ *+' conftest.er1 >conftest.err
18449 rm -f conftest.er1
18450 cat conftest.err >&5
18451 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18452 (exit $ac_status); } &&
b4e70030
JB
18453 { ac_try='test -z "$ac_c_werror_flag"
18454 || test ! -s conftest.err'
bec39cab
AC
18455 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18456 (eval $ac_try) 2>&5
18457 ac_status=$?
18458 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18459 (exit $ac_status); }; } &&
18460 { ac_try='test -s conftest.$ac_objext'
18461 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18462 (eval $ac_try) 2>&5
18463 ac_status=$?
18464 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18465 (exit $ac_status); }; }; then
97bf5e38 18466 gdb_cv_have_struct_link_map_with_l_members=yes
c906108c 18467else
bec39cab
AC
18468 echo "$as_me: failed program was:" >&5
18469sed 's/^/| /' conftest.$ac_ext >&5
18470
b4e70030 18471gdb_cv_have_struct_link_map_with_l_members=no
c906108c 18472fi
bec39cab 18473rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c
SS
18474fi
18475
b4e70030
JB
18476 echo "$as_me:$LINENO: result: $gdb_cv_have_struct_link_map_with_l_members" >&5
18477echo "${ECHO_T}$gdb_cv_have_struct_link_map_with_l_members" >&6
97bf5e38 18478 if test $gdb_cv_have_struct_link_map_with_l_members = yes; then
60ca704f
SE
18479
18480cat >>confdefs.h <<\_ACEOF
97bf5e38 18481#define HAVE_STRUCT_LINK_MAP_WITH_L_MEMBERS 1
bec39cab 18482_ACEOF
97bf5e38
MK
18483
18484 fi
18485
bec39cab 18486
b4e70030
JB
18487 echo "$as_me:$LINENO: checking for member lm_addr in struct link_map" >&5
18488echo $ECHO_N "checking for member lm_addr in struct link_map... $ECHO_C" >&6
bec39cab
AC
18489 if test "${gdb_cv_have_struct_link_map_with_lm_members+set}" = set; then
18490 echo $ECHO_N "(cached) $ECHO_C" >&6
c906108c 18491else
bec39cab
AC
18492 cat >conftest.$ac_ext <<_ACEOF
18493/* confdefs.h. */
18494_ACEOF
18495cat confdefs.h >>conftest.$ac_ext
18496cat >>conftest.$ac_ext <<_ACEOF
18497/* end confdefs.h. */
97bf5e38
MK
18498#include <sys/types.h>
18499#include <link.h>
bec39cab
AC
18500int
18501main ()
18502{
97bf5e38 18503struct link_map lm; (void) lm.lm_addr;
bec39cab
AC
18504 ;
18505 return 0;
18506}
18507_ACEOF
18508rm -f conftest.$ac_objext
18509if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
18510 (eval $ac_compile) 2>conftest.er1
18511 ac_status=$?
18512 grep -v '^ *+' conftest.er1 >conftest.err
18513 rm -f conftest.er1
18514 cat conftest.err >&5
18515 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18516 (exit $ac_status); } &&
b4e70030
JB
18517 { ac_try='test -z "$ac_c_werror_flag"
18518 || test ! -s conftest.err'
bec39cab
AC
18519 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18520 (eval $ac_try) 2>&5
18521 ac_status=$?
18522 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18523 (exit $ac_status); }; } &&
18524 { ac_try='test -s conftest.$ac_objext'
18525 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18526 (eval $ac_try) 2>&5
18527 ac_status=$?
18528 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18529 (exit $ac_status); }; }; then
97bf5e38
MK
18530 gdb_cv_have_struct_link_map_with_lm_members=yes
18531else
bec39cab
AC
18532 echo "$as_me: failed program was:" >&5
18533sed 's/^/| /' conftest.$ac_ext >&5
18534
b4e70030 18535gdb_cv_have_struct_link_map_with_lm_members=no
97bf5e38 18536fi
bec39cab 18537rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c906108c 18538fi
c906108c 18539
b4e70030
JB
18540 echo "$as_me:$LINENO: result: $gdb_cv_have_struct_link_map_with_lm_members" >&5
18541echo "${ECHO_T}$gdb_cv_have_struct_link_map_with_lm_members" >&6
97bf5e38 18542 if test $gdb_cv_have_struct_link_map_with_lm_members = yes; then
60ca704f
SE
18543
18544cat >>confdefs.h <<\_ACEOF
97bf5e38 18545#define HAVE_STRUCT_LINK_MAP_WITH_LM_MEMBERS 1
bec39cab 18546_ACEOF
97bf5e38
MK
18547
18548 fi
18549
bec39cab 18550
b4e70030
JB
18551 echo "$as_me:$LINENO: checking for member som_addr in struct so_map" >&5
18552echo $ECHO_N "checking for member som_addr in struct so_map... $ECHO_C" >&6
bec39cab
AC
18553 if test "${gdb_cv_have_struct_so_map_with_som_members+set}" = set; then
18554 echo $ECHO_N "(cached) $ECHO_C" >&6
c906108c 18555else
bec39cab
AC
18556 cat >conftest.$ac_ext <<_ACEOF
18557/* confdefs.h. */
18558_ACEOF
18559cat confdefs.h >>conftest.$ac_ext
18560cat >>conftest.$ac_ext <<_ACEOF
18561/* end confdefs.h. */
97bf5e38
MK
18562#include <sys/types.h>
18563#ifdef HAVE_NLIST_H
18564#include <nlist.h>
18565#endif
18566#include <link.h>
bec39cab
AC
18567int
18568main ()
18569{
97bf5e38 18570struct so_map lm; (void) lm.som_addr;
bec39cab
AC
18571 ;
18572 return 0;
18573}
18574_ACEOF
18575rm -f conftest.$ac_objext
18576if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
18577 (eval $ac_compile) 2>conftest.er1
18578 ac_status=$?
18579 grep -v '^ *+' conftest.er1 >conftest.err
18580 rm -f conftest.er1
18581 cat conftest.err >&5
18582 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18583 (exit $ac_status); } &&
b4e70030
JB
18584 { ac_try='test -z "$ac_c_werror_flag"
18585 || test ! -s conftest.err'
bec39cab
AC
18586 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18587 (eval $ac_try) 2>&5
18588 ac_status=$?
18589 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18590 (exit $ac_status); }; } &&
18591 { ac_try='test -s conftest.$ac_objext'
18592 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18593 (eval $ac_try) 2>&5
18594 ac_status=$?
18595 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18596 (exit $ac_status); }; }; then
97bf5e38
MK
18597 gdb_cv_have_struct_so_map_with_som_members=yes
18598else
bec39cab
AC
18599 echo "$as_me: failed program was:" >&5
18600sed 's/^/| /' conftest.$ac_ext >&5
18601
b4e70030 18602gdb_cv_have_struct_so_map_with_som_members=no
97bf5e38 18603fi
bec39cab 18604rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
97bf5e38 18605fi
c906108c 18606
b4e70030
JB
18607 echo "$as_me:$LINENO: result: $gdb_cv_have_struct_so_map_with_som_members" >&5
18608echo "${ECHO_T}$gdb_cv_have_struct_so_map_with_som_members" >&6
97bf5e38 18609 if test $gdb_cv_have_struct_so_map_with_som_members = yes; then
60ca704f
SE
18610
18611cat >>confdefs.h <<\_ACEOF
97bf5e38 18612#define HAVE_STRUCT_SO_MAP_WITH_SOM_MEMBERS 1
bec39cab 18613_ACEOF
c906108c 18614
97bf5e38 18615 fi
c906108c 18616
bec39cab 18617
b4e70030
JB
18618 echo "$as_me:$LINENO: checking for struct link_map32 in sys/link.h" >&5
18619echo $ECHO_N "checking for struct link_map32 in sys/link.h... $ECHO_C" >&6
bec39cab
AC
18620 if test "${gdb_cv_have_struct_link_map32+set}" = set; then
18621 echo $ECHO_N "(cached) $ECHO_C" >&6
97bf5e38 18622else
bec39cab
AC
18623 cat >conftest.$ac_ext <<_ACEOF
18624/* confdefs.h. */
18625_ACEOF
18626cat confdefs.h >>conftest.$ac_ext
18627cat >>conftest.$ac_ext <<_ACEOF
18628/* end confdefs.h. */
97bf5e38
MK
18629#define _SYSCALL32
18630#include <sys/link.h>
bec39cab
AC
18631int
18632main ()
18633{
97bf5e38 18634struct link_map32 l;
bec39cab
AC
18635 ;
18636 return 0;
18637}
18638_ACEOF
18639rm -f conftest.$ac_objext
18640if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
18641 (eval $ac_compile) 2>conftest.er1
18642 ac_status=$?
18643 grep -v '^ *+' conftest.er1 >conftest.err
18644 rm -f conftest.er1
18645 cat conftest.err >&5
18646 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18647 (exit $ac_status); } &&
b4e70030
JB
18648 { ac_try='test -z "$ac_c_werror_flag"
18649 || test ! -s conftest.err'
bec39cab
AC
18650 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18651 (eval $ac_try) 2>&5
18652 ac_status=$?
18653 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18654 (exit $ac_status); }; } &&
18655 { ac_try='test -s conftest.$ac_objext'
18656 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18657 (eval $ac_try) 2>&5
18658 ac_status=$?
18659 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18660 (exit $ac_status); }; }; then
97bf5e38
MK
18661 gdb_cv_have_struct_link_map32=yes
18662else
bec39cab
AC
18663 echo "$as_me: failed program was:" >&5
18664sed 's/^/| /' conftest.$ac_ext >&5
18665
b4e70030 18666gdb_cv_have_struct_link_map32=no
97bf5e38 18667fi
bec39cab 18668rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
97bf5e38 18669fi
c906108c 18670
b4e70030
JB
18671 echo "$as_me:$LINENO: result: $gdb_cv_have_struct_link_map32" >&5
18672echo "${ECHO_T}$gdb_cv_have_struct_link_map32" >&6
97bf5e38 18673 if test $gdb_cv_have_struct_link_map32 = yes; then
60ca704f
SE
18674
18675cat >>confdefs.h <<\_ACEOF
97bf5e38 18676#define HAVE_STRUCT_LINK_MAP32 1
bec39cab 18677_ACEOF
c906108c 18678
60ca704f
SE
18679
18680cat >>confdefs.h <<\_ACEOF
97bf5e38 18681#define _SYSCALL32 1
bec39cab 18682_ACEOF
c906108c 18683
97bf5e38
MK
18684 fi
18685fi
c906108c 18686
bc8bcb4b 18687# Check if the compiler supports the `long long' type.
c906108c 18688
b4e70030
JB
18689echo "$as_me:$LINENO: checking for long long support in compiler" >&5
18690echo $ECHO_N "checking for long long support in compiler... $ECHO_C" >&6
bec39cab
AC
18691if test "${gdb_cv_c_long_long+set}" = set; then
18692 echo $ECHO_N "(cached) $ECHO_C" >&6
97bf5e38 18693else
bec39cab
AC
18694 cat >conftest.$ac_ext <<_ACEOF
18695/* confdefs.h. */
18696_ACEOF
18697cat confdefs.h >>conftest.$ac_ext
18698cat >>conftest.$ac_ext <<_ACEOF
18699/* end confdefs.h. */
bc8bcb4b 18700extern long long foo;
bec39cab
AC
18701int
18702main ()
18703{
bc8bcb4b 18704switch (foo & 2) { case 0: return 1; }
bec39cab
AC
18705 ;
18706 return 0;
18707}
18708_ACEOF
18709rm -f conftest.$ac_objext
18710if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
18711 (eval $ac_compile) 2>conftest.er1
18712 ac_status=$?
18713 grep -v '^ *+' conftest.er1 >conftest.err
18714 rm -f conftest.er1
18715 cat conftest.err >&5
18716 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18717 (exit $ac_status); } &&
b4e70030
JB
18718 { ac_try='test -z "$ac_c_werror_flag"
18719 || test ! -s conftest.err'
bec39cab
AC
18720 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18721 (eval $ac_try) 2>&5
18722 ac_status=$?
18723 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18724 (exit $ac_status); }; } &&
18725 { ac_try='test -s conftest.$ac_objext'
18726 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18727 (eval $ac_try) 2>&5
18728 ac_status=$?
18729 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18730 (exit $ac_status); }; }; then
97bf5e38
MK
18731 gdb_cv_c_long_long=yes
18732else
bec39cab
AC
18733 echo "$as_me: failed program was:" >&5
18734sed 's/^/| /' conftest.$ac_ext >&5
18735
b4e70030 18736gdb_cv_c_long_long=no
97bf5e38 18737fi
bec39cab 18738rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
97bf5e38 18739fi
b4e70030
JB
18740echo "$as_me:$LINENO: result: $gdb_cv_c_long_long" >&5
18741echo "${ECHO_T}$gdb_cv_c_long_long" >&6
97bf5e38 18742if test $gdb_cv_c_long_long = yes; then
bc8bcb4b
MK
18743
18744cat >>confdefs.h <<\_ACEOF
97bf5e38 18745#define CC_HAS_LONG_LONG 1
bec39cab 18746_ACEOF
97bf5e38
MK
18747
18748fi
18749
bc8bcb4b 18750# Check if the compiler and runtime support printing long longs.
97bf5e38 18751
b4e70030
JB
18752echo "$as_me:$LINENO: checking for long long support in printf" >&5
18753echo $ECHO_N "checking for long long support in printf... $ECHO_C" >&6
bec39cab
AC
18754if test "${gdb_cv_printf_has_long_long+set}" = set; then
18755 echo $ECHO_N "(cached) $ECHO_C" >&6
97bf5e38
MK
18756else
18757 if test "$cross_compiling" = yes; then
18758 gdb_cv_printf_has_long_long=no
18759else
bec39cab
AC
18760 cat >conftest.$ac_ext <<_ACEOF
18761/* confdefs.h. */
18762_ACEOF
18763cat confdefs.h >>conftest.$ac_ext
18764cat >>conftest.$ac_ext <<_ACEOF
18765/* end confdefs.h. */
bc8bcb4b
MK
18766$ac_includes_default
18767int
18768main ()
18769{
18770char buf[32];
97bf5e38
MK
18771 long long l = 0;
18772 l = (l << 16) + 0x0123;
18773 l = (l << 16) + 0x4567;
18774 l = (l << 16) + 0x89ab;
18775 l = (l << 16) + 0xcdef;
18776 sprintf (buf, "0x%016llx", l);
18777 return (strcmp ("0x0123456789abcdef", buf));
bc8bcb4b
MK
18778 ;
18779 return 0;
c906108c 18780}
bec39cab
AC
18781_ACEOF
18782rm -f conftest$ac_exeext
18783if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
18784 (eval $ac_link) 2>&5
18785 ac_status=$?
18786 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18787 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
18788 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18789 (eval $ac_try) 2>&5
18790 ac_status=$?
18791 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18792 (exit $ac_status); }; }; then
97bf5e38
MK
18793 gdb_cv_printf_has_long_long=yes
18794else
bec39cab
AC
18795 echo "$as_me: program exited with status $ac_status" >&5
18796echo "$as_me: failed program was:" >&5
18797sed 's/^/| /' conftest.$ac_ext >&5
18798
18799( exit $ac_status )
18800gdb_cv_printf_has_long_long=no
97bf5e38 18801fi
b4e70030 18802rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
97bf5e38 18803fi
97bf5e38 18804fi
b4e70030
JB
18805echo "$as_me:$LINENO: result: $gdb_cv_printf_has_long_long" >&5
18806echo "${ECHO_T}$gdb_cv_printf_has_long_long" >&6
97bf5e38 18807if test $gdb_cv_printf_has_long_long = yes; then
bc8bcb4b
MK
18808
18809cat >>confdefs.h <<\_ACEOF
97bf5e38 18810#define PRINTF_HAS_LONG_LONG 1
bec39cab 18811_ACEOF
97bf5e38
MK
18812
18813fi
97bf5e38 18814
1a619819
LM
18815# Check if the compiler and runtime support printing decfloats.
18816
18817echo "$as_me:$LINENO: checking for decfloat support in printf" >&5
18818echo $ECHO_N "checking for decfloat support in printf... $ECHO_C" >&6
18819if test "${gdb_cv_printf_has_decfloat+set}" = set; then
18820 echo $ECHO_N "(cached) $ECHO_C" >&6
18821else
18822 if test "$cross_compiling" = yes; then
18823 gdb_cv_printf_has_decfloat=no
18824else
18825 cat >conftest.$ac_ext <<_ACEOF
18826/* confdefs.h. */
18827_ACEOF
18828cat confdefs.h >>conftest.$ac_ext
18829cat >>conftest.$ac_ext <<_ACEOF
18830/* end confdefs.h. */
18831$ac_includes_default
18832int
18833main ()
18834{
18835char buf[64];
18836 _Decimal32 d32 = 1.2345df;
18837 _Decimal64 d64 = 1.2345dd;
18838 _Decimal128 d128 = 1.2345dl;
18839 sprintf (buf, "Decimal32: %H\nDecimal64: %D\nDecimal128: %DD", d32, d64, d128);
18840 return (strcmp ("Decimal32: 1.2345\nDecimal64: 1.2345\nDecimal128: 1.2345", buf));
18841 ;
18842 return 0;
18843}
18844_ACEOF
18845rm -f conftest$ac_exeext
18846if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
18847 (eval $ac_link) 2>&5
18848 ac_status=$?
18849 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18850 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
18851 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18852 (eval $ac_try) 2>&5
18853 ac_status=$?
18854 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18855 (exit $ac_status); }; }; then
18856 gdb_cv_printf_has_decfloat=yes
18857else
18858 echo "$as_me: program exited with status $ac_status" >&5
18859echo "$as_me: failed program was:" >&5
18860sed 's/^/| /' conftest.$ac_ext >&5
18861
18862( exit $ac_status )
18863gdb_cv_printf_has_decfloat=no
18864fi
18865rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
18866fi
18867fi
18868echo "$as_me:$LINENO: result: $gdb_cv_printf_has_decfloat" >&5
18869echo "${ECHO_T}$gdb_cv_printf_has_decfloat" >&6
18870if test $gdb_cv_printf_has_decfloat = yes; then
18871
18872cat >>confdefs.h <<\_ACEOF
18873#define PRINTF_HAS_DECFLOAT 1
18874_ACEOF
18875
18876fi
18877
bc8bcb4b
MK
18878# Check if the compiler supports the `long double' type. We can't use
18879# AC_C_LONG_DOUBLE because that one does additional checks on the
18880# constants defined in <float.h> that fail on some systems,
18881# e.g. FreeBSD/i386 4.7 and OpenBSD/i386 3.6.
97bf5e38 18882
b4e70030
JB
18883echo "$as_me:$LINENO: checking for long double support in compiler" >&5
18884echo $ECHO_N "checking for long double support in compiler... $ECHO_C" >&6
bc8bcb4b 18885if test "${gdb_cv_c_long_double+set}" = set; then
bec39cab 18886 echo $ECHO_N "(cached) $ECHO_C" >&6
97bf5e38 18887else
bec39cab
AC
18888 cat >conftest.$ac_ext <<_ACEOF
18889/* confdefs.h. */
18890_ACEOF
18891cat confdefs.h >>conftest.$ac_ext
18892cat >>conftest.$ac_ext <<_ACEOF
18893/* end confdefs.h. */
97bf5e38 18894long double foo;
bec39cab
AC
18895_ACEOF
18896rm -f conftest.$ac_objext
18897if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
18898 (eval $ac_compile) 2>conftest.er1
18899 ac_status=$?
18900 grep -v '^ *+' conftest.er1 >conftest.err
18901 rm -f conftest.er1
18902 cat conftest.err >&5
18903 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18904 (exit $ac_status); } &&
b4e70030
JB
18905 { ac_try='test -z "$ac_c_werror_flag"
18906 || test ! -s conftest.err'
bec39cab
AC
18907 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18908 (eval $ac_try) 2>&5
18909 ac_status=$?
18910 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18911 (exit $ac_status); }; } &&
18912 { ac_try='test -s conftest.$ac_objext'
18913 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18914 (eval $ac_try) 2>&5
18915 ac_status=$?
18916 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18917 (exit $ac_status); }; }; then
bc8bcb4b 18918 gdb_cv_c_long_double=yes
97bf5e38 18919else
bec39cab
AC
18920 echo "$as_me: failed program was:" >&5
18921sed 's/^/| /' conftest.$ac_ext >&5
18922
b4e70030 18923gdb_cv_c_long_double=no
97bf5e38 18924fi
bec39cab 18925rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
97bf5e38 18926fi
b4e70030
JB
18927echo "$as_me:$LINENO: result: $gdb_cv_c_long_double" >&5
18928echo "${ECHO_T}$gdb_cv_c_long_double" >&6
bc8bcb4b 18929if test $gdb_cv_c_long_double = yes; then
c906108c 18930
bc8bcb4b 18931cat >>confdefs.h <<\_ACEOF
97bf5e38 18932#define HAVE_LONG_DOUBLE 1
bec39cab 18933_ACEOF
97bf5e38
MK
18934
18935fi
18936
bc8bcb4b 18937# Check if the compiler and runtime support printing long doubles.
97bf5e38 18938
b4e70030
JB
18939echo "$as_me:$LINENO: checking for long double support in printf" >&5
18940echo $ECHO_N "checking for long double support in printf... $ECHO_C" >&6
bec39cab
AC
18941if test "${gdb_cv_printf_has_long_double+set}" = set; then
18942 echo $ECHO_N "(cached) $ECHO_C" >&6
97bf5e38
MK
18943else
18944 if test "$cross_compiling" = yes; then
18945 gdb_cv_printf_has_long_double=no
18946else
bec39cab
AC
18947 cat >conftest.$ac_ext <<_ACEOF
18948/* confdefs.h. */
18949_ACEOF
18950cat confdefs.h >>conftest.$ac_ext
18951cat >>conftest.$ac_ext <<_ACEOF
18952/* end confdefs.h. */
bc8bcb4b
MK
18953$ac_includes_default
18954int
18955main ()
18956{
18957char buf[16];
97bf5e38
MK
18958 long double f = 3.141592653;
18959 sprintf (buf, "%Lg", f);
18960 return (strncmp ("3.14159", buf, 7));
bc8bcb4b
MK
18961 ;
18962 return 0;
97bf5e38 18963}
bec39cab
AC
18964_ACEOF
18965rm -f conftest$ac_exeext
18966if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
18967 (eval $ac_link) 2>&5
18968 ac_status=$?
18969 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18970 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
18971 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18972 (eval $ac_try) 2>&5
18973 ac_status=$?
18974 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18975 (exit $ac_status); }; }; then
97bf5e38 18976 gdb_cv_printf_has_long_double=yes
c906108c 18977else
bec39cab
AC
18978 echo "$as_me: program exited with status $ac_status" >&5
18979echo "$as_me: failed program was:" >&5
18980sed 's/^/| /' conftest.$ac_ext >&5
18981
18982( exit $ac_status )
18983gdb_cv_printf_has_long_double=no
c906108c 18984fi
b4e70030 18985rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
c906108c 18986fi
c906108c 18987fi
b4e70030
JB
18988echo "$as_me:$LINENO: result: $gdb_cv_printf_has_long_double" >&5
18989echo "${ECHO_T}$gdb_cv_printf_has_long_double" >&6
97bf5e38 18990if test $gdb_cv_printf_has_long_double = yes; then
bc8bcb4b
MK
18991
18992cat >>confdefs.h <<\_ACEOF
97bf5e38 18993#define PRINTF_HAS_LONG_DOUBLE 1
bec39cab 18994_ACEOF
97bf5e38
MK
18995
18996fi
97bf5e38 18997
bc8bcb4b 18998# Check if the compiler and runtime support scanning long doubles.
97bf5e38 18999
b4e70030
JB
19000echo "$as_me:$LINENO: checking for long double support in scanf" >&5
19001echo $ECHO_N "checking for long double support in scanf... $ECHO_C" >&6
bec39cab
AC
19002if test "${gdb_cv_scanf_has_long_double+set}" = set; then
19003 echo $ECHO_N "(cached) $ECHO_C" >&6
97bf5e38
MK
19004else
19005 if test "$cross_compiling" = yes; then
19006 gdb_cv_scanf_has_long_double=no
19007else
bec39cab
AC
19008 cat >conftest.$ac_ext <<_ACEOF
19009/* confdefs.h. */
19010_ACEOF
19011cat confdefs.h >>conftest.$ac_ext
19012cat >>conftest.$ac_ext <<_ACEOF
19013/* end confdefs.h. */
bc8bcb4b
MK
19014#include <stdio.h>
19015int
19016main ()
19017{
19018char *buf = "3.141592653";
97bf5e38
MK
19019 long double f = 0;
19020 sscanf (buf, "%Lg", &f);
19021 return !(f > 3.14159 && f < 3.14160);
bc8bcb4b
MK
19022 ;
19023 return 0;
97bf5e38 19024}
bec39cab
AC
19025_ACEOF
19026rm -f conftest$ac_exeext
19027if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
19028 (eval $ac_link) 2>&5
19029 ac_status=$?
19030 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19031 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
19032 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19033 (eval $ac_try) 2>&5
19034 ac_status=$?
19035 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19036 (exit $ac_status); }; }; then
97bf5e38
MK
19037 gdb_cv_scanf_has_long_double=yes
19038else
bec39cab
AC
19039 echo "$as_me: program exited with status $ac_status" >&5
19040echo "$as_me: failed program was:" >&5
19041sed 's/^/| /' conftest.$ac_ext >&5
19042
19043( exit $ac_status )
19044gdb_cv_scanf_has_long_double=no
97bf5e38 19045fi
b4e70030 19046rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
97bf5e38 19047fi
c906108c 19048fi
b4e70030
JB
19049echo "$as_me:$LINENO: result: $gdb_cv_scanf_has_long_double" >&5
19050echo "${ECHO_T}$gdb_cv_scanf_has_long_double" >&6
97bf5e38 19051if test $gdb_cv_scanf_has_long_double = yes; then
bc8bcb4b
MK
19052
19053cat >>confdefs.h <<\_ACEOF
97bf5e38 19054#define SCANF_HAS_LONG_DOUBLE 1
bec39cab 19055_ACEOF
97bf5e38
MK
19056
19057fi
c906108c 19058
438013df
AO
19059case ${host_os} in
19060aix*)
b4e70030
JB
19061 echo "$as_me:$LINENO: checking for -bbigtoc option" >&5
19062echo $ECHO_N "checking for -bbigtoc option... $ECHO_C" >&6
bec39cab
AC
19063if test "${gdb_cv_bigtoc+set}" = set; then
19064 echo $ECHO_N "(cached) $ECHO_C" >&6
438013df 19065else
bec39cab 19066
438013df
AO
19067 SAVE_LDFLAGS=$LDFLAGS
19068
19069 case $GCC in
19070 yes) gdb_cv_bigtoc=-Wl,-bbigtoc ;;
19071 *) gdb_cv_bigtoc=-bbigtoc ;;
19072 esac
19073
19074 LDFLAGS=$LDFLAGS\ $gdb_cv_bigtoc
bec39cab
AC
19075 cat >conftest.$ac_ext <<_ACEOF
19076/* confdefs.h. */
19077_ACEOF
19078cat confdefs.h >>conftest.$ac_ext
19079cat >>conftest.$ac_ext <<_ACEOF
19080/* end confdefs.h. */
438013df 19081
bec39cab
AC
19082int
19083main ()
19084{
438013df 19085int i;
bec39cab
AC
19086 ;
19087 return 0;
19088}
19089_ACEOF
19090rm -f conftest.$ac_objext conftest$ac_exeext
19091if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
19092 (eval $ac_link) 2>conftest.er1
19093 ac_status=$?
19094 grep -v '^ *+' conftest.er1 >conftest.err
19095 rm -f conftest.er1
19096 cat conftest.err >&5
19097 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19098 (exit $ac_status); } &&
b4e70030
JB
19099 { ac_try='test -z "$ac_c_werror_flag"
19100 || test ! -s conftest.err'
bec39cab
AC
19101 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19102 (eval $ac_try) 2>&5
19103 ac_status=$?
19104 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19105 (exit $ac_status); }; } &&
19106 { ac_try='test -s conftest$ac_exeext'
19107 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19108 (eval $ac_try) 2>&5
19109 ac_status=$?
19110 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19111 (exit $ac_status); }; }; then
438013df
AO
19112 :
19113else
bec39cab
AC
19114 echo "$as_me: failed program was:" >&5
19115sed 's/^/| /' conftest.$ac_ext >&5
19116
b4e70030 19117gdb_cv_bigtoc=
438013df 19118fi
bec39cab
AC
19119rm -f conftest.err conftest.$ac_objext \
19120 conftest$ac_exeext conftest.$ac_ext
ec76baa5 19121 LDFLAGS="${SAVE_LDFLAGS}"
438013df 19122
bec39cab 19123fi
b4e70030
JB
19124echo "$as_me:$LINENO: result: $gdb_cv_bigtoc" >&5
19125echo "${ECHO_T}$gdb_cv_bigtoc" >&6
438013df
AO
19126 CONFIG_LDFLAGS="${CONFIG_LDFLAGS} ${gdb_cv_bigtoc}"
19127 ;;
19128esac
19129
c906108c
SS
19130
19131
19132if test ${build} = ${host} -a ${host} = ${target} ; then
19133 case ${host_os} in
19134 hpux*)
b4e70030
JB
19135 echo "$as_me:$LINENO: checking for HPUX/OSF thread support" >&5
19136echo $ECHO_N "checking for HPUX/OSF thread support... $ECHO_C" >&6
c906108c
SS
19137 if test -f /usr/include/dce/cma_config.h ; then
19138 if test "$GCC" = "yes" ; then
b4e70030
JB
19139 echo "$as_me:$LINENO: result: yes" >&5
19140echo "${ECHO_T}yes" >&6
60ca704f
SE
19141
19142cat >>confdefs.h <<\_ACEOF
c906108c 19143#define HAVE_HPUX_THREAD_SUPPORT 1
bec39cab 19144_ACEOF
c906108c 19145
3483b318 19146 CONFIG_OBS="${CONFIG_OBS} hpux-thread.o"
c906108c
SS
19147 CONFIG_SRCS="${CONFIG_SRCS} hpux-thread.c"
19148 else
b4e70030
JB
19149 echo "$as_me:$LINENO: result: no (suppressed because you are not using GCC)" >&5
19150echo "${ECHO_T}no (suppressed because you are not using GCC)" >&6
c906108c
SS
19151 fi
19152 else
b4e70030
JB
19153 echo "$as_me:$LINENO: result: no" >&5
19154echo "${ECHO_T}no" >&6
c906108c
SS
19155 fi
19156 ;;
19157 solaris*)
d92419e5
JB
19158 # See if thread_db library is around for Solaris thread debugging.
19159 # Note that we must explicitly test for version 1 of the library
19160 # because version 0 (present on Solaris 2.4 or earlier) doesn't have
19161 # the same API.
b4e70030
JB
19162 echo "$as_me:$LINENO: checking for Solaris thread debugging library" >&5
19163echo $ECHO_N "checking for Solaris thread debugging library... $ECHO_C" >&6
c906108c 19164 if test -f /usr/lib/libthread_db.so.1 ; then
b4e70030
JB
19165 echo "$as_me:$LINENO: result: yes" >&5
19166echo "${ECHO_T}yes" >&6
60ca704f
SE
19167
19168cat >>confdefs.h <<\_ACEOF
c906108c 19169#define HAVE_THREAD_DB_LIB 1
bec39cab 19170_ACEOF
c906108c 19171
3483b318 19172 CONFIG_OBS="${CONFIG_OBS} sol-thread.o"
c906108c 19173 CONFIG_SRCS="${CONFIG_SRCS} sol-thread.c"
bec39cab 19174
b4e70030
JB
19175echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5
19176echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6
bec39cab
AC
19177if test "${ac_cv_lib_dl_dlopen+set}" = set; then
19178 echo $ECHO_N "(cached) $ECHO_C" >&6
c906108c 19179else
bec39cab 19180 ac_check_lib_save_LIBS=$LIBS
c906108c 19181LIBS="-ldl $LIBS"
bec39cab
AC
19182cat >conftest.$ac_ext <<_ACEOF
19183/* confdefs.h. */
19184_ACEOF
19185cat confdefs.h >>conftest.$ac_ext
19186cat >>conftest.$ac_ext <<_ACEOF
19187/* end confdefs.h. */
19188
b4e70030 19189/* Override any gcc2 internal prototype to avoid an error. */
bec39cab
AC
19190#ifdef __cplusplus
19191extern "C"
19192#endif
b4e70030
JB
19193/* We use char because int might match the return type of a gcc2
19194 builtin and then its argument prototype would still apply. */
bec39cab
AC
19195char dlopen ();
19196int
19197main ()
19198{
b4e70030 19199dlopen ();
bec39cab
AC
19200 ;
19201 return 0;
19202}
19203_ACEOF
19204rm -f conftest.$ac_objext conftest$ac_exeext
19205if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
19206 (eval $ac_link) 2>conftest.er1
19207 ac_status=$?
19208 grep -v '^ *+' conftest.er1 >conftest.err
19209 rm -f conftest.er1
19210 cat conftest.err >&5
19211 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19212 (exit $ac_status); } &&
b4e70030
JB
19213 { ac_try='test -z "$ac_c_werror_flag"
19214 || test ! -s conftest.err'
bec39cab
AC
19215 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19216 (eval $ac_try) 2>&5
19217 ac_status=$?
19218 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19219 (exit $ac_status); }; } &&
19220 { ac_try='test -s conftest$ac_exeext'
19221 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19222 (eval $ac_try) 2>&5
19223 ac_status=$?
19224 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19225 (exit $ac_status); }; }; then
19226 ac_cv_lib_dl_dlopen=yes
19227else
19228 echo "$as_me: failed program was:" >&5
19229sed 's/^/| /' conftest.$ac_ext >&5
19230
b4e70030 19231ac_cv_lib_dl_dlopen=no
bec39cab
AC
19232fi
19233rm -f conftest.err conftest.$ac_objext \
19234 conftest$ac_exeext conftest.$ac_ext
19235LIBS=$ac_check_lib_save_LIBS
19236fi
b4e70030
JB
19237echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5
19238echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6
bec39cab
AC
19239if test $ac_cv_lib_dl_dlopen = yes; then
19240 cat >>confdefs.h <<_ACEOF
19241#define HAVE_LIBDL 1
19242_ACEOF
c906108c
SS
19243
19244 LIBS="-ldl $LIBS"
19245
c906108c
SS
19246fi
19247
19248 if test "$GCC" = "yes" ; then
19249 # The GNU linker requires the -export-dynamic option to make
19250 # all symbols visible in the dynamic symbol table.
19251 hold_ldflags=$LDFLAGS
b4e70030
JB
19252 echo "$as_me:$LINENO: checking for the ld -export-dynamic flag" >&5
19253echo $ECHO_N "checking for the ld -export-dynamic flag... $ECHO_C" >&6
c906108c 19254 LDFLAGS="${LDFLAGS} -Wl,-export-dynamic"
bec39cab
AC
19255 cat >conftest.$ac_ext <<_ACEOF
19256/* confdefs.h. */
19257_ACEOF
19258cat confdefs.h >>conftest.$ac_ext
19259cat >>conftest.$ac_ext <<_ACEOF
19260/* end confdefs.h. */
c906108c 19261
bec39cab
AC
19262int
19263main ()
19264{
c906108c 19265int i;
bec39cab
AC
19266 ;
19267 return 0;
19268}
19269_ACEOF
19270rm -f conftest.$ac_objext conftest$ac_exeext
19271if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
19272 (eval $ac_link) 2>conftest.er1
19273 ac_status=$?
19274 grep -v '^ *+' conftest.er1 >conftest.err
19275 rm -f conftest.er1
19276 cat conftest.err >&5
19277 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19278 (exit $ac_status); } &&
b4e70030
JB
19279 { ac_try='test -z "$ac_c_werror_flag"
19280 || test ! -s conftest.err'
bec39cab
AC
19281 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19282 (eval $ac_try) 2>&5
19283 ac_status=$?
19284 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19285 (exit $ac_status); }; } &&
19286 { ac_try='test -s conftest$ac_exeext'
19287 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19288 (eval $ac_try) 2>&5
19289 ac_status=$?
19290 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19291 (exit $ac_status); }; }; then
c906108c
SS
19292 found=yes
19293else
bec39cab
AC
19294 echo "$as_me: failed program was:" >&5
19295sed 's/^/| /' conftest.$ac_ext >&5
19296
b4e70030 19297found=no
c906108c 19298fi
bec39cab
AC
19299rm -f conftest.err conftest.$ac_objext \
19300 conftest$ac_exeext conftest.$ac_ext
c906108c 19301 LDFLAGS=$hold_ldflags
b4e70030
JB
19302 echo "$as_me:$LINENO: result: $found" >&5
19303echo "${ECHO_T}$found" >&6
c906108c
SS
19304 if test $found = yes; then
19305 CONFIG_LDFLAGS="${CONFIG_LDFLAGS} -Wl,-export-dynamic"
19306 fi
19307 fi
19308 # Sun randomly tweaked the prototypes in <proc_service.h>
19309 # at one point.
b4e70030
JB
19310 echo "$as_me:$LINENO: checking if <proc_service.h> is old" >&5
19311echo $ECHO_N "checking if <proc_service.h> is old... $ECHO_C" >&6
bec39cab
AC
19312 if test "${gdb_cv_proc_service_is_old+set}" = set; then
19313 echo $ECHO_N "(cached) $ECHO_C" >&6
c906108c 19314else
bec39cab
AC
19315
19316 cat >conftest.$ac_ext <<_ACEOF
19317/* confdefs.h. */
19318_ACEOF
19319cat confdefs.h >>conftest.$ac_ext
19320cat >>conftest.$ac_ext <<_ACEOF
19321/* end confdefs.h. */
c906108c
SS
19322
19323 #include <proc_service.h>
19324 ps_err_e ps_pdwrite
19325 (struct ps_prochandle*, psaddr_t, const void*, size_t);
c906108c 19326
bec39cab
AC
19327int
19328main ()
19329{
19330
19331 ;
19332 return 0;
19333}
19334_ACEOF
19335rm -f conftest.$ac_objext
19336if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
19337 (eval $ac_compile) 2>conftest.er1
19338 ac_status=$?
19339 grep -v '^ *+' conftest.er1 >conftest.err
19340 rm -f conftest.er1
19341 cat conftest.err >&5
19342 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19343 (exit $ac_status); } &&
b4e70030
JB
19344 { ac_try='test -z "$ac_c_werror_flag"
19345 || test ! -s conftest.err'
bec39cab
AC
19346 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19347 (eval $ac_try) 2>&5
19348 ac_status=$?
19349 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19350 (exit $ac_status); }; } &&
19351 { ac_try='test -s conftest.$ac_objext'
19352 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19353 (eval $ac_try) 2>&5
19354 ac_status=$?
19355 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19356 (exit $ac_status); }; }; then
c906108c
SS
19357 gdb_cv_proc_service_is_old=no
19358else
bec39cab
AC
19359 echo "$as_me: failed program was:" >&5
19360sed 's/^/| /' conftest.$ac_ext >&5
19361
b4e70030 19362gdb_cv_proc_service_is_old=yes
c906108c 19363fi
bec39cab
AC
19364rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
19365
c906108c
SS
19366fi
19367
b4e70030
JB
19368 echo "$as_me:$LINENO: result: $gdb_cv_proc_service_is_old" >&5
19369echo "${ECHO_T}$gdb_cv_proc_service_is_old" >&6
c906108c 19370 if test $gdb_cv_proc_service_is_old = yes; then
60ca704f
SE
19371
19372cat >>confdefs.h <<\_ACEOF
c906108c 19373#define PROC_SERVICE_IS_OLD 1
bec39cab 19374_ACEOF
c906108c
SS
19375
19376 fi
19377 else
b4e70030
JB
19378 echo "$as_me:$LINENO: result: no" >&5
19379echo "${ECHO_T}no" >&6
c906108c
SS
19380 fi
19381 ;;
d92419e5 19382 aix*)
b4e70030
JB
19383 echo "$as_me:$LINENO: checking for AiX thread debugging library" >&5
19384echo $ECHO_N "checking for AiX thread debugging library... $ECHO_C" >&6
bec39cab
AC
19385 if test "${gdb_cv_have_aix_thread_debug+set}" = set; then
19386 echo $ECHO_N "(cached) $ECHO_C" >&6
19387else
19388 cat >conftest.$ac_ext <<_ACEOF
19389/* confdefs.h. */
19390_ACEOF
19391cat confdefs.h >>conftest.$ac_ext
19392cat >>conftest.$ac_ext <<_ACEOF
19393/* end confdefs.h. */
d92419e5 19394#include <sys/pthdebug.h>
bec39cab
AC
19395int
19396main ()
19397{
d92419e5
JB
19398#ifndef PTHDB_VERSION_3
19399 #error
19400 #endif
bec39cab
AC
19401 ;
19402 return 0;
19403}
19404_ACEOF
19405rm -f conftest.$ac_objext
19406if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
19407 (eval $ac_compile) 2>conftest.er1
19408 ac_status=$?
19409 grep -v '^ *+' conftest.er1 >conftest.err
19410 rm -f conftest.er1
19411 cat conftest.err >&5
19412 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19413 (exit $ac_status); } &&
b4e70030
JB
19414 { ac_try='test -z "$ac_c_werror_flag"
19415 || test ! -s conftest.err'
bec39cab
AC
19416 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19417 (eval $ac_try) 2>&5
19418 ac_status=$?
19419 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19420 (exit $ac_status); }; } &&
19421 { ac_try='test -s conftest.$ac_objext'
19422 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19423 (eval $ac_try) 2>&5
19424 ac_status=$?
19425 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19426 (exit $ac_status); }; }; then
d92419e5
JB
19427 gdb_cv_have_aix_thread_debug=yes
19428else
bec39cab
AC
19429 echo "$as_me: failed program was:" >&5
19430sed 's/^/| /' conftest.$ac_ext >&5
19431
b4e70030 19432gdb_cv_have_aix_thread_debug=no
d92419e5 19433fi
bec39cab 19434rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
d92419e5
JB
19435fi
19436
b4e70030
JB
19437 echo "$as_me:$LINENO: result: $gdb_cv_have_aix_thread_debug" >&5
19438echo "${ECHO_T}$gdb_cv_have_aix_thread_debug" >&6
d92419e5
JB
19439 if test $gdb_cv_have_aix_thread_debug = yes; then
19440 CONFIG_SRCS="${CONFIG_SRCS} aix-thread.c"
3483b318 19441 CONFIG_OBS="${CONFIG_OBS} aix-thread.o"
d92419e5
JB
19442 CONFIG_LDFLAGS="${CONFIG_LDFLAGS} -lpthdebug"
19443 fi
19444 ;;
c906108c 19445 esac
bec39cab 19446
c906108c
SS
19447fi
19448
3f47be5c 19449if test "x$ac_cv_header_thread_db_h" = "xyes"; then
b4e70030
JB
19450 echo "$as_me:$LINENO: checking whether <thread_db.h> has TD_NOTALLOC" >&5
19451echo $ECHO_N "checking whether <thread_db.h> has TD_NOTALLOC... $ECHO_C" >&6
bec39cab
AC
19452if test "${gdb_cv_thread_db_h_has_td_notalloc+set}" = set; then
19453 echo $ECHO_N "(cached) $ECHO_C" >&6
19454else
19455 cat >conftest.$ac_ext <<_ACEOF
19456/* confdefs.h. */
19457_ACEOF
19458cat confdefs.h >>conftest.$ac_ext
19459cat >>conftest.$ac_ext <<_ACEOF
19460/* end confdefs.h. */
3f47be5c 19461#include <thread_db.h>
bec39cab
AC
19462int
19463main ()
19464{
3f47be5c 19465int i = TD_NOTALLOC;
bec39cab
AC
19466 ;
19467 return 0;
19468}
19469_ACEOF
19470rm -f conftest.$ac_objext
19471if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
19472 (eval $ac_compile) 2>conftest.er1
19473 ac_status=$?
19474 grep -v '^ *+' conftest.er1 >conftest.err
19475 rm -f conftest.er1
19476 cat conftest.err >&5
19477 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19478 (exit $ac_status); } &&
b4e70030
JB
19479 { ac_try='test -z "$ac_c_werror_flag"
19480 || test ! -s conftest.err'
bec39cab
AC
19481 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19482 (eval $ac_try) 2>&5
19483 ac_status=$?
19484 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19485 (exit $ac_status); }; } &&
19486 { ac_try='test -s conftest.$ac_objext'
19487 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19488 (eval $ac_try) 2>&5
19489 ac_status=$?
19490 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19491 (exit $ac_status); }; }; then
3f47be5c
EZ
19492 gdb_cv_thread_db_h_has_td_notalloc=yes
19493else
bec39cab
AC
19494 echo "$as_me: failed program was:" >&5
19495sed 's/^/| /' conftest.$ac_ext >&5
19496
b4e70030 19497gdb_cv_thread_db_h_has_td_notalloc=no
bec39cab 19498
3f47be5c 19499fi
bec39cab 19500rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
3f47be5c 19501
bec39cab 19502fi
b4e70030
JB
19503echo "$as_me:$LINENO: result: $gdb_cv_thread_db_h_has_td_notalloc" >&5
19504echo "${ECHO_T}$gdb_cv_thread_db_h_has_td_notalloc" >&6
59f80f10
DJ
19505 echo "$as_me:$LINENO: checking whether <thread_db.h> has TD_VERSION" >&5
19506echo $ECHO_N "checking whether <thread_db.h> has TD_VERSION... $ECHO_C" >&6
19507if test "${gdb_cv_thread_db_h_has_td_version+set}" = set; then
19508 echo $ECHO_N "(cached) $ECHO_C" >&6
19509else
19510 cat >conftest.$ac_ext <<_ACEOF
19511/* confdefs.h. */
19512_ACEOF
19513cat confdefs.h >>conftest.$ac_ext
19514cat >>conftest.$ac_ext <<_ACEOF
19515/* end confdefs.h. */
19516#include <thread_db.h>
19517int
19518main ()
19519{
19520int i = TD_VERSION;
19521 ;
19522 return 0;
19523}
19524_ACEOF
19525rm -f conftest.$ac_objext
19526if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
19527 (eval $ac_compile) 2>conftest.er1
19528 ac_status=$?
19529 grep -v '^ *+' conftest.er1 >conftest.err
19530 rm -f conftest.er1
19531 cat conftest.err >&5
19532 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19533 (exit $ac_status); } &&
19534 { ac_try='test -z "$ac_c_werror_flag"
19535 || test ! -s conftest.err'
19536 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19537 (eval $ac_try) 2>&5
19538 ac_status=$?
19539 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19540 (exit $ac_status); }; } &&
19541 { ac_try='test -s conftest.$ac_objext'
19542 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19543 (eval $ac_try) 2>&5
19544 ac_status=$?
19545 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19546 (exit $ac_status); }; }; then
19547 gdb_cv_thread_db_h_has_td_version=yes
19548else
19549 echo "$as_me: failed program was:" >&5
19550sed 's/^/| /' conftest.$ac_ext >&5
19551
19552gdb_cv_thread_db_h_has_td_version=no
19553
19554fi
19555rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
19556
19557fi
19558echo "$as_me:$LINENO: result: $gdb_cv_thread_db_h_has_td_version" >&5
19559echo "${ECHO_T}$gdb_cv_thread_db_h_has_td_version" >&6
19560 echo "$as_me:$LINENO: checking whether <thread_db.h> has TD_NOTLS" >&5
19561echo $ECHO_N "checking whether <thread_db.h> has TD_NOTLS... $ECHO_C" >&6
19562if test "${gdb_cv_thread_db_h_has_td_notls+set}" = set; then
19563 echo $ECHO_N "(cached) $ECHO_C" >&6
19564else
19565 cat >conftest.$ac_ext <<_ACEOF
19566/* confdefs.h. */
19567_ACEOF
19568cat confdefs.h >>conftest.$ac_ext
19569cat >>conftest.$ac_ext <<_ACEOF
19570/* end confdefs.h. */
19571#include <thread_db.h>
19572int
19573main ()
19574{
19575int i = TD_NOTLS;
19576 ;
19577 return 0;
19578}
19579_ACEOF
19580rm -f conftest.$ac_objext
19581if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
19582 (eval $ac_compile) 2>conftest.er1
19583 ac_status=$?
19584 grep -v '^ *+' conftest.er1 >conftest.err
19585 rm -f conftest.er1
19586 cat conftest.err >&5
19587 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19588 (exit $ac_status); } &&
19589 { ac_try='test -z "$ac_c_werror_flag"
19590 || test ! -s conftest.err'
19591 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19592 (eval $ac_try) 2>&5
19593 ac_status=$?
19594 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19595 (exit $ac_status); }; } &&
19596 { ac_try='test -s conftest.$ac_objext'
19597 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19598 (eval $ac_try) 2>&5
19599 ac_status=$?
19600 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19601 (exit $ac_status); }; }; then
19602 gdb_cv_thread_db_h_has_td_notls=yes
19603else
19604 echo "$as_me: failed program was:" >&5
19605sed 's/^/| /' conftest.$ac_ext >&5
19606
19607gdb_cv_thread_db_h_has_td_notls=no
19608
19609fi
19610rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
19611
19612fi
19613echo "$as_me:$LINENO: result: $gdb_cv_thread_db_h_has_td_notls" >&5
19614echo "${ECHO_T}$gdb_cv_thread_db_h_has_td_notls" >&6
3f47be5c
EZ
19615fi
19616if test "x$gdb_cv_thread_db_h_has_td_notalloc" = "xyes"; then
bec39cab
AC
19617
19618cat >>confdefs.h <<\_ACEOF
3f47be5c 19619#define THREAD_DB_HAS_TD_NOTALLOC 1
bec39cab 19620_ACEOF
3f47be5c 19621
59f80f10
DJ
19622fi
19623if test "x$gdb_cv_thread_db_h_has_td_version" = "xyes"; then
19624
19625cat >>confdefs.h <<\_ACEOF
19626#define THREAD_DB_HAS_TD_VERSION 1
19627_ACEOF
19628
19629fi
19630if test "x$gdb_cv_thread_db_h_has_td_notls" = "xyes"; then
19631
19632cat >>confdefs.h <<\_ACEOF
19633#define THREAD_DB_HAS_TD_NOTLS 1
19634_ACEOF
19635
3f47be5c
EZ
19636fi
19637
b757528f 19638if test "x$ac_cv_header_sys_syscall_h" = "xyes"; then
b4e70030
JB
19639 echo "$as_me:$LINENO: checking whether <sys/syscall.h> has __NR_tkill" >&5
19640echo $ECHO_N "checking whether <sys/syscall.h> has __NR_tkill... $ECHO_C" >&6
bec39cab
AC
19641if test "${gdb_cv_sys_syscall_h_has_tkill+set}" = set; then
19642 echo $ECHO_N "(cached) $ECHO_C" >&6
19643else
19644 cat >conftest.$ac_ext <<_ACEOF
19645/* confdefs.h. */
19646_ACEOF
19647cat confdefs.h >>conftest.$ac_ext
19648cat >>conftest.$ac_ext <<_ACEOF
19649/* end confdefs.h. */
b757528f 19650#include <sys/syscall.h>
bec39cab
AC
19651int
19652main ()
19653{
b757528f 19654int i = __NR_tkill;
bec39cab
AC
19655 ;
19656 return 0;
19657}
19658_ACEOF
19659rm -f conftest.$ac_objext
19660if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
19661 (eval $ac_compile) 2>conftest.er1
19662 ac_status=$?
19663 grep -v '^ *+' conftest.er1 >conftest.err
19664 rm -f conftest.er1
19665 cat conftest.err >&5
19666 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19667 (exit $ac_status); } &&
b4e70030
JB
19668 { ac_try='test -z "$ac_c_werror_flag"
19669 || test ! -s conftest.err'
bec39cab
AC
19670 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19671 (eval $ac_try) 2>&5
19672 ac_status=$?
19673 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19674 (exit $ac_status); }; } &&
19675 { ac_try='test -s conftest.$ac_objext'
19676 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19677 (eval $ac_try) 2>&5
19678 ac_status=$?
19679 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19680 (exit $ac_status); }; }; then
b757528f
JJ
19681 gdb_cv_sys_syscall_h_has_tkill=yes
19682else
bec39cab
AC
19683 echo "$as_me: failed program was:" >&5
19684sed 's/^/| /' conftest.$ac_ext >&5
19685
b4e70030 19686gdb_cv_sys_syscall_h_has_tkill=no
bec39cab 19687
b757528f 19688fi
bec39cab 19689rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
b757528f 19690
bec39cab 19691fi
b4e70030
JB
19692echo "$as_me:$LINENO: result: $gdb_cv_sys_syscall_h_has_tkill" >&5
19693echo "${ECHO_T}$gdb_cv_sys_syscall_h_has_tkill" >&6
b757528f
JJ
19694fi
19695if test "x$gdb_cv_sys_syscall_h_has_tkill" = "xyes" && test "x$ac_cv_func_syscall" = "xyes"; then
bec39cab
AC
19696
19697cat >>confdefs.h <<\_ACEOF
b757528f 19698#define HAVE_TKILL_SYSCALL 1
bec39cab 19699_ACEOF
b757528f
JJ
19700
19701fi
19702
10568435
JK
19703echo "$as_me:$LINENO: checking whether ADDR_NO_RANDOMIZE is declared" >&5
19704echo $ECHO_N "checking whether ADDR_NO_RANDOMIZE is declared... $ECHO_C" >&6
19705if test "${ac_cv_have_decl_ADDR_NO_RANDOMIZE+set}" = set; then
19706 echo $ECHO_N "(cached) $ECHO_C" >&6
19707else
19708 cat >conftest.$ac_ext <<_ACEOF
19709/* confdefs.h. */
19710_ACEOF
19711cat confdefs.h >>conftest.$ac_ext
19712cat >>conftest.$ac_ext <<_ACEOF
19713/* end confdefs.h. */
19714#include <sys/personality.h>
19715
19716int
19717main ()
19718{
19719#ifndef ADDR_NO_RANDOMIZE
19720 char *p = (char *) ADDR_NO_RANDOMIZE;
19721#endif
19722
19723 ;
19724 return 0;
19725}
19726_ACEOF
19727rm -f conftest.$ac_objext
19728if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
19729 (eval $ac_compile) 2>conftest.er1
19730 ac_status=$?
19731 grep -v '^ *+' conftest.er1 >conftest.err
19732 rm -f conftest.er1
19733 cat conftest.err >&5
19734 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19735 (exit $ac_status); } &&
19736 { ac_try='test -z "$ac_c_werror_flag"
19737 || test ! -s conftest.err'
19738 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19739 (eval $ac_try) 2>&5
19740 ac_status=$?
19741 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19742 (exit $ac_status); }; } &&
19743 { ac_try='test -s conftest.$ac_objext'
19744 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19745 (eval $ac_try) 2>&5
19746 ac_status=$?
19747 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19748 (exit $ac_status); }; }; then
19749 ac_cv_have_decl_ADDR_NO_RANDOMIZE=yes
19750else
19751 echo "$as_me: failed program was:" >&5
19752sed 's/^/| /' conftest.$ac_ext >&5
19753
19754ac_cv_have_decl_ADDR_NO_RANDOMIZE=no
19755fi
19756rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
19757fi
19758echo "$as_me:$LINENO: result: $ac_cv_have_decl_ADDR_NO_RANDOMIZE" >&5
19759echo "${ECHO_T}$ac_cv_have_decl_ADDR_NO_RANDOMIZE" >&6
19760if test $ac_cv_have_decl_ADDR_NO_RANDOMIZE = yes; then
19761
19762cat >>confdefs.h <<_ACEOF
19763#define HAVE_DECL_ADDR_NO_RANDOMIZE 1
19764_ACEOF
19765
19766
19767else
19768 cat >>confdefs.h <<_ACEOF
19769#define HAVE_DECL_ADDR_NO_RANDOMIZE 0
19770_ACEOF
19771
19772
19773fi
19774
19775
19776
19777if test "$cross_compiling" = yes; then
19778 cat >conftest.$ac_ext <<_ACEOF
19779/* confdefs.h. */
19780_ACEOF
19781cat confdefs.h >>conftest.$ac_ext
19782cat >>conftest.$ac_ext <<_ACEOF
19783/* end confdefs.h. */
19784#include <sys/personality.h>
19785int
19786main ()
19787{
19788
19789# if !HAVE_DECL_ADDR_NO_RANDOMIZE
19790# define ADDR_NO_RANDOMIZE 0x0040000
19791# endif
19792 /* Test the flag could be set and stays set. */
19793 personality (personality (0xffffffff) | ADDR_NO_RANDOMIZE);
19794 if (!(personality (personality (0xffffffff)) & ADDR_NO_RANDOMIZE))
19795 return 1
19796 ;
19797 return 0;
19798}
19799_ACEOF
19800rm -f conftest.$ac_objext conftest$ac_exeext
19801if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
19802 (eval $ac_link) 2>conftest.er1
19803 ac_status=$?
19804 grep -v '^ *+' conftest.er1 >conftest.err
19805 rm -f conftest.er1
19806 cat conftest.err >&5
19807 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19808 (exit $ac_status); } &&
19809 { ac_try='test -z "$ac_c_werror_flag"
19810 || test ! -s conftest.err'
19811 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19812 (eval $ac_try) 2>&5
19813 ac_status=$?
19814 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19815 (exit $ac_status); }; } &&
19816 { ac_try='test -s conftest$ac_exeext'
19817 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19818 (eval $ac_try) 2>&5
19819 ac_status=$?
19820 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19821 (exit $ac_status); }; }; then
19822 have_personality=true
19823else
19824 echo "$as_me: failed program was:" >&5
19825sed 's/^/| /' conftest.$ac_ext >&5
19826
19827have_personality=false
19828fi
19829rm -f conftest.err conftest.$ac_objext \
19830 conftest$ac_exeext conftest.$ac_ext
19831else
19832 cat >conftest.$ac_ext <<_ACEOF
19833/* confdefs.h. */
19834_ACEOF
19835cat confdefs.h >>conftest.$ac_ext
19836cat >>conftest.$ac_ext <<_ACEOF
19837/* end confdefs.h. */
19838#include <sys/personality.h>
19839int
19840main ()
19841{
19842
19843# if !HAVE_DECL_ADDR_NO_RANDOMIZE
19844# define ADDR_NO_RANDOMIZE 0x0040000
19845# endif
19846 /* Test the flag could be set and stays set. */
19847 personality (personality (0xffffffff) | ADDR_NO_RANDOMIZE);
19848 if (!(personality (personality (0xffffffff)) & ADDR_NO_RANDOMIZE))
19849 return 1
19850 ;
19851 return 0;
19852}
19853_ACEOF
19854rm -f conftest$ac_exeext
19855if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
19856 (eval $ac_link) 2>&5
19857 ac_status=$?
19858 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19859 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
19860 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19861 (eval $ac_try) 2>&5
19862 ac_status=$?
19863 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19864 (exit $ac_status); }; }; then
19865 have_personality=true
19866else
19867 echo "$as_me: program exited with status $ac_status" >&5
19868echo "$as_me: failed program was:" >&5
19869sed 's/^/| /' conftest.$ac_ext >&5
19870
19871( exit $ac_status )
19872have_personality=false
19873fi
19874rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
19875fi
19876if $have_personality
19877then
19878
19879cat >>confdefs.h <<\_ACEOF
19880#define HAVE_PERSONALITY 1
19881_ACEOF
19882
19883fi
19884
fb40c209 19885
bec39cab 19886
b4e70030 19887# Check whether --with-sysroot or --without-sysroot was given.
030292b7 19888if test "${with_sysroot+set}" = set; then
b4e70030
JB
19889 withval="$with_sysroot"
19890
030292b7 19891 case ${with_sysroot} in
715d1656 19892 yes) TARGET_SYSTEM_ROOT='${exec_prefix}/${target_alias}/sys-root' ;;
030292b7
DJ
19893 *) TARGET_SYSTEM_ROOT=$with_sysroot ;;
19894 esac
19895
19896 TARGET_SYSTEM_ROOT_DEFINE='-DTARGET_SYSTEM_ROOT=\"$(TARGET_SYSTEM_ROOT)\"'
19897
07abfebf
RS
19898 if test "x$prefix" = xNONE; then
19899 test_prefix=/usr/local
19900 else
19901 test_prefix=$prefix
19902 fi
aa28a74e 19903 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
07abfebf 19904 test_exec_prefix=$test_prefix
030292b7 19905 else
07abfebf 19906 test_exec_prefix=$exec_prefix
030292b7
DJ
19907 fi
19908 case ${TARGET_SYSTEM_ROOT} in
715d1656 19909 "${test_prefix}"|"${test_prefix}/"*|\
07abfebf
RS
19910 "${test_exec_prefix}"|"${test_exec_prefix}/"*|\
19911 '${prefix}'|'${prefix}/'*|\
715d1656 19912 '${exec_prefix}'|'${exec_prefix}/'*)
030292b7
DJ
19913 t="$TARGET_SYSTEM_ROOT_DEFINE -DTARGET_SYSTEM_ROOT_RELOCATABLE"
19914 TARGET_SYSTEM_ROOT_DEFINE="$t"
19915 ;;
19916 esac
19917
19918else
bec39cab 19919
030292b7
DJ
19920 TARGET_SYSTEM_ROOT=
19921 TARGET_SYSTEM_ROOT_DEFINE='-DTARGET_SYSTEM_ROOT=\"\"'
19922
b4e70030 19923fi;
030292b7
DJ
19924
19925
19926
16e7150e
JG
19927system_gdbinit=
19928
19929# Check whether --with-system-gdbinit or --without-system-gdbinit was given.
19930if test "${with_system_gdbinit+set}" = set; then
19931 withval="$with_system_gdbinit"
19932 system_gdbinit=${withval}
19933fi;
19934
19935
19936 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
19937 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
19938 ac_define_dir=`eval echo $system_gdbinit`
19939 ac_define_dir=`eval echo $ac_define_dir`
19940
19941cat >>confdefs.h <<_ACEOF
19942#define SYSTEM_GDBINIT "$ac_define_dir"
19943_ACEOF
19944
19945
19946
19947if test "x$prefix" = xNONE; then
19948 test_prefix=$ac_default_prefix
19949else
19950 test_prefix=$prefix
19951fi
19952if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
19953 test_exec_prefix=$test_prefix
19954else
19955 test_exec_prefix=$exec_prefix
19956fi
19957case ${system_gdbinit} in
19958 "${test_prefix}"|"${test_prefix}/"*|\
19959 "${test_exec_prefix}"|"${test_exec_prefix}/"*|\
19960 '${prefix}'|'${prefix}/'*|\
19961 '${exec_prefix}'|'${exec_prefix}/'*)
19962
19963cat >>confdefs.h <<\_ACEOF
19964#define SYSTEM_GDBINIT_RELOCATABLE 1
19965_ACEOF
19966
19967 ;;
19968esac
19969
b4e70030 19970# Check whether --enable-werror or --disable-werror was given.
094a342e 19971if test "${enable_werror+set}" = set; then
b4e70030
JB
19972 enableval="$enable_werror"
19973 case "${enableval}" in
094a342e
MK
19974 yes | y) ERROR_ON_WARNING="yes" ;;
19975 no | n) ERROR_ON_WARNING="no" ;;
19976 *) { { echo "$as_me:$LINENO: error: bad value ${enableval} for --enable-werror" >&5
19977echo "$as_me: error: bad value ${enableval} for --enable-werror" >&2;}
19978 { (exit 1); exit 1; }; } ;;
19979 esac
b4e70030 19980fi;
094a342e
MK
19981
19982# Enable -Werror by default when using gcc
19983if test "${GCC}" = yes -a -z "${ERROR_ON_WARNING}" ; then
19984 ERROR_ON_WARNING=yes
19985fi
19986
19987WERROR_CFLAGS=""
19988if test "${ERROR_ON_WARNING}" = yes ; then
19989 WERROR_CFLAGS="-Werror"
19990fi
19991
aa79a185
DJ
19992# The entries after -Wno-pointer-sign are disabled warnings which may
19993# be enabled in the future, which can not currently be used to build
19994# GDB.
19995# NOTE: If you change this list, remember to update
3b851bce 19996# gdb/doc/gdbint.texinfo.
aa79a185
DJ
19997build_warnings="-Wall -Wdeclaration-after-statement -Wpointer-arith \
19998-Wformat-nonliteral -Wno-pointer-sign \
58b38ee2 19999-Wno-unused -Wno-switch -Wno-char-subscripts"
a3b362c4 20000
3526781e
DJ
20001# Enable -Wno-format by default when using gcc on mingw since many
20002# GCC versions complain about %I64.
20003case "${host}" in
20004 *-*-mingw32*) build_warnings="$build_warnings -Wno-format" ;;
20005esac
20006
b4e70030 20007# Check whether --enable-build-warnings or --disable-build-warnings was given.
c906108c 20008if test "${enable_build_warnings+set}" = set; then
b4e70030
JB
20009 enableval="$enable_build_warnings"
20010 case "${enableval}" in
c906108c
SS
20011 yes) ;;
20012 no) build_warnings="-w";;
20013 ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"`
20014 build_warnings="${build_warnings} ${t}";;
20015 *,) t=`echo "${enableval}" | sed -e "s/,/ /g"`
20016 build_warnings="${t} ${build_warnings}";;
20017 *) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;;
20018esac
d4f3574e 20019if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then
746a987d 20020 echo "Setting compiler warning flags = $build_warnings" 6>&1
c906108c 20021fi
b4e70030 20022fi; # Check whether --enable-gdb-build-warnings or --disable-gdb-build-warnings was given.
3b851bce 20023if test "${enable_gdb_build_warnings+set}" = set; then
b4e70030
JB
20024 enableval="$enable_gdb_build_warnings"
20025 case "${enableval}" in
3b851bce
AC
20026 yes) ;;
20027 no) build_warnings="-w";;
20028 ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"`
20029 build_warnings="${build_warnings} ${t}";;
20030 *,) t=`echo "${enableval}" | sed -e "s/,/ /g"`
20031 build_warnings="${t} ${build_warnings}";;
20032 *) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;;
20033esac
20034if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then
20035 echo "Setting GDB specific compiler warning flags = $build_warnings" 6>&1
20036fi
b4e70030 20037fi; WARN_CFLAGS=""
c906108c
SS
20038if test "x${build_warnings}" != x -a "x$GCC" = xyes
20039then
b4e70030
JB
20040 echo "$as_me:$LINENO: checking compiler warning flags" >&5
20041echo $ECHO_N "checking compiler warning flags... $ECHO_C" >&6
746a987d
AC
20042 # Separate out the -Werror flag as some files just cannot be
20043 # compiled with it enabled.
20044 for w in ${build_warnings}; do
20045 case $w in
20046 -Werr*) WERROR_CFLAGS=-Werror ;;
20047 *) # Check that GCC accepts it
4536bbc6
AC
20048 saved_CFLAGS="$CFLAGS"
20049 CFLAGS="$CFLAGS $w"
bec39cab
AC
20050 cat >conftest.$ac_ext <<_ACEOF
20051/* confdefs.h. */
20052_ACEOF
20053cat confdefs.h >>conftest.$ac_ext
20054cat >>conftest.$ac_ext <<_ACEOF
20055/* end confdefs.h. */
4536bbc6 20056
bec39cab
AC
20057int
20058main ()
20059{
4536bbc6 20060
bec39cab
AC
20061 ;
20062 return 0;
20063}
20064_ACEOF
20065rm -f conftest.$ac_objext
20066if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
20067 (eval $ac_compile) 2>conftest.er1
20068 ac_status=$?
20069 grep -v '^ *+' conftest.er1 >conftest.err
20070 rm -f conftest.er1
20071 cat conftest.err >&5
20072 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20073 (exit $ac_status); } &&
b4e70030
JB
20074 { ac_try='test -z "$ac_c_werror_flag"
20075 || test ! -s conftest.err'
bec39cab
AC
20076 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20077 (eval $ac_try) 2>&5
20078 ac_status=$?
20079 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20080 (exit $ac_status); }; } &&
20081 { ac_try='test -s conftest.$ac_objext'
20082 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20083 (eval $ac_try) 2>&5
20084 ac_status=$?
20085 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20086 (exit $ac_status); }; }; then
4536bbc6
AC
20087 WARN_CFLAGS="${WARN_CFLAGS} $w"
20088else
bec39cab
AC
20089 echo "$as_me: failed program was:" >&5
20090sed 's/^/| /' conftest.$ac_ext >&5
20091
4536bbc6 20092fi
bec39cab 20093rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
4536bbc6 20094 CFLAGS="$saved_CFLAGS"
746a987d
AC
20095 esac
20096 done
aa79a185
DJ
20097 echo "$as_me:$LINENO: result: ${WARN_CFLAGS} ${WERROR_CFLAGS}" >&5
20098echo "${ECHO_T}${WARN_CFLAGS} ${WERROR_CFLAGS}" >&6
c906108c
SS
20099fi
20100
20101
104c1213 20102
7a292a7a 20103# In the Cygwin environment, we need some additional flags.
b4e70030
JB
20104echo "$as_me:$LINENO: checking for cygwin" >&5
20105echo $ECHO_N "checking for cygwin... $ECHO_C" >&6
bec39cab
AC
20106if test "${gdb_cv_os_cygwin+set}" = set; then
20107 echo $ECHO_N "(cached) $ECHO_C" >&6
20108else
20109 cat >conftest.$ac_ext <<_ACEOF
20110/* confdefs.h. */
20111_ACEOF
20112cat confdefs.h >>conftest.$ac_ext
20113cat >>conftest.$ac_ext <<_ACEOF
20114/* end confdefs.h. */
7a292a7a
SS
20115
20116#if defined (__CYGWIN__) || defined (__CYGWIN32__)
20117lose
20118#endif
bec39cab 20119_ACEOF
7a292a7a 20120if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
bec39cab 20121 $EGREP "lose" >/dev/null 2>&1; then
7a292a7a
SS
20122 gdb_cv_os_cygwin=yes
20123else
7a292a7a
SS
20124 gdb_cv_os_cygwin=no
20125fi
20126rm -f conftest*
20127
20128fi
b4e70030
JB
20129echo "$as_me:$LINENO: result: $gdb_cv_os_cygwin" >&5
20130echo "${ECHO_T}$gdb_cv_os_cygwin" >&6
7a292a7a 20131
aff38e61 20132
3eb25fda 20133SER_HARDWIRE="ser-base.o ser-unix.o ser-pipe.o ser-tcp.o"
aff38e61 20134case ${host} in
95cbc983
AC
20135 *go32* ) SER_HARDWIRE=ser-go32.o ;;
20136 *djgpp* ) SER_HARDWIRE=ser-go32.o ;;
0ea3f30e 20137 *mingw32*) SER_HARDWIRE="ser-base.o ser-tcp.o ser-mingw.o" ;;
aff38e61
AC
20138esac
20139
20140
cd0fc7c3
SS
20141# libreadline needs libuser32.a in a cygwin environment
20142WIN32LIBS=
20143if test x$gdb_cv_os_cygwin = xyes; then
c5394b80
JM
20144 WIN32LIBS="-luser32"
20145 case "${target}" in
20146 *cygwin*) WIN32LIBS="$WIN32LIBS -limagehlp"
20147 ;;
20148 esac
cd0fc7c3 20149fi
c906108c 20150
b4505029
MM
20151# The ser-tcp.c module requires sockets.
20152case ${host} in
20153 *mingw32*)
20154
20155cat >>confdefs.h <<\_ACEOF
20156#define USE_WIN32API 1
20157_ACEOF
20158
20159 WIN32LIBS="$WIN32LIBS -lws2_32"
20160 ;;
20161esac
20162
7a292a7a 20163
31d99776
DJ
20164# Add ELF support to GDB, but only if BFD includes ELF support.
20165OLD_CFLAGS=$CFLAGS
20166OLD_LDFLAGS=$LDFLAGS
20167OLD_LIBS=$LIBS
cab58a69 20168CFLAGS="$CFLAGS -I${srcdir}/../include -I../bfd -I${srcdir}/../bfd"
31d99776 20169LDFLAGS="$LDFLAGS -L../bfd -L../libiberty"
7b3200f9 20170intl=`echo $LIBINTL | sed 's,${top_builddir}/,,g'`
0f72fb1c 20171LIBS="-lbfd -liberty $intl $LIBS"
31d99776
DJ
20172echo "$as_me:$LINENO: checking for ELF support in BFD" >&5
20173echo $ECHO_N "checking for ELF support in BFD... $ECHO_C" >&6
20174if test "${gdb_cv_var_elf+set}" = set; then
20175 echo $ECHO_N "(cached) $ECHO_C" >&6
20176else
20177 cat >conftest.$ac_ext <<_ACEOF
20178/* confdefs.h. */
20179_ACEOF
20180cat confdefs.h >>conftest.$ac_ext
20181cat >>conftest.$ac_ext <<_ACEOF
20182/* end confdefs.h. */
20183#include <stdlib.h>
20184#include "bfd.h"
20185#include "elf-bfd.h"
20186
20187int
20188main ()
20189{
20190bfd *abfd = NULL; bfd_get_elf_phdr_upper_bound (abfd);
20191 ;
20192 return 0;
20193}
20194_ACEOF
20195rm -f conftest.$ac_objext conftest$ac_exeext
20196if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
20197 (eval $ac_link) 2>conftest.er1
20198 ac_status=$?
20199 grep -v '^ *+' conftest.er1 >conftest.err
20200 rm -f conftest.er1
20201 cat conftest.err >&5
20202 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20203 (exit $ac_status); } &&
20204 { ac_try='test -z "$ac_c_werror_flag"
20205 || test ! -s conftest.err'
20206 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20207 (eval $ac_try) 2>&5
20208 ac_status=$?
20209 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20210 (exit $ac_status); }; } &&
20211 { ac_try='test -s conftest$ac_exeext'
20212 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20213 (eval $ac_try) 2>&5
20214 ac_status=$?
20215 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20216 (exit $ac_status); }; }; then
20217 gdb_cv_var_elf=yes
20218else
20219 echo "$as_me: failed program was:" >&5
20220sed 's/^/| /' conftest.$ac_ext >&5
20221
20222gdb_cv_var_elf=no
20223fi
20224rm -f conftest.err conftest.$ac_objext \
20225 conftest$ac_exeext conftest.$ac_ext
20226fi
20227echo "$as_me:$LINENO: result: $gdb_cv_var_elf" >&5
20228echo "${ECHO_T}$gdb_cv_var_elf" >&6
20229if test $gdb_cv_var_elf = yes; then
20230 CONFIG_OBS="$CONFIG_OBS elfread.o"
20231
20232cat >>confdefs.h <<\_ACEOF
20233#define HAVE_ELF 1
20234_ACEOF
20235
20236fi
20237CFLAGS=$OLD_CFLAGS
20238LDFLAGS=$OLD_LDFLAGS
20239LIBS=$OLD_LIBS
20240
121ce6e5
DJ
20241# Add any host-specific objects to GDB.
20242CONFIG_OBS="${CONFIG_OBS} ${gdb_host_obs}"
20243
3fc11d3e
JM
20244LIBGUI="../libgui/src/libgui.a"
20245GUI_CFLAGS_X="-I${srcdir}/../libgui/src"
20246
20247
7a292a7a 20248
3fc11d3e
JM
20249WIN32LDAPP=
20250
20251
20252
d91670b9 20253case "${host}" in
686a5eed 20254*-*-cygwin* | *-*-mingw* )
d91670b9
CV
20255 configdir="win"
20256 ;;
20257*)
20258 configdir="unix"
20259 ;;
20260esac
3fc11d3e
JM
20261
20262GDBTKLIBS=
20263if test "${enable_gdbtk}" = "yes"; then
20264
d1c3b63a
KS
20265 # Gdbtk must have an absolute path to srcdir in order to run
20266 # properly when not installed.
20267 here=`pwd`
20268 cd ${srcdir}
20269 GDBTK_SRC_DIR=`pwd`
20270 cd $here
20271
bec39cab 20272
5062cc19
KS
20273 #
20274 # Ok, lets find the tcl configuration
20275 # First, look for one uninstalled.
20276 # the alternative search directory is invoked by --with-tcl
20277 #
3fc11d3e 20278
5062cc19
KS
20279 if test x"${no_tcl}" = x ; then
20280 # we reset no_tcl in case something fails here
20281 no_tcl=true
bec39cab 20282
5062cc19
KS
20283# Check whether --with-tcl or --without-tcl was given.
20284if test "${with_tcl+set}" = set; then
20285 withval="$with_tcl"
b4e70030
JB
20286 with_tclconfig=${withval}
20287fi;
5062cc19 20288 echo "$as_me:$LINENO: checking for Tcl configuration" >&5
b4e70030 20289echo $ECHO_N "checking for Tcl configuration... $ECHO_C" >&6
5062cc19 20290 if test "${ac_cv_c_tclconfig+set}" = set; then
bec39cab 20291 echo $ECHO_N "(cached) $ECHO_C" >&6
3fc11d3e 20292else
bec39cab 20293
3fc11d3e 20294
5062cc19
KS
20295 # First check to see if --with-tcl was specified.
20296 case "${host}" in
20297 *-*-cygwin*) platDir="win" ;;
20298 *) platDir="unix" ;;
20299 esac
20300 if test x"${with_tclconfig}" != x ; then
20301 if test -f "${with_tclconfig}/tclConfig.sh" ; then
20302 ac_cv_c_tclconfig=`(cd ${with_tclconfig}; pwd)`
20303 else
20304 { { echo "$as_me:$LINENO: error: ${with_tclconfig} directory doesn't contain tclConfig.sh" >&5
bec39cab
AC
20305echo "$as_me: error: ${with_tclconfig} directory doesn't contain tclConfig.sh" >&2;}
20306 { (exit 1); exit 1; }; }
5062cc19
KS
20307 fi
20308 fi
20309
20310 # then check for a private Tcl installation
20311 if test x"${ac_cv_c_tclconfig}" = x ; then
20312 for i in \
20313 ../tcl \
20314 `ls -dr ../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
20315 `ls -dr ../tcl[8-9].[0-9] 2>/dev/null` \
20316 `ls -dr ../tcl[8-9].[0-9]* 2>/dev/null` \
20317 ../../tcl \
20318 `ls -dr ../../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
20319 `ls -dr ../../tcl[8-9].[0-9] 2>/dev/null` \
20320 `ls -dr ../../tcl[8-9].[0-9]* 2>/dev/null` \
20321 ../../../tcl \
20322 `ls -dr ../../../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
20323 `ls -dr ../../../tcl[8-9].[0-9] 2>/dev/null` \
20324 `ls -dr ../../../tcl[8-9].[0-9]* 2>/dev/null` ; do
20325 if test -f "$i/$platDir/tclConfig.sh" ; then
20326 ac_cv_c_tclconfig=`(cd $i/$platDir; pwd)`
20327 break
20328 fi
20329 done
20330 fi
20331
20332 # on Darwin, check in Framework installation locations
20333 if test "`uname -s`" = "Darwin" -a x"${ac_cv_c_tclconfig}" = x ; then
20334 for i in `ls -d ~/Library/Frameworks 2>/dev/null` \
20335 `ls -d /Library/Frameworks 2>/dev/null` \
20336 `ls -d /Network/Library/Frameworks 2>/dev/null` \
20337 `ls -d /System/Library/Frameworks 2>/dev/null` \
20338 ; do
20339 if test -f "$i/Tcl.framework/tclConfig.sh" ; then
20340 ac_cv_c_tclconfig=`(cd $i/Tcl.framework; pwd)`
20341 break
20342 fi
20343 done
20344 fi
20345
20346 # check in a few common install locations
20347 if test x"${ac_cv_c_tclconfig}" = x ; then
20348 for i in `ls -d ${libdir} 2>/dev/null` \
20349 `ls -d ${exec_prefix}/lib 2>/dev/null` \
20350 `ls -d ${prefix}/lib 2>/dev/null` \
20351 `ls -d /usr/local/lib 2>/dev/null` \
20352 `ls -d /usr/contrib/lib 2>/dev/null` \
20353 `ls -d /usr/lib 2>/dev/null` \
20354 ; do
20355 if test -f "$i/tclConfig.sh" ; then
20356 ac_cv_c_tclconfig=`(cd $i; pwd)`
20357 break
20358 fi
20359 done
20360 fi
3fc11d3e 20361
5062cc19
KS
20362 # check in a few other private locations
20363 if test x"${ac_cv_c_tclconfig}" = x ; then
20364 for i in \
20365 ${srcdir}/../tcl \
20366 `ls -dr ${srcdir}/../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
20367 `ls -dr ${srcdir}/../tcl[8-9].[0-9] 2>/dev/null` \
20368 `ls -dr ${srcdir}/../tcl[8-9].[0-9]* 2>/dev/null` ; do
20369 if test -f "$i/$platDir/tclConfig.sh" ; then
20370 ac_cv_c_tclconfig=`(cd $i/$platDir; pwd)`
20371 break
20372 fi
20373 done
20374 fi
bec39cab 20375
3fc11d3e
JM
20376fi
20377
5062cc19
KS
20378
20379 if test x"${ac_cv_c_tclconfig}" = x ; then
20380 TCL_BIN_DIR="# no Tcl configs found"
20381 { echo "$as_me:$LINENO: WARNING: Can't find Tcl configuration definitions" >&5
bec39cab 20382echo "$as_me: WARNING: Can't find Tcl configuration definitions" >&2;}
5062cc19
KS
20383 else
20384 no_tcl=
20385 TCL_BIN_DIR=${ac_cv_c_tclconfig}
20386 echo "$as_me:$LINENO: result: found ${TCL_BIN_DIR}/tclConfig.sh" >&5
20387echo "${ECHO_T}found ${TCL_BIN_DIR}/tclConfig.sh" >&6
20388 fi
20389 fi
3fc11d3e 20390
bec39cab 20391
85541719
DE
20392 # If $no_tk is nonempty, then we can't do Tk, and there is no
20393 # point to doing Tcl.
bec39cab 20394
5062cc19
KS
20395 #
20396 # Ok, lets find the tk configuration
20397 # First, look for one uninstalled.
20398 # the alternative search directory is invoked by --with-tk
20399 #
3fc11d3e 20400
5062cc19
KS
20401 if test x"${no_tk}" = x ; then
20402 # we reset no_tk in case something fails here
20403 no_tk=true
bec39cab 20404
5062cc19
KS
20405# Check whether --with-tk or --without-tk was given.
20406if test "${with_tk+set}" = set; then
20407 withval="$with_tk"
20408 with_tkconfig=${withval}
b4e70030 20409fi;
5062cc19
KS
20410 echo "$as_me:$LINENO: checking for Tk configuration" >&5
20411echo $ECHO_N "checking for Tk configuration... $ECHO_C" >&6
20412 if test "${ac_cv_c_tkconfig+set}" = set; then
bec39cab
AC
20413 echo $ECHO_N "(cached) $ECHO_C" >&6
20414else
3fc11d3e
JM
20415
20416
5062cc19
KS
20417 # First check to see if --with-tkconfig was specified.
20418 if test x"${with_tkconfig}" != x ; then
20419 if test -f "${with_tkconfig}/tkConfig.sh" ; then
20420 ac_cv_c_tkconfig=`(cd ${with_tkconfig}; pwd)`
20421 else
20422 { { echo "$as_me:$LINENO: error: ${with_tkconfig} directory doesn't contain tkConfig.sh" >&5
20423echo "$as_me: error: ${with_tkconfig} directory doesn't contain tkConfig.sh" >&2;}
bec39cab 20424 { (exit 1); exit 1; }; }
5062cc19
KS
20425 fi
20426 fi
3fc11d3e 20427
5062cc19
KS
20428 # then check for a private Tk library
20429 case "${host}" in
20430 *-*-cygwin*) platDir="win" ;;
20431 *) platDir="unix" ;;
20432 esac
20433 if test x"${ac_cv_c_tkconfig}" = x ; then
20434 for i in \
20435 ../tk \
20436 `ls -dr ../tk[8-9].[0-9].[0-9]* 2>/dev/null` \
20437 `ls -dr ../tk[8-9].[0-9] 2>/dev/null` \
20438 `ls -dr ../tk[8-9].[0-9]* 2>/dev/null` \
20439 ../../tk \
20440 `ls -dr ../../tk[8-9].[0-9].[0-9]* 2>/dev/null` \
20441 `ls -dr ../../tk[8-9].[0-9] 2>/dev/null` \
20442 `ls -dr ../../tk[8-9].[0-9]* 2>/dev/null` \
20443 ../../../tk \
20444 `ls -dr ../../../tk[8-9].[0-9].[0-9]* 2>/dev/null` \
20445 `ls -dr ../../../tk[8-9].[0-9] 2>/dev/null` \
20446 `ls -dr ../../../tk[8-9].[0-9]* 2>/dev/null` ; do
20447 if test -f "$i/$platDir/tkConfig.sh" ; then
20448 ac_cv_c_tkconfig=`(cd $i/$platDir; pwd)`
20449 break
20450 fi
20451 done
20452 fi
20453
20454 # on Darwin, check in Framework installation locations
20455 if test "`uname -s`" = "Darwin" -a x"${ac_cv_c_tkconfig}" = x ; then
20456 for i in `ls -d ~/Library/Frameworks 2>/dev/null` \
20457 `ls -d /Library/Frameworks 2>/dev/null` \
20458 `ls -d /Network/Library/Frameworks 2>/dev/null` \
20459 `ls -d /System/Library/Frameworks 2>/dev/null` \
20460 ; do
20461 if test -f "$i/Tk.framework/tkConfig.sh" ; then
20462 ac_cv_c_tkconfig=`(cd $i/Tk.framework; pwd)`
20463 break
20464 fi
20465 done
20466 fi
20467
20468 # check in a few common install locations
20469 if test x"${ac_cv_c_tkconfig}" = x ; then
20470 for i in `ls -d ${libdir} 2>/dev/null` \
20471 `ls -d ${exec_prefix}/lib 2>/dev/null` \
20472 `ls -d ${prefix}/lib 2>/dev/null` \
20473 `ls -d /usr/local/lib 2>/dev/null` \
20474 `ls -d /usr/contrib/lib 2>/dev/null` \
20475 `ls -d /usr/lib 2>/dev/null` \
20476 ; do
20477 if test -f "$i/tkConfig.sh" ; then
20478 ac_cv_c_tkconfig=`(cd $i; pwd)`
20479 break
20480 fi
20481 done
20482 fi
20483 # check in a few other private locations
20484 if test x"${ac_cv_c_tkconfig}" = x ; then
20485 for i in \
20486 ${srcdir}/../tk \
20487 `ls -dr ${srcdir}/../tk[8-9].[0-9].[0-9]* 2>/dev/null` \
20488 `ls -dr ${srcdir}/../tk[8-9].[0-9] 2>/dev/null` \
20489 `ls -dr ${srcdir}/../tk[8-9].[0-9]* 2>/dev/null` ; do
20490 if test -f "$i/$platDir/tkConfig.sh" ; then
20491 ac_cv_c_tkconfig=`(cd $i/$platDir; pwd)`
20492 break
20493 fi
20494 done
20495 fi
3fc11d3e 20496
3fc11d3e
JM
20497fi
20498
20499
5062cc19
KS
20500 if test x"${ac_cv_c_tkconfig}" = x ; then
20501 TK_BIN_DIR="# no Tk configs found"
20502 { echo "$as_me:$LINENO: WARNING: Can't find Tk configuration definitions" >&5
20503echo "$as_me: WARNING: Can't find Tk configuration definitions" >&2;}
5062cc19
KS
20504 else
20505 no_tk=
20506 TK_BIN_DIR=${ac_cv_c_tkconfig}
20507 echo "$as_me:$LINENO: result: found ${TK_BIN_DIR}/tkConfig.sh" >&5
20508echo "${ECHO_T}found ${TK_BIN_DIR}/tkConfig.sh" >&6
20509 fi
3fc11d3e 20510 fi
dd2504ab 20511
dd2504ab 20512
85541719
DE
20513 if test -z "${no_tcl}" -a -z "${no_tk}"; then
20514
20515 echo "$as_me:$LINENO: checking for existence of ${TCL_BIN_DIR}/tclConfig.sh" >&5
20516echo $ECHO_N "checking for existence of ${TCL_BIN_DIR}/tclConfig.sh... $ECHO_C" >&6
20517
20518 if test -f "${TCL_BIN_DIR}/tclConfig.sh" ; then
20519 echo "$as_me:$LINENO: result: loading" >&5
20520echo "${ECHO_T}loading" >&6
20521 . ${TCL_BIN_DIR}/tclConfig.sh
20522 else
20523 echo "$as_me:$LINENO: result: could not find ${TCL_BIN_DIR}/tclConfig.sh" >&5
20524echo "${ECHO_T}could not find ${TCL_BIN_DIR}/tclConfig.sh" >&6
20525 fi
20526
20527 # eval is required to do the TCL_DBGX substitution
20528 eval "TCL_LIB_FILE=\"${TCL_LIB_FILE}\""
20529 eval "TCL_STUB_LIB_FILE=\"${TCL_STUB_LIB_FILE}\""
20530
20531 # If the TCL_BIN_DIR is the build directory (not the install directory),
20532 # then set the common variable name to the value of the build variables.
20533 # For example, the variable TCL_LIB_SPEC will be set to the value
20534 # of TCL_BUILD_LIB_SPEC. An extension should make use of TCL_LIB_SPEC
20535 # instead of TCL_BUILD_LIB_SPEC since it will work with both an
20536 # installed and uninstalled version of Tcl.
20537 if test -f "${TCL_BIN_DIR}/Makefile" ; then
20538 TCL_LIB_SPEC=${TCL_BUILD_LIB_SPEC}
20539 TCL_STUB_LIB_SPEC=${TCL_BUILD_STUB_LIB_SPEC}
20540 TCL_STUB_LIB_PATH=${TCL_BUILD_STUB_LIB_PATH}
20541 elif test "`uname -s`" = "Darwin"; then
20542 # If Tcl was built as a framework, attempt to use the libraries
20543 # from the framework at the given location so that linking works
20544 # against Tcl.framework installed in an arbitary location.
20545 case ${TCL_DEFS} in
20546 *TCL_FRAMEWORK*)
20547 if test -f "${TCL_BIN_DIR}/${TCL_LIB_FILE}"; then
20548 for i in "`cd ${TCL_BIN_DIR}; pwd`" \
20549 "`cd ${TCL_BIN_DIR}/../..; pwd`"; do
20550 if test "`basename "$i"`" = "${TCL_LIB_FILE}.framework"; then
20551 TCL_LIB_SPEC="-F`dirname "$i"` -framework ${TCL_LIB_FILE}"
20552 break
20553 fi
20554 done
20555 fi
20556 if test -f "${TCL_BIN_DIR}/${TCL_STUB_LIB_FILE}"; then
20557 TCL_STUB_LIB_SPEC="-L${TCL_BIN_DIR} ${TCL_STUB_LIB_FLAG}"
20558 TCL_STUB_LIB_PATH="${TCL_BIN_DIR}/${TCL_STUB_LIB_FILE}"
20559 fi
20560 ;;
20561 esac
20562 fi
20563
20564 # eval is required to do the TCL_DBGX substitution
20565 eval "TCL_LIB_FLAG=\"${TCL_LIB_FLAG}\""
20566 eval "TCL_LIB_SPEC=\"${TCL_LIB_SPEC}\""
20567 eval "TCL_STUB_LIB_FLAG=\"${TCL_STUB_LIB_FLAG}\""
20568 eval "TCL_STUB_LIB_SPEC=\"${TCL_STUB_LIB_SPEC}\""
20569
20570
20571
20572
20573
20574
20575
20576
20577
20578
20579
20580
20581
20582
20583
20584 # Check for in-tree tcl
20585 here=`pwd`
20586 cd ${srcdir}/..
20587 topdir=`pwd`
20588 cd ${here}
20589
20590 intree="no"
20591 if test "${TCL_SRC_DIR}" = "${topdir}/tcl"; then
20592 intree="yes"
20593 fi
20594
20595 # Find Tcl private headers
20596 if test x"${intree}" = xno; then
20597
20598 echo "$as_me:$LINENO: checking for Tcl private headers" >&5
20599echo $ECHO_N "checking for Tcl private headers... $ECHO_C" >&6
20600 private_dir=""
20601 dir=`echo ${TCL_INCLUDE_SPEC}/tcl-private/generic | sed -e s/-I//`
20602 if test -f ${dir}/tclInt.h ; then
20603 private_dir=${dir}
20604 fi
20605
20606 if test x"${private_dir}" = x; then
20607 { { echo "$as_me:$LINENO: error: could not find private Tcl headers" >&5
20608echo "$as_me: error: could not find private Tcl headers" >&2;}
20609 { (exit 1); exit 1; }; }
20610 else
20611 TCL_PRIVATE_INCLUDE="-I${private_dir}"
20612 echo "$as_me:$LINENO: result: ${private_dir}" >&5
20613echo "${ECHO_T}${private_dir}" >&6
20614 fi
20615
20616 TCL_INCLUDE="${TCL_INCLUDE_SPEC} ${TCL_PRIVATE_INCLUDE}"
20617 TCL_LIBRARY="${TCL_LIB_SPEC}"
20618 TCL_DEPS=""
20619 else
20620 # If building tcl in the same src tree, private headers
20621 # are not needed, but we need to be sure to use the right
20622 # headers library
20623 TCL_INCLUDE="-I${TCL_SRC_DIR}/generic"
20624 TCL_LIBRARY="${TCL_BUILD_LIB_SPEC}"
20625 TCL_DEPS="../tcl/${configdir}${TCL_LIB_FILE}"
20626 fi
20627
20628
20629
20630
20631
5062cc19
KS
20632 echo "$as_me:$LINENO: checking for existence of ${TK_BIN_DIR}/tkConfig.sh" >&5
20633echo $ECHO_N "checking for existence of ${TK_BIN_DIR}/tkConfig.sh... $ECHO_C" >&6
dd2504ab 20634
5062cc19
KS
20635 if test -f "${TK_BIN_DIR}/tkConfig.sh" ; then
20636 echo "$as_me:$LINENO: result: loading" >&5
20637echo "${ECHO_T}loading" >&6
20638 . ${TK_BIN_DIR}/tkConfig.sh
3fc11d3e 20639 else
5062cc19
KS
20640 echo "$as_me:$LINENO: result: could not find ${TK_BIN_DIR}/tkConfig.sh" >&5
20641echo "${ECHO_T}could not find ${TK_BIN_DIR}/tkConfig.sh" >&6
3fc11d3e 20642 fi
bec39cab 20643
5062cc19
KS
20644 # eval is required to do the TK_DBGX substitution
20645 eval "TK_LIB_FILE=\"${TK_LIB_FILE}\""
20646 eval "TK_STUB_LIB_FILE=\"${TK_STUB_LIB_FILE}\""
20647
20648 # If the TK_BIN_DIR is the build directory (not the install directory),
20649 # then set the common variable name to the value of the build variables.
20650 # For example, the variable TK_LIB_SPEC will be set to the value
20651 # of TK_BUILD_LIB_SPEC. An extension should make use of TK_LIB_SPEC
20652 # instead of TK_BUILD_LIB_SPEC since it will work with both an
20653 # installed and uninstalled version of Tcl.
85541719 20654 if test -f "${TK_BIN_DIR}/Makefile" ; then
5062cc19
KS
20655 TK_LIB_SPEC=${TK_BUILD_LIB_SPEC}
20656 TK_STUB_LIB_SPEC=${TK_BUILD_STUB_LIB_SPEC}
20657 TK_STUB_LIB_PATH=${TK_BUILD_STUB_LIB_PATH}
20658 elif test "`uname -s`" = "Darwin"; then
20659 # If Tk was built as a framework, attempt to use the libraries
20660 # from the framework at the given location so that linking works
20661 # against Tk.framework installed in an arbitary location.
20662 case ${TK_DEFS} in
20663 *TK_FRAMEWORK*)
85541719 20664 if test -f "${TK_BIN_DIR}/${TK_LIB_FILE}"; then
5062cc19
KS
20665 for i in "`cd ${TK_BIN_DIR}; pwd`" \
20666 "`cd ${TK_BIN_DIR}/../..; pwd`"; do
20667 if test "`basename "$i"`" = "${TK_LIB_FILE}.framework"; then
20668 TK_LIB_SPEC="-F`dirname "$i"` -framework ${TK_LIB_FILE}"
20669 break
20670 fi
20671 done
20672 fi
85541719 20673 if test -f "${TK_BIN_DIR}/${TK_STUB_LIB_FILE}"; then
5062cc19
KS
20674 TK_STUB_LIB_SPEC="-L${TK_BIN_DIR} ${TK_STUB_LIB_FLAG}"
20675 TK_STUB_LIB_PATH="${TK_BIN_DIR}/${TK_STUB_LIB_FILE}"
20676 fi
20677 ;;
20678 esac
3fc11d3e
JM
20679 fi
20680
5062cc19
KS
20681 # eval is required to do the TK_DBGX substitution
20682 eval "TK_LIB_FLAG=\"${TK_LIB_FLAG}\""
20683 eval "TK_LIB_SPEC=\"${TK_LIB_SPEC}\""
20684 eval "TK_STUB_LIB_FLAG=\"${TK_STUB_LIB_FLAG}\""
20685 eval "TK_STUB_LIB_SPEC=\"${TK_STUB_LIB_SPEC}\""
3fc11d3e 20686
3fc11d3e
JM
20687
20688
bec39cab
AC
20689
20690
20691
20692
20693
20694
20695
3fc11d3e 20696
3fc11d3e 20697
bec39cab 20698
bec39cab 20699
85541719
DE
20700 # Check for in-tree Tk
20701 intree="no"
20702 if test "${TK_SRC_DIR}" = "${topdir}/tk"; then
20703 intree="yes"
20704 fi
3fc11d3e 20705
85541719
DE
20706 # Find Tk private headers
20707 if test x"${intree}" = xno; then
3fc11d3e 20708
5062cc19
KS
20709 echo "$as_me:$LINENO: checking for Tk private headers" >&5
20710echo $ECHO_N "checking for Tk private headers... $ECHO_C" >&6
20711 private_dir=""
20712 dir=`echo ${TK_INCLUDE_SPEC}/tk-private/generic | sed -e s/-I//`
20713 if test -f ${dir}/tkInt.h; then
20714 private_dir=${dir}
3fc11d3e 20715 fi
bec39cab 20716
5062cc19
KS
20717 if test x"${private_dir}" = x; then
20718 { { echo "$as_me:$LINENO: error: could not find Tk private headers" >&5
20719echo "$as_me: error: could not find Tk private headers" >&2;}
20720 { (exit 1); exit 1; }; }
3fc11d3e 20721 else
5062cc19
KS
20722 TK_PRIVATE_INCLUDE="-I${private_dir}"
20723 echo "$as_me:$LINENO: result: ${private_dir}" >&5
20724echo "${ECHO_T}${private_dir}" >&6
3fc11d3e 20725 fi
3fc11d3e 20726
85541719
DE
20727 TK_INCLUDE="${TK_INCLUDE_SPEC} ${TK_PRIVATE_INCLUDE}"
20728 TK_LIBRARY=${TK_LIB_SPEC}
20729 TK_DEPS=""
20730 else
20731 TK_INCLUDE="-I${TK_SRC_DIR}/generic"
20732 TK_LIBRARY="${TK_BUILD_LIB_SPEC}"
20733 TK_DEPS="../tk/${configdir}/${TK_LIB_FILE}"
20734 fi
3fc11d3e
JM
20735
20736
3fc11d3e
JM
20737
20738
3fc11d3e 20739
85541719 20740 ENABLE_CFLAGS="${ENABLE_CFLAGS} \$(SUBDIR_GDBTK_CFLAGS)"
3fc11d3e 20741
85541719
DE
20742 # Include some libraries that Tcl and Tk want.
20743 TCL_LIBS='$(LIBGUI) $(TK) $(TCL) $(X11_LDFLAGS) $(X11_LIBS)'
20744 # Yes, the ordering seems wrong here. But it isn't.
20745 # TK_LIBS is the list of libraries that need to be linked
20746 # after Tcl/Tk. Note that this isn't put into LIBS. If it
20747 # were in LIBS then any link tests after this point would
20748 # try to include things like `$(LIBGUI)', which wouldn't work.
20749 GDBTKLIBS="${TCL_LIBS} ${TK_LIBS}"
4226a5a5 20750
85541719
DE
20751 CONFIG_OBS="${CONFIG_OBS} \$(SUBDIR_GDBTK_OBS)"
20752 CONFIG_DEPS="${CONFIG_DEPS} \$(SUBDIR_GDBTK_DEPS)"
20753 CONFIG_SRCS="${CONFIG_SRCS} \$(SUBDIR_GDBTK_SRCS)"
20754 CONFIG_ALL="${CONFIG_ALL} all-gdbtk"
20755 CONFIG_CLEAN="${CONFIG_CLEAN} clean-gdbtk"
20756 CONFIG_INSTALL="${CONFIG_INSTALL} install-gdbtk"
20757 CONFIG_UNINSTALL="${CONFIG_UNINSTALL} uninstall-gdbtk"
3fc11d3e 20758
85541719
DE
20759 if test x$gdb_cv_os_cygwin = xyes; then
20760 WIN32LIBS="${WIN32LIBS} -lshell32 -lgdi32 -lcomdlg32 -ladvapi32"
20761 WIN32LDAPP="-Wl,--subsystem,console"
20762 CONFIG_OBS="${CONFIG_OBS} gdbres.o"
3fc11d3e 20763 fi
ffc6a242 20764
b4e70030
JB
20765
20766
20767subdirs="$subdirs gdbtk"
3ace7edb 20768
85541719 20769 fi
3fc11d3e
JM
20770fi
20771
20772
20773
20774
20775
20776
20777
20778
b4e70030
JB
20779echo "$as_me:$LINENO: checking for X" >&5
20780echo $ECHO_N "checking for X... $ECHO_C" >&6
bec39cab 20781
c906108c 20782
b4e70030 20783# Check whether --with-x or --without-x was given.
c906108c 20784if test "${with_x+set}" = set; then
b4e70030 20785 withval="$with_x"
c906108c 20786
b4e70030 20787fi;
c906108c
SS
20788# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
20789if test "x$with_x" = xno; then
20790 # The user explicitly disabled X.
20791 have_x=disabled
20792else
20793 if test "x$x_includes" != xNONE && test "x$x_libraries" != xNONE; then
20794 # Both variables are already set.
20795 have_x=yes
20796 else
bec39cab
AC
20797 if test "${ac_cv_have_x+set}" = set; then
20798 echo $ECHO_N "(cached) $ECHO_C" >&6
c906108c
SS
20799else
20800 # One or both of the vars are not set, and there is no cached value.
bec39cab 20801ac_x_includes=no ac_x_libraries=no
b4e70030 20802rm -fr conftest.dir
bec39cab
AC
20803if mkdir conftest.dir; then
20804 cd conftest.dir
c906108c 20805 # Make sure to not put "make" in the Imakefile rules, since we grep it out.
bec39cab 20806 cat >Imakefile <<'_ACEOF'
c906108c
SS
20807acfindx:
20808 @echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"'
bec39cab 20809_ACEOF
b4e70030 20810 if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
c906108c
SS
20811 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
20812 eval `${MAKE-make} acfindx 2>/dev/null | grep -v make`
20813 # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
20814 for ac_extension in a so sl; do
20815 if test ! -f $ac_im_usrlibdir/libX11.$ac_extension &&
bec39cab
AC
20816 test -f $ac_im_libdir/libX11.$ac_extension; then
20817 ac_im_usrlibdir=$ac_im_libdir; break
c906108c
SS
20818 fi
20819 done
20820 # Screen out bogus values from the imake configuration. They are
20821 # bogus both because they are the default anyway, and because
20822 # using them would break gcc on systems where it needs fixed includes.
bec39cab 20823 case $ac_im_incroot in
b4e70030 20824 /usr/include) ;;
bec39cab 20825 *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
c906108c 20826 esac
bec39cab 20827 case $ac_im_usrlibdir in
c906108c 20828 /usr/lib | /lib) ;;
bec39cab 20829 *) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
c906108c
SS
20830 esac
20831 fi
20832 cd ..
b4e70030 20833 rm -fr conftest.dir
c906108c
SS
20834fi
20835
bec39cab
AC
20836# Standard set of common directories for X headers.
20837# Check X11 before X11Rn because it is often a symlink to the current release.
20838ac_x_header_dirs='
20839/usr/X11/include
20840/usr/X11R6/include
20841/usr/X11R5/include
20842/usr/X11R4/include
20843
20844/usr/include/X11
20845/usr/include/X11R6
20846/usr/include/X11R5
20847/usr/include/X11R4
20848
20849/usr/local/X11/include
20850/usr/local/X11R6/include
20851/usr/local/X11R5/include
20852/usr/local/X11R4/include
20853
20854/usr/local/include/X11
20855/usr/local/include/X11R6
20856/usr/local/include/X11R5
20857/usr/local/include/X11R4
20858
20859/usr/X386/include
20860/usr/x386/include
20861/usr/XFree86/include/X11
20862
20863/usr/include
20864/usr/local/include
20865/usr/unsupported/include
20866/usr/athena/include
20867/usr/local/x11r5/include
20868/usr/lpp/Xamples/include
20869
20870/usr/openwin/include
20871/usr/openwin/share/include'
20872
20873if test "$ac_x_includes" = no; then
59f80f10 20874 # Guess where to find include files, by looking for Intrinsic.h.
c906108c 20875 # First, try using that file with no special directory specified.
bec39cab
AC
20876 cat >conftest.$ac_ext <<_ACEOF
20877/* confdefs.h. */
20878_ACEOF
20879cat confdefs.h >>conftest.$ac_ext
20880cat >>conftest.$ac_ext <<_ACEOF
20881/* end confdefs.h. */
59f80f10 20882#include <X11/Intrinsic.h>
bec39cab
AC
20883_ACEOF
20884if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
20885 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
20886 ac_status=$?
20887 grep -v '^ *+' conftest.er1 >conftest.err
20888 rm -f conftest.er1
20889 cat conftest.err >&5
20890 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20891 (exit $ac_status); } >/dev/null; then
20892 if test -s conftest.err; then
20893 ac_cpp_err=$ac_c_preproc_warn_flag
20894 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
20895 else
20896 ac_cpp_err=
20897 fi
20898else
20899 ac_cpp_err=yes
20900fi
20901if test -z "$ac_cpp_err"; then
c906108c
SS
20902 # We can compile using X headers with no special include directory.
20903ac_x_includes=
20904else
bec39cab
AC
20905 echo "$as_me: failed program was:" >&5
20906sed 's/^/| /' conftest.$ac_ext >&5
20907
20908 for ac_dir in $ac_x_header_dirs; do
59f80f10 20909 if test -r "$ac_dir/X11/Intrinsic.h"; then
bec39cab
AC
20910 ac_x_includes=$ac_dir
20911 break
20912 fi
20913done
c906108c 20914fi
bec39cab
AC
20915rm -f conftest.err conftest.$ac_ext
20916fi # $ac_x_includes = no
c906108c 20917
bec39cab 20918if test "$ac_x_libraries" = no; then
c906108c 20919 # Check for the libraries.
c906108c
SS
20920 # See if we find them without any special options.
20921 # Don't add to $LIBS permanently.
bec39cab 20922 ac_save_LIBS=$LIBS
4e8d927d 20923 LIBS="-lXt $LIBS"
bec39cab
AC
20924 cat >conftest.$ac_ext <<_ACEOF
20925/* confdefs.h. */
20926_ACEOF
20927cat confdefs.h >>conftest.$ac_ext
20928cat >>conftest.$ac_ext <<_ACEOF
20929/* end confdefs.h. */
59f80f10 20930#include <X11/Intrinsic.h>
bec39cab
AC
20931int
20932main ()
20933{
59f80f10 20934XtMalloc (0)
bec39cab
AC
20935 ;
20936 return 0;
20937}
20938_ACEOF
20939rm -f conftest.$ac_objext conftest$ac_exeext
20940if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
20941 (eval $ac_link) 2>conftest.er1
20942 ac_status=$?
20943 grep -v '^ *+' conftest.er1 >conftest.err
20944 rm -f conftest.er1
20945 cat conftest.err >&5
20946 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20947 (exit $ac_status); } &&
b4e70030
JB
20948 { ac_try='test -z "$ac_c_werror_flag"
20949 || test ! -s conftest.err'
bec39cab
AC
20950 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20951 (eval $ac_try) 2>&5
20952 ac_status=$?
20953 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20954 (exit $ac_status); }; } &&
20955 { ac_try='test -s conftest$ac_exeext'
20956 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20957 (eval $ac_try) 2>&5
20958 ac_status=$?
20959 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20960 (exit $ac_status); }; }; then
20961 LIBS=$ac_save_LIBS
c906108c
SS
20962# We can link X programs with no special library path.
20963ac_x_libraries=
20964else
bec39cab
AC
20965 echo "$as_me: failed program was:" >&5
20966sed 's/^/| /' conftest.$ac_ext >&5
20967
b4e70030 20968LIBS=$ac_save_LIBS
bec39cab 20969for ac_dir in `echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
c906108c 20970do
bec39cab 20971 # Don't even attempt the hair of trying to link an X program!
c906108c 20972 for ac_extension in a so sl; do
b4e70030 20973 if test -r $ac_dir/libXt.$ac_extension; then
c906108c
SS
20974 ac_x_libraries=$ac_dir
20975 break 2
20976 fi
20977 done
20978done
20979fi
bec39cab
AC
20980rm -f conftest.err conftest.$ac_objext \
20981 conftest$ac_exeext conftest.$ac_ext
20982fi # $ac_x_libraries = no
c906108c 20983
bec39cab 20984if test "$ac_x_includes" = no || test "$ac_x_libraries" = no; then
c906108c
SS
20985 # Didn't find X anywhere. Cache the known absence of X.
20986 ac_cv_have_x="have_x=no"
20987else
20988 # Record where we found X for the cache.
20989 ac_cv_have_x="have_x=yes \
bec39cab 20990 ac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries"
c906108c
SS
20991fi
20992fi
bec39cab 20993
c906108c
SS
20994 fi
20995 eval "$ac_cv_have_x"
20996fi # $with_x != no
20997
20998if test "$have_x" != yes; then
b4e70030
JB
20999 echo "$as_me:$LINENO: result: $have_x" >&5
21000echo "${ECHO_T}$have_x" >&6
c906108c
SS
21001 no_x=yes
21002else
21003 # If each of the values was on the command line, it overrides each guess.
21004 test "x$x_includes" = xNONE && x_includes=$ac_x_includes
21005 test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
21006 # Update the cache value to reflect the command line values.
21007 ac_cv_have_x="have_x=yes \
21008 ac_x_includes=$x_includes ac_x_libraries=$x_libraries"
b4e70030
JB
21009 echo "$as_me:$LINENO: result: libraries $x_libraries, headers $x_includes" >&5
21010echo "${ECHO_T}libraries $x_libraries, headers $x_includes" >&6
c906108c
SS
21011fi
21012
21013
bec39cab 21014# Unlike the sim directory, whether a simulator is linked is controlled by
9b624dbe 21015# presence of a gdb_sim definition in the target configure.tgt entry.
7a292a7a
SS
21016# This code just checks for a few cases where we'd like to ignore those
21017# definitions, even when they're present in the '.mt' file. These cases
21018# are when --disable-sim is specified, or if the simulator directory is
6c5cfe5b 21019# not part of the source tree.
7a292a7a 21020#
b4e70030 21021# Check whether --enable-sim or --disable-sim was given.
7a292a7a 21022if test "${enable_sim+set}" = set; then
b4e70030
JB
21023 enableval="$enable_sim"
21024 echo "enable_sim = $enable_sim";
7a292a7a
SS
21025 echo "enableval = ${enableval}";
21026 case "${enableval}" in
21027 yes) ignore_sim=false ;;
21028 no) ignore_sim=true ;;
21029 *) ignore_sim=false ;;
21030 esac
21031else
21032 ignore_sim=false
b4e70030 21033fi;
7a292a7a
SS
21034
21035if test ! -d "${srcdir}/../sim"; then
21036 ignore_sim=true
21037fi
21038
9b624dbe
UW
21039SIM=
21040SIM_OBS=
21041if test "${ignore_sim}" = "false"; then
21042 if test x"${gdb_sim}" != x ; then
21043 SIM="${gdb_sim}"
21044 SIM_OBS="remote-sim.o"
60ca704f
SE
21045
21046cat >>confdefs.h <<\_ACEOF
7a292a7a 21047#define WITH_SIM 1
bec39cab 21048_ACEOF
7a292a7a 21049
9b624dbe 21050 fi
7a292a7a
SS
21051fi
21052
21053
21054
c906108c
SS
21055
21056
21057
21058
21059
21060
dfcd3bfb 21061
e56ac5c3
AC
21062
21063
b3a90332
AC
21064
21065
c35f4ffc 21066# List of host floatformats.
bec39cab
AC
21067
21068cat >>confdefs.h <<_ACEOF
c35f4ffc 21069#define GDB_HOST_FLOAT_FORMAT $gdb_host_float_format
bec39cab 21070_ACEOF
c35f4ffc 21071
bec39cab
AC
21072
21073cat >>confdefs.h <<_ACEOF
c35f4ffc 21074#define GDB_HOST_DOUBLE_FORMAT $gdb_host_double_format
bec39cab
AC
21075_ACEOF
21076
c35f4ffc 21077
bec39cab 21078cat >>confdefs.h <<_ACEOF
c35f4ffc 21079#define GDB_HOST_LONG_DOUBLE_FORMAT $gdb_host_long_double_format
bec39cab 21080_ACEOF
c35f4ffc
AC
21081
21082
c906108c
SS
21083# target_subdir is used by the testsuite to find the target libraries.
21084target_subdir=
21085if test "${host}" != "${target}"; then
21086 target_subdir="${target_alias}/"
21087fi
21088
21089
21090frags=
771b4502 21091if test "${gdb_native}" = "yes"; then
0dad8a66
MK
21092 host_makefile_frag=${srcdir}/config/${gdb_host_cpu}/${gdb_host}.mh
21093 if test ! -f ${host_makefile_frag}; then
bec39cab
AC
21094 { { echo "$as_me:$LINENO: error: \"*** Gdb does not support native target ${host}\"" >&5
21095echo "$as_me: error: \"*** Gdb does not support native target ${host}\"" >&2;}
21096 { (exit 1); exit 1; }; }
0dad8a66
MK
21097 fi
21098 frags="$frags $host_makefile_frag"
21099else
21100 host_makefile_frag=/dev/null
c906108c 21101fi
c906108c 21102
c906108c
SS
21103
21104
21105
771b4502 21106if test "${gdb_native}" = "yes"; then
a85f51e7
DJ
21107# We pick this up from the host configuration file (.mh) because we
21108# do not have a native configuration Makefile fragment.
c906108c
SS
21109nativefile=`sed -n '
21110s/NAT_FILE[ ]*=[ ]*\([^ ]*\)/\1/p
21111' ${host_makefile_frag}`
c906108c
SS
21112fi
21113
21114
b00a8037 21115if test x"${gdb_osabi}" != x ; then
bec39cab
AC
21116
21117cat >>confdefs.h <<_ACEOF
b00a8037 21118#define GDB_OSABI_DEFAULT $gdb_osabi
bec39cab 21119_ACEOF
b00a8037
DJ
21120
21121fi
21122
8dcde887 21123# Enable multi-ice-gdb-server.
b4e70030 21124# Check whether --enable-multi-ice or --disable-multi-ice was given.
8dcde887 21125if test "${enable_multi_ice+set}" = set; then
b4e70030
JB
21126 enableval="$enable_multi_ice"
21127 case $enableval in
8dcde887
MK
21128 yes | no)
21129 ;;
bec39cab
AC
21130 *) { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-multi-ice" >&5
21131echo "$as_me: error: bad value $enableval for --enable-multi-ice" >&2;}
21132 { (exit 1); exit 1; }; } ;;
8dcde887 21133 esac
b4e70030 21134fi;
4e8d927d 21135if test "x$enable_multi_ice" = xyes; then
b4e70030
JB
21136
21137
21138subdirs="$subdirs multi-ice"
3ace7edb 21139
a85f51e7
DJ
21140fi
21141
a13e2c95
UW
21142# We only build gdbserver automatically in a native configuration.
21143if test "$gdb_native" = "yes"; then
b4e70030
JB
21144 echo "$as_me:$LINENO: checking whether gdbserver is supported on this host" >&5
21145echo $ECHO_N "checking whether gdbserver is supported on this host... $ECHO_C" >&6
8dcde887 21146 if test "x$build_gdbserver" = xyes; then
b4e70030
JB
21147 echo "$as_me:$LINENO: result: yes" >&5
21148echo "${ECHO_T}yes" >&6
21149
21150
21151subdirs="$subdirs gdbserver"
3ace7edb 21152
8dcde887 21153 else
b4e70030
JB
21154 echo "$as_me:$LINENO: result: no" >&5
21155echo "${ECHO_T}no" >&6
8dcde887
MK
21156 fi
21157fi
21158
db985757 21159# If nativefile (NAT_FILE) is not set in config/*/*.m[ht] files, we link
2c0fc042 21160# to an empty version.
c906108c
SS
21161
21162files=
21163links=
5a2402b8 21164
c906108c 21165rm -f nm.h
5a2402b8 21166nm_h=""
c906108c 21167if test "${nativefile}" != ""; then
5a2402b8 21168 nm_h=nm.h
0f475e27
AC
21169 case "${nativefile}" in
21170 nm-*.h ) GDB_NM_FILE="config/${gdb_host_cpu}/${nativefile}" ;;
21171 * ) GDB_NM_FILE="${nativefile}"
21172 esac
5a2402b8
AC
21173 files="${files} ${GDB_NM_FILE}"
21174 links="${links} nm.h"
60ca704f
SE
21175
21176cat >>confdefs.h <<_ACEOF
b78960be 21177#define GDB_NM_FILE "${GDB_NM_FILE}"
bec39cab 21178_ACEOF
5a2402b8 21179
c906108c 21180fi
5a2402b8
AC
21181
21182
bec39cab
AC
21183ac_sources="$files"
21184ac_dests="$links"
21185while test -n "$ac_sources"; do
21186 set $ac_dests; ac_dest=$1; shift; ac_dests=$*
21187 set $ac_sources; ac_source=$1; shift; ac_sources=$*
21188 ac_config_links_1="$ac_config_links_1 $ac_dest:$ac_source"
21189done
b4e70030 21190 ac_config_links="$ac_config_links $ac_config_links_1"
c906108c
SS
21191
21192
c906108c
SS
21193
21194
c906108c 21195
bec39cab 21196cat >>confdefs.h <<\_ACEOF
6c7a06a3 21197#define GDB_DEFAULT_HOST_CHARSET "UTF-8"
bec39cab
AC
21198_ACEOF
21199
bec39cab 21200
89a34d1b
JM
21201
21202
21203
21204
21205
e28b3332 21206 ac_config_files="$ac_config_files Makefile .gdbinit:gdbinit.in gnulib/Makefile"
b4e70030 21207 ac_config_commands="$ac_config_commands default"
bec39cab
AC
21208cat >confcache <<\_ACEOF
21209# This file is a shell script that caches the results of configure
21210# tests run on this system so they can be shared between configure
21211# scripts and configure runs, see configure's option --config-cache.
21212# It is not useful on other systems. If it contains results you don't
21213# want to keep, you may remove or edit it.
21214#
21215# config.status only pays attention to the cache file if you give it
21216# the --recheck option to rerun configure.
21217#
21218# `ac_cv_env_foo' variables (set or unset) will be overridden when
21219# loading this file, other *unset* `ac_cv_foo' will be assigned the
21220# following values.
21221
21222_ACEOF
21223
21224# The following way of writing the cache mishandles newlines in values,
21225# but we know of no workaround that is simple, portable, and efficient.
b4e70030 21226# So, don't put newlines in cache variables' values.
bec39cab
AC
21227# Ultrix sh set writes to stderr and can't be redirected directly,
21228# and sets the high bit in the cache file unless we assign to the vars.
b4e70030 21229{
bec39cab 21230 (set) 2>&1 |
b4e70030
JB
21231 case `(ac_space=' '; set | grep ac_space) 2>&1` in
21232 *ac_space=\ *)
bec39cab
AC
21233 # `set' does not quote correctly, so add quotes (double-quote
21234 # substitution turns \\\\ into \\, and sed turns \\ into \).
21235 sed -n \
21236 "s/'/'\\\\''/g;
21237 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
b4e70030 21238 ;;
bec39cab
AC
21239 *)
21240 # `set' quotes correctly as required by POSIX, so do not add quotes.
b4e70030
JB
21241 sed -n \
21242 "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
bec39cab 21243 ;;
b4e70030
JB
21244 esac;
21245} |
bec39cab
AC
21246 sed '
21247 t clear
b4e70030 21248 : clear
bec39cab
AC
21249 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
21250 t end
b4e70030
JB
21251 /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
21252 : end' >>confcache
bec39cab
AC
21253if diff $cache_file confcache >/dev/null 2>&1; then :; else
21254 if test -w $cache_file; then
b4e70030 21255 test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
bec39cab
AC
21256 cat confcache >$cache_file
21257 else
b4e70030 21258 echo "not updating unwritable cache $cache_file"
bec39cab
AC
21259 fi
21260fi
21261rm -f confcache
21262
21263test "x$prefix" = xNONE && prefix=$ac_default_prefix
21264# Let make expand exec_prefix.
21265test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
21266
b4e70030
JB
21267# VPATH may cause trouble with some makes, so we remove $(srcdir),
21268# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
21269# trailing colons and then remove the whole line if VPATH becomes empty
21270# (actually we leave an empty line to preserve line numbers).
21271if test "x$srcdir" = x.; then
21272 ac_vpsub='/^[ ]*VPATH[ ]*=/{
21273s/:*\$(srcdir):*/:/;
21274s/:*\${srcdir}:*/:/;
21275s/:*@srcdir@:*/:/;
21276s/^\([^=]*=[ ]*\):*/\1/;
21277s/:*$//;
21278s/^[^=]*=[ ]*$//;
21279}'
21280fi
21281
bec39cab
AC
21282DEFS=-DHAVE_CONFIG_H
21283
21284ac_libobjs=
21285ac_ltlibobjs=
21286for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
21287 # 1. Remove the extension, and $U if already installed.
b4e70030
JB
21288 ac_i=`echo "$ac_i" |
21289 sed 's/\$U\././;s/\.o$//;s/\.obj$//'`
21290 # 2. Add them.
21291 ac_libobjs="$ac_libobjs $ac_i\$U.$ac_objext"
21292 ac_ltlibobjs="$ac_ltlibobjs $ac_i"'$U.lo'
bec39cab
AC
21293done
21294LIBOBJS=$ac_libobjs
21295
21296LTLIBOBJS=$ac_ltlibobjs
21297
21298
85981d60
AC
21299if test -z "${MAINTAINER_MODE_TRUE}" && test -z "${MAINTAINER_MODE_FALSE}"; then
21300 { { echo "$as_me:$LINENO: error: conditional \"MAINTAINER_MODE\" was never defined.
21301Usually this means the macro was only invoked conditionally." >&5
21302echo "$as_me: error: conditional \"MAINTAINER_MODE\" was never defined.
21303Usually this means the macro was only invoked conditionally." >&2;}
21304 { (exit 1); exit 1; }; }
21305fi
a417dc56
RW
21306if test -z "${GMAKE_TRUE}" && test -z "${GMAKE_FALSE}"; then
21307 { { echo "$as_me:$LINENO: error: conditional \"GMAKE\" was never defined.
21308Usually this means the macro was only invoked conditionally." >&5
21309echo "$as_me: error: conditional \"GMAKE\" was never defined.
21310Usually this means the macro was only invoked conditionally." >&2;}
21311 { (exit 1); exit 1; }; }
21312fi
783e057b
DJ
21313if test -z "${GL_COND_LIBTOOL_TRUE}" && test -z "${GL_COND_LIBTOOL_FALSE}"; then
21314 { { echo "$as_me:$LINENO: error: conditional \"GL_COND_LIBTOOL\" was never defined.
21315Usually this means the macro was only invoked conditionally." >&5
21316echo "$as_me: error: conditional \"GL_COND_LIBTOOL\" was never defined.
21317Usually this means the macro was only invoked conditionally." >&2;}
21318 { (exit 1); exit 1; }; }
21319fi
21320
21321 gl_libobjs=
21322 gl_ltlibobjs=
21323 if test -n "$gl_LIBOBJS"; then
21324 # Remove the extension.
21325 sed_drop_objext='s/\.o$//;s/\.obj$//'
21326 for i in `for i in $gl_LIBOBJS; do echo "$i"; done | sed "$sed_drop_objext" | sort | uniq`; do
21327 gl_libobjs="$gl_libobjs $i.$ac_objext"
21328 gl_ltlibobjs="$gl_ltlibobjs $i.lo"
21329 done
21330 fi
21331 gl_LIBOBJS=$gl_libobjs
21332
21333 gl_LTLIBOBJS=$gl_ltlibobjs
21334
21335
21336
21337 gltests_libobjs=
21338 gltests_ltlibobjs=
21339 if test -n "$gltests_LIBOBJS"; then
21340 # Remove the extension.
21341 sed_drop_objext='s/\.o$//;s/\.obj$//'
21342 for i in `for i in $gltests_LIBOBJS; do echo "$i"; done | sed "$sed_drop_objext" | sort | uniq`; do
21343 gltests_libobjs="$gltests_libobjs $i.$ac_objext"
21344 gltests_ltlibobjs="$gltests_ltlibobjs $i.lo"
21345 done
21346 fi
21347 gltests_LIBOBJS=$gltests_libobjs
21348
21349 gltests_LTLIBOBJS=$gltests_ltlibobjs
21350
21351
e28b3332
DJ
21352if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then
21353 { { echo "$as_me:$LINENO: error: conditional \"AMDEP\" was never defined.
21354Usually this means the macro was only invoked conditionally." >&5
21355echo "$as_me: error: conditional \"AMDEP\" was never defined.
21356Usually this means the macro was only invoked conditionally." >&2;}
21357 { (exit 1); exit 1; }; }
21358fi
21359if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then
21360 { { echo "$as_me:$LINENO: error: conditional \"am__fastdepCC\" was never defined.
21361Usually this means the macro was only invoked conditionally." >&5
21362echo "$as_me: error: conditional \"am__fastdepCC\" was never defined.
21363Usually this means the macro was only invoked conditionally." >&2;}
21364 { (exit 1); exit 1; }; }
21365fi
bec39cab
AC
21366
21367: ${CONFIG_STATUS=./config.status}
21368ac_clean_files_save=$ac_clean_files
21369ac_clean_files="$ac_clean_files $CONFIG_STATUS"
21370{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
21371echo "$as_me: creating $CONFIG_STATUS" >&6;}
21372cat >$CONFIG_STATUS <<_ACEOF
21373#! $SHELL
21374# Generated by $as_me.
21375# Run this file to recreate the current configuration.
21376# Compiler output produced by configure, useful for debugging
21377# configure, is in config.log if it exists.
21378
21379debug=false
21380ac_cs_recheck=false
21381ac_cs_silent=false
21382SHELL=\${CONFIG_SHELL-$SHELL}
21383_ACEOF
21384
21385cat >>$CONFIG_STATUS <<\_ACEOF
21386## --------------------- ##
21387## M4sh Initialization. ##
21388## --------------------- ##
21389
21390# Be Bourne compatible
21391if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
21392 emulate sh
21393 NULLCMD=:
21394 # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
21395 # is contrary to our usage. Disable this feature.
21396 alias -g '${1+"$@"}'='"$@"'
b4e70030
JB
21397elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
21398 set -o posix
bec39cab
AC
21399fi
21400DUALCASE=1; export DUALCASE # for MKS sh
21401
21402# Support unset when possible.
21403if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
21404 as_unset=unset
21405else
21406 as_unset=false
21407fi
21408
21409
21410# Work around bugs in pre-3.0 UWIN ksh.
b4e70030 21411$as_unset ENV MAIL MAILPATH
bec39cab
AC
21412PS1='$ '
21413PS2='> '
21414PS4='+ '
21415
21416# NLS nuisances.
21417for as_var in \
21418 LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
21419 LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
21420 LC_TELEPHONE LC_TIME
21421do
21422 if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
21423 eval $as_var=C; export $as_var
21424 else
b4e70030 21425 $as_unset $as_var
bec39cab
AC
21426 fi
21427done
21428
21429# Required to use basename.
b4e70030 21430if expr a : '\(a\)' >/dev/null 2>&1; then
bec39cab
AC
21431 as_expr=expr
21432else
21433 as_expr=false
21434fi
21435
b4e70030 21436if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then
bec39cab
AC
21437 as_basename=basename
21438else
21439 as_basename=false
21440fi
21441
21442
21443# Name of the executable.
b4e70030 21444as_me=`$as_basename "$0" ||
bec39cab
AC
21445$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
21446 X"$0" : 'X\(//\)$' \| \
b4e70030
JB
21447 X"$0" : 'X\(/\)$' \| \
21448 . : '\(.\)' 2>/dev/null ||
bec39cab 21449echo X/"$0" |
b4e70030
JB
21450 sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
21451 /^X\/\(\/\/\)$/{ s//\1/; q; }
21452 /^X\/\(\/\).*/{ s//\1/; q; }
21453 s/.*/./; q'`
bec39cab 21454
b4e70030
JB
21455
21456# PATH needs CR, and LINENO needs CR and PATH.
21457# Avoid depending upon Character Ranges.
21458as_cr_letters='abcdefghijklmnopqrstuvwxyz'
21459as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
21460as_cr_Letters=$as_cr_letters$as_cr_LETTERS
21461as_cr_digits='0123456789'
21462as_cr_alnum=$as_cr_Letters$as_cr_digits
21463
21464# The user is always right.
21465if test "${PATH_SEPARATOR+set}" != set; then
21466 echo "#! /bin/sh" >conf$$.sh
21467 echo "exit 0" >>conf$$.sh
21468 chmod +x conf$$.sh
21469 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
21470 PATH_SEPARATOR=';'
21471 else
21472 PATH_SEPARATOR=:
21473 fi
21474 rm -f conf$$.sh
21475fi
bec39cab
AC
21476
21477
b4e70030
JB
21478 as_lineno_1=$LINENO
21479 as_lineno_2=$LINENO
21480 as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
21481 test "x$as_lineno_1" != "x$as_lineno_2" &&
21482 test "x$as_lineno_3" = "x$as_lineno_2" || {
21483 # Find who we are. Look in the path if we contain no path at all
21484 # relative or not.
21485 case $0 in
21486 *[\\/]* ) as_myself=$0 ;;
21487 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21488for as_dir in $PATH
21489do
21490 IFS=$as_save_IFS
21491 test -z "$as_dir" && as_dir=.
21492 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
21493done
bec39cab 21494
b4e70030
JB
21495 ;;
21496 esac
21497 # We did not find ourselves, most probably we were run as `sh COMMAND'
21498 # in which case we are not to be found in the path.
21499 if test "x$as_myself" = x; then
21500 as_myself=$0
21501 fi
21502 if test ! -f "$as_myself"; then
21503 { { echo "$as_me:$LINENO: error: cannot find myself; rerun with an absolute path" >&5
21504echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2;}
21505 { (exit 1); exit 1; }; }
21506 fi
21507 case $CONFIG_SHELL in
21508 '')
21509 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21510for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
21511do
21512 IFS=$as_save_IFS
21513 test -z "$as_dir" && as_dir=.
21514 for as_base in sh bash ksh sh5; do
21515 case $as_dir in
21516 /*)
21517 if ("$as_dir/$as_base" -c '
bec39cab
AC
21518 as_lineno_1=$LINENO
21519 as_lineno_2=$LINENO
b4e70030 21520 as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
bec39cab 21521 test "x$as_lineno_1" != "x$as_lineno_2" &&
b4e70030
JB
21522 test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then
21523 $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; }
21524 $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; }
21525 CONFIG_SHELL=$as_dir/$as_base
21526 export CONFIG_SHELL
21527 exec "$CONFIG_SHELL" "$0" ${1+"$@"}
21528 fi;;
21529 esac
21530 done
21531done
21532;;
21533 esac
bec39cab
AC
21534
21535 # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
21536 # uniformly replaced by the line number. The first 'sed' inserts a
b4e70030
JB
21537 # line-number line before each line; the second 'sed' does the real
21538 # work. The second script uses 'N' to pair each line-number line
21539 # with the numbered line, and appends trailing '-' during
21540 # substitution so that $LINENO is not a special case at line end.
bec39cab 21541 # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
b4e70030
JB
21542 # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-)
21543 sed '=' <$as_myself |
bec39cab
AC
21544 sed '
21545 N
b4e70030
JB
21546 s,$,-,
21547 : loop
21548 s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
bec39cab 21549 t loop
b4e70030
JB
21550 s,-$,,
21551 s,^['$as_cr_digits']*\n,,
bec39cab 21552 ' >$as_me.lineno &&
b4e70030
JB
21553 chmod +x $as_me.lineno ||
21554 { { echo "$as_me:$LINENO: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&5
21555echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2;}
bec39cab
AC
21556 { (exit 1); exit 1; }; }
21557
21558 # Don't try to exec as it changes $[0], causing all sort of problems
21559 # (the dirname of $[0] is not the place where we might find the
b4e70030
JB
21560 # original and so on. Autoconf is especially sensible to this).
21561 . ./$as_me.lineno
bec39cab
AC
21562 # Exit status is that of the last command.
21563 exit
21564}
21565
21566
b4e70030
JB
21567case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
21568 *c*,-n*) ECHO_N= ECHO_C='
21569' ECHO_T=' ' ;;
21570 *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;;
21571 *) ECHO_N= ECHO_C='\c' ECHO_T= ;;
bec39cab
AC
21572esac
21573
b4e70030 21574if expr a : '\(a\)' >/dev/null 2>&1; then
bec39cab
AC
21575 as_expr=expr
21576else
21577 as_expr=false
21578fi
21579
21580rm -f conf$$ conf$$.exe conf$$.file
21581echo >conf$$.file
21582if ln -s conf$$.file conf$$ 2>/dev/null; then
b4e70030
JB
21583 # We could just check for DJGPP; but this test a) works b) is more generic
21584 # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
21585 if test -f conf$$.exe; then
21586 # Don't use ln at all; we don't have any links
bec39cab 21587 as_ln_s='cp -p'
b4e70030
JB
21588 else
21589 as_ln_s='ln -s'
21590 fi
bec39cab
AC
21591elif ln conf$$.file conf$$ 2>/dev/null; then
21592 as_ln_s=ln
21593else
21594 as_ln_s='cp -p'
21595fi
b4e70030 21596rm -f conf$$ conf$$.exe conf$$.file
bec39cab
AC
21597
21598if mkdir -p . 2>/dev/null; then
21599 as_mkdir_p=:
21600else
21601 test -d ./-p && rmdir ./-p
21602 as_mkdir_p=false
21603fi
21604
b4e70030 21605as_executable_p="test -f"
bec39cab
AC
21606
21607# Sed expression to map a string onto a valid CPP name.
21608as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
21609
21610# Sed expression to map a string onto a valid variable name.
21611as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
21612
21613
b4e70030
JB
21614# IFS
21615# We need space, tab and new line, in precisely that order.
21616as_nl='
21617'
21618IFS=" $as_nl"
21619
21620# CDPATH.
21621$as_unset CDPATH
21622
bec39cab
AC
21623exec 6>&1
21624
b4e70030 21625# Open the log real soon, to keep \$[0] and so on meaningful, and to
bec39cab 21626# report actual input values of CONFIG_FILES etc. instead of their
b4e70030
JB
21627# values after options handling. Logging --version etc. is OK.
21628exec 5>>config.log
21629{
21630 echo
21631 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
21632## Running $as_me. ##
21633_ASBOX
21634} >&5
21635cat >&5 <<_CSEOF
21636
bec39cab 21637This file was extended by $as_me, which was
b4e70030 21638generated by GNU Autoconf 2.59. Invocation command line was
bec39cab
AC
21639
21640 CONFIG_FILES = $CONFIG_FILES
21641 CONFIG_HEADERS = $CONFIG_HEADERS
21642 CONFIG_LINKS = $CONFIG_LINKS
21643 CONFIG_COMMANDS = $CONFIG_COMMANDS
21644 $ $0 $@
21645
b4e70030
JB
21646_CSEOF
21647echo "on `(hostname || uname -n) 2>/dev/null | sed 1q`" >&5
21648echo >&5
bec39cab
AC
21649_ACEOF
21650
21651# Files that config.status was made for.
b4e70030
JB
21652if test -n "$ac_config_files"; then
21653 echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
21654fi
234b45d4 21655
b4e70030
JB
21656if test -n "$ac_config_headers"; then
21657 echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
21658fi
21659
21660if test -n "$ac_config_links"; then
21661 echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
21662fi
21663
21664if test -n "$ac_config_commands"; then
21665 echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
21666fi
234b45d4 21667
bec39cab 21668cat >>$CONFIG_STATUS <<\_ACEOF
b4e70030 21669
bec39cab
AC
21670ac_cs_usage="\
21671\`$as_me' instantiates files from templates according to the
21672current configuration.
234b45d4 21673
bec39cab 21674Usage: $0 [OPTIONS] [FILE]...
234b45d4 21675
bec39cab
AC
21676 -h, --help print this help, then exit
21677 -V, --version print version number, then exit
21678 -q, --quiet do not print progress messages
21679 -d, --debug don't remove temporary files
21680 --recheck update $as_me by reconfiguring in the same conditions
21681 --file=FILE[:TEMPLATE]
21682 instantiate the configuration file FILE
21683 --header=FILE[:TEMPLATE]
21684 instantiate the configuration header FILE
234b45d4 21685
bec39cab
AC
21686Configuration files:
21687$config_files
234b45d4 21688
bec39cab
AC
21689Configuration headers:
21690$config_headers
234b45d4 21691
bec39cab
AC
21692Configuration links:
21693$config_links
234b45d4 21694
bec39cab
AC
21695Configuration commands:
21696$config_commands
21697
21698Report bugs to <bug-autoconf@gnu.org>."
4e8d927d 21699_ACEOF
b4e70030 21700
bec39cab
AC
21701cat >>$CONFIG_STATUS <<_ACEOF
21702ac_cs_version="\\
21703config.status
b4e70030 21704configured by $0, generated by GNU Autoconf 2.59,
bec39cab
AC
21705 with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
21706
b4e70030 21707Copyright (C) 2003 Free Software Foundation, Inc.
bec39cab
AC
21708This config.status script is free software; the Free Software Foundation
21709gives unlimited permission to copy, distribute and modify it."
b4e70030
JB
21710srcdir=$srcdir
21711INSTALL="$INSTALL"
bec39cab
AC
21712_ACEOF
21713
21714cat >>$CONFIG_STATUS <<\_ACEOF
21715# If no file are specified by the user, then we need to provide default
21716# value. By we need to know if files were specified by the user.
21717ac_need_defaults=:
21718while test $# != 0
21719do
21720 case $1 in
21721 --*=*)
b4e70030
JB
21722 ac_option=`expr "x$1" : 'x\([^=]*\)='`
21723 ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
bec39cab 21724 ac_shift=:
c906108c 21725 ;;
b4e70030 21726 -*)
bec39cab
AC
21727 ac_option=$1
21728 ac_optarg=$2
21729 ac_shift=shift
c906108c 21730 ;;
b4e70030
JB
21731 *) # This is not an option, so the user has probably given explicit
21732 # arguments.
21733 ac_option=$1
21734 ac_need_defaults=false;;
bec39cab 21735 esac
c906108c 21736
bec39cab
AC
21737 case $ac_option in
21738 # Handling of the options.
b4e70030
JB
21739_ACEOF
21740cat >>$CONFIG_STATUS <<\_ACEOF
bec39cab
AC
21741 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
21742 ac_cs_recheck=: ;;
b4e70030
JB
21743 --version | --vers* | -V )
21744 echo "$ac_cs_version"; exit 0 ;;
21745 --he | --h)
21746 # Conflict between --help and --header
21747 { { echo "$as_me:$LINENO: error: ambiguous option: $1
21748Try \`$0 --help' for more information." >&5
21749echo "$as_me: error: ambiguous option: $1
21750Try \`$0 --help' for more information." >&2;}
21751 { (exit 1); exit 1; }; };;
21752 --help | --hel | -h )
21753 echo "$ac_cs_usage"; exit 0 ;;
21754 --debug | --d* | -d )
bec39cab
AC
21755 debug=: ;;
21756 --file | --fil | --fi | --f )
21757 $ac_shift
21758 CONFIG_FILES="$CONFIG_FILES $ac_optarg"
21759 ac_need_defaults=false;;
21760 --header | --heade | --head | --hea )
21761 $ac_shift
21762 CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg"
21763 ac_need_defaults=false;;
21764 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
21765 | -silent | --silent | --silen | --sile | --sil | --si | --s)
21766 ac_cs_silent=: ;;
c906108c 21767
bec39cab 21768 # This is an error.
b4e70030
JB
21769 -*) { { echo "$as_me:$LINENO: error: unrecognized option: $1
21770Try \`$0 --help' for more information." >&5
21771echo "$as_me: error: unrecognized option: $1
21772Try \`$0 --help' for more information." >&2;}
bec39cab 21773 { (exit 1); exit 1; }; } ;;
c906108c 21774
b4e70030 21775 *) ac_config_targets="$ac_config_targets $1" ;;
c906108c 21776
bec39cab
AC
21777 esac
21778 shift
21779done
c906108c 21780
bec39cab 21781ac_configure_extra_args=
c906108c 21782
bec39cab
AC
21783if $ac_cs_silent; then
21784 exec 6>/dev/null
21785 ac_configure_extra_args="$ac_configure_extra_args --silent"
21786fi
c906108c 21787
bec39cab
AC
21788_ACEOF
21789cat >>$CONFIG_STATUS <<_ACEOF
21790if \$ac_cs_recheck; then
b4e70030
JB
21791 echo "running $SHELL $0 " $ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6
21792 exec $SHELL $0 $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
bec39cab
AC
21793fi
21794
21795_ACEOF
21796
21797cat >>$CONFIG_STATUS <<_ACEOF
c906108c 21798#
b4e70030 21799# INIT-COMMANDS section.
c906108c 21800#
c906108c 21801
a417dc56 21802ac_aux_dir=$ac_aux_dir DEPDIR=$DEPDIR
e28b3332 21803AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"
b4e70030 21804
bec39cab 21805gdb_host_cpu=$gdb_host_cpu
bec39cab
AC
21806nativefile=$nativefile
21807
21808
21809_ACEOF
21810
4e8d927d 21811
b4e70030
JB
21812
21813cat >>$CONFIG_STATUS <<\_ACEOF
bec39cab 21814for ac_config_target in $ac_config_targets
c906108c 21815do
b4e70030
JB
21816 case "$ac_config_target" in
21817 # Handling of arguments.
21818 "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
21819 ".gdbinit" ) CONFIG_FILES="$CONFIG_FILES .gdbinit:gdbinit.in" ;;
e28b3332 21820 "gnulib/Makefile" ) CONFIG_FILES="$CONFIG_FILES gnulib/Makefile" ;;
b4e70030 21821 "$ac_config_links_1" ) CONFIG_LINKS="$CONFIG_LINKS $ac_config_links_1" ;;
a417dc56 21822 "depdir" ) CONFIG_COMMANDS="$CONFIG_COMMANDS depdir" ;;
e28b3332 21823 "depfiles" ) CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;;
b4e70030
JB
21824 "default" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
21825 "config.h" ) CONFIG_HEADERS="$CONFIG_HEADERS config.h:config.in" ;;
bec39cab
AC
21826 *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
21827echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
21828 { (exit 1); exit 1; }; };;
c906108c
SS
21829 esac
21830done
21831
bec39cab
AC
21832# If the user did not use the arguments to specify the items to instantiate,
21833# then the envvar interface is used. Set only those that are not.
21834# We use the long form for the default assignment because of an extremely
21835# bizarre bug on SunOS 4.1.3.
21836if $ac_need_defaults; then
21837 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
21838 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
21839 test "${CONFIG_LINKS+set}" = set || CONFIG_LINKS=$config_links
21840 test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
21841fi
21842
b4e70030
JB
21843# Have a temporary directory for convenience. Make it in the build tree
21844# simply because there is no reason to put it here, and in addition,
21845# creating and moving files from /tmp can sometimes cause problems.
21846# Create a temporary directory, and hook for its removal unless debugging.
21847$debug ||
21848{
21849 trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
21850 trap '{ (exit 1); exit 1; }' 1 2 13 15
21851}
4e8d927d 21852
b4e70030 21853# Create a (secure) tmp directory for tmp files.
4e8d927d 21854
b4e70030
JB
21855{
21856 tmp=`(umask 077 && mktemp -d -q "./confstatXXXXXX") 2>/dev/null` &&
21857 test -n "$tmp" && test -d "$tmp"
21858} ||
21859{
21860 tmp=./confstat$$-$RANDOM
21861 (umask 077 && mkdir $tmp)
21862} ||
21863{
21864 echo "$me: cannot create a temporary directory in ." >&2
21865 { (exit 1); exit 1; }
21866}
4e8d927d 21867
b4e70030 21868_ACEOF
4e8d927d 21869
b4e70030 21870cat >>$CONFIG_STATUS <<_ACEOF
4e8d927d 21871
b4e70030
JB
21872#
21873# CONFIG_FILES section.
21874#
4e8d927d 21875
b4e70030
JB
21876# No need to generate the scripts if there are no CONFIG_FILES.
21877# This happens for instance when ./config.status config.h
21878if test -n "\$CONFIG_FILES"; then
21879 # Protect against being on the right side of a sed subst in config.status.
21880 sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
21881 s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
21882s,@SHELL@,$SHELL,;t t
21883s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
21884s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
21885s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
21886s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
21887s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
21888s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
21889s,@exec_prefix@,$exec_prefix,;t t
21890s,@prefix@,$prefix,;t t
21891s,@program_transform_name@,$program_transform_name,;t t
21892s,@bindir@,$bindir,;t t
21893s,@sbindir@,$sbindir,;t t
21894s,@libexecdir@,$libexecdir,;t t
21895s,@datadir@,$datadir,;t t
21896s,@sysconfdir@,$sysconfdir,;t t
21897s,@sharedstatedir@,$sharedstatedir,;t t
21898s,@localstatedir@,$localstatedir,;t t
21899s,@libdir@,$libdir,;t t
21900s,@includedir@,$includedir,;t t
21901s,@oldincludedir@,$oldincludedir,;t t
21902s,@infodir@,$infodir,;t t
21903s,@mandir@,$mandir,;t t
21904s,@build_alias@,$build_alias,;t t
21905s,@host_alias@,$host_alias,;t t
21906s,@target_alias@,$target_alias,;t t
21907s,@DEFS@,$DEFS,;t t
21908s,@ECHO_C@,$ECHO_C,;t t
21909s,@ECHO_N@,$ECHO_N,;t t
21910s,@ECHO_T@,$ECHO_T,;t t
21911s,@LIBS@,$LIBS,;t t
21912s,@MAINTAINER_MODE_TRUE@,$MAINTAINER_MODE_TRUE,;t t
21913s,@MAINTAINER_MODE_FALSE@,$MAINTAINER_MODE_FALSE,;t t
21914s,@MAINT@,$MAINT,;t t
21915s,@CC@,$CC,;t t
21916s,@CFLAGS@,$CFLAGS,;t t
21917s,@LDFLAGS@,$LDFLAGS,;t t
21918s,@CPPFLAGS@,$CPPFLAGS,;t t
21919s,@ac_ct_CC@,$ac_ct_CC,;t t
21920s,@EXEEXT@,$EXEEXT,;t t
21921s,@OBJEXT@,$OBJEXT,;t t
21922s,@CPP@,$CPP,;t t
21923s,@EGREP@,$EGREP,;t t
783e057b
DJ
21924s,@RANLIB@,$RANLIB,;t t
21925s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
b4e70030
JB
21926s,@build@,$build,;t t
21927s,@build_cpu@,$build_cpu,;t t
21928s,@build_vendor@,$build_vendor,;t t
21929s,@build_os@,$build_os,;t t
21930s,@host@,$host,;t t
21931s,@host_cpu@,$host_cpu,;t t
21932s,@host_vendor@,$host_vendor,;t t
21933s,@host_os@,$host_os,;t t
21934s,@target@,$target,;t t
21935s,@target_cpu@,$target_cpu,;t t
21936s,@target_vendor@,$target_vendor,;t t
21937s,@target_os@,$target_os,;t t
a417dc56
RW
21938s,@am__leading_dot@,$am__leading_dot,;t t
21939s,@DEPDIR@,$DEPDIR,;t t
21940s,@CCDEPMODE@,$CCDEPMODE,;t t
21941s,@MAKE@,$MAKE,;t t
21942s,@GMAKE_TRUE@,$GMAKE_TRUE,;t t
21943s,@GMAKE_FALSE@,$GMAKE_FALSE,;t t
21944s,@SET_MAKE@,$SET_MAKE,;t t
b4e70030 21945s,@USE_NLS@,$USE_NLS,;t t
20e95c23
DJ
21946s,@LIBINTL@,$LIBINTL,;t t
21947s,@LIBINTL_DEP@,$LIBINTL_DEP,;t t
21948s,@INCINTL@,$INCINTL,;t t
b4e70030 21949s,@XGETTEXT@,$XGETTEXT,;t t
20e95c23
DJ
21950s,@GMSGFMT@,$GMSGFMT,;t t
21951s,@POSUB@,$POSUB,;t t
b4e70030 21952s,@CATALOGS@,$CATALOGS,;t t
b4e70030 21953s,@DATADIRNAME@,$DATADIRNAME,;t t
b4e70030 21954s,@INSTOBJEXT@,$INSTOBJEXT,;t t
20e95c23
DJ
21955s,@GENCAT@,$GENCAT,;t t
21956s,@CATOBJEXT@,$CATOBJEXT,;t t
b4e70030 21957s,@localedir@,$localedir,;t t
783e057b
DJ
21958s,@GL_COND_LIBTOOL_TRUE@,$GL_COND_LIBTOOL_TRUE,;t t
21959s,@GL_COND_LIBTOOL_FALSE@,$GL_COND_LIBTOOL_FALSE,;t t
21960s,@GNULIB_MEMMEM@,$GNULIB_MEMMEM,;t t
21961s,@GNULIB_MEMPCPY@,$GNULIB_MEMPCPY,;t t
21962s,@GNULIB_MEMRCHR@,$GNULIB_MEMRCHR,;t t
21963s,@GNULIB_STPCPY@,$GNULIB_STPCPY,;t t
21964s,@GNULIB_STPNCPY@,$GNULIB_STPNCPY,;t t
21965s,@GNULIB_STRCHRNUL@,$GNULIB_STRCHRNUL,;t t
21966s,@GNULIB_STRDUP@,$GNULIB_STRDUP,;t t
21967s,@GNULIB_STRNDUP@,$GNULIB_STRNDUP,;t t
21968s,@GNULIB_STRNLEN@,$GNULIB_STRNLEN,;t t
21969s,@GNULIB_STRPBRK@,$GNULIB_STRPBRK,;t t
21970s,@GNULIB_STRSEP@,$GNULIB_STRSEP,;t t
21971s,@GNULIB_STRSTR@,$GNULIB_STRSTR,;t t
21972s,@GNULIB_STRCASESTR@,$GNULIB_STRCASESTR,;t t
21973s,@GNULIB_STRTOK_R@,$GNULIB_STRTOK_R,;t t
21974s,@GNULIB_MBSLEN@,$GNULIB_MBSLEN,;t t
21975s,@GNULIB_MBSNLEN@,$GNULIB_MBSNLEN,;t t
21976s,@GNULIB_MBSCHR@,$GNULIB_MBSCHR,;t t
21977s,@GNULIB_MBSRCHR@,$GNULIB_MBSRCHR,;t t
21978s,@GNULIB_MBSSTR@,$GNULIB_MBSSTR,;t t
21979s,@GNULIB_MBSCASECMP@,$GNULIB_MBSCASECMP,;t t
21980s,@GNULIB_MBSNCASECMP@,$GNULIB_MBSNCASECMP,;t t
21981s,@GNULIB_MBSPCASECMP@,$GNULIB_MBSPCASECMP,;t t
21982s,@GNULIB_MBSCASESTR@,$GNULIB_MBSCASESTR,;t t
21983s,@GNULIB_MBSCSPN@,$GNULIB_MBSCSPN,;t t
21984s,@GNULIB_MBSPBRK@,$GNULIB_MBSPBRK,;t t
21985s,@GNULIB_MBSSPN@,$GNULIB_MBSSPN,;t t
21986s,@GNULIB_MBSSEP@,$GNULIB_MBSSEP,;t t
21987s,@GNULIB_MBSTOK_R@,$GNULIB_MBSTOK_R,;t t
21988s,@GNULIB_STRERROR@,$GNULIB_STRERROR,;t t
21989s,@GNULIB_STRSIGNAL@,$GNULIB_STRSIGNAL,;t t
21990s,@HAVE_DECL_MEMMEM@,$HAVE_DECL_MEMMEM,;t t
21991s,@HAVE_MEMPCPY@,$HAVE_MEMPCPY,;t t
21992s,@HAVE_DECL_MEMRCHR@,$HAVE_DECL_MEMRCHR,;t t
21993s,@HAVE_STPCPY@,$HAVE_STPCPY,;t t
21994s,@HAVE_STPNCPY@,$HAVE_STPNCPY,;t t
21995s,@HAVE_STRCHRNUL@,$HAVE_STRCHRNUL,;t t
21996s,@HAVE_DECL_STRDUP@,$HAVE_DECL_STRDUP,;t t
21997s,@HAVE_STRNDUP@,$HAVE_STRNDUP,;t t
21998s,@HAVE_DECL_STRNDUP@,$HAVE_DECL_STRNDUP,;t t
21999s,@HAVE_DECL_STRNLEN@,$HAVE_DECL_STRNLEN,;t t
22000s,@HAVE_STRPBRK@,$HAVE_STRPBRK,;t t
22001s,@HAVE_STRSEP@,$HAVE_STRSEP,;t t
22002s,@HAVE_STRCASESTR@,$HAVE_STRCASESTR,;t t
22003s,@HAVE_DECL_STRTOK_R@,$HAVE_DECL_STRTOK_R,;t t
22004s,@HAVE_DECL_STRERROR@,$HAVE_DECL_STRERROR,;t t
22005s,@HAVE_DECL_STRSIGNAL@,$HAVE_DECL_STRSIGNAL,;t t
22006s,@REPLACE_STRERROR@,$REPLACE_STRERROR,;t t
22007s,@REPLACE_STRSIGNAL@,$REPLACE_STRSIGNAL,;t t
22008s,@REPLACE_MEMMEM@,$REPLACE_MEMMEM,;t t
22009s,@REPLACE_STRCASESTR@,$REPLACE_STRCASESTR,;t t
22010s,@REPLACE_STRSTR@,$REPLACE_STRSTR,;t t
22011s,@HAVE_LONG_LONG_INT@,$HAVE_LONG_LONG_INT,;t t
22012s,@HAVE_UNSIGNED_LONG_LONG_INT@,$HAVE_UNSIGNED_LONG_LONG_INT,;t t
22013s,@HAVE_INTTYPES_H@,$HAVE_INTTYPES_H,;t t
22014s,@HAVE_SYS_TYPES_H@,$HAVE_SYS_TYPES_H,;t t
22015s,@INCLUDE_NEXT@,$INCLUDE_NEXT,;t t
22016s,@NEXT_STDINT_H@,$NEXT_STDINT_H,;t t
22017s,@HAVE_STDINT_H@,$HAVE_STDINT_H,;t t
22018s,@HAVE_SYS_INTTYPES_H@,$HAVE_SYS_INTTYPES_H,;t t
22019s,@HAVE_SYS_BITYPES_H@,$HAVE_SYS_BITYPES_H,;t t
22020s,@BITSIZEOF_PTRDIFF_T@,$BITSIZEOF_PTRDIFF_T,;t t
22021s,@BITSIZEOF_SIG_ATOMIC_T@,$BITSIZEOF_SIG_ATOMIC_T,;t t
22022s,@BITSIZEOF_SIZE_T@,$BITSIZEOF_SIZE_T,;t t
22023s,@BITSIZEOF_WCHAR_T@,$BITSIZEOF_WCHAR_T,;t t
22024s,@BITSIZEOF_WINT_T@,$BITSIZEOF_WINT_T,;t t
22025s,@HAVE_SIGNED_SIG_ATOMIC_T@,$HAVE_SIGNED_SIG_ATOMIC_T,;t t
22026s,@HAVE_SIGNED_WCHAR_T@,$HAVE_SIGNED_WCHAR_T,;t t
22027s,@HAVE_SIGNED_WINT_T@,$HAVE_SIGNED_WINT_T,;t t
22028s,@PTRDIFF_T_SUFFIX@,$PTRDIFF_T_SUFFIX,;t t
22029s,@SIG_ATOMIC_T_SUFFIX@,$SIG_ATOMIC_T_SUFFIX,;t t
22030s,@SIZE_T_SUFFIX@,$SIZE_T_SUFFIX,;t t
22031s,@WCHAR_T_SUFFIX@,$WCHAR_T_SUFFIX,;t t
22032s,@WINT_T_SUFFIX@,$WINT_T_SUFFIX,;t t
22033s,@STDINT_H@,$STDINT_H,;t t
22034s,@NEXT_STRING_H@,$NEXT_STRING_H,;t t
22035s,@GNULIB_WCWIDTH@,$GNULIB_WCWIDTH,;t t
22036s,@HAVE_DECL_WCWIDTH@,$HAVE_DECL_WCWIDTH,;t t
22037s,@REPLACE_WCWIDTH@,$REPLACE_WCWIDTH,;t t
22038s,@WCHAR_H@,$WCHAR_H,;t t
22039s,@HAVE_WCHAR_H@,$HAVE_WCHAR_H,;t t
22040s,@NEXT_WCHAR_H@,$NEXT_WCHAR_H,;t t
22041s,@LIBGNU_LIBDEPS@,$LIBGNU_LIBDEPS,;t t
22042s,@LIBGNU_LTLIBDEPS@,$LIBGNU_LTLIBDEPS,;t t
d5af19ba 22043s,@GNULIB_STDINT_H@,$GNULIB_STDINT_H,;t t
b4e70030 22044s,@PACKAGE@,$PACKAGE,;t t
b4e70030
JB
22045s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
22046s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
22047s,@INSTALL_DATA@,$INSTALL_DATA,;t t
e28b3332 22048s,@CYGPATH_W@,$CYGPATH_W,;t t
d57a3c85 22049s,@PYTHON2_4@,$PYTHON2_4,;t t
e28b3332
DJ
22050s,@ACLOCAL@,$ACLOCAL,;t t
22051s,@AUTOCONF@,$AUTOCONF,;t t
22052s,@AUTOMAKE@,$AUTOMAKE,;t t
22053s,@AUTOHEADER@,$AUTOHEADER,;t t
22054s,@MAKEINFO@,$MAKEINFO,;t t
22055s,@install_sh@,$install_sh,;t t
22056s,@STRIP@,$STRIP,;t t
22057s,@ac_ct_STRIP@,$ac_ct_STRIP,;t t
22058s,@INSTALL_STRIP_PROGRAM@,$INSTALL_STRIP_PROGRAM,;t t
22059s,@mkdir_p@,$mkdir_p,;t t
22060s,@AWK@,$AWK,;t t
e28b3332
DJ
22061s,@AMTAR@,$AMTAR,;t t
22062s,@am__tar@,$am__tar,;t t
22063s,@am__untar@,$am__untar,;t t
e28b3332
DJ
22064s,@am__include@,$am__include,;t t
22065s,@am__quote@,$am__quote,;t t
22066s,@AMDEP_TRUE@,$AMDEP_TRUE,;t t
22067s,@AMDEP_FALSE@,$AMDEP_FALSE,;t t
22068s,@AMDEPBACKSLASH@,$AMDEPBACKSLASH,;t t
e28b3332
DJ
22069s,@am__fastdepCC_TRUE@,$am__fastdepCC_TRUE,;t t
22070s,@am__fastdepCC_FALSE@,$am__fastdepCC_FALSE,;t t
22071s,@subdirs@,$subdirs,;t t
22072s,@TARGET_OBS@,$TARGET_OBS,;t t
c16158bc
JM
22073s,@PKGVERSION@,$PKGVERSION,;t t
22074s,@REPORT_BUGS_TO@,$REPORT_BUGS_TO,;t t
22075s,@REPORT_BUGS_TEXI@,$REPORT_BUGS_TEXI,;t t
b4e70030
JB
22076s,@LN_S@,$LN_S,;t t
22077s,@YACC@,$YACC,;t t
22078s,@AR@,$AR,;t t
22079s,@ac_ct_AR@,$ac_ct_AR,;t t
22080s,@DLLTOOL@,$DLLTOOL,;t t
22081s,@ac_ct_DLLTOOL@,$ac_ct_DLLTOOL,;t t
22082s,@WINDRES@,$WINDRES,;t t
22083s,@ac_ct_WINDRES@,$ac_ct_WINDRES,;t t
22084s,@MIG@,$MIG,;t t
22085s,@ac_ct_MIG@,$ac_ct_MIG,;t t
6a30b0a5
AS
22086s,@READLINE@,$READLINE,;t t
22087s,@READLINE_DEPS@,$READLINE_DEPS,;t t
22088s,@READLINE_CFLAGS@,$READLINE_CFLAGS,;t t
3841debe
DJ
22089s,@HAVE_LIBEXPAT@,$HAVE_LIBEXPAT,;t t
22090s,@LIBEXPAT@,$LIBEXPAT,;t t
22091s,@LTLIBEXPAT@,$LTLIBEXPAT,;t t
d57a3c85 22092s,@PYTHON_CFLAGS@,$PYTHON_CFLAGS,;t t
20e95c23 22093s,@ALLOCA@,$ALLOCA,;t t
b4e70030
JB
22094s,@CONFIG_LDFLAGS@,$CONFIG_LDFLAGS,;t t
22095s,@TARGET_SYSTEM_ROOT@,$TARGET_SYSTEM_ROOT,;t t
22096s,@TARGET_SYSTEM_ROOT_DEFINE@,$TARGET_SYSTEM_ROOT_DEFINE,;t t
22097s,@WARN_CFLAGS@,$WARN_CFLAGS,;t t
22098s,@WERROR_CFLAGS@,$WERROR_CFLAGS,;t t
22099s,@SER_HARDWIRE@,$SER_HARDWIRE,;t t
22100s,@WIN32LIBS@,$WIN32LIBS,;t t
22101s,@LIBGUI@,$LIBGUI,;t t
22102s,@GUI_CFLAGS_X@,$GUI_CFLAGS_X,;t t
22103s,@WIN32LDAPP@,$WIN32LDAPP,;t t
22104s,@TCL_VERSION@,$TCL_VERSION,;t t
5062cc19
KS
22105s,@TCL_PATCH_LEVEL@,$TCL_PATCH_LEVEL,;t t
22106s,@TCL_BIN_DIR@,$TCL_BIN_DIR,;t t
22107s,@TCL_SRC_DIR@,$TCL_SRC_DIR,;t t
22108s,@TCL_LIB_FILE@,$TCL_LIB_FILE,;t t
22109s,@TCL_LIB_FLAG@,$TCL_LIB_FLAG,;t t
b4e70030 22110s,@TCL_LIB_SPEC@,$TCL_LIB_SPEC,;t t
5062cc19
KS
22111s,@TCL_STUB_LIB_FILE@,$TCL_STUB_LIB_FILE,;t t
22112s,@TCL_STUB_LIB_FLAG@,$TCL_STUB_LIB_FLAG,;t t
22113s,@TCL_STUB_LIB_SPEC@,$TCL_STUB_LIB_SPEC,;t t
22114s,@TCL_INCLUDE@,$TCL_INCLUDE,;t t
22115s,@TCL_LIBRARY@,$TCL_LIBRARY,;t t
22116s,@TCL_DEPS@,$TCL_DEPS,;t t
b4e70030 22117s,@TK_VERSION@,$TK_VERSION,;t t
5062cc19
KS
22118s,@TK_BIN_DIR@,$TK_BIN_DIR,;t t
22119s,@TK_SRC_DIR@,$TK_SRC_DIR,;t t
22120s,@TK_LIB_FILE@,$TK_LIB_FILE,;t t
22121s,@TK_LIB_FLAG@,$TK_LIB_FLAG,;t t
b4e70030 22122s,@TK_LIB_SPEC@,$TK_LIB_SPEC,;t t
5062cc19
KS
22123s,@TK_STUB_LIB_FILE@,$TK_STUB_LIB_FILE,;t t
22124s,@TK_STUB_LIB_FLAG@,$TK_STUB_LIB_FLAG,;t t
22125s,@TK_STUB_LIB_SPEC@,$TK_STUB_LIB_SPEC,;t t
22126s,@TK_INCLUDE@,$TK_INCLUDE,;t t
22127s,@TK_LIBRARY@,$TK_LIBRARY,;t t
22128s,@TK_DEPS@,$TK_DEPS,;t t
22129s,@TK_XINCLUDES@,$TK_XINCLUDES,;t t
b4e70030
JB
22130s,@X_CFLAGS@,$X_CFLAGS,;t t
22131s,@X_LDFLAGS@,$X_LDFLAGS,;t t
22132s,@X_LIBS@,$X_LIBS,;t t
b4e70030
JB
22133s,@GDBTKLIBS@,$GDBTKLIBS,;t t
22134s,@GDBTK_CFLAGS@,$GDBTK_CFLAGS,;t t
22135s,@GDBTK_SRC_DIR@,$GDBTK_SRC_DIR,;t t
9b624dbe
UW
22136s,@SIM@,$SIM,;t t
22137s,@SIM_OBS@,$SIM_OBS,;t t
b4e70030
JB
22138s,@ENABLE_CFLAGS@,$ENABLE_CFLAGS,;t t
22139s,@PROFILE_CFLAGS@,$PROFILE_CFLAGS,;t t
22140s,@CONFIG_OBS@,$CONFIG_OBS,;t t
22141s,@CONFIG_DEPS@,$CONFIG_DEPS,;t t
22142s,@CONFIG_SRCS@,$CONFIG_SRCS,;t t
22143s,@CONFIG_ALL@,$CONFIG_ALL,;t t
22144s,@CONFIG_CLEAN@,$CONFIG_CLEAN,;t t
22145s,@CONFIG_INSTALL@,$CONFIG_INSTALL,;t t
22146s,@CONFIG_UNINSTALL@,$CONFIG_UNINSTALL,;t t
22147s,@target_subdir@,$target_subdir,;t t
22148s,@frags@,$frags,;t t
b4e70030 22149s,@nm_h@,$nm_h,;t t
89a34d1b
JM
22150s,@datarootdir@,$datarootdir,;t t
22151s,@docdir@,$docdir,;t t
22152s,@htmldir@,$htmldir,;t t
22153s,@pdfdir@,$pdfdir,;t t
b4e70030
JB
22154s,@LIBOBJS@,$LIBOBJS,;t t
22155s,@LTLIBOBJS@,$LTLIBOBJS,;t t
783e057b
DJ
22156s,@gl_LIBOBJS@,$gl_LIBOBJS,;t t
22157s,@gl_LTLIBOBJS@,$gl_LTLIBOBJS,;t t
22158s,@gltests_LIBOBJS@,$gltests_LIBOBJS,;t t
22159s,@gltests_LTLIBOBJS@,$gltests_LTLIBOBJS,;t t
b4e70030
JB
22160/@host_makefile_frag@/r $host_makefile_frag
22161s,@host_makefile_frag@,,;t t
b4e70030
JB
22162CEOF
22163
22164_ACEOF
22165
22166 cat >>$CONFIG_STATUS <<\_ACEOF
22167 # Split the substitutions into bite-sized pieces for seds with
22168 # small command number limits, like on Digital OSF/1 and HP-UX.
22169 ac_max_sed_lines=48
22170 ac_sed_frag=1 # Number of current file.
22171 ac_beg=1 # First line for current file.
22172 ac_end=$ac_max_sed_lines # Line after last line for current file.
22173 ac_more_lines=:
22174 ac_sed_cmds=
22175 while $ac_more_lines; do
22176 if test $ac_beg -gt 1; then
22177 sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
22178 else
22179 sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
4e8d927d 22180 fi
b4e70030
JB
22181 if test ! -s $tmp/subs.frag; then
22182 ac_more_lines=false
22183 else
22184 # The purpose of the label and of the branching condition is to
22185 # speed up the sed processing (if there are no `@' at all, there
22186 # is no need to browse any of the substitutions).
22187 # These are the two extra sed commands mentioned above.
22188 (echo ':t
22189 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
22190 if test -z "$ac_sed_cmds"; then
22191 ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
22192 else
22193 ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
22194 fi
22195 ac_sed_frag=`expr $ac_sed_frag + 1`
22196 ac_beg=$ac_end
22197 ac_end=`expr $ac_end + $ac_max_sed_lines`
22198 fi
22199 done
22200 if test -z "$ac_sed_cmds"; then
22201 ac_sed_cmds=cat
22202 fi
22203fi # test -n "$CONFIG_FILES"
4e8d927d 22204
b4e70030
JB
22205_ACEOF
22206cat >>$CONFIG_STATUS <<\_ACEOF
22207for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
22208 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
22209 case $ac_file in
22210 - | *:- | *:-:* ) # input from stdin
22211 cat >$tmp/stdin
22212 ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
22213 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
22214 *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
22215 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
22216 * ) ac_file_in=$ac_file.in ;;
c906108c
SS
22217 esac
22218
b4e70030
JB
22219 # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
22220 ac_dir=`(dirname "$ac_file") 2>/dev/null ||
bec39cab
AC
22221$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
22222 X"$ac_file" : 'X\(//\)[^/]' \| \
22223 X"$ac_file" : 'X\(//\)$' \| \
b4e70030
JB
22224 X"$ac_file" : 'X\(/\)' \| \
22225 . : '\(.\)' 2>/dev/null ||
bec39cab 22226echo X"$ac_file" |
b4e70030
JB
22227 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
22228 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
22229 /^X\(\/\/\)$/{ s//\1/; q; }
22230 /^X\(\/\).*/{ s//\1/; q; }
22231 s/.*/./; q'`
22232 { if $as_mkdir_p; then
22233 mkdir -p "$ac_dir"
22234 else
22235 as_dir="$ac_dir"
bec39cab 22236 as_dirs=
b4e70030
JB
22237 while test ! -d "$as_dir"; do
22238 as_dirs="$as_dir $as_dirs"
22239 as_dir=`(dirname "$as_dir") 2>/dev/null ||
bec39cab
AC
22240$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
22241 X"$as_dir" : 'X\(//\)[^/]' \| \
22242 X"$as_dir" : 'X\(//\)$' \| \
b4e70030
JB
22243 X"$as_dir" : 'X\(/\)' \| \
22244 . : '\(.\)' 2>/dev/null ||
bec39cab 22245echo X"$as_dir" |
b4e70030
JB
22246 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
22247 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
22248 /^X\(\/\/\)$/{ s//\1/; q; }
22249 /^X\(\/\).*/{ s//\1/; q; }
22250 s/.*/./; q'`
bec39cab 22251 done
b4e70030
JB
22252 test ! -n "$as_dirs" || mkdir $as_dirs
22253 fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
22254echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
bec39cab 22255 { (exit 1); exit 1; }; }; }
b4e70030 22256
bec39cab
AC
22257 ac_builddir=.
22258
b4e70030 22259if test "$ac_dir" != .; then
bec39cab 22260 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
b4e70030
JB
22261 # A "../" for each directory in $ac_dir_suffix.
22262 ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
22263else
22264 ac_dir_suffix= ac_top_builddir=
22265fi
bec39cab
AC
22266
22267case $srcdir in
b4e70030 22268 .) # No --srcdir option. We are building in place.
bec39cab 22269 ac_srcdir=.
b4e70030
JB
22270 if test -z "$ac_top_builddir"; then
22271 ac_top_srcdir=.
22272 else
22273 ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
22274 fi ;;
22275 [\\/]* | ?:[\\/]* ) # Absolute path.
bec39cab 22276 ac_srcdir=$srcdir$ac_dir_suffix;
b4e70030
JB
22277 ac_top_srcdir=$srcdir ;;
22278 *) # Relative path.
22279 ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
22280 ac_top_srcdir=$ac_top_builddir$srcdir ;;
bec39cab
AC
22281esac
22282
b4e70030
JB
22283# Do not use `cd foo && pwd` to compute absolute paths, because
22284# the directories may not exist.
22285case `pwd` in
22286.) ac_abs_builddir="$ac_dir";;
22287*)
22288 case "$ac_dir" in
22289 .) ac_abs_builddir=`pwd`;;
22290 [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
22291 *) ac_abs_builddir=`pwd`/"$ac_dir";;
22292 esac;;
22293esac
22294case $ac_abs_builddir in
22295.) ac_abs_top_builddir=${ac_top_builddir}.;;
22296*)
22297 case ${ac_top_builddir}. in
22298 .) ac_abs_top_builddir=$ac_abs_builddir;;
22299 [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
22300 *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
22301 esac;;
22302esac
22303case $ac_abs_builddir in
22304.) ac_abs_srcdir=$ac_srcdir;;
22305*)
22306 case $ac_srcdir in
22307 .) ac_abs_srcdir=$ac_abs_builddir;;
22308 [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
22309 *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
22310 esac;;
22311esac
22312case $ac_abs_builddir in
22313.) ac_abs_top_srcdir=$ac_top_srcdir;;
22314*)
22315 case $ac_top_srcdir in
22316 .) ac_abs_top_srcdir=$ac_abs_builddir;;
22317 [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
22318 *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
22319 esac;;
22320esac
c906108c 22321
c906108c 22322
bec39cab
AC
22323 case $INSTALL in
22324 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
b4e70030 22325 *) ac_INSTALL=$ac_top_builddir$INSTALL ;;
c906108c 22326 esac
121ce6e5 22327
b4e70030
JB
22328 if test x"$ac_file" != x-; then
22329 { echo "$as_me:$LINENO: creating $ac_file" >&5
22330echo "$as_me: creating $ac_file" >&6;}
22331 rm -f "$ac_file"
22332 fi
22333 # Let's still pretend it is `configure' which instantiates (i.e., don't
22334 # use $as_me), people would be surprised to read:
22335 # /* config.h. Generated by config.status. */
22336 if test x"$ac_file" = x-; then
22337 configure_input=
22338 else
22339 configure_input="$ac_file. "
22340 fi
22341 configure_input=$configure_input"Generated from `echo $ac_file_in |
22342 sed 's,.*/,,'` by configure."
22343
22344 # First look for the input files in the build tree, otherwise in the
22345 # src tree.
22346 ac_file_inputs=`IFS=:
22347 for f in $ac_file_in; do
22348 case $f in
22349 -) echo $tmp/stdin ;;
22350 [\\/$]*)
22351 # Absolute (can't be DOS-style, as IFS=:)
22352 test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
22353echo "$as_me: error: cannot find input file: $f" >&2;}
22354 { (exit 1); exit 1; }; }
22355 echo "$f";;
22356 *) # Relative
22357 if test -f "$f"; then
22358 # Build tree
22359 echo "$f"
22360 elif test -f "$srcdir/$f"; then
22361 # Source tree
22362 echo "$srcdir/$f"
22363 else
22364 # /dev/null tree
22365 { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
22366echo "$as_me: error: cannot find input file: $f" >&2;}
22367 { (exit 1); exit 1; }; }
22368 fi;;
22369 esac
22370 done` || { (exit 1); exit 1; }
4e8d927d 22371_ACEOF
bec39cab
AC
22372cat >>$CONFIG_STATUS <<_ACEOF
22373 sed "$ac_vpsub
22374$extrasub
22375_ACEOF
22376cat >>$CONFIG_STATUS <<\_ACEOF
22377:t
22378/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
b4e70030
JB
22379s,@configure_input@,$configure_input,;t t
22380s,@srcdir@,$ac_srcdir,;t t
22381s,@abs_srcdir@,$ac_abs_srcdir,;t t
22382s,@top_srcdir@,$ac_top_srcdir,;t t
22383s,@abs_top_srcdir@,$ac_abs_top_srcdir,;t t
22384s,@builddir@,$ac_builddir,;t t
22385s,@abs_builddir@,$ac_abs_builddir,;t t
22386s,@top_builddir@,$ac_top_builddir,;t t
22387s,@abs_top_builddir@,$ac_abs_top_builddir,;t t
22388s,@INSTALL@,$ac_INSTALL,;t t
22389" $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
22390 rm -f $tmp/stdin
22391 if test x"$ac_file" != x-; then
22392 mv $tmp/out $ac_file
22393 else
22394 cat $tmp/out
22395 rm -f $tmp/out
22396 fi
22397
22398done
22399_ACEOF
22400cat >>$CONFIG_STATUS <<\_ACEOF
22401
22402#
22403# CONFIG_HEADER section.
22404#
22405
22406# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
22407# NAME is the cpp macro being defined and VALUE is the value it is being given.
22408#
22409# ac_d sets the value in "#define NAME VALUE" lines.
22410ac_dA='s,^\([ ]*\)#\([ ]*define[ ][ ]*\)'
22411ac_dB='[ ].*$,\1#\2'
22412ac_dC=' '
22413ac_dD=',;t'
22414# ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
22415ac_uA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
22416ac_uB='$,\1#\2define\3'
22417ac_uC=' '
22418ac_uD=',;t'
22419
22420for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
22421 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
bec39cab 22422 case $ac_file in
b4e70030
JB
22423 - | *:- | *:-:* ) # input from stdin
22424 cat >$tmp/stdin
22425 ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
22426 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
22427 *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
22428 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
22429 * ) ac_file_in=$ac_file.in ;;
c906108c 22430 esac
b4e70030
JB
22431
22432 test x"$ac_file" != x- && { echo "$as_me:$LINENO: creating $ac_file" >&5
22433echo "$as_me: creating $ac_file" >&6;}
22434
22435 # First look for the input files in the build tree, otherwise in the
22436 # src tree.
22437 ac_file_inputs=`IFS=:
22438 for f in $ac_file_in; do
22439 case $f in
22440 -) echo $tmp/stdin ;;
22441 [\\/$]*)
22442 # Absolute (can't be DOS-style, as IFS=:)
22443 test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
22444echo "$as_me: error: cannot find input file: $f" >&2;}
22445 { (exit 1); exit 1; }; }
22446 # Do quote $f, to prevent DOS paths from being IFS'd.
22447 echo "$f";;
22448 *) # Relative
22449 if test -f "$f"; then
22450 # Build tree
22451 echo "$f"
22452 elif test -f "$srcdir/$f"; then
22453 # Source tree
22454 echo "$srcdir/$f"
22455 else
22456 # /dev/null tree
22457 { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
22458echo "$as_me: error: cannot find input file: $f" >&2;}
22459 { (exit 1); exit 1; }; }
22460 fi;;
22461 esac
22462 done` || { (exit 1); exit 1; }
22463 # Remove the trailing spaces.
22464 sed 's/[ ]*$//' $ac_file_inputs >$tmp/in
22465
22466_ACEOF
22467
22468# Transform confdefs.h into two sed scripts, `conftest.defines' and
22469# `conftest.undefs', that substitutes the proper values into
22470# config.h.in to produce config.h. The first handles `#define'
22471# templates, and the second `#undef' templates.
22472# And first: Protect against being on the right side of a sed subst in
22473# config.status. Protect against being in an unquoted here document
22474# in config.status.
22475rm -f conftest.defines conftest.undefs
22476# Using a here document instead of a string reduces the quoting nightmare.
22477# Putting comments in sed scripts is not portable.
22478#
22479# `end' is used to avoid that the second main sed command (meant for
22480# 0-ary CPP macros) applies to n-ary macro definitions.
22481# See the Autoconf documentation for `clear'.
22482cat >confdef2sed.sed <<\_ACEOF
22483s/[\\&,]/\\&/g
22484s,[\\$`],\\&,g
22485t clear
22486: clear
22487s,^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*\)\(([^)]*)\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1\2${ac_dC}\3${ac_dD},gp
22488t end
22489s,^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD},gp
22490: end
22491_ACEOF
22492# If some macros were called several times there might be several times
22493# the same #defines, which is useless. Nevertheless, we may not want to
22494# sort them, since we want the *last* AC-DEFINE to be honored.
22495uniq confdefs.h | sed -n -f confdef2sed.sed >conftest.defines
22496sed 's/ac_d/ac_u/g' conftest.defines >conftest.undefs
22497rm -f confdef2sed.sed
22498
22499# This sed command replaces #undef with comments. This is necessary, for
c906108c
SS
22500# example, in the case of _POSIX_SOURCE, which is predefined and required
22501# on some systems where configure will not decide to define it.
b4e70030
JB
22502cat >>conftest.undefs <<\_ACEOF
22503s,^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*,/* & */,
22504_ACEOF
22505
22506# Break up conftest.defines because some shells have a limit on the size
22507# of here documents, and old seds have small limits too (100 cmds).
22508echo ' # Handle all the #define templates only if necessary.' >>$CONFIG_STATUS
22509echo ' if grep "^[ ]*#[ ]*define" $tmp/in >/dev/null; then' >>$CONFIG_STATUS
22510echo ' # If there are no defines, we may have an empty if/fi' >>$CONFIG_STATUS
22511echo ' :' >>$CONFIG_STATUS
22512rm -f conftest.tail
22513while grep . conftest.defines >/dev/null
bec39cab 22514do
b4e70030
JB
22515 # Write a limited-size here document to $tmp/defines.sed.
22516 echo ' cat >$tmp/defines.sed <<CEOF' >>$CONFIG_STATUS
22517 # Speed up: don't consider the non `#define' lines.
22518 echo '/^[ ]*#[ ]*define/!b' >>$CONFIG_STATUS
22519 # Work around the forget-to-reset-the-flag bug.
22520 echo 't clr' >>$CONFIG_STATUS
22521 echo ': clr' >>$CONFIG_STATUS
22522 sed ${ac_max_here_lines}q conftest.defines >>$CONFIG_STATUS
bec39cab 22523 echo 'CEOF
b4e70030
JB
22524 sed -f $tmp/defines.sed $tmp/in >$tmp/out
22525 rm -f $tmp/in
22526 mv $tmp/out $tmp/in
22527' >>$CONFIG_STATUS
22528 sed 1,${ac_max_here_lines}d conftest.defines >conftest.tail
bec39cab
AC
22529 rm -f conftest.defines
22530 mv conftest.tail conftest.defines
22531done
b4e70030
JB
22532rm -f conftest.defines
22533echo ' fi # grep' >>$CONFIG_STATUS
22534echo >>$CONFIG_STATUS
22535
22536# Break up conftest.undefs because some shells have a limit on the size
22537# of here documents, and old seds have small limits too (100 cmds).
22538echo ' # Handle all the #undef templates' >>$CONFIG_STATUS
22539rm -f conftest.tail
22540while grep . conftest.undefs >/dev/null
22541do
22542 # Write a limited-size here document to $tmp/undefs.sed.
22543 echo ' cat >$tmp/undefs.sed <<CEOF' >>$CONFIG_STATUS
22544 # Speed up: don't consider the non `#undef'
22545 echo '/^[ ]*#[ ]*undef/!b' >>$CONFIG_STATUS
22546 # Work around the forget-to-reset-the-flag bug.
22547 echo 't clr' >>$CONFIG_STATUS
22548 echo ': clr' >>$CONFIG_STATUS
22549 sed ${ac_max_here_lines}q conftest.undefs >>$CONFIG_STATUS
22550 echo 'CEOF
22551 sed -f $tmp/undefs.sed $tmp/in >$tmp/out
22552 rm -f $tmp/in
22553 mv $tmp/out $tmp/in
22554' >>$CONFIG_STATUS
22555 sed 1,${ac_max_here_lines}d conftest.undefs >conftest.tail
22556 rm -f conftest.undefs
22557 mv conftest.tail conftest.undefs
22558done
22559rm -f conftest.undefs
bec39cab
AC
22560
22561cat >>$CONFIG_STATUS <<\_ACEOF
b4e70030
JB
22562 # Let's still pretend it is `configure' which instantiates (i.e., don't
22563 # use $as_me), people would be surprised to read:
22564 # /* config.h. Generated by config.status. */
22565 if test x"$ac_file" = x-; then
22566 echo "/* Generated by configure. */" >$tmp/config.h
22567 else
22568 echo "/* $ac_file. Generated by configure. */" >$tmp/config.h
22569 fi
22570 cat $tmp/in >>$tmp/config.h
22571 rm -f $tmp/in
bec39cab 22572 if test x"$ac_file" != x-; then
b4e70030 22573 if diff $ac_file $tmp/config.h >/dev/null 2>&1; then
bec39cab
AC
22574 { echo "$as_me:$LINENO: $ac_file is unchanged" >&5
22575echo "$as_me: $ac_file is unchanged" >&6;}
22576 else
b4e70030
JB
22577 ac_dir=`(dirname "$ac_file") 2>/dev/null ||
22578$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
22579 X"$ac_file" : 'X\(//\)[^/]' \| \
22580 X"$ac_file" : 'X\(//\)$' \| \
22581 X"$ac_file" : 'X\(/\)' \| \
22582 . : '\(.\)' 2>/dev/null ||
22583echo X"$ac_file" |
22584 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
22585 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
22586 /^X\(\/\/\)$/{ s//\1/; q; }
22587 /^X\(\/\).*/{ s//\1/; q; }
22588 s/.*/./; q'`
22589 { if $as_mkdir_p; then
22590 mkdir -p "$ac_dir"
22591 else
22592 as_dir="$ac_dir"
22593 as_dirs=
22594 while test ! -d "$as_dir"; do
22595 as_dirs="$as_dir $as_dirs"
22596 as_dir=`(dirname "$as_dir") 2>/dev/null ||
22597$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
22598 X"$as_dir" : 'X\(//\)[^/]' \| \
22599 X"$as_dir" : 'X\(//\)$' \| \
22600 X"$as_dir" : 'X\(/\)' \| \
22601 . : '\(.\)' 2>/dev/null ||
22602echo X"$as_dir" |
22603 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
22604 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
22605 /^X\(\/\/\)$/{ s//\1/; q; }
22606 /^X\(\/\).*/{ s//\1/; q; }
22607 s/.*/./; q'`
22608 done
22609 test ! -n "$as_dirs" || mkdir $as_dirs
22610 fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
22611echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
22612 { (exit 1); exit 1; }; }; }
22613
bec39cab 22614 rm -f $ac_file
b4e70030 22615 mv $tmp/config.h $ac_file
bec39cab
AC
22616 fi
22617 else
b4e70030
JB
22618 cat $tmp/config.h
22619 rm -f $tmp/config.h
bec39cab 22620 fi
e28b3332
DJ
22621# Compute $ac_file's index in $config_headers.
22622_am_stamp_count=1
22623for _am_header in $config_headers :; do
22624 case $_am_header in
22625 $ac_file | $ac_file:* )
22626 break ;;
22627 * )
22628 _am_stamp_count=`expr $_am_stamp_count + 1` ;;
22629 esac
22630done
22631echo "timestamp for $ac_file" >`(dirname $ac_file) 2>/dev/null ||
22632$as_expr X$ac_file : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
22633 X$ac_file : 'X\(//\)[^/]' \| \
22634 X$ac_file : 'X\(//\)$' \| \
22635 X$ac_file : 'X\(/\)' \| \
22636 . : '\(.\)' 2>/dev/null ||
22637echo X$ac_file |
22638 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
22639 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
22640 /^X\(\/\/\)$/{ s//\1/; q; }
22641 /^X\(\/\).*/{ s//\1/; q; }
22642 s/.*/./; q'`/stamp-h$_am_stamp_count
b4e70030
JB
22643done
22644_ACEOF
22645cat >>$CONFIG_STATUS <<\_ACEOF
22646
22647#
22648# CONFIG_LINKS section.
22649#
22650
22651for ac_file in : $CONFIG_LINKS; do test "x$ac_file" = x: && continue
22652 ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
22653 ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
c906108c 22654
b4e70030
JB
22655 { echo "$as_me:$LINENO: linking $srcdir/$ac_source to $ac_dest" >&5
22656echo "$as_me: linking $srcdir/$ac_source to $ac_dest" >&6;}
c906108c
SS
22657
22658 if test ! -r $srcdir/$ac_source; then
bec39cab
AC
22659 { { echo "$as_me:$LINENO: error: $srcdir/$ac_source: file not found" >&5
22660echo "$as_me: error: $srcdir/$ac_source: file not found" >&2;}
22661 { (exit 1); exit 1; }; }
c906108c 22662 fi
b4e70030
JB
22663 rm -f $ac_dest
22664
22665 # Make relative symlinks.
22666 ac_dest_dir=`(dirname "$ac_dest") 2>/dev/null ||
22667$as_expr X"$ac_dest" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
22668 X"$ac_dest" : 'X\(//\)[^/]' \| \
22669 X"$ac_dest" : 'X\(//\)$' \| \
22670 X"$ac_dest" : 'X\(/\)' \| \
22671 . : '\(.\)' 2>/dev/null ||
22672echo X"$ac_dest" |
22673 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
22674 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
22675 /^X\(\/\/\)$/{ s//\1/; q; }
22676 /^X\(\/\).*/{ s//\1/; q; }
22677 s/.*/./; q'`
22678 { if $as_mkdir_p; then
22679 mkdir -p "$ac_dest_dir"
22680 else
22681 as_dir="$ac_dest_dir"
22682 as_dirs=
22683 while test ! -d "$as_dir"; do
22684 as_dirs="$as_dir $as_dirs"
22685 as_dir=`(dirname "$as_dir") 2>/dev/null ||
22686$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
22687 X"$as_dir" : 'X\(//\)[^/]' \| \
22688 X"$as_dir" : 'X\(//\)$' \| \
22689 X"$as_dir" : 'X\(/\)' \| \
22690 . : '\(.\)' 2>/dev/null ||
22691echo X"$as_dir" |
22692 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
22693 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
22694 /^X\(\/\/\)$/{ s//\1/; q; }
22695 /^X\(\/\).*/{ s//\1/; q; }
22696 s/.*/./; q'`
22697 done
22698 test ! -n "$as_dirs" || mkdir $as_dirs
22699 fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dest_dir\"" >&5
22700echo "$as_me: error: cannot create directory \"$ac_dest_dir\"" >&2;}
22701 { (exit 1); exit 1; }; }; }
22702
22703 ac_builddir=.
22704
22705if test "$ac_dest_dir" != .; then
22706 ac_dir_suffix=/`echo "$ac_dest_dir" | sed 's,^\.[\\/],,'`
22707 # A "../" for each directory in $ac_dir_suffix.
22708 ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
22709else
22710 ac_dir_suffix= ac_top_builddir=
22711fi
22712
22713case $srcdir in
22714 .) # No --srcdir option. We are building in place.
22715 ac_srcdir=.
22716 if test -z "$ac_top_builddir"; then
22717 ac_top_srcdir=.
22718 else
22719 ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
22720 fi ;;
22721 [\\/]* | ?:[\\/]* ) # Absolute path.
22722 ac_srcdir=$srcdir$ac_dir_suffix;
22723 ac_top_srcdir=$srcdir ;;
22724 *) # Relative path.
22725 ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
22726 ac_top_srcdir=$ac_top_builddir$srcdir ;;
22727esac
22728
22729# Do not use `cd foo && pwd` to compute absolute paths, because
22730# the directories may not exist.
22731case `pwd` in
22732.) ac_abs_builddir="$ac_dest_dir";;
22733*)
22734 case "$ac_dest_dir" in
22735 .) ac_abs_builddir=`pwd`;;
22736 [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dest_dir";;
22737 *) ac_abs_builddir=`pwd`/"$ac_dest_dir";;
22738 esac;;
22739esac
22740case $ac_abs_builddir in
22741.) ac_abs_top_builddir=${ac_top_builddir}.;;
22742*)
22743 case ${ac_top_builddir}. in
22744 .) ac_abs_top_builddir=$ac_abs_builddir;;
22745 [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
22746 *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
22747 esac;;
22748esac
22749case $ac_abs_builddir in
22750.) ac_abs_srcdir=$ac_srcdir;;
22751*)
22752 case $ac_srcdir in
22753 .) ac_abs_srcdir=$ac_abs_builddir;;
22754 [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
22755 *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
22756 esac;;
22757esac
22758case $ac_abs_builddir in
22759.) ac_abs_top_srcdir=$ac_top_srcdir;;
22760*)
22761 case $ac_top_srcdir in
22762 .) ac_abs_top_srcdir=$ac_abs_builddir;;
22763 [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
22764 *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
22765 esac;;
22766esac
22767
bec39cab
AC
22768
22769 case $srcdir in
22770 [\\/$]* | ?:[\\/]* ) ac_rel_source=$srcdir/$ac_source ;;
b4e70030 22771 *) ac_rel_source=$ac_top_builddir$srcdir/$ac_source ;;
c906108c 22772 esac
b4e70030
JB
22773
22774 # Try a symlink, then a hard link, then a copy.
22775 ln -s $ac_rel_source $ac_dest 2>/dev/null ||
22776 ln $srcdir/$ac_source $ac_dest 2>/dev/null ||
22777 cp -p $srcdir/$ac_source $ac_dest ||
22778 { { echo "$as_me:$LINENO: error: cannot link or copy $srcdir/$ac_source to $ac_dest" >&5
22779echo "$as_me: error: cannot link or copy $srcdir/$ac_source to $ac_dest" >&2;}
bec39cab 22780 { (exit 1); exit 1; }; }
b4e70030
JB
22781done
22782_ACEOF
22783cat >>$CONFIG_STATUS <<\_ACEOF
22784
22785#
22786# CONFIG_COMMANDS section.
22787#
22788for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
22789 ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
22790 ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
22791 ac_dir=`(dirname "$ac_dest") 2>/dev/null ||
22792$as_expr X"$ac_dest" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
22793 X"$ac_dest" : 'X\(//\)[^/]' \| \
22794 X"$ac_dest" : 'X\(//\)$' \| \
22795 X"$ac_dest" : 'X\(/\)' \| \
22796 . : '\(.\)' 2>/dev/null ||
22797echo X"$ac_dest" |
22798 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
22799 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
22800 /^X\(\/\/\)$/{ s//\1/; q; }
22801 /^X\(\/\).*/{ s//\1/; q; }
22802 s/.*/./; q'`
22803 { if $as_mkdir_p; then
22804 mkdir -p "$ac_dir"
22805 else
22806 as_dir="$ac_dir"
22807 as_dirs=
22808 while test ! -d "$as_dir"; do
22809 as_dirs="$as_dir $as_dirs"
22810 as_dir=`(dirname "$as_dir") 2>/dev/null ||
22811$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
22812 X"$as_dir" : 'X\(//\)[^/]' \| \
22813 X"$as_dir" : 'X\(//\)$' \| \
22814 X"$as_dir" : 'X\(/\)' \| \
22815 . : '\(.\)' 2>/dev/null ||
22816echo X"$as_dir" |
22817 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
22818 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
22819 /^X\(\/\/\)$/{ s//\1/; q; }
22820 /^X\(\/\).*/{ s//\1/; q; }
22821 s/.*/./; q'`
22822 done
22823 test ! -n "$as_dirs" || mkdir $as_dirs
22824 fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
22825echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
22826 { (exit 1); exit 1; }; }; }
22827
22828 ac_builddir=.
22829
22830if test "$ac_dir" != .; then
22831 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
22832 # A "../" for each directory in $ac_dir_suffix.
22833 ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
22834else
22835 ac_dir_suffix= ac_top_builddir=
22836fi
22837
22838case $srcdir in
22839 .) # No --srcdir option. We are building in place.
22840 ac_srcdir=.
22841 if test -z "$ac_top_builddir"; then
22842 ac_top_srcdir=.
22843 else
22844 ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
22845 fi ;;
22846 [\\/]* | ?:[\\/]* ) # Absolute path.
22847 ac_srcdir=$srcdir$ac_dir_suffix;
22848 ac_top_srcdir=$srcdir ;;
22849 *) # Relative path.
22850 ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
22851 ac_top_srcdir=$ac_top_builddir$srcdir ;;
22852esac
22853
22854# Do not use `cd foo && pwd` to compute absolute paths, because
22855# the directories may not exist.
22856case `pwd` in
22857.) ac_abs_builddir="$ac_dir";;
22858*)
22859 case "$ac_dir" in
22860 .) ac_abs_builddir=`pwd`;;
22861 [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
22862 *) ac_abs_builddir=`pwd`/"$ac_dir";;
22863 esac;;
22864esac
22865case $ac_abs_builddir in
22866.) ac_abs_top_builddir=${ac_top_builddir}.;;
22867*)
22868 case ${ac_top_builddir}. in
22869 .) ac_abs_top_builddir=$ac_abs_builddir;;
22870 [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
22871 *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
22872 esac;;
22873esac
22874case $ac_abs_builddir in
22875.) ac_abs_srcdir=$ac_srcdir;;
22876*)
22877 case $ac_srcdir in
22878 .) ac_abs_srcdir=$ac_abs_builddir;;
22879 [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
22880 *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
22881 esac;;
22882esac
22883case $ac_abs_builddir in
22884.) ac_abs_top_srcdir=$ac_top_srcdir;;
22885*)
22886 case $ac_top_srcdir in
22887 .) ac_abs_top_srcdir=$ac_abs_builddir;;
22888 [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
22889 *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
22890 esac;;
22891esac
bec39cab 22892
bec39cab 22893
b4e70030
JB
22894 { echo "$as_me:$LINENO: executing $ac_dest commands" >&5
22895echo "$as_me: executing $ac_dest commands" >&6;}
22896 case $ac_dest in
a417dc56 22897 depdir ) $SHELL $ac_aux_dir/mkinstalldirs $DEPDIR ;;
e28b3332
DJ
22898 depfiles ) test x"$AMDEP_TRUE" != x"" || for mf in $CONFIG_FILES; do
22899 # Strip MF so we end up with the name of the file.
22900 mf=`echo "$mf" | sed -e 's/:.*$//'`
22901 # Check whether this is an Automake generated Makefile or not.
22902 # We used to match only the files named `Makefile.in', but
22903 # some people rename them; so instead we look at the file content.
22904 # Grep'ing the first line is not enough: some people post-process
22905 # each Makefile.in and add a new line on top of each file to say so.
22906 # So let's grep whole file.
22907 if grep '^#.*generated by automake' $mf > /dev/null 2>&1; then
22908 dirpart=`(dirname "$mf") 2>/dev/null ||
22909$as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
22910 X"$mf" : 'X\(//\)[^/]' \| \
22911 X"$mf" : 'X\(//\)$' \| \
22912 X"$mf" : 'X\(/\)' \| \
22913 . : '\(.\)' 2>/dev/null ||
22914echo X"$mf" |
22915 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
22916 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
22917 /^X\(\/\/\)$/{ s//\1/; q; }
22918 /^X\(\/\).*/{ s//\1/; q; }
22919 s/.*/./; q'`
22920 else
22921 continue
22922 fi
22923 # Extract the definition of DEPDIR, am__include, and am__quote
22924 # from the Makefile without running `make'.
22925 DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
22926 test -z "$DEPDIR" && continue
22927 am__include=`sed -n 's/^am__include = //p' < "$mf"`
22928 test -z "am__include" && continue
22929 am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
22930 # When using ansi2knr, U may be empty or an underscore; expand it
22931 U=`sed -n 's/^U = //p' < "$mf"`
22932 # Find all dependency output files, they are included files with
22933 # $(DEPDIR) in their names. We invoke sed twice because it is the
22934 # simplest approach to changing $(DEPDIR) to its actual value in the
22935 # expansion.
22936 for file in `sed -n "
22937 s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
22938 sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
22939 # Make sure the directory exists.
22940 test -f "$dirpart/$file" && continue
22941 fdir=`(dirname "$file") 2>/dev/null ||
22942$as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
22943 X"$file" : 'X\(//\)[^/]' \| \
22944 X"$file" : 'X\(//\)$' \| \
22945 X"$file" : 'X\(/\)' \| \
22946 . : '\(.\)' 2>/dev/null ||
22947echo X"$file" |
22948 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
22949 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
22950 /^X\(\/\/\)$/{ s//\1/; q; }
22951 /^X\(\/\).*/{ s//\1/; q; }
22952 s/.*/./; q'`
22953 { if $as_mkdir_p; then
22954 mkdir -p $dirpart/$fdir
22955 else
22956 as_dir=$dirpart/$fdir
22957 as_dirs=
22958 while test ! -d "$as_dir"; do
22959 as_dirs="$as_dir $as_dirs"
22960 as_dir=`(dirname "$as_dir") 2>/dev/null ||
22961$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
22962 X"$as_dir" : 'X\(//\)[^/]' \| \
22963 X"$as_dir" : 'X\(//\)$' \| \
22964 X"$as_dir" : 'X\(/\)' \| \
22965 . : '\(.\)' 2>/dev/null ||
22966echo X"$as_dir" |
22967 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
22968 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
22969 /^X\(\/\/\)$/{ s//\1/; q; }
22970 /^X\(\/\).*/{ s//\1/; q; }
22971 s/.*/./; q'`
22972 done
22973 test ! -n "$as_dirs" || mkdir $as_dirs
22974 fi || { { echo "$as_me:$LINENO: error: cannot create directory $dirpart/$fdir" >&5
22975echo "$as_me: error: cannot create directory $dirpart/$fdir" >&2;}
22976 { (exit 1); exit 1; }; }; }
22977
22978 # echo "creating $dirpart/$file"
22979 echo '# dummy' > "$dirpart/$file"
22980 done
22981done
4e8d927d 22982 ;;
b4e70030 22983 default )
c906108c 22984
db985757 22985sed -e '/^NAT_FILE[ ]*=/s,^NAT_FILE[ ]*=[ ]*,&config/'"${gdb_host_cpu}"'/,' <Makefile >Makefile.tmp
c906108c
SS
22986mv -f Makefile.tmp Makefile
22987
2acceee2 22988
c906108c
SS
22989case x$CONFIG_HEADERS in
22990xconfig.h:config.in)
22991echo > stamp-h ;;
22992esac
bec39cab
AC
22993 ;;
22994 esac
b4e70030
JB
22995done
22996_ACEOF
c906108c 22997
b4e70030 22998cat >>$CONFIG_STATUS <<\_ACEOF
bec39cab
AC
22999
23000{ (exit 0); exit 0; }
23001_ACEOF
c906108c 23002chmod +x $CONFIG_STATUS
bec39cab
AC
23003ac_clean_files=$ac_clean_files_save
23004
23005
23006# configure is writing to config.log, and then calls config.status.
23007# config.status does its own redirection, appending to config.log.
23008# Unfortunately, on DOS this fails, as config.log is still kept open
23009# by configure, so config.status won't be able to write to it; its
23010# output is simply discarded. So we exec the FD to /dev/null,
23011# effectively closing config.log, so it can be properly (re)opened and
23012# appended to by config.status. When coming back to configure, we
23013# need to make the FD available again.
23014if test "$no_create" != yes; then
23015 ac_cs_success=:
23016 ac_config_status_args=
23017 test "$silent" = yes &&
23018 ac_config_status_args="$ac_config_status_args --quiet"
23019 exec 5>/dev/null
23020 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
23021 exec 5>>config.log
23022 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
23023 # would make configure fail if this is the last instruction.
23024 $ac_cs_success || { (exit 1); exit 1; }
23025fi
c906108c 23026
bec39cab 23027#
fdc59709 23028# CONFIG_SUBDIRS section, as fixed in confsubdir.m4.
bec39cab 23029#
c906108c
SS
23030if test "$no_recursion" != yes; then
23031
23032 # Remove --cache-file and --srcdir arguments so they do not pile up.
23033 ac_sub_configure_args=
23034 ac_prev=
fdc59709
PB
23035 eval "set x $ac_configure_args"
23036 shift
23037 for ac_arg
23038 do
c906108c
SS
23039 if test -n "$ac_prev"; then
23040 ac_prev=
23041 continue
23042 fi
bec39cab 23043 case $ac_arg in
c906108c
SS
23044 -cache-file | --cache-file | --cache-fil | --cache-fi \
23045 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
23046 ac_prev=cache_file ;;
23047 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
bec39cab
AC
23048 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* \
23049 | --c=*)
23050 ;;
23051 --config-cache | -C)
c906108c
SS
23052 ;;
23053 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
23054 ac_prev=srcdir ;;
23055 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
23056 ;;
bec39cab
AC
23057 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
23058 ac_prev=prefix ;;
23059 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
23060 ;;
fdc59709
PB
23061 *)
23062 case $ac_arg in
23063 *\'*) ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
23064 esac
23065 ac_sub_configure_args="$ac_sub_configure_args '$ac_arg'" ;;
c906108c
SS
23066 esac
23067 done
23068
bec39cab
AC
23069 # Always prepend --prefix to ensure using the same prefix
23070 # in subdir configurations.
fdc59709
PB
23071 ac_arg="--prefix=$prefix"
23072 case $ac_arg in
23073 *\'*) ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
23074 esac
23075 ac_sub_configure_args="$ac_arg $ac_sub_configure_args"
bec39cab 23076
b4e70030 23077 ac_popdir=`pwd`
bec39cab 23078 for ac_dir in : $subdirs; do test "x$ac_dir" = x: && continue
c906108c
SS
23079
23080 # Do not complain, so a configure script can configure whichever
23081 # parts of a large source tree are present.
fdc59709 23082 test -d "$srcdir/$ac_dir" || continue
c906108c 23083
b4e70030
JB
23084 { echo "$as_me:$LINENO: configuring in $ac_dir" >&5
23085echo "$as_me: configuring in $ac_dir" >&6;}
23086 { if $as_mkdir_p; then
23087 mkdir -p "$ac_dir"
23088 else
23089 as_dir="$ac_dir"
bec39cab 23090 as_dirs=
b4e70030
JB
23091 while test ! -d "$as_dir"; do
23092 as_dirs="$as_dir $as_dirs"
23093 as_dir=`(dirname "$as_dir") 2>/dev/null ||
bec39cab
AC
23094$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
23095 X"$as_dir" : 'X\(//\)[^/]' \| \
23096 X"$as_dir" : 'X\(//\)$' \| \
b4e70030
JB
23097 X"$as_dir" : 'X\(/\)' \| \
23098 . : '\(.\)' 2>/dev/null ||
bec39cab 23099echo X"$as_dir" |
b4e70030
JB
23100 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
23101 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
23102 /^X\(\/\/\)$/{ s//\1/; q; }
23103 /^X\(\/\).*/{ s//\1/; q; }
23104 s/.*/./; q'`
bec39cab 23105 done
b4e70030
JB
23106 test ! -n "$as_dirs" || mkdir $as_dirs
23107 fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
23108echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
bec39cab 23109 { (exit 1); exit 1; }; }; }
b4e70030 23110
bec39cab
AC
23111 ac_builddir=.
23112
b4e70030 23113if test "$ac_dir" != .; then
bec39cab 23114 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
b4e70030
JB
23115 # A "../" for each directory in $ac_dir_suffix.
23116 ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
23117else
23118 ac_dir_suffix= ac_top_builddir=
23119fi
bec39cab
AC
23120
23121case $srcdir in
b4e70030 23122 .) # No --srcdir option. We are building in place.
bec39cab 23123 ac_srcdir=.
b4e70030
JB
23124 if test -z "$ac_top_builddir"; then
23125 ac_top_srcdir=.
23126 else
23127 ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
23128 fi ;;
23129 [\\/]* | ?:[\\/]* ) # Absolute path.
bec39cab 23130 ac_srcdir=$srcdir$ac_dir_suffix;
b4e70030
JB
23131 ac_top_srcdir=$srcdir ;;
23132 *) # Relative path.
23133 ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
23134 ac_top_srcdir=$ac_top_builddir$srcdir ;;
23135esac
23136
23137# Do not use `cd foo && pwd` to compute absolute paths, because
23138# the directories may not exist.
23139case `pwd` in
23140.) ac_abs_builddir="$ac_dir";;
23141*)
23142 case "$ac_dir" in
23143 .) ac_abs_builddir=`pwd`;;
23144 [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
23145 *) ac_abs_builddir=`pwd`/"$ac_dir";;
23146 esac;;
23147esac
23148case $ac_abs_builddir in
23149.) ac_abs_top_builddir=${ac_top_builddir}.;;
23150*)
23151 case ${ac_top_builddir}. in
23152 .) ac_abs_top_builddir=$ac_abs_builddir;;
23153 [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
23154 *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
23155 esac;;
23156esac
23157case $ac_abs_builddir in
23158.) ac_abs_srcdir=$ac_srcdir;;
23159*)
23160 case $ac_srcdir in
23161 .) ac_abs_srcdir=$ac_abs_builddir;;
23162 [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
23163 *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
23164 esac;;
23165esac
23166case $ac_abs_builddir in
23167.) ac_abs_top_srcdir=$ac_top_srcdir;;
23168*)
23169 case $ac_top_srcdir in
23170 .) ac_abs_top_srcdir=$ac_abs_builddir;;
23171 [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
23172 *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
23173 esac;;
bec39cab 23174esac
c906108c 23175
c906108c 23176
fdc59709 23177 cd "$ac_dir"
c906108c
SS
23178
23179 # Check for guested configure; otherwise get Cygnus style configure.
fdc59709
PB
23180 if test -f "$ac_srcdir/configure.gnu"; then
23181 ac_sub_configure=$ac_srcdir/configure.gnu
23182 elif test -f "$ac_srcdir/configure"; then
23183 ac_sub_configure=$ac_srcdir/configure
23184 elif test -f "$ac_srcdir/configure.in"; then
23185 # This should be Cygnus configure.
23186 ac_sub_configure=$ac_aux_dir/configure
c906108c 23187 else
bec39cab
AC
23188 { echo "$as_me:$LINENO: WARNING: no configuration information is in $ac_dir" >&5
23189echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2;}
c906108c
SS
23190 ac_sub_configure=
23191 fi
23192
23193 # The recursion is here.
23194 if test -n "$ac_sub_configure"; then
c906108c 23195 # Make the cache file name correct relative to the subdirectory.
bec39cab
AC
23196 case $cache_file in
23197 [\\/]* | ?:[\\/]* ) ac_sub_cache_file=$cache_file ;;
b4e70030
JB
23198 *) # Relative path.
23199 ac_sub_cache_file=$ac_top_builddir$cache_file ;;
c906108c 23200 esac
c906108c 23201
fdc59709
PB
23202 { echo "$as_me:$LINENO: running $SHELL $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_srcdir" >&5
23203echo "$as_me: running $SHELL $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_srcdir" >&6;}
c906108c 23204 # The eval makes quoting arguments work.
fdc59709
PB
23205 eval "\$SHELL \"\$ac_sub_configure\" $ac_sub_configure_args \
23206 --cache-file=\"\$ac_sub_cache_file\" --srcdir=\"\$ac_srcdir\"" ||
bec39cab
AC
23207 { { echo "$as_me:$LINENO: error: $ac_sub_configure failed for $ac_dir" >&5
23208echo "$as_me: error: $ac_sub_configure failed for $ac_dir" >&2;}
23209 { (exit 1); exit 1; }; }
c906108c
SS
23210 fi
23211
fdc59709 23212 cd "$ac_popdir"
c906108c
SS
23213 done
23214fi
23215
23216
23217exit 0
This page took 2.997126 seconds and 4 git commands to generate.