* x86-64-tdep.h: Tewak comment.
[deliverable/binutils-gdb.git] / gdb / configure
CommitLineData
c906108c
SS
1#! /bin/sh
2
3# Guess values for system-dependent variables and create Makefiles.
4# Generated automatically using autoconf version 2.13
5# Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
6#
7# This configure script is free software; the Free Software Foundation
8# gives unlimited permission to copy, distribute and modify it.
9
10# Defaults:
11ac_help=
12ac_default_prefix=/usr/local
13# Any additions from configure.in:
413ccac7
AC
14ac_help="$ac_help
15 --enable-maintainer-mode enable make rules and dependencies not useful
16 (and sometimes confusing) to the casual installer"
c906108c
SS
17ac_help="$ac_help
18 --disable-nls do not use Native Language Support"
19ac_help="$ac_help
20 --with-included-gettext use the GNU gettext library included here"
5b5d99cf
JB
21ac_help="$ac_help
22 --with-separate-debug-dir=path Look for global separate debug info in this path [LIBDIR/debug]"
627af7ea
MK
23ac_help="$ac_help
24 --disable-gdbcli disable command-line interface (CLI)"
25ac_help="$ac_help
26 --disable-gdbmi disable machine-interface (MI)"
06825bd1
MK
27ac_help="$ac_help
28 --enable-tui enable full-screen terminal user interface (TUI)"
8ee53726 29ac_help="$ac_help
d28f9cdf 30 --enable-gdbtk enable gdbtk graphical user interface (GUI)"
0e5d83e3
JJ
31ac_help="$ac_help
32 --with-libunwind Use libunwind frame unwinding support"
d28f9cdf
DJ
33ac_help="$ac_help
34 --enable-profiling enable profiling of GDB"
06825bd1
MK
35ac_help="$ac_help
36 --without-included-regex don't use included regex; this is the default
37 on systems with version 2 of the GNU C library
38 (use with caution on other system)"
030292b7
DJ
39ac_help="$ac_help
40 --with-sysroot[=DIR] Search for usr/lib et al within DIR."
c906108c
SS
41ac_help="$ac_help
42 --enable-build-warnings Enable build-time compiler warnings if gcc is used"
3b851bce
AC
43ac_help="$ac_help
44 --enable-gdb-build-warnings Enable GDB specific build-time compiler warnings if gcc is used"
7a292a7a
SS
45ac_help="$ac_help
46 --with-tclconfig=DIR Directory containing tcl configuration (tclConfig.sh)"
47ac_help="$ac_help
48 --with-tkconfig=DIR Directory containing tk configuration (tkConfig.sh)"
49ac_help="$ac_help
50 --with-tclinclude=DIR Directory where tcl private headers are"
51ac_help="$ac_help
52 --with-tkinclude=DIR Directory where tk private headers are"
53ac_help="$ac_help
54 --with-itclconfig Directory containing itcl configuration (itclConfig.sh)"
55ac_help="$ac_help
56 --with-itkconfig Directory containing itk configuration (itkConfig.sh)"
c906108c
SS
57ac_help="$ac_help
58 --with-x use the X Window System"
7a292a7a
SS
59ac_help="$ac_help
60 --enable-sim Link gdb with simulator"
8dcde887
MK
61ac_help="$ac_help
62 --enable-multi-ice build the multi-ice-gdb-server"
234b45d4
KB
63ac_help="$ac_help
64 --with-libiconv-prefix=DIR search for libiconv in DIR/include and DIR/lib"
c906108c
SS
65
66# Initialize some variables set by options.
67# The variables have the same names as the options, with
68# dashes changed to underlines.
69build=NONE
70cache_file=./config.cache
71exec_prefix=NONE
72host=NONE
73no_create=
74nonopt=NONE
75no_recursion=
76prefix=NONE
77program_prefix=NONE
78program_suffix=NONE
79program_transform_name=s,x,x,
80silent=
81site=
d836ee13 82sitefile=
c906108c
SS
83srcdir=
84target=NONE
85verbose=
86x_includes=NONE
87x_libraries=NONE
88bindir='${exec_prefix}/bin'
89sbindir='${exec_prefix}/sbin'
90libexecdir='${exec_prefix}/libexec'
91datadir='${prefix}/share'
92sysconfdir='${prefix}/etc'
93sharedstatedir='${prefix}/com'
94localstatedir='${prefix}/var'
95libdir='${exec_prefix}/lib'
96includedir='${prefix}/include'
97oldincludedir='/usr/include'
98infodir='${prefix}/info'
99mandir='${prefix}/man'
100
101# Initialize some other variables.
102subdirs=
103MFLAGS= MAKEFLAGS=
104SHELL=${CONFIG_SHELL-/bin/sh}
105# Maximum number of lines to put in a shell here document.
106ac_max_here_lines=12
107
108ac_prev=
109for ac_option
110do
111
112 # If the previous option needs an argument, assign it.
113 if test -n "$ac_prev"; then
114 eval "$ac_prev=\$ac_option"
115 ac_prev=
116 continue
117 fi
118
119 case "$ac_option" in
120 -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
121 *) ac_optarg= ;;
122 esac
123
124 # Accept the important Cygnus configure options, so we can diagnose typos.
125
126 case "$ac_option" in
127
128 -bindir | --bindir | --bindi | --bind | --bin | --bi)
129 ac_prev=bindir ;;
130 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
131 bindir="$ac_optarg" ;;
132
133 -build | --build | --buil | --bui | --bu)
134 ac_prev=build ;;
135 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
136 build="$ac_optarg" ;;
137
138 -cache-file | --cache-file | --cache-fil | --cache-fi \
139 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
140 ac_prev=cache_file ;;
141 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
142 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
143 cache_file="$ac_optarg" ;;
144
145 -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
146 ac_prev=datadir ;;
147 -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
148 | --da=*)
149 datadir="$ac_optarg" ;;
150
151 -disable-* | --disable-*)
152 ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
153 # Reject names that are not valid shell variable names.
154 if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
155 { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
156 fi
157 ac_feature=`echo $ac_feature| sed 's/-/_/g'`
158 eval "enable_${ac_feature}=no" ;;
159
160 -enable-* | --enable-*)
161 ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
162 # Reject names that are not valid shell variable names.
163 if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
164 { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
165 fi
166 ac_feature=`echo $ac_feature| sed 's/-/_/g'`
167 case "$ac_option" in
168 *=*) ;;
169 *) ac_optarg=yes ;;
170 esac
171 eval "enable_${ac_feature}='$ac_optarg'" ;;
172
173 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
174 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
175 | --exec | --exe | --ex)
176 ac_prev=exec_prefix ;;
177 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
178 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
179 | --exec=* | --exe=* | --ex=*)
180 exec_prefix="$ac_optarg" ;;
181
182 -gas | --gas | --ga | --g)
183 # Obsolete; use --with-gas.
184 with_gas=yes ;;
185
186 -help | --help | --hel | --he)
187 # Omit some internal or obsolete options to make the list less imposing.
188 # This message is too long to be a string in the A/UX 3.1 sh.
189 cat << EOF
190Usage: configure [options] [host]
191Options: [defaults in brackets after descriptions]
192Configuration:
193 --cache-file=FILE cache test results in FILE
194 --help print this message
195 --no-create do not create output files
196 --quiet, --silent do not print \`checking...' messages
d836ee13 197 --site-file=FILE use FILE as the site file
c906108c
SS
198 --version print the version of autoconf that created configure
199Directory and file names:
200 --prefix=PREFIX install architecture-independent files in PREFIX
201 [$ac_default_prefix]
202 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
203 [same as prefix]
204 --bindir=DIR user executables in DIR [EPREFIX/bin]
205 --sbindir=DIR system admin executables in DIR [EPREFIX/sbin]
206 --libexecdir=DIR program executables in DIR [EPREFIX/libexec]
207 --datadir=DIR read-only architecture-independent data in DIR
208 [PREFIX/share]
209 --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc]
210 --sharedstatedir=DIR modifiable architecture-independent data in DIR
211 [PREFIX/com]
212 --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var]
213 --libdir=DIR object code libraries in DIR [EPREFIX/lib]
214 --includedir=DIR C header files in DIR [PREFIX/include]
215 --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include]
216 --infodir=DIR info documentation in DIR [PREFIX/info]
217 --mandir=DIR man documentation in DIR [PREFIX/man]
218 --srcdir=DIR find the sources in DIR [configure dir or ..]
219 --program-prefix=PREFIX prepend PREFIX to installed program names
220 --program-suffix=SUFFIX append SUFFIX to installed program names
221 --program-transform-name=PROGRAM
222 run sed PROGRAM on installed program names
223EOF
224 cat << EOF
225Host type:
226 --build=BUILD configure for building on BUILD [BUILD=HOST]
227 --host=HOST configure for HOST [guessed]
228 --target=TARGET configure for TARGET [TARGET=HOST]
229Features and packages:
230 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
231 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
232 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
233 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
234 --x-includes=DIR X include files are in DIR
235 --x-libraries=DIR X library files are in DIR
236EOF
237 if test -n "$ac_help"; then
238 echo "--enable and --with options recognized:$ac_help"
239 fi
240 exit 0 ;;
241
242 -host | --host | --hos | --ho)
243 ac_prev=host ;;
244 -host=* | --host=* | --hos=* | --ho=*)
245 host="$ac_optarg" ;;
246
247 -includedir | --includedir | --includedi | --included | --include \
248 | --includ | --inclu | --incl | --inc)
249 ac_prev=includedir ;;
250 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
251 | --includ=* | --inclu=* | --incl=* | --inc=*)
252 includedir="$ac_optarg" ;;
253
254 -infodir | --infodir | --infodi | --infod | --info | --inf)
255 ac_prev=infodir ;;
256 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
257 infodir="$ac_optarg" ;;
258
259 -libdir | --libdir | --libdi | --libd)
260 ac_prev=libdir ;;
261 -libdir=* | --libdir=* | --libdi=* | --libd=*)
262 libdir="$ac_optarg" ;;
263
264 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
265 | --libexe | --libex | --libe)
266 ac_prev=libexecdir ;;
267 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
268 | --libexe=* | --libex=* | --libe=*)
269 libexecdir="$ac_optarg" ;;
270
271 -localstatedir | --localstatedir | --localstatedi | --localstated \
272 | --localstate | --localstat | --localsta | --localst \
273 | --locals | --local | --loca | --loc | --lo)
274 ac_prev=localstatedir ;;
275 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
276 | --localstate=* | --localstat=* | --localsta=* | --localst=* \
277 | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
278 localstatedir="$ac_optarg" ;;
279
280 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
281 ac_prev=mandir ;;
282 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
283 mandir="$ac_optarg" ;;
284
285 -nfp | --nfp | --nf)
286 # Obsolete; use --without-fp.
287 with_fp=no ;;
288
289 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
290 | --no-cr | --no-c)
291 no_create=yes ;;
292
293 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
294 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
295 no_recursion=yes ;;
296
297 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
298 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
299 | --oldin | --oldi | --old | --ol | --o)
300 ac_prev=oldincludedir ;;
301 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
302 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
303 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
304 oldincludedir="$ac_optarg" ;;
305
306 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
307 ac_prev=prefix ;;
308 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
309 prefix="$ac_optarg" ;;
310
311 -program-prefix | --program-prefix | --program-prefi | --program-pref \
312 | --program-pre | --program-pr | --program-p)
313 ac_prev=program_prefix ;;
314 -program-prefix=* | --program-prefix=* | --program-prefi=* \
315 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
316 program_prefix="$ac_optarg" ;;
317
318 -program-suffix | --program-suffix | --program-suffi | --program-suff \
319 | --program-suf | --program-su | --program-s)
320 ac_prev=program_suffix ;;
321 -program-suffix=* | --program-suffix=* | --program-suffi=* \
322 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
323 program_suffix="$ac_optarg" ;;
324
325 -program-transform-name | --program-transform-name \
326 | --program-transform-nam | --program-transform-na \
327 | --program-transform-n | --program-transform- \
328 | --program-transform | --program-transfor \
329 | --program-transfo | --program-transf \
330 | --program-trans | --program-tran \
331 | --progr-tra | --program-tr | --program-t)
332 ac_prev=program_transform_name ;;
333 -program-transform-name=* | --program-transform-name=* \
334 | --program-transform-nam=* | --program-transform-na=* \
335 | --program-transform-n=* | --program-transform-=* \
336 | --program-transform=* | --program-transfor=* \
337 | --program-transfo=* | --program-transf=* \
338 | --program-trans=* | --program-tran=* \
339 | --progr-tra=* | --program-tr=* | --program-t=*)
340 program_transform_name="$ac_optarg" ;;
341
342 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
343 | -silent | --silent | --silen | --sile | --sil)
344 silent=yes ;;
345
346 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
347 ac_prev=sbindir ;;
348 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
349 | --sbi=* | --sb=*)
350 sbindir="$ac_optarg" ;;
351
352 -sharedstatedir | --sharedstatedir | --sharedstatedi \
353 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
354 | --sharedst | --shareds | --shared | --share | --shar \
355 | --sha | --sh)
356 ac_prev=sharedstatedir ;;
357 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
358 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
359 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
360 | --sha=* | --sh=*)
361 sharedstatedir="$ac_optarg" ;;
362
363 -site | --site | --sit)
364 ac_prev=site ;;
365 -site=* | --site=* | --sit=*)
366 site="$ac_optarg" ;;
367
d836ee13
AC
368 -site-file | --site-file | --site-fil | --site-fi | --site-f)
369 ac_prev=sitefile ;;
370 -site-file=* | --site-file=* | --site-fil=* | --site-fi=* | --site-f=*)
371 sitefile="$ac_optarg" ;;
372
c906108c
SS
373 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
374 ac_prev=srcdir ;;
375 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
376 srcdir="$ac_optarg" ;;
377
378 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
379 | --syscon | --sysco | --sysc | --sys | --sy)
380 ac_prev=sysconfdir ;;
381 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
382 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
383 sysconfdir="$ac_optarg" ;;
384
385 -target | --target | --targe | --targ | --tar | --ta | --t)
386 ac_prev=target ;;
387 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
388 target="$ac_optarg" ;;
389
390 -v | -verbose | --verbose | --verbos | --verbo | --verb)
391 verbose=yes ;;
392
393 -version | --version | --versio | --versi | --vers)
394 echo "configure generated by autoconf version 2.13"
395 exit 0 ;;
396
397 -with-* | --with-*)
398 ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
399 # Reject names that are not valid shell variable names.
400 if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
401 { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
402 fi
403 ac_package=`echo $ac_package| sed 's/-/_/g'`
404 case "$ac_option" in
405 *=*) ;;
406 *) ac_optarg=yes ;;
407 esac
408 eval "with_${ac_package}='$ac_optarg'" ;;
409
410 -without-* | --without-*)
411 ac_package=`echo $ac_option|sed -e 's/-*without-//'`
412 # Reject names that are not valid shell variable names.
413 if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
414 { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
415 fi
416 ac_package=`echo $ac_package| sed 's/-/_/g'`
417 eval "with_${ac_package}=no" ;;
418
419 --x)
420 # Obsolete; use --with-x.
421 with_x=yes ;;
422
423 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
424 | --x-incl | --x-inc | --x-in | --x-i)
425 ac_prev=x_includes ;;
426 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
427 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
428 x_includes="$ac_optarg" ;;
429
430 -x-libraries | --x-libraries | --x-librarie | --x-librari \
431 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
432 ac_prev=x_libraries ;;
433 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
434 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
435 x_libraries="$ac_optarg" ;;
436
437 -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
438 ;;
439
440 *)
441 if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
442 echo "configure: warning: $ac_option: invalid host type" 1>&2
443 fi
444 if test "x$nonopt" != xNONE; then
445 { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
446 fi
447 nonopt="$ac_option"
448 ;;
449
450 esac
451done
452
453if test -n "$ac_prev"; then
454 { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
455fi
456
457trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
458
459# File descriptor usage:
460# 0 standard input
461# 1 file creation
462# 2 errors and warnings
463# 3 some systems may open it to /dev/tty
464# 4 used on the Kubota Titan
465# 6 checking for... messages and results
466# 5 compiler messages saved in config.log
467if test "$silent" = yes; then
468 exec 6>/dev/null
469else
470 exec 6>&1
471fi
472exec 5>./config.log
473
474echo "\
475This file contains any messages produced by compilers while
476running configure, to aid debugging if configure makes a mistake.
477" 1>&5
478
479# Strip out --no-create and --no-recursion so they do not pile up.
480# Also quote any args containing shell metacharacters.
481ac_configure_args=
482for ac_arg
483do
484 case "$ac_arg" in
485 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
486 | --no-cr | --no-c) ;;
487 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
488 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
489 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
490 ac_configure_args="$ac_configure_args '$ac_arg'" ;;
491 *) ac_configure_args="$ac_configure_args $ac_arg" ;;
492 esac
493done
494
495# NLS nuisances.
496# Only set these to C if already set. These must not be set unconditionally
497# because not all systems understand e.g. LANG=C (notably SCO).
498# Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
499# Non-C LC_CTYPE values break the ctype check.
500if test "${LANG+set}" = set; then LANG=C; export LANG; fi
501if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
502if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
503if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi
504
505# confdefs.h avoids OS command line length limits that DEFS can exceed.
506rm -rf conftest* confdefs.h
507# AIX cpp loses on an empty file, so make sure it contains at least a newline.
508echo > confdefs.h
509
510# A filename unique to this package, relative to the directory that
511# configure is in, which we can look for to find out if srcdir is correct.
512ac_unique_file=main.c
513
514# Find the source files, if location was not specified.
515if test -z "$srcdir"; then
516 ac_srcdir_defaulted=yes
517 # Try the directory containing this script, then its parent.
518 ac_prog=$0
519 ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
520 test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
521 srcdir=$ac_confdir
522 if test ! -r $srcdir/$ac_unique_file; then
523 srcdir=..
524 fi
525else
526 ac_srcdir_defaulted=no
527fi
528if test ! -r $srcdir/$ac_unique_file; then
529 if test "$ac_srcdir_defaulted" = yes; then
530 { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
531 else
532 { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
533 fi
534fi
535srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
536
537# Prefer explicitly selected file to automatically selected ones.
d836ee13
AC
538if test -z "$sitefile"; then
539 if test -z "$CONFIG_SITE"; then
540 if test "x$prefix" != xNONE; then
541 CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
542 else
543 CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
544 fi
c906108c 545 fi
d836ee13
AC
546else
547 CONFIG_SITE="$sitefile"
c906108c
SS
548fi
549for ac_site_file in $CONFIG_SITE; do
550 if test -r "$ac_site_file"; then
551 echo "loading site script $ac_site_file"
552 . "$ac_site_file"
553 fi
554done
555
556if test -r "$cache_file"; then
557 echo "loading cache $cache_file"
558 . $cache_file
559else
560 echo "creating cache $cache_file"
561 > $cache_file
562fi
563
564ac_ext=c
565# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
566ac_cpp='$CPP $CPPFLAGS'
567ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
568ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
569cross_compiling=$ac_cv_prog_cc_cross
570
571ac_exeext=
572ac_objext=o
573if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
574 # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
575 if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
576 ac_n= ac_c='
577' ac_t=' '
578 else
579 ac_n=-n ac_c= ac_t=
580 fi
581else
582 ac_n= ac_c='\c' ac_t=
583fi
584
585
586
413ccac7 587echo $ac_n "checking whether to enable maintainer-specific portions of Makefiles""... $ac_c" 1>&6
d836ee13 588echo "configure:589: checking whether to enable maintainer-specific portions of Makefiles" >&5
413ccac7
AC
589 # Check whether --enable-maintainer-mode or --disable-maintainer-mode was given.
590if test "${enable_maintainer_mode+set}" = set; then
591 enableval="$enable_maintainer_mode"
592 USE_MAINTAINER_MODE=$enableval
593else
594 USE_MAINTAINER_MODE=no
595fi
596
597 echo "$ac_t""$USE_MAINTAINER_MODE" 1>&6
598
599
600if test $USE_MAINTAINER_MODE = yes; then
601 MAINTAINER_MODE_TRUE=
602 MAINTAINER_MODE_FALSE='#'
603else
604 MAINTAINER_MODE_TRUE='#'
605 MAINTAINER_MODE_FALSE=
606fi
607 MAINT=$MAINTAINER_MODE_TRUE
608
609
c906108c
SS
610
611# Extract the first word of "gcc", so it can be a program name with args.
612set dummy gcc; ac_word=$2
613echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
d836ee13 614echo "configure:615: checking for $ac_word" >&5
c906108c
SS
615if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
616 echo $ac_n "(cached) $ac_c" 1>&6
617else
618 if test -n "$CC"; then
619 ac_cv_prog_CC="$CC" # Let the user override the test.
620else
621 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
622 ac_dummy="$PATH"
623 for ac_dir in $ac_dummy; do
624 test -z "$ac_dir" && ac_dir=.
625 if test -f $ac_dir/$ac_word; then
626 ac_cv_prog_CC="gcc"
627 break
628 fi
629 done
630 IFS="$ac_save_ifs"
631fi
632fi
633CC="$ac_cv_prog_CC"
634if test -n "$CC"; then
635 echo "$ac_t""$CC" 1>&6
636else
637 echo "$ac_t""no" 1>&6
638fi
639
640if test -z "$CC"; then
641 # Extract the first word of "cc", so it can be a program name with args.
642set dummy cc; ac_word=$2
643echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
d836ee13 644echo "configure:645: checking for $ac_word" >&5
c906108c
SS
645if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
646 echo $ac_n "(cached) $ac_c" 1>&6
647else
648 if test -n "$CC"; then
649 ac_cv_prog_CC="$CC" # Let the user override the test.
650else
651 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
652 ac_prog_rejected=no
653 ac_dummy="$PATH"
654 for ac_dir in $ac_dummy; do
655 test -z "$ac_dir" && ac_dir=.
656 if test -f $ac_dir/$ac_word; then
657 if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
658 ac_prog_rejected=yes
659 continue
660 fi
661 ac_cv_prog_CC="cc"
662 break
663 fi
664 done
665 IFS="$ac_save_ifs"
666if test $ac_prog_rejected = yes; then
667 # We found a bogon in the path, so make sure we never use it.
668 set dummy $ac_cv_prog_CC
669 shift
670 if test $# -gt 0; then
671 # We chose a different compiler from the bogus one.
672 # However, it has the same basename, so the bogon will be chosen
673 # first if we set CC to just the basename; use the full file name.
674 shift
675 set dummy "$ac_dir/$ac_word" "$@"
676 shift
677 ac_cv_prog_CC="$@"
678 fi
679fi
680fi
681fi
682CC="$ac_cv_prog_CC"
683if test -n "$CC"; then
684 echo "$ac_t""$CC" 1>&6
685else
686 echo "$ac_t""no" 1>&6
687fi
688
689 if test -z "$CC"; then
690 case "`uname -s`" in
691 *win32* | *WIN32*)
692 # Extract the first word of "cl", so it can be a program name with args.
693set dummy cl; ac_word=$2
694echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
d836ee13 695echo "configure:696: checking for $ac_word" >&5
c906108c
SS
696if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
697 echo $ac_n "(cached) $ac_c" 1>&6
698else
699 if test -n "$CC"; then
700 ac_cv_prog_CC="$CC" # Let the user override the test.
701else
702 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
703 ac_dummy="$PATH"
704 for ac_dir in $ac_dummy; do
705 test -z "$ac_dir" && ac_dir=.
706 if test -f $ac_dir/$ac_word; then
707 ac_cv_prog_CC="cl"
708 break
709 fi
710 done
711 IFS="$ac_save_ifs"
712fi
713fi
714CC="$ac_cv_prog_CC"
715if test -n "$CC"; then
716 echo "$ac_t""$CC" 1>&6
717else
718 echo "$ac_t""no" 1>&6
719fi
720 ;;
721 esac
722 fi
723 test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
724fi
725
726echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
d836ee13 727echo "configure:728: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
c906108c
SS
728
729ac_ext=c
730# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
731ac_cpp='$CPP $CPPFLAGS'
732ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
733ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
734cross_compiling=$ac_cv_prog_cc_cross
735
736cat > conftest.$ac_ext << EOF
737
d836ee13 738#line 739 "configure"
c906108c
SS
739#include "confdefs.h"
740
741main(){return(0);}
742EOF
d836ee13 743if { (eval echo configure:744: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c
SS
744 ac_cv_prog_cc_works=yes
745 # If we can't run a trivial program, we are probably using a cross compiler.
746 if (./conftest; exit) 2>/dev/null; then
747 ac_cv_prog_cc_cross=no
748 else
749 ac_cv_prog_cc_cross=yes
750 fi
751else
752 echo "configure: failed program was:" >&5
753 cat conftest.$ac_ext >&5
754 ac_cv_prog_cc_works=no
755fi
756rm -fr conftest*
757ac_ext=c
758# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
759ac_cpp='$CPP $CPPFLAGS'
760ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
761ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
762cross_compiling=$ac_cv_prog_cc_cross
763
764echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
765if test $ac_cv_prog_cc_works = no; then
766 { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
767fi
768echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
d836ee13 769echo "configure:770: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
c906108c
SS
770echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
771cross_compiling=$ac_cv_prog_cc_cross
772
773echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
d836ee13 774echo "configure:775: checking whether we are using GNU C" >&5
c906108c
SS
775if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
776 echo $ac_n "(cached) $ac_c" 1>&6
777else
778 cat > conftest.c <<EOF
779#ifdef __GNUC__
780 yes;
781#endif
782EOF
d836ee13 783if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:784: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
c906108c
SS
784 ac_cv_prog_gcc=yes
785else
786 ac_cv_prog_gcc=no
787fi
788fi
789
790echo "$ac_t""$ac_cv_prog_gcc" 1>&6
791
792if test $ac_cv_prog_gcc = yes; then
793 GCC=yes
794else
795 GCC=
796fi
797
798ac_test_CFLAGS="${CFLAGS+set}"
799ac_save_CFLAGS="$CFLAGS"
800CFLAGS=
801echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
d836ee13 802echo "configure:803: checking whether ${CC-cc} accepts -g" >&5
c906108c
SS
803if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
804 echo $ac_n "(cached) $ac_c" 1>&6
805else
806 echo 'void f(){}' > conftest.c
807if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
808 ac_cv_prog_cc_g=yes
809else
810 ac_cv_prog_cc_g=no
811fi
812rm -f conftest*
813
814fi
815
816echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
817if test "$ac_test_CFLAGS" = set; then
818 CFLAGS="$ac_save_CFLAGS"
819elif test $ac_cv_prog_cc_g = yes; then
820 if test "$GCC" = yes; then
821 CFLAGS="-g -O2"
822 else
823 CFLAGS="-g"
824 fi
825else
826 if test "$GCC" = yes; then
827 CFLAGS="-O2"
828 else
829 CFLAGS=
830 fi
831fi
832
14abd0fb
MK
833cat >> confdefs.h <<\EOF
834#define _GNU_SOURCE 1
835EOF
836
837
c906108c 838echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
d836ee13 839echo "configure:840: checking how to run the C preprocessor" >&5
c906108c
SS
840# On Suns, sometimes $CPP names a directory.
841if test -n "$CPP" && test -d "$CPP"; then
842 CPP=
843fi
844if test -z "$CPP"; then
845if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
846 echo $ac_n "(cached) $ac_c" 1>&6
847else
848 # This must be in double quotes, not single quotes, because CPP may get
849 # substituted into the Makefile and "${CC-cc}" will confuse make.
850 CPP="${CC-cc} -E"
851 # On the NeXT, cc -E runs the code through the compiler's parser,
852 # not just through cpp.
853 cat > conftest.$ac_ext <<EOF
d836ee13 854#line 855 "configure"
c906108c
SS
855#include "confdefs.h"
856#include <assert.h>
857Syntax Error
858EOF
859ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
d836ee13 860{ (eval echo configure:861: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
c906108c
SS
861ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
862if test -z "$ac_err"; then
863 :
864else
865 echo "$ac_err" >&5
866 echo "configure: failed program was:" >&5
867 cat conftest.$ac_ext >&5
868 rm -rf conftest*
869 CPP="${CC-cc} -E -traditional-cpp"
870 cat > conftest.$ac_ext <<EOF
d836ee13 871#line 872 "configure"
c906108c
SS
872#include "confdefs.h"
873#include <assert.h>
874Syntax Error
875EOF
876ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
d836ee13 877{ (eval echo configure:878: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
c906108c
SS
878ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
879if test -z "$ac_err"; then
880 :
881else
882 echo "$ac_err" >&5
883 echo "configure: failed program was:" >&5
884 cat conftest.$ac_ext >&5
885 rm -rf conftest*
886 CPP="${CC-cc} -nologo -E"
887 cat > conftest.$ac_ext <<EOF
d836ee13 888#line 889 "configure"
c906108c
SS
889#include "confdefs.h"
890#include <assert.h>
891Syntax Error
892EOF
893ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
d836ee13 894{ (eval echo configure:895: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
c906108c
SS
895ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
896if test -z "$ac_err"; then
897 :
898else
899 echo "$ac_err" >&5
900 echo "configure: failed program was:" >&5
901 cat conftest.$ac_ext >&5
902 rm -rf conftest*
903 CPP=/lib/cpp
904fi
905rm -f conftest*
906fi
907rm -f conftest*
908fi
909rm -f conftest*
910 ac_cv_prog_CPP="$CPP"
911fi
912 CPP="$ac_cv_prog_CPP"
913else
914 ac_cv_prog_CPP="$CPP"
915fi
916echo "$ac_t""$CPP" 1>&6
917
918echo $ac_n "checking for AIX""... $ac_c" 1>&6
d836ee13 919echo "configure:920: checking for AIX" >&5
c906108c 920cat > conftest.$ac_ext <<EOF
d836ee13 921#line 922 "configure"
c906108c
SS
922#include "confdefs.h"
923#ifdef _AIX
924 yes
925#endif
926
927EOF
928if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
929 egrep "yes" >/dev/null 2>&1; then
930 rm -rf conftest*
931 echo "$ac_t""yes" 1>&6; cat >> confdefs.h <<\EOF
932#define _ALL_SOURCE 1
933EOF
934
935else
936 rm -rf conftest*
937 echo "$ac_t""no" 1>&6
938fi
939rm -f conftest*
940
941
56157b4a 942echo $ac_n "checking for POSIXized ISC""... $ac_c" 1>&6
d836ee13 943echo "configure:944: checking for POSIXized ISC" >&5
56157b4a
AC
944if test -d /etc/conf/kconfig.d &&
945 grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1
946then
947 echo "$ac_t""yes" 1>&6
948 ISC=yes # If later tests want to check for ISC.
949 cat >> confdefs.h <<\EOF
950#define _POSIX_SOURCE 1
c906108c
SS
951EOF
952
56157b4a
AC
953 if test "$GCC" = yes; then
954 CC="$CC -posix"
955 else
956 CC="$CC -Xp"
957 fi
c906108c
SS
958else
959 echo "$ac_t""no" 1>&6
56157b4a 960 ISC=
c906108c
SS
961fi
962
963
964
965
966echo $ac_n "checking for ${CC-cc} option to accept ANSI C""... $ac_c" 1>&6
d836ee13 967echo "configure:968: checking for ${CC-cc} option to accept ANSI C" >&5
c906108c
SS
968if eval "test \"`echo '$''{'am_cv_prog_cc_stdc'+set}'`\" = set"; then
969 echo $ac_n "(cached) $ac_c" 1>&6
970else
971 am_cv_prog_cc_stdc=no
972ac_save_CC="$CC"
973# Don't try gcc -ansi; that turns off useful extensions and
974# breaks some systems' header files.
975# AIX -qlanglvl=ansi
976# Ultrix and OSF/1 -std1
56157b4a
AC
977# HP-UX 10.20 and later -Ae
978# HP-UX older versions -Aa -D_HPUX_SOURCE
c906108c 979# SVR4 -Xc -D__EXTENSIONS__
56157b4a 980for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
c906108c
SS
981do
982 CC="$ac_save_CC $ac_arg"
983 cat > conftest.$ac_ext <<EOF
d836ee13 984#line 985 "configure"
c906108c
SS
985#include "confdefs.h"
986#include <stdarg.h>
987#include <stdio.h>
988#include <sys/types.h>
989#include <sys/stat.h>
990/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
991struct buf { int x; };
992FILE * (*rcsopen) (struct buf *, struct stat *, int);
993static char *e (p, i)
994 char **p;
995 int i;
996{
997 return p[i];
998}
999static char *f (char * (*g) (char **, int), char **p, ...)
1000{
1001 char *s;
1002 va_list v;
1003 va_start (v,p);
1004 s = g (p, va_arg (v,int));
1005 va_end (v);
1006 return s;
1007}
1008int test (int i, double x);
1009struct s1 {int (*f) (int a);};
1010struct s2 {int (*f) (double a);};
1011int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
1012int argc;
1013char **argv;
1014
1015int main() {
1016
1017return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
1018
1019; return 0; }
1020EOF
d836ee13 1021if { (eval echo configure:1022: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c
SS
1022 rm -rf conftest*
1023 am_cv_prog_cc_stdc="$ac_arg"; break
1024else
1025 echo "configure: failed program was:" >&5
1026 cat conftest.$ac_ext >&5
1027fi
1028rm -f conftest*
1029done
1030CC="$ac_save_CC"
1031
1032fi
1033
1034if test -z "$am_cv_prog_cc_stdc"; then
1035 echo "$ac_t""none needed" 1>&6
1036else
1037 echo "$ac_t""$am_cv_prog_cc_stdc" 1>&6
1038fi
1039case "x$am_cv_prog_cc_stdc" in
1040 x|xno) ;;
1041 *) CC="$CC $am_cv_prog_cc_stdc" ;;
1042esac
1043
1044
1045ac_aux_dir=
1046for ac_dir in `cd $srcdir;pwd`/.. $srcdir/`cd $srcdir;pwd`/..; do
1047 if test -f $ac_dir/install-sh; then
1048 ac_aux_dir=$ac_dir
1049 ac_install_sh="$ac_aux_dir/install-sh -c"
1050 break
1051 elif test -f $ac_dir/install.sh; then
1052 ac_aux_dir=$ac_dir
1053 ac_install_sh="$ac_aux_dir/install.sh -c"
1054 break
1055 fi
1056done
1057if test -z "$ac_aux_dir"; then
1058 { echo "configure: error: can not find install-sh or install.sh in `cd $srcdir;pwd`/.. $srcdir/`cd $srcdir;pwd`/.." 1>&2; exit 1; }
1059fi
1060ac_config_guess=$ac_aux_dir/config.guess
1061ac_config_sub=$ac_aux_dir/config.sub
1062ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
1063
1064
1065# Do some error checking and defaulting for the host and target type.
1066# The inputs are:
1067# configure --host=HOST --target=TARGET --build=BUILD NONOPT
1068#
1069# The rules are:
1070# 1. You are not allowed to specify --host, --target, and nonopt at the
1071# same time.
1072# 2. Host defaults to nonopt.
1073# 3. If nonopt is not specified, then host defaults to the current host,
1074# as determined by config.guess.
1075# 4. Target and build default to nonopt.
1076# 5. If nonopt is not specified, then target and build default to host.
1077
1078# The aliases save the names the user supplied, while $host etc.
1079# will get canonicalized.
1080case $host---$target---$nonopt in
1081NONE---*---* | *---NONE---* | *---*---NONE) ;;
1082*) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;;
1083esac
1084
1085
1086# Make sure we can run config.sub.
1087if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then :
1088else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
1089fi
1090
1091echo $ac_n "checking host system type""... $ac_c" 1>&6
d836ee13 1092echo "configure:1093: checking host system type" >&5
c906108c
SS
1093
1094host_alias=$host
1095case "$host_alias" in
1096NONE)
1097 case $nonopt in
1098 NONE)
1099 if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then :
1100 else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
1101 fi ;;
1102 *) host_alias=$nonopt ;;
1103 esac ;;
1104esac
1105
1106host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias`
1107host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1108host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1109host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1110echo "$ac_t""$host" 1>&6
1111
1112echo $ac_n "checking target system type""... $ac_c" 1>&6
d836ee13 1113echo "configure:1114: checking target system type" >&5
c906108c
SS
1114
1115target_alias=$target
1116case "$target_alias" in
1117NONE)
1118 case $nonopt in
1119 NONE) target_alias=$host_alias ;;
1120 *) target_alias=$nonopt ;;
1121 esac ;;
1122esac
1123
1124target=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $target_alias`
1125target_cpu=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1126target_vendor=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1127target_os=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1128echo "$ac_t""$target" 1>&6
1129
1130echo $ac_n "checking build system type""... $ac_c" 1>&6
d836ee13 1131echo "configure:1132: checking build system type" >&5
c906108c
SS
1132
1133build_alias=$build
1134case "$build_alias" in
1135NONE)
1136 case $nonopt in
1137 NONE) build_alias=$host_alias ;;
1138 *) build_alias=$nonopt ;;
1139 esac ;;
1140esac
1141
1142build=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $build_alias`
1143build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1144build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1145build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1146echo "$ac_t""$build" 1>&6
1147
1148test "$host_alias" != "$target_alias" &&
1149 test "$program_prefix$program_suffix$program_transform_name" = \
1150 NONENONEs,x,x, &&
1151 program_prefix=${target_alias}-
1152
1153
8bb2c122
MK
1154# FIXME: kettenis/20030102: The AC_PROG_RANLIB from Autoconf 2.13
1155# doesn't support cross-compilation, but the one from Autoconf 2.5x
1156# does. Override RANLIB here (i.e. before running AC_PROG_RANLIB) to
1157# deal with the lossage. Note that CY_GNU_GETTEXT currently calls
f6e85fc8 1158# AC_PROG_RANLIB. This can be removed when we switch to Autoconf
8bb2c122
MK
1159# 2.5x.
1160if test $host != $build; then
1161 ac_tool_prefix=${host_alias}-
1162else
1163 ac_tool_prefix=
1164fi
1165
1166# Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
1167set dummy ${ac_tool_prefix}ranlib; ac_word=$2
1168echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
d836ee13 1169echo "configure:1170: checking for $ac_word" >&5
8bb2c122
MK
1170if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
1171 echo $ac_n "(cached) $ac_c" 1>&6
1172else
1173 if test -n "$RANLIB"; then
1174 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
1175else
1176 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1177 ac_dummy="$PATH"
1178 for ac_dir in $ac_dummy; do
1179 test -z "$ac_dir" && ac_dir=.
1180 if test -f $ac_dir/$ac_word; then
1181 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
1182 break
1183 fi
1184 done
1185 IFS="$ac_save_ifs"
1186fi
1187fi
1188RANLIB="$ac_cv_prog_RANLIB"
1189if test -n "$RANLIB"; then
1190 echo "$ac_t""$RANLIB" 1>&6
1191else
1192 echo "$ac_t""no" 1>&6
1193fi
1194
1195
1196if test -z "$ac_cv_prog_RANLIB"; then
1197if test -n "$ac_tool_prefix"; then
1198 # Extract the first word of "ranlib", so it can be a program name with args.
1199set dummy ranlib; ac_word=$2
1200echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
d836ee13 1201echo "configure:1202: checking for $ac_word" >&5
8bb2c122
MK
1202if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
1203 echo $ac_n "(cached) $ac_c" 1>&6
1204else
1205 if test -n "$RANLIB"; then
1206 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
1207else
1208 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1209 ac_dummy="$PATH"
1210 for ac_dir in $ac_dummy; do
1211 test -z "$ac_dir" && ac_dir=.
1212 if test -f $ac_dir/$ac_word; then
1213 ac_cv_prog_RANLIB="ranlib"
1214 break
1215 fi
1216 done
1217 IFS="$ac_save_ifs"
1218 test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
1219fi
1220fi
1221RANLIB="$ac_cv_prog_RANLIB"
1222if test -n "$RANLIB"; then
1223 echo "$ac_t""$RANLIB" 1>&6
1224else
1225 echo "$ac_t""no" 1>&6
1226fi
1227
1228else
1229 RANLIB=":"
1230fi
1231fi
1232
1233
c906108c
SS
1234ALL_LINGUAS=
1235echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
d836ee13 1236echo "configure:1237: checking whether ${MAKE-make} sets \${MAKE}" >&5
c906108c
SS
1237set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
1238if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
1239 echo $ac_n "(cached) $ac_c" 1>&6
1240else
1241 cat > conftestmake <<\EOF
1242all:
1243 @echo 'ac_maketemp="${MAKE}"'
1244EOF
1245# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
1246eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
1247if test -n "$ac_maketemp"; then
1248 eval ac_cv_prog_make_${ac_make}_set=yes
1249else
1250 eval ac_cv_prog_make_${ac_make}_set=no
1251fi
1252rm -f conftestmake
1253fi
1254if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
1255 echo "$ac_t""yes" 1>&6
1256 SET_MAKE=
1257else
1258 echo "$ac_t""no" 1>&6
1259 SET_MAKE="MAKE=${MAKE-make}"
1260fi
1261
1262# Extract the first word of "ranlib", so it can be a program name with args.
1263set dummy ranlib; ac_word=$2
1264echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
d836ee13 1265echo "configure:1266: checking for $ac_word" >&5
c906108c
SS
1266if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
1267 echo $ac_n "(cached) $ac_c" 1>&6
1268else
1269 if test -n "$RANLIB"; then
1270 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
1271else
1272 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1273 ac_dummy="$PATH"
1274 for ac_dir in $ac_dummy; do
1275 test -z "$ac_dir" && ac_dir=.
1276 if test -f $ac_dir/$ac_word; then
1277 ac_cv_prog_RANLIB="ranlib"
1278 break
1279 fi
1280 done
1281 IFS="$ac_save_ifs"
1282 test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
1283fi
1284fi
1285RANLIB="$ac_cv_prog_RANLIB"
1286if test -n "$RANLIB"; then
1287 echo "$ac_t""$RANLIB" 1>&6
1288else
1289 echo "$ac_t""no" 1>&6
1290fi
1291
1292echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
d836ee13 1293echo "configure:1294: checking for ANSI C header files" >&5
c906108c
SS
1294if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
1295 echo $ac_n "(cached) $ac_c" 1>&6
1296else
1297 cat > conftest.$ac_ext <<EOF
d836ee13 1298#line 1299 "configure"
c906108c
SS
1299#include "confdefs.h"
1300#include <stdlib.h>
1301#include <stdarg.h>
1302#include <string.h>
1303#include <float.h>
1304EOF
1305ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
d836ee13 1306{ (eval echo configure:1307: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
c906108c
SS
1307ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1308if test -z "$ac_err"; then
1309 rm -rf conftest*
1310 ac_cv_header_stdc=yes
1311else
1312 echo "$ac_err" >&5
1313 echo "configure: failed program was:" >&5
1314 cat conftest.$ac_ext >&5
1315 rm -rf conftest*
1316 ac_cv_header_stdc=no
1317fi
1318rm -f conftest*
1319
1320if test $ac_cv_header_stdc = yes; then
1321 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
1322cat > conftest.$ac_ext <<EOF
d836ee13 1323#line 1324 "configure"
c906108c
SS
1324#include "confdefs.h"
1325#include <string.h>
1326EOF
1327if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1328 egrep "memchr" >/dev/null 2>&1; then
1329 :
1330else
1331 rm -rf conftest*
1332 ac_cv_header_stdc=no
1333fi
1334rm -f conftest*
1335
1336fi
1337
1338if test $ac_cv_header_stdc = yes; then
1339 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
1340cat > conftest.$ac_ext <<EOF
d836ee13 1341#line 1342 "configure"
c906108c
SS
1342#include "confdefs.h"
1343#include <stdlib.h>
1344EOF
1345if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1346 egrep "free" >/dev/null 2>&1; then
1347 :
1348else
1349 rm -rf conftest*
1350 ac_cv_header_stdc=no
1351fi
1352rm -f conftest*
1353
1354fi
1355
1356if test $ac_cv_header_stdc = yes; then
1357 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
1358if test "$cross_compiling" = yes; then
1359 :
1360else
1361 cat > conftest.$ac_ext <<EOF
d836ee13 1362#line 1363 "configure"
c906108c
SS
1363#include "confdefs.h"
1364#include <ctype.h>
1365#define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
1366#define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
1367#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
1368int main () { int i; for (i = 0; i < 256; i++)
1369if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
1370exit (0); }
1371
1372EOF
d836ee13 1373if { (eval echo configure:1374: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
c906108c
SS
1374then
1375 :
1376else
1377 echo "configure: failed program was:" >&5
1378 cat conftest.$ac_ext >&5
1379 rm -fr conftest*
1380 ac_cv_header_stdc=no
1381fi
1382rm -fr conftest*
1383fi
1384
1385fi
1386fi
1387
1388echo "$ac_t""$ac_cv_header_stdc" 1>&6
1389if test $ac_cv_header_stdc = yes; then
1390 cat >> confdefs.h <<\EOF
1391#define STDC_HEADERS 1
1392EOF
1393
1394fi
1395
1396echo $ac_n "checking for working const""... $ac_c" 1>&6
d836ee13 1397echo "configure:1398: checking for working const" >&5
c906108c
SS
1398if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
1399 echo $ac_n "(cached) $ac_c" 1>&6
1400else
1401 cat > conftest.$ac_ext <<EOF
d836ee13 1402#line 1403 "configure"
c906108c
SS
1403#include "confdefs.h"
1404
1405int main() {
1406
1407/* Ultrix mips cc rejects this. */
1408typedef int charset[2]; const charset x;
1409/* SunOS 4.1.1 cc rejects this. */
1410char const *const *ccp;
1411char **p;
1412/* NEC SVR4.0.2 mips cc rejects this. */
1413struct point {int x, y;};
1414static struct point const zero = {0,0};
1415/* AIX XL C 1.02.0.0 rejects this.
1416 It does not let you subtract one const X* pointer from another in an arm
1417 of an if-expression whose if-part is not a constant expression */
1418const char *g = "string";
1419ccp = &g + (g ? g-g : 0);
1420/* HPUX 7.0 cc rejects these. */
1421++ccp;
1422p = (char**) ccp;
1423ccp = (char const *const *) p;
1424{ /* SCO 3.2v4 cc rejects this. */
1425 char *t;
1426 char const *s = 0 ? (char *) 0 : (char const *) 0;
1427
1428 *t++ = 0;
1429}
1430{ /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
1431 int x[] = {25, 17};
1432 const int *foo = &x[0];
1433 ++foo;
1434}
1435{ /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
1436 typedef const int *iptr;
1437 iptr p = 0;
1438 ++p;
1439}
1440{ /* AIX XL C 1.02.0.0 rejects this saying
1441 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
1442 struct s { int j; const int *ap[3]; };
1443 struct s *b; b->j = 5;
1444}
1445{ /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
1446 const int foo = 10;
1447}
1448
1449; return 0; }
1450EOF
d836ee13 1451if { (eval echo configure:1452: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c
SS
1452 rm -rf conftest*
1453 ac_cv_c_const=yes
1454else
1455 echo "configure: failed program was:" >&5
1456 cat conftest.$ac_ext >&5
1457 rm -rf conftest*
1458 ac_cv_c_const=no
1459fi
1460rm -f conftest*
1461fi
1462
1463echo "$ac_t""$ac_cv_c_const" 1>&6
1464if test $ac_cv_c_const = no; then
1465 cat >> confdefs.h <<\EOF
1466#define const
1467EOF
1468
1469fi
1470
1471echo $ac_n "checking for inline""... $ac_c" 1>&6
d836ee13 1472echo "configure:1473: checking for inline" >&5
c906108c
SS
1473if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then
1474 echo $ac_n "(cached) $ac_c" 1>&6
1475else
1476 ac_cv_c_inline=no
1477for ac_kw in inline __inline__ __inline; do
1478 cat > conftest.$ac_ext <<EOF
d836ee13 1479#line 1480 "configure"
c906108c
SS
1480#include "confdefs.h"
1481
1482int main() {
1483} $ac_kw foo() {
1484; return 0; }
1485EOF
d836ee13 1486if { (eval echo configure:1487: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c
SS
1487 rm -rf conftest*
1488 ac_cv_c_inline=$ac_kw; break
1489else
1490 echo "configure: failed program was:" >&5
1491 cat conftest.$ac_ext >&5
1492fi
1493rm -f conftest*
1494done
1495
1496fi
1497
1498echo "$ac_t""$ac_cv_c_inline" 1>&6
1499case "$ac_cv_c_inline" in
1500 inline | yes) ;;
1501 no) cat >> confdefs.h <<\EOF
1502#define inline
1503EOF
1504 ;;
1505 *) cat >> confdefs.h <<EOF
1506#define inline $ac_cv_c_inline
1507EOF
1508 ;;
1509esac
1510
1511echo $ac_n "checking for off_t""... $ac_c" 1>&6
d836ee13 1512echo "configure:1513: checking for off_t" >&5
c906108c
SS
1513if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then
1514 echo $ac_n "(cached) $ac_c" 1>&6
1515else
1516 cat > conftest.$ac_ext <<EOF
d836ee13 1517#line 1518 "configure"
c906108c
SS
1518#include "confdefs.h"
1519#include <sys/types.h>
1520#if STDC_HEADERS
1521#include <stdlib.h>
1522#include <stddef.h>
1523#endif
1524EOF
1525if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1526 egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
1527 rm -rf conftest*
1528 ac_cv_type_off_t=yes
1529else
1530 rm -rf conftest*
1531 ac_cv_type_off_t=no
1532fi
1533rm -f conftest*
1534
1535fi
1536echo "$ac_t""$ac_cv_type_off_t" 1>&6
1537if test $ac_cv_type_off_t = no; then
1538 cat >> confdefs.h <<\EOF
1539#define off_t long
1540EOF
1541
1542fi
1543
1544echo $ac_n "checking for size_t""... $ac_c" 1>&6
d836ee13 1545echo "configure:1546: checking for size_t" >&5
c906108c
SS
1546if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
1547 echo $ac_n "(cached) $ac_c" 1>&6
1548else
1549 cat > conftest.$ac_ext <<EOF
d836ee13 1550#line 1551 "configure"
c906108c
SS
1551#include "confdefs.h"
1552#include <sys/types.h>
1553#if STDC_HEADERS
1554#include <stdlib.h>
1555#include <stddef.h>
1556#endif
1557EOF
1558if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1559 egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
1560 rm -rf conftest*
1561 ac_cv_type_size_t=yes
1562else
1563 rm -rf conftest*
1564 ac_cv_type_size_t=no
1565fi
1566rm -f conftest*
1567
1568fi
1569echo "$ac_t""$ac_cv_type_size_t" 1>&6
1570if test $ac_cv_type_size_t = no; then
1571 cat >> confdefs.h <<\EOF
1572#define size_t unsigned
1573EOF
1574
1575fi
1576
1577# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
1578# for constant arguments. Useless!
1579echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6
d836ee13 1580echo "configure:1581: checking for working alloca.h" >&5
c906108c
SS
1581if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then
1582 echo $ac_n "(cached) $ac_c" 1>&6
1583else
1584 cat > conftest.$ac_ext <<EOF
d836ee13 1585#line 1586 "configure"
c906108c
SS
1586#include "confdefs.h"
1587#include <alloca.h>
1588int main() {
1589char *p = alloca(2 * sizeof(int));
1590; return 0; }
1591EOF
d836ee13 1592if { (eval echo configure:1593: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c
SS
1593 rm -rf conftest*
1594 ac_cv_header_alloca_h=yes
1595else
1596 echo "configure: failed program was:" >&5
1597 cat conftest.$ac_ext >&5
1598 rm -rf conftest*
1599 ac_cv_header_alloca_h=no
1600fi
1601rm -f conftest*
1602fi
1603
1604echo "$ac_t""$ac_cv_header_alloca_h" 1>&6
1605if test $ac_cv_header_alloca_h = yes; then
1606 cat >> confdefs.h <<\EOF
1607#define HAVE_ALLOCA_H 1
1608EOF
1609
1610fi
1611
1612echo $ac_n "checking for alloca""... $ac_c" 1>&6
d836ee13 1613echo "configure:1614: checking for alloca" >&5
c906108c
SS
1614if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then
1615 echo $ac_n "(cached) $ac_c" 1>&6
1616else
1617 cat > conftest.$ac_ext <<EOF
d836ee13 1618#line 1619 "configure"
c906108c
SS
1619#include "confdefs.h"
1620
1621#ifdef __GNUC__
1622# define alloca __builtin_alloca
1623#else
1624# ifdef _MSC_VER
1625# include <malloc.h>
1626# define alloca _alloca
1627# else
1628# if HAVE_ALLOCA_H
1629# include <alloca.h>
1630# else
1631# ifdef _AIX
1632 #pragma alloca
1633# else
1634# ifndef alloca /* predefined by HP cc +Olibcalls */
1635char *alloca ();
1636# endif
1637# endif
1638# endif
1639# endif
1640#endif
1641
1642int main() {
1643char *p = (char *) alloca(1);
1644; return 0; }
1645EOF
d836ee13 1646if { (eval echo configure:1647: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c
SS
1647 rm -rf conftest*
1648 ac_cv_func_alloca_works=yes
1649else
1650 echo "configure: failed program was:" >&5
1651 cat conftest.$ac_ext >&5
1652 rm -rf conftest*
1653 ac_cv_func_alloca_works=no
1654fi
1655rm -f conftest*
1656fi
1657
1658echo "$ac_t""$ac_cv_func_alloca_works" 1>&6
1659if test $ac_cv_func_alloca_works = yes; then
1660 cat >> confdefs.h <<\EOF
1661#define HAVE_ALLOCA 1
1662EOF
1663
1664fi
1665
1666if test $ac_cv_func_alloca_works = no; then
1667 # The SVR3 libPW and SVR4 libucb both contain incompatible functions
1668 # that cause trouble. Some versions do not even contain alloca or
1669 # contain a buggy version. If you still want to use their alloca,
1670 # use ar to extract alloca.o from them instead of compiling alloca.c.
1671 ALLOCA=alloca.${ac_objext}
1672 cat >> confdefs.h <<\EOF
1673#define C_ALLOCA 1
1674EOF
1675
1676
1677echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
d836ee13 1678echo "configure:1679: checking whether alloca needs Cray hooks" >&5
c906108c
SS
1679if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then
1680 echo $ac_n "(cached) $ac_c" 1>&6
1681else
1682 cat > conftest.$ac_ext <<EOF
d836ee13 1683#line 1684 "configure"
c906108c
SS
1684#include "confdefs.h"
1685#if defined(CRAY) && ! defined(CRAY2)
1686webecray
1687#else
1688wenotbecray
1689#endif
1690
1691EOF
1692if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1693 egrep "webecray" >/dev/null 2>&1; then
1694 rm -rf conftest*
1695 ac_cv_os_cray=yes
1696else
1697 rm -rf conftest*
1698 ac_cv_os_cray=no
1699fi
1700rm -f conftest*
1701
1702fi
1703
1704echo "$ac_t""$ac_cv_os_cray" 1>&6
1705if test $ac_cv_os_cray = yes; then
1706for ac_func in _getb67 GETB67 getb67; do
1707 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
d836ee13 1708echo "configure:1709: checking for $ac_func" >&5
c906108c
SS
1709if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
1710 echo $ac_n "(cached) $ac_c" 1>&6
1711else
1712 cat > conftest.$ac_ext <<EOF
d836ee13 1713#line 1714 "configure"
c906108c
SS
1714#include "confdefs.h"
1715/* System header to define __stub macros and hopefully few prototypes,
1716 which can conflict with char $ac_func(); below. */
1717#include <assert.h>
1718/* Override any gcc2 internal prototype to avoid an error. */
1719/* We use char because int might match the return type of a gcc2
1720 builtin and then its argument prototype would still apply. */
1721char $ac_func();
1722
1723int main() {
1724
1725/* The GNU C library defines this for functions which it implements
1726 to always fail with ENOSYS. Some functions are actually named
1727 something starting with __ and the normal name is an alias. */
1728#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
1729choke me
1730#else
1731$ac_func();
1732#endif
1733
1734; return 0; }
1735EOF
d836ee13 1736if { (eval echo configure:1737: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c
SS
1737 rm -rf conftest*
1738 eval "ac_cv_func_$ac_func=yes"
1739else
1740 echo "configure: failed program was:" >&5
1741 cat conftest.$ac_ext >&5
1742 rm -rf conftest*
1743 eval "ac_cv_func_$ac_func=no"
1744fi
1745rm -f conftest*
1746fi
1747
1748if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
1749 echo "$ac_t""yes" 1>&6
1750 cat >> confdefs.h <<EOF
1751#define CRAY_STACKSEG_END $ac_func
1752EOF
1753
1754 break
1755else
1756 echo "$ac_t""no" 1>&6
1757fi
1758
1759done
1760fi
1761
1762echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
d836ee13 1763echo "configure:1764: checking stack direction for C alloca" >&5
c906108c
SS
1764if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then
1765 echo $ac_n "(cached) $ac_c" 1>&6
1766else
1767 if test "$cross_compiling" = yes; then
1768 ac_cv_c_stack_direction=0
1769else
1770 cat > conftest.$ac_ext <<EOF
d836ee13 1771#line 1772 "configure"
c906108c
SS
1772#include "confdefs.h"
1773find_stack_direction ()
1774{
1775 static char *addr = 0;
1776 auto char dummy;
1777 if (addr == 0)
1778 {
1779 addr = &dummy;
1780 return find_stack_direction ();
1781 }
1782 else
1783 return (&dummy > addr) ? 1 : -1;
1784}
1785main ()
1786{
1787 exit (find_stack_direction() < 0);
1788}
1789EOF
d836ee13 1790if { (eval echo configure:1791: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
c906108c
SS
1791then
1792 ac_cv_c_stack_direction=1
1793else
1794 echo "configure: failed program was:" >&5
1795 cat conftest.$ac_ext >&5
1796 rm -fr conftest*
1797 ac_cv_c_stack_direction=-1
1798fi
1799rm -fr conftest*
1800fi
1801
1802fi
1803
1804echo "$ac_t""$ac_cv_c_stack_direction" 1>&6
1805cat >> confdefs.h <<EOF
1806#define STACK_DIRECTION $ac_cv_c_stack_direction
1807EOF
1808
1809fi
1810
d836ee13 1811for ac_hdr in unistd.h
c906108c
SS
1812do
1813ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
1814echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
d836ee13 1815echo "configure:1816: checking for $ac_hdr" >&5
c906108c
SS
1816if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1817 echo $ac_n "(cached) $ac_c" 1>&6
1818else
1819 cat > conftest.$ac_ext <<EOF
d836ee13 1820#line 1821 "configure"
c906108c
SS
1821#include "confdefs.h"
1822#include <$ac_hdr>
1823EOF
1824ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
d836ee13 1825{ (eval echo configure:1826: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
c906108c
SS
1826ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1827if test -z "$ac_err"; then
1828 rm -rf conftest*
1829 eval "ac_cv_header_$ac_safe=yes"
1830else
1831 echo "$ac_err" >&5
1832 echo "configure: failed program was:" >&5
1833 cat conftest.$ac_ext >&5
1834 rm -rf conftest*
1835 eval "ac_cv_header_$ac_safe=no"
1836fi
1837rm -f conftest*
1838fi
1839if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1840 echo "$ac_t""yes" 1>&6
1841 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
1842 cat >> confdefs.h <<EOF
1843#define $ac_tr_hdr 1
1844EOF
1845
1846else
1847 echo "$ac_t""no" 1>&6
1848fi
1849done
1850
1851for ac_func in getpagesize
1852do
1853echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
d836ee13 1854echo "configure:1855: checking for $ac_func" >&5
c906108c
SS
1855if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
1856 echo $ac_n "(cached) $ac_c" 1>&6
1857else
1858 cat > conftest.$ac_ext <<EOF
d836ee13 1859#line 1860 "configure"
c906108c
SS
1860#include "confdefs.h"
1861/* System header to define __stub macros and hopefully few prototypes,
1862 which can conflict with char $ac_func(); below. */
1863#include <assert.h>
1864/* Override any gcc2 internal prototype to avoid an error. */
1865/* We use char because int might match the return type of a gcc2
1866 builtin and then its argument prototype would still apply. */
1867char $ac_func();
1868
1869int main() {
1870
1871/* The GNU C library defines this for functions which it implements
1872 to always fail with ENOSYS. Some functions are actually named
1873 something starting with __ and the normal name is an alias. */
1874#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
1875choke me
1876#else
1877$ac_func();
1878#endif
1879
1880; return 0; }
1881EOF
d836ee13 1882if { (eval echo configure:1883: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c
SS
1883 rm -rf conftest*
1884 eval "ac_cv_func_$ac_func=yes"
1885else
1886 echo "configure: failed program was:" >&5
1887 cat conftest.$ac_ext >&5
1888 rm -rf conftest*
1889 eval "ac_cv_func_$ac_func=no"
1890fi
1891rm -f conftest*
1892fi
1893
1894if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
1895 echo "$ac_t""yes" 1>&6
1896 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
1897 cat >> confdefs.h <<EOF
1898#define $ac_tr_func 1
1899EOF
1900
1901else
1902 echo "$ac_t""no" 1>&6
1903fi
1904done
1905
1906echo $ac_n "checking for working mmap""... $ac_c" 1>&6
d836ee13 1907echo "configure:1908: checking for working mmap" >&5
c906108c
SS
1908if eval "test \"`echo '$''{'ac_cv_func_mmap_fixed_mapped'+set}'`\" = set"; then
1909 echo $ac_n "(cached) $ac_c" 1>&6
1910else
1911 if test "$cross_compiling" = yes; then
1912 ac_cv_func_mmap_fixed_mapped=no
1913else
1914 cat > conftest.$ac_ext <<EOF
d836ee13 1915#line 1916 "configure"
c906108c
SS
1916#include "confdefs.h"
1917
1918/* Thanks to Mike Haertel and Jim Avera for this test.
1919 Here is a matrix of mmap possibilities:
1920 mmap private not fixed
1921 mmap private fixed at somewhere currently unmapped
1922 mmap private fixed at somewhere already mapped
1923 mmap shared not fixed
1924 mmap shared fixed at somewhere currently unmapped
1925 mmap shared fixed at somewhere already mapped
1926 For private mappings, we should verify that changes cannot be read()
1927 back from the file, nor mmap's back from the file at a different
1928 address. (There have been systems where private was not correctly
1929 implemented like the infamous i386 svr4.0, and systems where the
1930 VM page cache was not coherent with the filesystem buffer cache
1931 like early versions of FreeBSD and possibly contemporary NetBSD.)
1932 For shared mappings, we should conversely verify that changes get
1933 propogated back to all the places they're supposed to be.
1934
1935 Grep wants private fixed already mapped.
1936 The main things grep needs to know about mmap are:
1937 * does it exist and is it safe to write into the mmap'd area
1938 * how to use it (BSD variants) */
1939#include <sys/types.h>
1940#include <fcntl.h>
1941#include <sys/mman.h>
1942
1943/* This mess was copied from the GNU getpagesize.h. */
1944#ifndef HAVE_GETPAGESIZE
d836ee13
AC
1945# ifdef HAVE_UNISTD_H
1946# include <unistd.h>
1947# endif
c906108c
SS
1948
1949/* Assume that all systems that can run configure have sys/param.h. */
1950# ifndef HAVE_SYS_PARAM_H
1951# define HAVE_SYS_PARAM_H 1
1952# endif
1953
1954# ifdef _SC_PAGESIZE
1955# define getpagesize() sysconf(_SC_PAGESIZE)
1956# else /* no _SC_PAGESIZE */
1957# ifdef HAVE_SYS_PARAM_H
1958# include <sys/param.h>
1959# ifdef EXEC_PAGESIZE
1960# define getpagesize() EXEC_PAGESIZE
1961# else /* no EXEC_PAGESIZE */
1962# ifdef NBPG
1963# define getpagesize() NBPG * CLSIZE
1964# ifndef CLSIZE
1965# define CLSIZE 1
1966# endif /* no CLSIZE */
1967# else /* no NBPG */
1968# ifdef NBPC
1969# define getpagesize() NBPC
1970# else /* no NBPC */
1971# ifdef PAGESIZE
1972# define getpagesize() PAGESIZE
1973# endif /* PAGESIZE */
1974# endif /* no NBPC */
1975# endif /* no NBPG */
1976# endif /* no EXEC_PAGESIZE */
1977# else /* no HAVE_SYS_PARAM_H */
1978# define getpagesize() 8192 /* punt totally */
1979# endif /* no HAVE_SYS_PARAM_H */
1980# endif /* no _SC_PAGESIZE */
1981
1982#endif /* no HAVE_GETPAGESIZE */
1983
1984#ifdef __cplusplus
1985extern "C" { void *malloc(unsigned); }
1986#else
1987char *malloc();
1988#endif
1989
1990int
1991main()
1992{
1993 char *data, *data2, *data3;
1994 int i, pagesize;
1995 int fd;
1996
1997 pagesize = getpagesize();
1998
1999 /*
2000 * First, make a file with some known garbage in it.
2001 */
2002 data = malloc(pagesize);
2003 if (!data)
2004 exit(1);
2005 for (i = 0; i < pagesize; ++i)
2006 *(data + i) = rand();
2007 umask(0);
2008 fd = creat("conftestmmap", 0600);
2009 if (fd < 0)
2010 exit(1);
2011 if (write(fd, data, pagesize) != pagesize)
2012 exit(1);
2013 close(fd);
2014
2015 /*
2016 * Next, try to mmap the file at a fixed address which
2017 * already has something else allocated at it. If we can,
2018 * also make sure that we see the same garbage.
2019 */
2020 fd = open("conftestmmap", O_RDWR);
2021 if (fd < 0)
2022 exit(1);
2023 data2 = malloc(2 * pagesize);
2024 if (!data2)
2025 exit(1);
2026 data2 += (pagesize - ((int) data2 & (pagesize - 1))) & (pagesize - 1);
2027 if (data2 != mmap(data2, pagesize, PROT_READ | PROT_WRITE,
2028 MAP_PRIVATE | MAP_FIXED, fd, 0L))
2029 exit(1);
2030 for (i = 0; i < pagesize; ++i)
2031 if (*(data + i) != *(data2 + i))
2032 exit(1);
2033
2034 /*
2035 * Finally, make sure that changes to the mapped area
2036 * do not percolate back to the file as seen by read().
2037 * (This is a bug on some variants of i386 svr4.0.)
2038 */
2039 for (i = 0; i < pagesize; ++i)
2040 *(data2 + i) = *(data2 + i) + 1;
2041 data3 = malloc(pagesize);
2042 if (!data3)
2043 exit(1);
2044 if (read(fd, data3, pagesize) != pagesize)
2045 exit(1);
2046 for (i = 0; i < pagesize; ++i)
2047 if (*(data + i) != *(data3 + i))
2048 exit(1);
2049 close(fd);
2050 unlink("conftestmmap");
2051 exit(0);
2052}
2053
2054EOF
d836ee13 2055if { (eval echo configure:2056: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
c906108c
SS
2056then
2057 ac_cv_func_mmap_fixed_mapped=yes
2058else
2059 echo "configure: failed program was:" >&5
2060 cat conftest.$ac_ext >&5
2061 rm -fr conftest*
2062 ac_cv_func_mmap_fixed_mapped=no
2063fi
2064rm -fr conftest*
2065fi
2066
2067fi
2068
2069echo "$ac_t""$ac_cv_func_mmap_fixed_mapped" 1>&6
2070if test $ac_cv_func_mmap_fixed_mapped = yes; then
2071 cat >> confdefs.h <<\EOF
2072#define HAVE_MMAP 1
2073EOF
2074
2075fi
2076
2077
2078 for ac_hdr in argz.h limits.h locale.h nl_types.h malloc.h string.h \
2079unistd.h values.h sys/param.h
2080do
2081ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2082echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
d836ee13 2083echo "configure:2084: checking for $ac_hdr" >&5
c906108c
SS
2084if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2085 echo $ac_n "(cached) $ac_c" 1>&6
2086else
2087 cat > conftest.$ac_ext <<EOF
d836ee13 2088#line 2089 "configure"
c906108c
SS
2089#include "confdefs.h"
2090#include <$ac_hdr>
2091EOF
2092ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
d836ee13 2093{ (eval echo configure:2094: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
c906108c
SS
2094ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2095if test -z "$ac_err"; then
2096 rm -rf conftest*
2097 eval "ac_cv_header_$ac_safe=yes"
2098else
2099 echo "$ac_err" >&5
2100 echo "configure: failed program was:" >&5
2101 cat conftest.$ac_ext >&5
2102 rm -rf conftest*
2103 eval "ac_cv_header_$ac_safe=no"
2104fi
2105rm -f conftest*
2106fi
2107if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2108 echo "$ac_t""yes" 1>&6
2109 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2110 cat >> confdefs.h <<EOF
2111#define $ac_tr_hdr 1
2112EOF
2113
2114else
2115 echo "$ac_t""no" 1>&6
2116fi
2117done
2118
2119 for ac_func in getcwd munmap putenv setenv setlocale strchr strcasecmp \
2120__argz_count __argz_stringify __argz_next
2121do
2122echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
d836ee13 2123echo "configure:2124: checking for $ac_func" >&5
c906108c
SS
2124if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2125 echo $ac_n "(cached) $ac_c" 1>&6
2126else
2127 cat > conftest.$ac_ext <<EOF
d836ee13 2128#line 2129 "configure"
c906108c
SS
2129#include "confdefs.h"
2130/* System header to define __stub macros and hopefully few prototypes,
2131 which can conflict with char $ac_func(); below. */
2132#include <assert.h>
2133/* Override any gcc2 internal prototype to avoid an error. */
2134/* We use char because int might match the return type of a gcc2
2135 builtin and then its argument prototype would still apply. */
2136char $ac_func();
2137
2138int main() {
2139
2140/* The GNU C library defines this for functions which it implements
2141 to always fail with ENOSYS. Some functions are actually named
2142 something starting with __ and the normal name is an alias. */
2143#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
2144choke me
2145#else
2146$ac_func();
2147#endif
2148
2149; return 0; }
2150EOF
d836ee13 2151if { (eval echo configure:2152: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c
SS
2152 rm -rf conftest*
2153 eval "ac_cv_func_$ac_func=yes"
2154else
2155 echo "configure: failed program was:" >&5
2156 cat conftest.$ac_ext >&5
2157 rm -rf conftest*
2158 eval "ac_cv_func_$ac_func=no"
2159fi
2160rm -f conftest*
2161fi
2162
2163if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
2164 echo "$ac_t""yes" 1>&6
2165 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2166 cat >> confdefs.h <<EOF
2167#define $ac_tr_func 1
2168EOF
2169
2170else
2171 echo "$ac_t""no" 1>&6
2172fi
2173done
2174
2175
2176 if test "${ac_cv_func_stpcpy+set}" != "set"; then
2177 for ac_func in stpcpy
2178do
2179echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
d836ee13 2180echo "configure:2181: checking for $ac_func" >&5
c906108c
SS
2181if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2182 echo $ac_n "(cached) $ac_c" 1>&6
2183else
2184 cat > conftest.$ac_ext <<EOF
d836ee13 2185#line 2186 "configure"
c906108c
SS
2186#include "confdefs.h"
2187/* System header to define __stub macros and hopefully few prototypes,
2188 which can conflict with char $ac_func(); below. */
2189#include <assert.h>
2190/* Override any gcc2 internal prototype to avoid an error. */
2191/* We use char because int might match the return type of a gcc2
2192 builtin and then its argument prototype would still apply. */
2193char $ac_func();
2194
2195int main() {
2196
2197/* The GNU C library defines this for functions which it implements
2198 to always fail with ENOSYS. Some functions are actually named
2199 something starting with __ and the normal name is an alias. */
2200#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
2201choke me
2202#else
2203$ac_func();
2204#endif
2205
2206; return 0; }
2207EOF
d836ee13 2208if { (eval echo configure:2209: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c
SS
2209 rm -rf conftest*
2210 eval "ac_cv_func_$ac_func=yes"
2211else
2212 echo "configure: failed program was:" >&5
2213 cat conftest.$ac_ext >&5
2214 rm -rf conftest*
2215 eval "ac_cv_func_$ac_func=no"
2216fi
2217rm -f conftest*
2218fi
2219
2220if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
2221 echo "$ac_t""yes" 1>&6
2222 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2223 cat >> confdefs.h <<EOF
2224#define $ac_tr_func 1
2225EOF
2226
2227else
2228 echo "$ac_t""no" 1>&6
2229fi
2230done
2231
2232 fi
2233 if test "${ac_cv_func_stpcpy}" = "yes"; then
2234 cat >> confdefs.h <<\EOF
2235#define HAVE_STPCPY 1
2236EOF
2237
2238 fi
2239
2240 if test $ac_cv_header_locale_h = yes; then
2241 echo $ac_n "checking for LC_MESSAGES""... $ac_c" 1>&6
d836ee13 2242echo "configure:2243: checking for LC_MESSAGES" >&5
c906108c
SS
2243if eval "test \"`echo '$''{'am_cv_val_LC_MESSAGES'+set}'`\" = set"; then
2244 echo $ac_n "(cached) $ac_c" 1>&6
2245else
2246 cat > conftest.$ac_ext <<EOF
d836ee13 2247#line 2248 "configure"
c906108c
SS
2248#include "confdefs.h"
2249#include <locale.h>
2250int main() {
2251return LC_MESSAGES
2252; return 0; }
2253EOF
d836ee13 2254if { (eval echo configure:2255: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c
SS
2255 rm -rf conftest*
2256 am_cv_val_LC_MESSAGES=yes
2257else
2258 echo "configure: failed program was:" >&5
2259 cat conftest.$ac_ext >&5
2260 rm -rf conftest*
2261 am_cv_val_LC_MESSAGES=no
2262fi
2263rm -f conftest*
2264fi
2265
2266echo "$ac_t""$am_cv_val_LC_MESSAGES" 1>&6
2267 if test $am_cv_val_LC_MESSAGES = yes; then
2268 cat >> confdefs.h <<\EOF
2269#define HAVE_LC_MESSAGES 1
2270EOF
2271
2272 fi
2273 fi
2274 echo $ac_n "checking whether NLS is requested""... $ac_c" 1>&6
d836ee13 2275echo "configure:2276: checking whether NLS is requested" >&5
c906108c
SS
2276 # Check whether --enable-nls or --disable-nls was given.
2277if test "${enable_nls+set}" = set; then
2278 enableval="$enable_nls"
2279 USE_NLS=$enableval
2280else
2281 USE_NLS=yes
2282fi
2283
2284 echo "$ac_t""$USE_NLS" 1>&6
2285
2286
2287 USE_INCLUDED_LIBINTL=no
2288
2289 if test "$USE_NLS" = "yes"; then
2290 cat >> confdefs.h <<\EOF
2291#define ENABLE_NLS 1
2292EOF
2293
2294 echo $ac_n "checking whether included gettext is requested""... $ac_c" 1>&6
d836ee13 2295echo "configure:2296: checking whether included gettext is requested" >&5
c906108c
SS
2296 # Check whether --with-included-gettext or --without-included-gettext was given.
2297if test "${with_included_gettext+set}" = set; then
2298 withval="$with_included_gettext"
2299 nls_cv_force_use_gnu_gettext=$withval
2300else
2301 nls_cv_force_use_gnu_gettext=no
2302fi
2303
2304 echo "$ac_t""$nls_cv_force_use_gnu_gettext" 1>&6
2305
2306 nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext"
2307 if test "$nls_cv_force_use_gnu_gettext" != "yes"; then
2308 nls_cv_header_intl=
2309 nls_cv_header_libgt=
2310 CATOBJEXT=NONE
2311
2312 ac_safe=`echo "libintl.h" | sed 'y%./+-%__p_%'`
2313echo $ac_n "checking for libintl.h""... $ac_c" 1>&6
d836ee13 2314echo "configure:2315: checking for libintl.h" >&5
c906108c
SS
2315if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2316 echo $ac_n "(cached) $ac_c" 1>&6
2317else
2318 cat > conftest.$ac_ext <<EOF
d836ee13 2319#line 2320 "configure"
c906108c
SS
2320#include "confdefs.h"
2321#include <libintl.h>
2322EOF
2323ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
d836ee13 2324{ (eval echo configure:2325: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
c906108c
SS
2325ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2326if test -z "$ac_err"; then
2327 rm -rf conftest*
2328 eval "ac_cv_header_$ac_safe=yes"
2329else
2330 echo "$ac_err" >&5
2331 echo "configure: failed program was:" >&5
2332 cat conftest.$ac_ext >&5
2333 rm -rf conftest*
2334 eval "ac_cv_header_$ac_safe=no"
2335fi
2336rm -f conftest*
2337fi
2338if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2339 echo "$ac_t""yes" 1>&6
2340 echo $ac_n "checking for gettext in libc""... $ac_c" 1>&6
d836ee13 2341echo "configure:2342: checking for gettext in libc" >&5
c906108c
SS
2342if eval "test \"`echo '$''{'gt_cv_func_gettext_libc'+set}'`\" = set"; then
2343 echo $ac_n "(cached) $ac_c" 1>&6
2344else
2345 cat > conftest.$ac_ext <<EOF
d836ee13 2346#line 2347 "configure"
c906108c
SS
2347#include "confdefs.h"
2348#include <libintl.h>
2349int main() {
2350return (int) gettext ("")
2351; return 0; }
2352EOF
d836ee13 2353if { (eval echo configure:2354: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c
SS
2354 rm -rf conftest*
2355 gt_cv_func_gettext_libc=yes
2356else
2357 echo "configure: failed program was:" >&5
2358 cat conftest.$ac_ext >&5
2359 rm -rf conftest*
2360 gt_cv_func_gettext_libc=no
2361fi
2362rm -f conftest*
2363fi
2364
2365echo "$ac_t""$gt_cv_func_gettext_libc" 1>&6
2366
2367 if test "$gt_cv_func_gettext_libc" != "yes"; then
2368 echo $ac_n "checking for bindtextdomain in -lintl""... $ac_c" 1>&6
d836ee13 2369echo "configure:2370: checking for bindtextdomain in -lintl" >&5
c906108c
SS
2370ac_lib_var=`echo intl'_'bindtextdomain | sed 'y%./+-%__p_%'`
2371if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2372 echo $ac_n "(cached) $ac_c" 1>&6
2373else
2374 ac_save_LIBS="$LIBS"
2375LIBS="-lintl $LIBS"
2376cat > conftest.$ac_ext <<EOF
d836ee13 2377#line 2378 "configure"
c906108c
SS
2378#include "confdefs.h"
2379/* Override any gcc2 internal prototype to avoid an error. */
2380/* We use char because int might match the return type of a gcc2
2381 builtin and then its argument prototype would still apply. */
2382char bindtextdomain();
2383
2384int main() {
2385bindtextdomain()
2386; return 0; }
2387EOF
d836ee13 2388if { (eval echo configure:2389: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c
SS
2389 rm -rf conftest*
2390 eval "ac_cv_lib_$ac_lib_var=yes"
2391else
2392 echo "configure: failed program was:" >&5
2393 cat conftest.$ac_ext >&5
2394 rm -rf conftest*
2395 eval "ac_cv_lib_$ac_lib_var=no"
2396fi
2397rm -f conftest*
2398LIBS="$ac_save_LIBS"
2399
2400fi
2401if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2402 echo "$ac_t""yes" 1>&6
2403 echo $ac_n "checking for gettext in libintl""... $ac_c" 1>&6
d836ee13 2404echo "configure:2405: checking for gettext in libintl" >&5
c906108c
SS
2405if eval "test \"`echo '$''{'gt_cv_func_gettext_libintl'+set}'`\" = set"; then
2406 echo $ac_n "(cached) $ac_c" 1>&6
2407else
2408 cat > conftest.$ac_ext <<EOF
d836ee13 2409#line 2410 "configure"
c906108c
SS
2410#include "confdefs.h"
2411
2412int main() {
2413return (int) gettext ("")
2414; return 0; }
2415EOF
d836ee13 2416if { (eval echo configure:2417: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c
SS
2417 rm -rf conftest*
2418 gt_cv_func_gettext_libintl=yes
2419else
2420 echo "configure: failed program was:" >&5
2421 cat conftest.$ac_ext >&5
2422 rm -rf conftest*
2423 gt_cv_func_gettext_libintl=no
2424fi
2425rm -f conftest*
2426fi
2427
2428echo "$ac_t""$gt_cv_func_gettext_libintl" 1>&6
2429else
2430 echo "$ac_t""no" 1>&6
2431fi
2432
2433 fi
2434
2435 if test "$gt_cv_func_gettext_libc" = "yes" \
2436 || test "$gt_cv_func_gettext_libintl" = "yes"; then
2437 cat >> confdefs.h <<\EOF
2438#define HAVE_GETTEXT 1
2439EOF
2440
2441 # Extract the first word of "msgfmt", so it can be a program name with args.
2442set dummy msgfmt; ac_word=$2
2443echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
d836ee13 2444echo "configure:2445: checking for $ac_word" >&5
c906108c
SS
2445if eval "test \"`echo '$''{'ac_cv_path_MSGFMT'+set}'`\" = set"; then
2446 echo $ac_n "(cached) $ac_c" 1>&6
2447else
2448 case "$MSGFMT" in
2449 /*)
2450 ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path.
2451 ;;
2452 *)
2453 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
2454 for ac_dir in $PATH; do
2455 test -z "$ac_dir" && ac_dir=.
2456 if test -f $ac_dir/$ac_word; then
2457 if test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"; then
2458 ac_cv_path_MSGFMT="$ac_dir/$ac_word"
2459 break
2460 fi
2461 fi
2462 done
2463 IFS="$ac_save_ifs"
2464 test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT="no"
2465 ;;
2466esac
2467fi
2468MSGFMT="$ac_cv_path_MSGFMT"
2469if test -n "$MSGFMT"; then
2470 echo "$ac_t""$MSGFMT" 1>&6
2471else
2472 echo "$ac_t""no" 1>&6
2473fi
2474 if test "$MSGFMT" != "no"; then
2475 for ac_func in dcgettext
2476do
2477echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
d836ee13 2478echo "configure:2479: checking for $ac_func" >&5
c906108c
SS
2479if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2480 echo $ac_n "(cached) $ac_c" 1>&6
2481else
2482 cat > conftest.$ac_ext <<EOF
d836ee13 2483#line 2484 "configure"
c906108c
SS
2484#include "confdefs.h"
2485/* System header to define __stub macros and hopefully few prototypes,
2486 which can conflict with char $ac_func(); below. */
2487#include <assert.h>
2488/* Override any gcc2 internal prototype to avoid an error. */
2489/* We use char because int might match the return type of a gcc2
2490 builtin and then its argument prototype would still apply. */
2491char $ac_func();
2492
2493int main() {
2494
2495/* The GNU C library defines this for functions which it implements
2496 to always fail with ENOSYS. Some functions are actually named
2497 something starting with __ and the normal name is an alias. */
2498#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
2499choke me
2500#else
2501$ac_func();
2502#endif
2503
2504; return 0; }
2505EOF
d836ee13 2506if { (eval echo configure:2507: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c
SS
2507 rm -rf conftest*
2508 eval "ac_cv_func_$ac_func=yes"
2509else
2510 echo "configure: failed program was:" >&5
2511 cat conftest.$ac_ext >&5
2512 rm -rf conftest*
2513 eval "ac_cv_func_$ac_func=no"
2514fi
2515rm -f conftest*
2516fi
2517
2518if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
2519 echo "$ac_t""yes" 1>&6
2520 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2521 cat >> confdefs.h <<EOF
2522#define $ac_tr_func 1
2523EOF
2524
2525else
2526 echo "$ac_t""no" 1>&6
2527fi
2528done
2529
2530 # Extract the first word of "gmsgfmt", so it can be a program name with args.
2531set dummy gmsgfmt; ac_word=$2
2532echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
d836ee13 2533echo "configure:2534: checking for $ac_word" >&5
c906108c
SS
2534if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then
2535 echo $ac_n "(cached) $ac_c" 1>&6
2536else
2537 case "$GMSGFMT" in
2538 /*)
2539 ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path.
2540 ;;
2541 ?:/*)
2542 ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a dos path.
2543 ;;
2544 *)
2545 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2546 ac_dummy="$PATH"
2547 for ac_dir in $ac_dummy; do
2548 test -z "$ac_dir" && ac_dir=.
2549 if test -f $ac_dir/$ac_word; then
2550 ac_cv_path_GMSGFMT="$ac_dir/$ac_word"
2551 break
2552 fi
2553 done
2554 IFS="$ac_save_ifs"
2555 test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT"
2556 ;;
2557esac
2558fi
2559GMSGFMT="$ac_cv_path_GMSGFMT"
2560if test -n "$GMSGFMT"; then
2561 echo "$ac_t""$GMSGFMT" 1>&6
2562else
2563 echo "$ac_t""no" 1>&6
2564fi
2565
2566 # Extract the first word of "xgettext", so it can be a program name with args.
2567set dummy xgettext; ac_word=$2
2568echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
d836ee13 2569echo "configure:2570: checking for $ac_word" >&5
c906108c
SS
2570if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then
2571 echo $ac_n "(cached) $ac_c" 1>&6
2572else
2573 case "$XGETTEXT" in
2574 /*)
2575 ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path.
2576 ;;
2577 *)
2578 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
2579 for ac_dir in $PATH; do
2580 test -z "$ac_dir" && ac_dir=.
2581 if test -f $ac_dir/$ac_word; then
2582 if test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"; then
2583 ac_cv_path_XGETTEXT="$ac_dir/$ac_word"
2584 break
2585 fi
2586 fi
2587 done
2588 IFS="$ac_save_ifs"
2589 test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":"
2590 ;;
2591esac
2592fi
2593XGETTEXT="$ac_cv_path_XGETTEXT"
2594if test -n "$XGETTEXT"; then
2595 echo "$ac_t""$XGETTEXT" 1>&6
2596else
2597 echo "$ac_t""no" 1>&6
2598fi
2599
2600 cat > conftest.$ac_ext <<EOF
d836ee13 2601#line 2602 "configure"
c906108c
SS
2602#include "confdefs.h"
2603
2604int main() {
2605extern int _nl_msg_cat_cntr;
2606 return _nl_msg_cat_cntr
2607; return 0; }
2608EOF
d836ee13 2609if { (eval echo configure:2610: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c
SS
2610 rm -rf conftest*
2611 CATOBJEXT=.gmo
2612 DATADIRNAME=share
2613else
2614 echo "configure: failed program was:" >&5
2615 cat conftest.$ac_ext >&5
2616 rm -rf conftest*
2617 CATOBJEXT=.mo
2618 DATADIRNAME=lib
2619fi
2620rm -f conftest*
2621 INSTOBJEXT=.mo
2622 fi
2623 fi
2624
2625else
2626 echo "$ac_t""no" 1>&6
2627fi
2628
2629
2630
2631 if test "$CATOBJEXT" = "NONE"; then
2632 nls_cv_use_gnu_gettext=yes
2633 fi
2634 fi
2635
2636 if test "$nls_cv_use_gnu_gettext" = "yes"; then
2637 INTLOBJS="\$(GETTOBJS)"
2638 # Extract the first word of "msgfmt", so it can be a program name with args.
2639set dummy msgfmt; ac_word=$2
2640echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
d836ee13 2641echo "configure:2642: checking for $ac_word" >&5
c906108c
SS
2642if eval "test \"`echo '$''{'ac_cv_path_MSGFMT'+set}'`\" = set"; then
2643 echo $ac_n "(cached) $ac_c" 1>&6
2644else
2645 case "$MSGFMT" in
2646 /*)
2647 ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path.
2648 ;;
2649 *)
2650 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
2651 for ac_dir in $PATH; do
2652 test -z "$ac_dir" && ac_dir=.
2653 if test -f $ac_dir/$ac_word; then
2654 if test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"; then
2655 ac_cv_path_MSGFMT="$ac_dir/$ac_word"
2656 break
2657 fi
2658 fi
2659 done
2660 IFS="$ac_save_ifs"
2661 test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT="msgfmt"
2662 ;;
2663esac
2664fi
2665MSGFMT="$ac_cv_path_MSGFMT"
2666if test -n "$MSGFMT"; then
2667 echo "$ac_t""$MSGFMT" 1>&6
2668else
2669 echo "$ac_t""no" 1>&6
2670fi
2671
2672 # Extract the first word of "gmsgfmt", so it can be a program name with args.
2673set dummy gmsgfmt; ac_word=$2
2674echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
d836ee13 2675echo "configure:2676: checking for $ac_word" >&5
c906108c
SS
2676if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then
2677 echo $ac_n "(cached) $ac_c" 1>&6
2678else
2679 case "$GMSGFMT" in
2680 /*)
2681 ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path.
2682 ;;
2683 ?:/*)
2684 ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a dos path.
2685 ;;
2686 *)
2687 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2688 ac_dummy="$PATH"
2689 for ac_dir in $ac_dummy; do
2690 test -z "$ac_dir" && ac_dir=.
2691 if test -f $ac_dir/$ac_word; then
2692 ac_cv_path_GMSGFMT="$ac_dir/$ac_word"
2693 break
2694 fi
2695 done
2696 IFS="$ac_save_ifs"
2697 test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT"
2698 ;;
2699esac
2700fi
2701GMSGFMT="$ac_cv_path_GMSGFMT"
2702if test -n "$GMSGFMT"; then
2703 echo "$ac_t""$GMSGFMT" 1>&6
2704else
2705 echo "$ac_t""no" 1>&6
2706fi
2707
2708 # Extract the first word of "xgettext", so it can be a program name with args.
2709set dummy xgettext; ac_word=$2
2710echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
d836ee13 2711echo "configure:2712: checking for $ac_word" >&5
c906108c
SS
2712if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then
2713 echo $ac_n "(cached) $ac_c" 1>&6
2714else
2715 case "$XGETTEXT" in
2716 /*)
2717 ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path.
2718 ;;
2719 *)
2720 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
2721 for ac_dir in $PATH; do
2722 test -z "$ac_dir" && ac_dir=.
2723 if test -f $ac_dir/$ac_word; then
2724 if test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"; then
2725 ac_cv_path_XGETTEXT="$ac_dir/$ac_word"
2726 break
2727 fi
2728 fi
2729 done
2730 IFS="$ac_save_ifs"
2731 test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":"
2732 ;;
2733esac
2734fi
2735XGETTEXT="$ac_cv_path_XGETTEXT"
2736if test -n "$XGETTEXT"; then
2737 echo "$ac_t""$XGETTEXT" 1>&6
2738else
2739 echo "$ac_t""no" 1>&6
2740fi
2741
2742
2743 USE_INCLUDED_LIBINTL=yes
2744 CATOBJEXT=.gmo
2745 INSTOBJEXT=.mo
2746 DATADIRNAME=share
2747 INTLDEPS='$(top_builddir)/../intl/libintl.a'
2748 INTLLIBS=$INTLDEPS
2749 LIBS=`echo $LIBS | sed -e 's/-lintl//'`
2750 nls_cv_header_intl=libintl.h
2751 nls_cv_header_libgt=libgettext.h
2752 fi
2753
2754 if test "$XGETTEXT" != ":"; then
2755 if $XGETTEXT --omit-header /dev/null 2> /dev/null; then
2756 : ;
2757 else
2758 echo "$ac_t""found xgettext programs is not GNU xgettext; ignore it" 1>&6
2759 XGETTEXT=":"
2760 fi
2761 fi
2762
2763 # We need to process the po/ directory.
2764 POSUB=po
2765 else
2766 DATADIRNAME=share
2767 nls_cv_header_intl=libintl.h
2768 nls_cv_header_libgt=libgettext.h
2769 fi
2770
2771 # If this is used in GNU gettext we have to set USE_NLS to `yes'
2772 # because some of the sources are only built for this goal.
2773 if test "$PACKAGE" = gettext; then
2774 USE_NLS=yes
2775 USE_INCLUDED_LIBINTL=yes
2776 fi
2777
2778 for lang in $ALL_LINGUAS; do
2779 GMOFILES="$GMOFILES $lang.gmo"
2780 POFILES="$POFILES $lang.po"
2781 done
2782
2783
2784
2785
2786
2787
2788
2789
2790
2791
2792
2793
2794
2795
2796 if test "x$CATOBJEXT" != "x"; then
2797 if test "x$ALL_LINGUAS" = "x"; then
2798 LINGUAS=
2799 else
2800 echo $ac_n "checking for catalogs to be installed""... $ac_c" 1>&6
d836ee13 2801echo "configure:2802: checking for catalogs to be installed" >&5
c906108c
SS
2802 NEW_LINGUAS=
2803 for lang in ${LINGUAS=$ALL_LINGUAS}; do
2804 case "$ALL_LINGUAS" in
2805 *$lang*) NEW_LINGUAS="$NEW_LINGUAS $lang" ;;
2806 esac
2807 done
2808 LINGUAS=$NEW_LINGUAS
2809 echo "$ac_t""$LINGUAS" 1>&6
2810 fi
2811
2812 if test -n "$LINGUAS"; then
2813 for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done
2814 fi
2815 fi
2816
2817 if test $ac_cv_header_locale_h = yes; then
2818 INCLUDE_LOCALE_H="#include <locale.h>"
2819 else
2820 INCLUDE_LOCALE_H="\
2821/* The system does not provide the header <locale.h>. Take care yourself. */"
2822 fi
2823
2824
2825 if test -f $srcdir/po2tbl.sed.in; then
2826 if test "$CATOBJEXT" = ".cat"; then
2827 ac_safe=`echo "linux/version.h" | sed 'y%./+-%__p_%'`
2828echo $ac_n "checking for linux/version.h""... $ac_c" 1>&6
d836ee13 2829echo "configure:2830: checking for linux/version.h" >&5
c906108c
SS
2830if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2831 echo $ac_n "(cached) $ac_c" 1>&6
2832else
2833 cat > conftest.$ac_ext <<EOF
d836ee13 2834#line 2835 "configure"
c906108c
SS
2835#include "confdefs.h"
2836#include <linux/version.h>
2837EOF
2838ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
d836ee13 2839{ (eval echo configure:2840: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
c906108c
SS
2840ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2841if test -z "$ac_err"; then
2842 rm -rf conftest*
2843 eval "ac_cv_header_$ac_safe=yes"
2844else
2845 echo "$ac_err" >&5
2846 echo "configure: failed program was:" >&5
2847 cat conftest.$ac_ext >&5
2848 rm -rf conftest*
2849 eval "ac_cv_header_$ac_safe=no"
2850fi
2851rm -f conftest*
2852fi
2853if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2854 echo "$ac_t""yes" 1>&6
2855 msgformat=linux
2856else
2857 echo "$ac_t""no" 1>&6
2858msgformat=xopen
2859fi
2860
2861
2862 sed -e '/^#/d' $srcdir/$msgformat-msg.sed > po2msg.sed
2863 fi
2864 sed -e '/^#.*[^\\]$/d' -e '/^#$/d' \
2865 $srcdir/po2tbl.sed.in > po2tbl.sed
2866 fi
2867
2868 if test "$PACKAGE" = "gettext"; then
2869 GT_NO="#NO#"
2870 GT_YES=
2871 else
2872 GT_NO=
2873 GT_YES="#YES#"
2874 fi
2875
2876
2877
2878 MKINSTALLDIRS="\$(srcdir)/../../mkinstalldirs"
2879
2880
2881 l=
2882
2883
4536bbc6 2884 if test -f $srcdir/po/POTFILES.in; then
c906108c
SS
2885 test -d po || mkdir po
2886 if test "x$srcdir" != "x."; then
2887 if test "x`echo $srcdir | sed 's@/.*@@'`" = "x"; then
2888 posrcprefix="$srcdir/"
2889 else
2890 posrcprefix="../$srcdir/"
2891 fi
2892 else
2893 posrcprefix="../"
2894 fi
2895 rm -f po/POTFILES
2896 sed -e "/^#/d" -e "/^\$/d" -e "s,.*, $posrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \
2897 < $srcdir/po/POTFILES.in > po/POTFILES
2898 fi
2899
0fbb3da7
TT
2900cat >> confdefs.h <<\EOF
2901#define PACKAGE "gdb"
2902EOF
2903
2904
5b5d99cf
JB
2905debugdir=${libdir}/debug
2906
2907# Check whether --with-separate-debug-dir or --without-separate-debug-dir was given.
2908if test "${with_separate_debug_dir+set}" = set; then
2909 withval="$with_separate_debug_dir"
2910 debugdir="${withval}"
2911fi
2912
2913
2914
2915 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
2916 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
2917 ac_define_dir=`eval echo $debugdir`
2918 ac_define_dir=`eval echo $ac_define_dir`
2919 cat >> confdefs.h <<EOF
2920#define DEBUGDIR "$ac_define_dir"
2921EOF
2922
2923
2924#AC_DEFINE_UNQUOTED(DEBUGDIR, "$debugdir"),
c906108c
SS
2925
2926
2927CONFIG_OBS=
2928CONFIG_DEPS=
2929CONFIG_SRCS=
fb40c209 2930ENABLE_CFLAGS=
b3a90332
AC
2931CONFIG_ALL=
2932CONFIG_CLEAN=
e56ac5c3
AC
2933CONFIG_INSTALL=
2934CONFIG_UNINSTALL=
c906108c 2935
8dcde887 2936subdirs="doc testsuite"
96baa820 2937
8dcde887 2938configdirs=
96baa820 2939
27e9bf90 2940. $srcdir/configure.host
c906108c 2941
27e9bf90 2942. $srcdir/configure.tgt
c906108c 2943
27e9bf90
MK
2944# Fetch the default architecture and default target vector from BFD.
2945targ=$target; . $srcdir/../bfd/config.bfd
c906108c 2946
27e9bf90
MK
2947# We only want the first architecture, so strip off the others if
2948# there is more than one.
2949targ_archs=`echo $targ_archs | sed 's/ .*//'`
1ba607ad 2950
27e9bf90
MK
2951if test "x$targ_archs" != x; then
2952 cat >> confdefs.h <<EOF
2953#define DEFAULT_BFD_ARCH $targ_archs
1ba607ad
AC
2954EOF
2955
2956fi
27e9bf90
MK
2957if test "x$targ_defvec" != x; then
2958 cat >> confdefs.h <<EOF
2959#define DEFAULT_BFD_VEC $targ_defvec
1ba607ad
AC
2960EOF
2961
2962fi
c906108c 2963
8bb2c122
MK
2964if test "$program_transform_name" = s,x,x,; then
2965 program_transform_name=
2966else
2967 # Double any \ or $. echo might interpret backslashes.
2968 cat <<\EOF_SED > conftestsed
2969s,\\,\\\\,g; s,\$,$$,g
2970EOF_SED
2971 program_transform_name="`echo $program_transform_name|sed -f conftestsed`"
2972 rm -f conftestsed
2973fi
2974test "$program_prefix" != NONE &&
2975 program_transform_name="s,^,${program_prefix},; $program_transform_name"
2976# Use a double $ so make ignores it.
2977test "$program_suffix" != NONE &&
2978 program_transform_name="s,\$\$,${program_suffix},; $program_transform_name"
2979
2980# sed with no file args requires a program.
2981test "$program_transform_name" = "" && program_transform_name="s,x,x,"
2982
2983
627af7ea
MK
2984# The CLI cannot be disabled yet, but may be in the future.
2985
2986# Enable CLI.
2987# Check whether --enable-gdbcli or --disable-gdbcli was given.
2988if test "${enable_gdbcli+set}" = set; then
2989 enableval="$enable_gdbcli"
2990 case $enableval in
2991 yes)
2992 ;;
2993 no)
2994 { echo "configure: error: the command-line interface cannot be disabled yet" 1>&2; exit 1; } ;;
2995 *)
2996 { echo "configure: error: bad value $enableval for --enable-gdbcli" 1>&2; exit 1; } ;;
2997 esac
2998else
2999 enable_gdbcli=yes
3000fi
3001
3002if test x"$enable_gdbcli" = xyes; then
3003 if test -d $srcdir/cli; then
3004 CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_CLI_OBS)"
3005 CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_CLI_DEPS)"
3006 CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_CLI_SRCS)"
627af7ea 3007 ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_CLI_CFLAGS)"
627af7ea
MK
3008 fi
3009fi
3010
3011# Enable MI.
3012# Check whether --enable-gdbmi or --disable-gdbmi was given.
3013if test "${enable_gdbmi+set}" = set; then
3014 enableval="$enable_gdbmi"
3015 case $enableval in
3016 yes | no)
3017 ;;
3018 *)
3019 { echo "configure: error: bad value $enableval for --enable-gdbmi" 1>&2; exit 1; } ;;
3020 esac
3021else
3022 enable_gdbmi=yes
3023fi
3024
3025if test x"$enable_gdbmi" = xyes; then
3026 if test -d $srcdir/mi; then
3027 CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_MI_OBS)"
3028 CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_MI_DEPS)"
3029 CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_MI_SRCS)"
627af7ea 3030 ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_MI_CFLAGS)"
627af7ea
MK
3031 fi
3032fi
3033
c324d747
AC
3034# FIXME: kettenis/20030102: We seem to prefer HP curses (Hcurses) over
3035# Xcurses on HP-UX; see the `-D__HP_CURSES' in the relevant host
3036# Makefile fragments. That's why we need to have `Hcurses' before
3037# `curses'. I don't see why we should use HP curses if a more
3038# standard curses is available, except that according to HP's
3039# documentation one needs to compile `-D_XOPEN_SOURCE_EXTENDED' on
3040# HP-UX 10.10 and 10.20.
3041
3042
3043echo $ac_n "checking for library containing initscr""... $ac_c" 1>&6
3044echo "configure:3045: checking for library containing initscr" >&5
3045if eval "test \"`echo '$''{'ac_cv_search_initscr'+set}'`\" = set"; then
3046 echo $ac_n "(cached) $ac_c" 1>&6
3047else
3048 ac_func_search_save_LIBS="$LIBS"
3049ac_cv_search_initscr="no"
3050cat > conftest.$ac_ext <<EOF
3051#line 3052 "configure"
3052#include "confdefs.h"
3053/* Override any gcc2 internal prototype to avoid an error. */
3054/* We use char because int might match the return type of a gcc2
3055 builtin and then its argument prototype would still apply. */
3056char initscr();
3057
3058int main() {
3059initscr()
3060; return 0; }
3061EOF
3062if { (eval echo configure:3063: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3063 rm -rf conftest*
3064 ac_cv_search_initscr="none required"
3065else
3066 echo "configure: failed program was:" >&5
3067 cat conftest.$ac_ext >&5
3068fi
3069rm -f conftest*
3070test "$ac_cv_search_initscr" = "no" && for i in ncurses Hcurses curses pdcurses; do
3071LIBS="-l$i $ac_func_search_save_LIBS"
3072cat > conftest.$ac_ext <<EOF
3073#line 3074 "configure"
3074#include "confdefs.h"
3075/* Override any gcc2 internal prototype to avoid an error. */
3076/* We use char because int might match the return type of a gcc2
3077 builtin and then its argument prototype would still apply. */
3078char initscr();
3079
3080int main() {
3081initscr()
3082; return 0; }
3083EOF
3084if { (eval echo configure:3085: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3085 rm -rf conftest*
3086 ac_cv_search_initscr="-l$i"
3087break
3088else
3089 echo "configure: failed program was:" >&5
3090 cat conftest.$ac_ext >&5
3091fi
3092rm -f conftest*
3093done
3094LIBS="$ac_func_search_save_LIBS"
3095fi
3096
3097echo "$ac_t""$ac_cv_search_initscr" 1>&6
3098if test "$ac_cv_search_initscr" != "no"; then
3099 test "$ac_cv_search_initscr" = "none required" || LIBS="$ac_cv_search_initscr $LIBS"
3100
3101else :
3102 echo "configure: warning: no curses library found" 1>&2
3103fi
3104
06825bd1
MK
3105# Enable TUI.
3106# Check whether --enable-tui or --disable-tui was given.
3107if test "${enable_tui+set}" = set; then
3108 enableval="$enable_tui"
3109 case $enableval in
3110 yes | no)
3111 ;;
3112 *)
3113 { echo "configure: error: bad value $enableval for --enable-tui" 1>&2; exit 1; } ;;
3114 esac
c324d747
AC
3115else
3116 enable_tui=yes
06825bd1
MK
3117fi
3118
3119if test x"$enable_tui" = xyes; then
3120 if test -d $srcdir/tui; then
c324d747
AC
3121 if test "$ac_cv_search_initscr" != no; then
3122 CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_TUI_OBS)"
3123 CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_TUI_DEPS)"
3124 CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_TUI_SRCS)"
3125 CONFIG_INITS="$CONFIG_INITS \$(SUBDIR_TUI_INITS)"
3126 ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_TUI_CFLAGS)"
226361c4
AC
3127 CONFIG_ALL="${CONFIG_ALL} all-tui"
3128 CONFIG_CLEAN="${CONFIG_CLEAN} clean-tui"
3129 CONFIG_INSTALL="${CONFIG_INSTALL} install-tui"
3130 CONFIG_UNINSTALL="${CONFIG_UNINSTALL} uninstall-tui"
c324d747 3131 fi
06825bd1
MK
3132 fi
3133fi
3134
8ee53726
MK
3135# Enable gdbtk.
3136# Check whether --enable-gdbtk or --disable-gdbtk was given.
3137if test "${enable_gdbtk+set}" = set; then
3138 enableval="$enable_gdbtk"
3139 case $enableval in
3140 yes | no)
3141 ;;
3142 *)
3143 { echo "configure: error: bad value $enableval for --enable-gdbtk" 1>&2; exit 1; } ;;
3144 esac
3145else
3146 if test -d $srcdir/gdbtk; then
3147 enable_gdbtk=yes
3148 else
3149 enable_gdbtk=no
3150 fi
3151fi
3152
3153# We unconditionally disable gdbtk tests on selected platforms.
3154case $host_os in
3155 go32* | windows*)
3156 echo "configure: warning: gdbtk isn't supported on $host; disabling" 1>&2
3157 enable_gdbtk=no ;;
3158esac
3159
0e5d83e3
JJ
3160# Libunwind support.
3161# Check whether --with-libunwind or --without-libunwind was given.
3162if test "${with_libunwind+set}" = set; then
3163 withval="$with_libunwind"
3164 case "${withval}" in
3165 yes) enable_libunwind=yes ;;
3166 no) enable_libunwind=no ;;
3167 *) { echo "configure: error: bad value ${withval} for GDB with-libunwind option" 1>&2; exit 1; } ;;
3168esac
3169else
3170
3171 for ac_hdr in libunwind.h
3172do
3173ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
3174echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
226361c4 3175echo "configure:3176: checking for $ac_hdr" >&5
0e5d83e3
JJ
3176if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3177 echo $ac_n "(cached) $ac_c" 1>&6
3178else
3179 cat > conftest.$ac_ext <<EOF
226361c4 3180#line 3181 "configure"
0e5d83e3
JJ
3181#include "confdefs.h"
3182#include <$ac_hdr>
3183EOF
3184ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
226361c4 3185{ (eval echo configure:3186: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
0e5d83e3
JJ
3186ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3187if test -z "$ac_err"; then
3188 rm -rf conftest*
3189 eval "ac_cv_header_$ac_safe=yes"
3190else
3191 echo "$ac_err" >&5
3192 echo "configure: failed program was:" >&5
3193 cat conftest.$ac_ext >&5
3194 rm -rf conftest*
3195 eval "ac_cv_header_$ac_safe=no"
3196fi
3197rm -f conftest*
3198fi
3199if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3200 echo "$ac_t""yes" 1>&6
3201 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
3202 cat >> confdefs.h <<EOF
3203#define $ac_tr_hdr 1
3204EOF
3205
3206else
3207 echo "$ac_t""no" 1>&6
3208fi
3209done
3210
3211 for ac_hdr in libunwind-ia64.h
3212do
3213ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
3214echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
226361c4 3215echo "configure:3216: checking for $ac_hdr" >&5
0e5d83e3
JJ
3216if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3217 echo $ac_n "(cached) $ac_c" 1>&6
3218else
3219 cat > conftest.$ac_ext <<EOF
226361c4 3220#line 3221 "configure"
0e5d83e3
JJ
3221#include "confdefs.h"
3222#include <$ac_hdr>
3223EOF
3224ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
226361c4 3225{ (eval echo configure:3226: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
0e5d83e3
JJ
3226ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3227if test -z "$ac_err"; then
3228 rm -rf conftest*
3229 eval "ac_cv_header_$ac_safe=yes"
3230else
3231 echo "$ac_err" >&5
3232 echo "configure: failed program was:" >&5
3233 cat conftest.$ac_ext >&5
3234 rm -rf conftest*
3235 eval "ac_cv_header_$ac_safe=no"
3236fi
3237rm -f conftest*
3238fi
3239if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3240 echo "$ac_t""yes" 1>&6
3241 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
3242 cat >> confdefs.h <<EOF
3243#define $ac_tr_hdr 1
3244EOF
3245
3246else
3247 echo "$ac_t""no" 1>&6
3248fi
3249done
3250
3251 if test x"$ac_cv_header_libunwind_h" = xyes -a x"$ac_cv_header_libunwind_ia64_h" = xyes; then
3252 enable_libunwind=yes;
3253 fi
3254
3255fi
3256
3257
3258if test x"$enable_libunwind" = xyes; then
3259 for ac_hdr in libunwind.h
3260do
3261ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
3262echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
226361c4 3263echo "configure:3264: checking for $ac_hdr" >&5
0e5d83e3
JJ
3264if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3265 echo $ac_n "(cached) $ac_c" 1>&6
3266else
3267 cat > conftest.$ac_ext <<EOF
226361c4 3268#line 3269 "configure"
0e5d83e3
JJ
3269#include "confdefs.h"
3270#include <$ac_hdr>
3271EOF
3272ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
226361c4 3273{ (eval echo configure:3274: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
0e5d83e3
JJ
3274ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3275if test -z "$ac_err"; then
3276 rm -rf conftest*
3277 eval "ac_cv_header_$ac_safe=yes"
3278else
3279 echo "$ac_err" >&5
3280 echo "configure: failed program was:" >&5
3281 cat conftest.$ac_ext >&5
3282 rm -rf conftest*
3283 eval "ac_cv_header_$ac_safe=no"
3284fi
3285rm -f conftest*
3286fi
3287if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3288 echo "$ac_t""yes" 1>&6
3289 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
3290 cat >> confdefs.h <<EOF
3291#define $ac_tr_hdr 1
3292EOF
3293
3294else
3295 echo "$ac_t""no" 1>&6
3296fi
3297done
3298
3299 for ac_hdr in libunwind-ia64.h
3300do
3301ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
3302echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
226361c4 3303echo "configure:3304: checking for $ac_hdr" >&5
0e5d83e3
JJ
3304if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3305 echo $ac_n "(cached) $ac_c" 1>&6
3306else
3307 cat > conftest.$ac_ext <<EOF
226361c4 3308#line 3309 "configure"
0e5d83e3
JJ
3309#include "confdefs.h"
3310#include <$ac_hdr>
3311EOF
3312ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
226361c4 3313{ (eval echo configure:3314: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
0e5d83e3
JJ
3314ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3315if test -z "$ac_err"; then
3316 rm -rf conftest*
3317 eval "ac_cv_header_$ac_safe=yes"
3318else
3319 echo "$ac_err" >&5
3320 echo "configure: failed program was:" >&5
3321 cat conftest.$ac_ext >&5
3322 rm -rf conftest*
3323 eval "ac_cv_header_$ac_safe=no"
3324fi
3325rm -f conftest*
3326fi
3327if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3328 echo "$ac_t""yes" 1>&6
3329 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
3330 cat >> confdefs.h <<EOF
3331#define $ac_tr_hdr 1
3332EOF
3333
3334else
3335 echo "$ac_t""no" 1>&6
3336fi
3337done
3338
3339 cat >> confdefs.h <<\EOF
3340#define HAVE_LIBUNWIND 1
3341EOF
3342
3343 CONFIG_OBS="$CONFIG_OBS libunwind-frame.o"
3344 CONFIG_DEPS="$CONFIG_DEPS libunwind-frame.o"
3345 CONFIG_SRCS="$CONFIG_SRCS libunwind-frame.c"
3346fi
3347
d28f9cdf
DJ
3348# Profiling support.
3349# Check whether --enable-profiling or --disable-profiling was given.
3350if test "${enable_profiling+set}" = set; then
3351 enableval="$enable_profiling"
3352 case $enableval in
3353 yes | no)
3354 ;;
3355 *)
3356 { echo "configure: error: bad value $enableval for --enable-profile" 1>&2; exit 1; } ;;
3357 esac
3358else
3359 enable_profiling=no
3360fi
3361
3362
d9feb4e7
DJ
3363for ac_func in monstartup _mcleanup
3364do
3365echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
226361c4 3366echo "configure:3367: checking for $ac_func" >&5
d9feb4e7 3367if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
d28f9cdf
DJ
3368 echo $ac_n "(cached) $ac_c" 1>&6
3369else
3370 cat > conftest.$ac_ext <<EOF
226361c4 3371#line 3372 "configure"
d28f9cdf
DJ
3372#include "confdefs.h"
3373/* System header to define __stub macros and hopefully few prototypes,
d9feb4e7 3374 which can conflict with char $ac_func(); below. */
d28f9cdf
DJ
3375#include <assert.h>
3376/* Override any gcc2 internal prototype to avoid an error. */
3377/* We use char because int might match the return type of a gcc2
3378 builtin and then its argument prototype would still apply. */
d9feb4e7 3379char $ac_func();
d28f9cdf
DJ
3380
3381int main() {
3382
3383/* The GNU C library defines this for functions which it implements
3384 to always fail with ENOSYS. Some functions are actually named
3385 something starting with __ and the normal name is an alias. */
d9feb4e7 3386#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
d28f9cdf
DJ
3387choke me
3388#else
d9feb4e7 3389$ac_func();
d28f9cdf
DJ
3390#endif
3391
3392; return 0; }
3393EOF
226361c4 3394if { (eval echo configure:3395: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
d28f9cdf 3395 rm -rf conftest*
d9feb4e7 3396 eval "ac_cv_func_$ac_func=yes"
d28f9cdf
DJ
3397else
3398 echo "configure: failed program was:" >&5
3399 cat conftest.$ac_ext >&5
3400 rm -rf conftest*
d9feb4e7 3401 eval "ac_cv_func_$ac_func=no"
d28f9cdf
DJ
3402fi
3403rm -f conftest*
3404fi
3405
d9feb4e7 3406if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
d28f9cdf 3407 echo "$ac_t""yes" 1>&6
d9feb4e7
DJ
3408 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3409 cat >> confdefs.h <<EOF
3410#define $ac_tr_func 1
3411EOF
3412
d28f9cdf
DJ
3413else
3414 echo "$ac_t""no" 1>&6
d28f9cdf 3415fi
d9feb4e7 3416done
d28f9cdf 3417
b0b1c2c0 3418echo $ac_n "checking for _etext""... $ac_c" 1>&6
226361c4 3419echo "configure:3420: checking for _etext" >&5
b0b1c2c0
MK
3420if eval "test \"`echo '$''{'ac_cv_var__etext'+set}'`\" = set"; then
3421 echo $ac_n "(cached) $ac_c" 1>&6
3422else
3423 cat > conftest.$ac_ext <<EOF
226361c4 3424#line 3425 "configure"
b0b1c2c0
MK
3425#include "confdefs.h"
3426#include <stdlib.h>
3427extern char _etext;
3428
3429int main() {
3430free (&_etext);
3431; return 0; }
3432EOF
226361c4 3433if { (eval echo configure:3434: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
b0b1c2c0
MK
3434 rm -rf conftest*
3435 ac_cv_var__etext=yes
3436else
3437 echo "configure: failed program was:" >&5
3438 cat conftest.$ac_ext >&5
3439 rm -rf conftest*
3440 ac_cv_var__etext=no
3441fi
3442rm -f conftest*
3443fi
3444
3445echo "$ac_t""$ac_cv_var__etext" 1>&6
3446if test $ac_cv_var__etext = yes; then
3447 cat >> confdefs.h <<\EOF
3448#define HAVE__ETEXT 1
3449EOF
3450
3451fi
d9feb4e7
DJ
3452if test "$enable_profiling" = yes ; then
3453 if test $ac_cv_func_monstartup = no || test $ac_cv_func__mcleanup = no; then
3454 { echo "configure: error: --enable-profiling requires monstartup and _mcleanup" 1>&2; exit 1; }
3455 fi
3456 PROFILE_CFLAGS=-pg
3457 OLD_CFLAGS="$CFLAGS"
3458 CFLAGS="$CFLAGS $PROFILE_CFLAGS"
d28f9cdf 3459
d9feb4e7 3460 echo $ac_n "checking whether $CC supports -pg""... $ac_c" 1>&6
226361c4 3461echo "configure:3462: checking whether $CC supports -pg" >&5
d9feb4e7 3462if eval "test \"`echo '$''{'ac_cv_cc_supports_pg'+set}'`\" = set"; then
d28f9cdf
DJ
3463 echo $ac_n "(cached) $ac_c" 1>&6
3464else
3465 cat > conftest.$ac_ext <<EOF
226361c4 3466#line 3467 "configure"
d28f9cdf 3467#include "confdefs.h"
d28f9cdf
DJ
3468
3469int main() {
d9feb4e7 3470int x;
d28f9cdf
DJ
3471; return 0; }
3472EOF
226361c4 3473if { (eval echo configure:3474: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
d28f9cdf 3474 rm -rf conftest*
d9feb4e7 3475 ac_cv_cc_supports_pg=yes
d28f9cdf
DJ
3476else
3477 echo "configure: failed program was:" >&5
3478 cat conftest.$ac_ext >&5
3479 rm -rf conftest*
d9feb4e7 3480 ac_cv_cc_supports_pg=no
d28f9cdf
DJ
3481fi
3482rm -f conftest*
3483fi
3484
d9feb4e7 3485echo "$ac_t""$ac_cv_cc_supports_pg" 1>&6
d28f9cdf 3486
d9feb4e7
DJ
3487 if test $ac_cv_cc_supports_pg = no; then
3488 { echo "configure: error: --enable-profiling requires a compiler which supports -pg" 1>&2; exit 1; }
3489 fi
d28f9cdf
DJ
3490
3491 CFLAGS="$OLD_CFLAGS"
3492fi
3493
8bb2c122
MK
3494# --------------------- #
3495# Checks for programs. #
3496# --------------------- #
3497
d836ee13 3498for ac_prog in mawk gawk nawk awk
7a292a7a
SS
3499do
3500# Extract the first word of "$ac_prog", so it can be a program name with args.
3501set dummy $ac_prog; ac_word=$2
3502echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
226361c4 3503echo "configure:3504: checking for $ac_word" >&5
7a292a7a
SS
3504if eval "test \"`echo '$''{'ac_cv_prog_AWK'+set}'`\" = set"; then
3505 echo $ac_n "(cached) $ac_c" 1>&6
3506else
3507 if test -n "$AWK"; then
3508 ac_cv_prog_AWK="$AWK" # Let the user override the test.
3509else
3510 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
3511 ac_dummy="$PATH"
3512 for ac_dir in $ac_dummy; do
3513 test -z "$ac_dir" && ac_dir=.
3514 if test -f $ac_dir/$ac_word; then
3515 ac_cv_prog_AWK="$ac_prog"
3516 break
3517 fi
3518 done
3519 IFS="$ac_save_ifs"
3520fi
3521fi
3522AWK="$ac_cv_prog_AWK"
3523if test -n "$AWK"; then
3524 echo "$ac_t""$AWK" 1>&6
3525else
3526 echo "$ac_t""no" 1>&6
3527fi
3528
3529test -n "$AWK" && break
3530done
3531
c906108c
SS
3532# Find a good install program. We prefer a C program (faster),
3533# so one script is as good as another. But avoid the broken or
3534# incompatible versions:
3535# SysV /etc/install, /usr/sbin/install
3536# SunOS /usr/etc/install
3537# IRIX /sbin/install
3538# AIX /bin/install
3539# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
3540# AFS /usr/afsws/bin/install, which mishandles nonexistent args
3541# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
3542# ./install, which can be erroneously created by make from ./install.sh.
3543echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
226361c4 3544echo "configure:3545: checking for a BSD compatible install" >&5
c906108c
SS
3545if test -z "$INSTALL"; then
3546if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
3547 echo $ac_n "(cached) $ac_c" 1>&6
3548else
3549 IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS=":"
3550 for ac_dir in $PATH; do
3551 # Account for people who put trailing slashes in PATH elements.
3552 case "$ac_dir/" in
3553 /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
3554 *)
3555 # OSF1 and SCO ODT 3.0 have their own names for install.
3556 # Don't use installbsd from OSF since it installs stuff as root
3557 # by default.
3558 for ac_prog in ginstall scoinst install; do
3559 if test -f $ac_dir/$ac_prog; then
3560 if test $ac_prog = install &&
3561 grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
3562 # AIX install. It has an incompatible calling convention.
3563 :
3564 else
3565 ac_cv_path_install="$ac_dir/$ac_prog -c"
3566 break 2
3567 fi
3568 fi
3569 done
3570 ;;
3571 esac
3572 done
3573 IFS="$ac_save_IFS"
3574
3575fi
3576 if test "${ac_cv_path_install+set}" = set; then
3577 INSTALL="$ac_cv_path_install"
3578 else
3579 # As a last resort, use the slow shell script. We don't cache a
3580 # path for INSTALL within a source directory, because that will
3581 # break other packages using the cache if that directory is
3582 # removed, or if the path is relative.
3583 INSTALL="$ac_install_sh"
3584 fi
3585fi
3586echo "$ac_t""$INSTALL" 1>&6
3587
3588# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
3589# It thinks the first close brace ends the variable substitution.
3590test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
3591
3592test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
3593
3594test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
3595
8bb2c122 3596echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
226361c4 3597echo "configure:3598: checking whether ln -s works" >&5
8bb2c122
MK
3598if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then
3599 echo $ac_n "(cached) $ac_c" 1>&6
c906108c 3600else
8bb2c122
MK
3601 rm -f conftestdata
3602if ln -s X conftestdata 2>/dev/null
3603then
3604 rm -f conftestdata
3605 ac_cv_prog_LN_S="ln -s"
3606else
3607 ac_cv_prog_LN_S=ln
3608fi
3609fi
3610LN_S="$ac_cv_prog_LN_S"
3611if test "$ac_cv_prog_LN_S" = "ln -s"; then
3612 echo "$ac_t""yes" 1>&6
3613else
3614 echo "$ac_t""no" 1>&6
c906108c
SS
3615fi
3616
8bb2c122
MK
3617# Extract the first word of "ranlib", so it can be a program name with args.
3618set dummy ranlib; ac_word=$2
c906108c 3619echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
226361c4 3620echo "configure:3621: checking for $ac_word" >&5
8bb2c122 3621if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
c906108c
SS
3622 echo $ac_n "(cached) $ac_c" 1>&6
3623else
8bb2c122
MK
3624 if test -n "$RANLIB"; then
3625 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
c906108c
SS
3626else
3627 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
3628 ac_dummy="$PATH"
3629 for ac_dir in $ac_dummy; do
3630 test -z "$ac_dir" && ac_dir=.
3631 if test -f $ac_dir/$ac_word; then
8bb2c122 3632 ac_cv_prog_RANLIB="ranlib"
c906108c
SS
3633 break
3634 fi
3635 done
3636 IFS="$ac_save_ifs"
8bb2c122 3637 test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
c906108c
SS
3638fi
3639fi
8bb2c122
MK
3640RANLIB="$ac_cv_prog_RANLIB"
3641if test -n "$RANLIB"; then
3642 echo "$ac_t""$RANLIB" 1>&6
c906108c
SS
3643else
3644 echo "$ac_t""no" 1>&6
3645fi
3646
8bb2c122
MK
3647for ac_prog in 'bison -y' byacc
3648do
3649# Extract the first word of "$ac_prog", so it can be a program name with args.
3650set dummy $ac_prog; ac_word=$2
c906108c 3651echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
226361c4 3652echo "configure:3653: checking for $ac_word" >&5
8bb2c122 3653if eval "test \"`echo '$''{'ac_cv_prog_YACC'+set}'`\" = set"; then
c906108c
SS
3654 echo $ac_n "(cached) $ac_c" 1>&6
3655else
8bb2c122
MK
3656 if test -n "$YACC"; then
3657 ac_cv_prog_YACC="$YACC" # Let the user override the test.
c906108c
SS
3658else
3659 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
3660 ac_dummy="$PATH"
3661 for ac_dir in $ac_dummy; do
3662 test -z "$ac_dir" && ac_dir=.
3663 if test -f $ac_dir/$ac_word; then
8bb2c122 3664 ac_cv_prog_YACC="$ac_prog"
c906108c
SS
3665 break
3666 fi
3667 done
3668 IFS="$ac_save_ifs"
3669fi
3670fi
8bb2c122
MK
3671YACC="$ac_cv_prog_YACC"
3672if test -n "$YACC"; then
3673 echo "$ac_t""$YACC" 1>&6
c906108c
SS
3674else
3675 echo "$ac_t""no" 1>&6
3676fi
3677
8bb2c122
MK
3678test -n "$YACC" && break
3679done
3680test -n "$YACC" || YACC="yacc"
c906108c 3681
8bb2c122
MK
3682
3683# Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
3684set dummy ${ac_tool_prefix}ar; ac_word=$2
c906108c 3685echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
226361c4 3686echo "configure:3687: checking for $ac_word" >&5
8bb2c122 3687if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then
c906108c
SS
3688 echo $ac_n "(cached) $ac_c" 1>&6
3689else
8bb2c122
MK
3690 if test -n "$AR"; then
3691 ac_cv_prog_AR="$AR" # Let the user override the test.
c906108c
SS
3692else
3693 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
3694 ac_dummy="$PATH"
3695 for ac_dir in $ac_dummy; do
3696 test -z "$ac_dir" && ac_dir=.
3697 if test -f $ac_dir/$ac_word; then
8bb2c122 3698 ac_cv_prog_AR="${ac_tool_prefix}ar"
c906108c
SS
3699 break
3700 fi
3701 done
3702 IFS="$ac_save_ifs"
8bb2c122 3703 test -z "$ac_cv_prog_AR" && ac_cv_prog_AR="ar"
c906108c
SS
3704fi
3705fi
8bb2c122
MK
3706AR="$ac_cv_prog_AR"
3707if test -n "$AR"; then
3708 echo "$ac_t""$AR" 1>&6
c906108c
SS
3709else
3710 echo "$ac_t""no" 1>&6
3711fi
3712
8bb2c122 3713
c906108c 3714
95ca63c4
CF
3715# Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
3716set dummy ${ac_tool_prefix}dlltool; ac_word=$2
3717echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
226361c4 3718echo "configure:3719: checking for $ac_word" >&5
95ca63c4
CF
3719if eval "test \"`echo '$''{'ac_cv_prog_DLLTOOL'+set}'`\" = set"; then
3720 echo $ac_n "(cached) $ac_c" 1>&6
3721else
3722 if test -n "$DLLTOOL"; then
3723 ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
3724else
3725 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
3726 ac_dummy="$PATH"
3727 for ac_dir in $ac_dummy; do
3728 test -z "$ac_dir" && ac_dir=.
3729 if test -f $ac_dir/$ac_word; then
3730 ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
3731 break
3732 fi
3733 done
3734 IFS="$ac_save_ifs"
3735 test -z "$ac_cv_prog_DLLTOOL" && ac_cv_prog_DLLTOOL="dlltool"
3736fi
3737fi
3738DLLTOOL="$ac_cv_prog_DLLTOOL"
3739if test -n "$DLLTOOL"; then
3740 echo "$ac_t""$DLLTOOL" 1>&6
3741else
3742 echo "$ac_t""no" 1>&6
3743fi
3744
3745
3746
3747# Extract the first word of "${ac_tool_prefix}windres", so it can be a program name with args.
3748set dummy ${ac_tool_prefix}windres; ac_word=$2
3749echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
226361c4 3750echo "configure:3751: checking for $ac_word" >&5
95ca63c4
CF
3751if eval "test \"`echo '$''{'ac_cv_prog_WINDRES'+set}'`\" = set"; then
3752 echo $ac_n "(cached) $ac_c" 1>&6
3753else
3754 if test -n "$WINDRES"; then
3755 ac_cv_prog_WINDRES="$WINDRES" # Let the user override the test.
3756else
3757 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
3758 ac_dummy="$PATH"
3759 for ac_dir in $ac_dummy; do
3760 test -z "$ac_dir" && ac_dir=.
3761 if test -f $ac_dir/$ac_word; then
3762 ac_cv_prog_WINDRES="${ac_tool_prefix}windres"
3763 break
3764 fi
3765 done
3766 IFS="$ac_save_ifs"
3767 test -z "$ac_cv_prog_WINDRES" && ac_cv_prog_WINDRES="windres"
3768fi
3769fi
3770WINDRES="$ac_cv_prog_WINDRES"
3771if test -n "$WINDRES"; then
3772 echo "$ac_t""$WINDRES" 1>&6
3773else
3774 echo "$ac_t""no" 1>&6
3775fi
3776
3777
3778
c906108c 3779
8bb2c122 3780# Needed for GNU/Hurd.
75c6e08a
MK
3781# Extract the first word of "${ac_tool_prefix}mig", so it can be a program name with args.
3782set dummy ${ac_tool_prefix}mig; ac_word=$2
3783echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
226361c4 3784echo "configure:3785: checking for $ac_word" >&5
75c6e08a
MK
3785if eval "test \"`echo '$''{'ac_cv_prog_MIG'+set}'`\" = set"; then
3786 echo $ac_n "(cached) $ac_c" 1>&6
3787else
3788 if test -n "$MIG"; then
3789 ac_cv_prog_MIG="$MIG" # Let the user override the test.
3790else
3791 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
3792 ac_dummy="$PATH"
3793 for ac_dir in $ac_dummy; do
3794 test -z "$ac_dir" && ac_dir=.
3795 if test -f $ac_dir/$ac_word; then
3796 ac_cv_prog_MIG="${ac_tool_prefix}mig"
3797 break
3798 fi
3799 done
3800 IFS="$ac_save_ifs"
3801 test -z "$ac_cv_prog_MIG" && ac_cv_prog_MIG="mig"
3802fi
3803fi
3804MIG="$ac_cv_prog_MIG"
3805if test -n "$MIG"; then
3806 echo "$ac_t""$MIG" 1>&6
3807else
3808 echo "$ac_t""no" 1>&6
3809fi
3810
3811
3812
3813
9a156167
MK
3814# ---------------------- #
3815# Checks for libraries. #
3816# ---------------------- #
3817
3818# We might need to link with -lm; most simulators need it.
3819echo $ac_n "checking for main in -lm""... $ac_c" 1>&6
226361c4 3820echo "configure:3821: checking for main in -lm" >&5
9a156167
MK
3821ac_lib_var=`echo m'_'main | sed 'y%./+-%__p_%'`
3822if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3823 echo $ac_n "(cached) $ac_c" 1>&6
3824else
3825 ac_save_LIBS="$LIBS"
3826LIBS="-lm $LIBS"
3827cat > conftest.$ac_ext <<EOF
226361c4 3828#line 3829 "configure"
9a156167
MK
3829#include "confdefs.h"
3830
3831int main() {
3832main()
3833; return 0; }
3834EOF
226361c4 3835if { (eval echo configure:3836: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9a156167
MK
3836 rm -rf conftest*
3837 eval "ac_cv_lib_$ac_lib_var=yes"
3838else
3839 echo "configure: failed program was:" >&5
3840 cat conftest.$ac_ext >&5
3841 rm -rf conftest*
3842 eval "ac_cv_lib_$ac_lib_var=no"
3843fi
3844rm -f conftest*
3845LIBS="$ac_save_LIBS"
3846
3847fi
3848if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3849 echo "$ac_t""yes" 1>&6
3850 ac_tr_lib=HAVE_LIB`echo m | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3851 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3852 cat >> confdefs.h <<EOF
3853#define $ac_tr_lib 1
3854EOF
3855
3856 LIBS="-lm $LIBS"
3857
3858else
3859 echo "$ac_t""no" 1>&6
3860fi
3861
3862
3863# We need to link with -lw to get `wctype' on Solaris before Solaris
3864# 2.6. Solaris 2.6 and beyond have this function in libc, and have a
3865# libw that some versions of the GNU linker cannot hanle (GNU ld 2.9.1
3866# is known to have this problem). Therefore we avoid libw if we can.
3867echo $ac_n "checking for wctype""... $ac_c" 1>&6
226361c4 3868echo "configure:3869: checking for wctype" >&5
9a156167
MK
3869if eval "test \"`echo '$''{'ac_cv_func_wctype'+set}'`\" = set"; then
3870 echo $ac_n "(cached) $ac_c" 1>&6
3871else
3872 cat > conftest.$ac_ext <<EOF
226361c4 3873#line 3874 "configure"
9a156167
MK
3874#include "confdefs.h"
3875/* System header to define __stub macros and hopefully few prototypes,
3876 which can conflict with char wctype(); below. */
3877#include <assert.h>
3878/* Override any gcc2 internal prototype to avoid an error. */
3879/* We use char because int might match the return type of a gcc2
3880 builtin and then its argument prototype would still apply. */
3881char wctype();
3882
3883int main() {
3884
3885/* The GNU C library defines this for functions which it implements
3886 to always fail with ENOSYS. Some functions are actually named
3887 something starting with __ and the normal name is an alias. */
3888#if defined (__stub_wctype) || defined (__stub___wctype)
3889choke me
3890#else
3891wctype();
3892#endif
3893
3894; return 0; }
3895EOF
226361c4 3896if { (eval echo configure:3897: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9a156167
MK
3897 rm -rf conftest*
3898 eval "ac_cv_func_wctype=yes"
3899else
3900 echo "configure: failed program was:" >&5
3901 cat conftest.$ac_ext >&5
3902 rm -rf conftest*
3903 eval "ac_cv_func_wctype=no"
3904fi
3905rm -f conftest*
3906fi
3907
3908if eval "test \"`echo '$ac_cv_func_'wctype`\" = yes"; then
3909 echo "$ac_t""yes" 1>&6
3910 :
3911else
3912 echo "$ac_t""no" 1>&6
3913echo $ac_n "checking for wctype in -lw""... $ac_c" 1>&6
226361c4 3914echo "configure:3915: checking for wctype in -lw" >&5
9a156167
MK
3915ac_lib_var=`echo w'_'wctype | sed 'y%./+-%__p_%'`
3916if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3917 echo $ac_n "(cached) $ac_c" 1>&6
3918else
3919 ac_save_LIBS="$LIBS"
3920LIBS="-lw $LIBS"
3921cat > conftest.$ac_ext <<EOF
226361c4 3922#line 3923 "configure"
9a156167
MK
3923#include "confdefs.h"
3924/* Override any gcc2 internal prototype to avoid an error. */
3925/* We use char because int might match the return type of a gcc2
3926 builtin and then its argument prototype would still apply. */
3927char wctype();
3928
3929int main() {
3930wctype()
3931; return 0; }
3932EOF
226361c4 3933if { (eval echo configure:3934: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9a156167
MK
3934 rm -rf conftest*
3935 eval "ac_cv_lib_$ac_lib_var=yes"
3936else
3937 echo "configure: failed program was:" >&5
3938 cat conftest.$ac_ext >&5
3939 rm -rf conftest*
3940 eval "ac_cv_lib_$ac_lib_var=no"
3941fi
3942rm -f conftest*
3943LIBS="$ac_save_LIBS"
3944
3945fi
3946if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3947 echo "$ac_t""yes" 1>&6
3948 ac_tr_lib=HAVE_LIB`echo w | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3949 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3950 cat >> confdefs.h <<EOF
3951#define $ac_tr_lib 1
3952EOF
3953
3954 LIBS="-lw $LIBS"
3955
3956else
3957 echo "$ac_t""no" 1>&6
3958fi
3959
3960fi
3961
3962
c890192f
MK
3963# Some systems (e.g. Solaris) have `gethostbyname' in libnsl.
3964
3965echo $ac_n "checking for library containing gethostbyname""... $ac_c" 1>&6
226361c4 3966echo "configure:3967: checking for library containing gethostbyname" >&5
c890192f
MK
3967if eval "test \"`echo '$''{'ac_cv_search_gethostbyname'+set}'`\" = set"; then
3968 echo $ac_n "(cached) $ac_c" 1>&6
3969else
3970 ac_func_search_save_LIBS="$LIBS"
3971ac_cv_search_gethostbyname="no"
3972cat > conftest.$ac_ext <<EOF
226361c4 3973#line 3974 "configure"
c890192f
MK
3974#include "confdefs.h"
3975/* Override any gcc2 internal prototype to avoid an error. */
3976/* We use char because int might match the return type of a gcc2
3977 builtin and then its argument prototype would still apply. */
3978char gethostbyname();
3979
3980int main() {
3981gethostbyname()
3982; return 0; }
3983EOF
226361c4 3984if { (eval echo configure:3985: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c890192f
MK
3985 rm -rf conftest*
3986 ac_cv_search_gethostbyname="none required"
3987else
3988 echo "configure: failed program was:" >&5
3989 cat conftest.$ac_ext >&5
3990fi
3991rm -f conftest*
3992test "$ac_cv_search_gethostbyname" = "no" && for i in nsl; do
3993LIBS="-l$i $ac_func_search_save_LIBS"
3994cat > conftest.$ac_ext <<EOF
226361c4 3995#line 3996 "configure"
c890192f
MK
3996#include "confdefs.h"
3997/* Override any gcc2 internal prototype to avoid an error. */
3998/* We use char because int might match the return type of a gcc2
3999 builtin and then its argument prototype would still apply. */
4000char gethostbyname();
4001
4002int main() {
4003gethostbyname()
4004; return 0; }
4005EOF
226361c4 4006if { (eval echo configure:4007: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c890192f
MK
4007 rm -rf conftest*
4008 ac_cv_search_gethostbyname="-l$i"
4009break
4010else
4011 echo "configure: failed program was:" >&5
4012 cat conftest.$ac_ext >&5
4013fi
4014rm -f conftest*
4015done
4016LIBS="$ac_func_search_save_LIBS"
4017fi
4018
4019echo "$ac_t""$ac_cv_search_gethostbyname" 1>&6
4020if test "$ac_cv_search_gethostbyname" != "no"; then
4021 test "$ac_cv_search_gethostbyname" = "none required" || LIBS="$ac_cv_search_gethostbyname $LIBS"
4022
4023else :
4024
4025fi
4026
9a156167
MK
4027# Some systems (e.g. Solaris) have `socketpair' in libsocket.
4028
4029echo $ac_n "checking for library containing socketpair""... $ac_c" 1>&6
226361c4 4030echo "configure:4031: checking for library containing socketpair" >&5
9a156167
MK
4031if eval "test \"`echo '$''{'ac_cv_search_socketpair'+set}'`\" = set"; then
4032 echo $ac_n "(cached) $ac_c" 1>&6
4033else
4034 ac_func_search_save_LIBS="$LIBS"
4035ac_cv_search_socketpair="no"
4036cat > conftest.$ac_ext <<EOF
226361c4 4037#line 4038 "configure"
9a156167
MK
4038#include "confdefs.h"
4039/* Override any gcc2 internal prototype to avoid an error. */
4040/* We use char because int might match the return type of a gcc2
4041 builtin and then its argument prototype would still apply. */
4042char socketpair();
4043
4044int main() {
4045socketpair()
4046; return 0; }
4047EOF
226361c4 4048if { (eval echo configure:4049: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9a156167
MK
4049 rm -rf conftest*
4050 ac_cv_search_socketpair="none required"
4051else
4052 echo "configure: failed program was:" >&5
4053 cat conftest.$ac_ext >&5
4054fi
4055rm -f conftest*
4056test "$ac_cv_search_socketpair" = "no" && for i in socket; do
4057LIBS="-l$i $ac_func_search_save_LIBS"
4058cat > conftest.$ac_ext <<EOF
226361c4 4059#line 4060 "configure"
9a156167
MK
4060#include "confdefs.h"
4061/* Override any gcc2 internal prototype to avoid an error. */
4062/* We use char because int might match the return type of a gcc2
4063 builtin and then its argument prototype would still apply. */
4064char socketpair();
4065
4066int main() {
4067socketpair()
4068; return 0; }
4069EOF
226361c4 4070if { (eval echo configure:4071: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9a156167
MK
4071 rm -rf conftest*
4072 ac_cv_search_socketpair="-l$i"
4073break
4074else
4075 echo "configure: failed program was:" >&5
4076 cat conftest.$ac_ext >&5
4077fi
4078rm -f conftest*
4079done
4080LIBS="$ac_func_search_save_LIBS"
4081fi
4082
4083echo "$ac_t""$ac_cv_search_socketpair" 1>&6
4084if test "$ac_cv_search_socketpair" != "no"; then
4085 test "$ac_cv_search_socketpair" = "none required" || LIBS="$ac_cv_search_socketpair $LIBS"
4086
4087else :
4088
4089fi
4090
06825bd1
MK
4091# Since GDB uses Readline, we need termcap functionality, so we need
4092# to find a library that provides that. When GDB is configured with
c324d747 4093# the TUI, we need full curses functionality.
06825bd1
MK
4094
4095case $host_os in
4096 cygwin*)
4097 if test -d $srcdir/libtermcap; then
4098 LIBS="../libtermcap/libtermcap.a $LIBS"
4099 ac_cv_search_tgetent="../libtermcap/libtermcap.a"
4100 fi ;;
40a7debc 4101 go32* | *djgpp*)
06825bd1
MK
4102 ac_cv_search_tgetent="none required"
4103 ;;
4104 aix*)
4105 # Readline prefers curses over termcap on AIX.
4106 # ??? Why?
4107
4108echo $ac_n "checking for library containing tgetent""... $ac_c" 1>&6
226361c4 4109echo "configure:4110: checking for library containing tgetent" >&5
06825bd1
MK
4110if eval "test \"`echo '$''{'ac_cv_search_tgetent'+set}'`\" = set"; then
4111 echo $ac_n "(cached) $ac_c" 1>&6
4112else
4113 ac_func_search_save_LIBS="$LIBS"
4114ac_cv_search_tgetent="no"
4115cat > conftest.$ac_ext <<EOF
226361c4 4116#line 4117 "configure"
06825bd1
MK
4117#include "confdefs.h"
4118/* Override any gcc2 internal prototype to avoid an error. */
4119/* We use char because int might match the return type of a gcc2
4120 builtin and then its argument prototype would still apply. */
4121char tgetent();
4122
4123int main() {
4124tgetent()
4125; return 0; }
4126EOF
226361c4 4127if { (eval echo configure:4128: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
06825bd1
MK
4128 rm -rf conftest*
4129 ac_cv_search_tgetent="none required"
4130else
4131 echo "configure: failed program was:" >&5
4132 cat conftest.$ac_ext >&5
4133fi
4134rm -f conftest*
4135test "$ac_cv_search_tgetent" = "no" && for i in tinfo ncurses curses termcap; do
4136LIBS="-l$i $ac_func_search_save_LIBS"
4137cat > conftest.$ac_ext <<EOF
226361c4 4138#line 4139 "configure"
06825bd1
MK
4139#include "confdefs.h"
4140/* Override any gcc2 internal prototype to avoid an error. */
4141/* We use char because int might match the return type of a gcc2
4142 builtin and then its argument prototype would still apply. */
4143char tgetent();
4144
4145int main() {
4146tgetent()
4147; return 0; }
4148EOF
226361c4 4149if { (eval echo configure:4150: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
06825bd1
MK
4150 rm -rf conftest*
4151 ac_cv_search_tgetent="-l$i"
4152break
4153else
4154 echo "configure: failed program was:" >&5
4155 cat conftest.$ac_ext >&5
4156fi
4157rm -f conftest*
4158done
4159LIBS="$ac_func_search_save_LIBS"
4160fi
4161
4162echo "$ac_t""$ac_cv_search_tgetent" 1>&6
4163if test "$ac_cv_search_tgetent" != "no"; then
4164 test "$ac_cv_search_tgetent" = "none required" || LIBS="$ac_cv_search_tgetent $LIBS"
4165
4166else :
4167
4168fi
4169 ;;
4170esac
4171
4172# Note: We used to check for libtermlib and libterminfo too, but
4173# Readline doesn't, so I think we're safe with leaving them out.
4174
4175echo $ac_n "checking for library containing tgetent""... $ac_c" 1>&6
226361c4 4176echo "configure:4177: checking for library containing tgetent" >&5
06825bd1
MK
4177if eval "test \"`echo '$''{'ac_cv_search_tgetent'+set}'`\" = set"; then
4178 echo $ac_n "(cached) $ac_c" 1>&6
4179else
4180 ac_func_search_save_LIBS="$LIBS"
4181ac_cv_search_tgetent="no"
4182cat > conftest.$ac_ext <<EOF
226361c4 4183#line 4184 "configure"
06825bd1
MK
4184#include "confdefs.h"
4185/* Override any gcc2 internal prototype to avoid an error. */
4186/* We use char because int might match the return type of a gcc2
4187 builtin and then its argument prototype would still apply. */
4188char tgetent();
4189
4190int main() {
4191tgetent()
4192; return 0; }
4193EOF
226361c4 4194if { (eval echo configure:4195: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
06825bd1
MK
4195 rm -rf conftest*
4196 ac_cv_search_tgetent="none required"
4197else
4198 echo "configure: failed program was:" >&5
4199 cat conftest.$ac_ext >&5
4200fi
4201rm -f conftest*
4202test "$ac_cv_search_tgetent" = "no" && for i in termcap tinfo ncurses Hcurses curses; do
4203LIBS="-l$i $ac_func_search_save_LIBS"
4204cat > conftest.$ac_ext <<EOF
226361c4 4205#line 4206 "configure"
06825bd1
MK
4206#include "confdefs.h"
4207/* Override any gcc2 internal prototype to avoid an error. */
4208/* We use char because int might match the return type of a gcc2
4209 builtin and then its argument prototype would still apply. */
4210char tgetent();
4211
4212int main() {
4213tgetent()
4214; return 0; }
4215EOF
226361c4 4216if { (eval echo configure:4217: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
06825bd1
MK
4217 rm -rf conftest*
4218 ac_cv_search_tgetent="-l$i"
4219break
4220else
4221 echo "configure: failed program was:" >&5
4222 cat conftest.$ac_ext >&5
4223fi
4224rm -f conftest*
4225done
4226LIBS="$ac_func_search_save_LIBS"
4227fi
4228
4229echo "$ac_t""$ac_cv_search_tgetent" 1>&6
4230if test "$ac_cv_search_tgetent" != "no"; then
4231 test "$ac_cv_search_tgetent" = "none required" || LIBS="$ac_cv_search_tgetent $LIBS"
4232
4233else :
4234
4235fi
4236
4237if test "$ac_cv_search_tgetent" = no; then
4238 { echo "configure: error: no termcap library found" 1>&2; exit 1; }
4239fi
4240
5ee754fc
MK
4241# ------------------------- #
4242# Checks for header files. #
4243# ------------------------- #
4244
4245ac_header_dirent=no
4246for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
4247do
4248ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4249echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
226361c4 4250echo "configure:4251: checking for $ac_hdr that defines DIR" >&5
5ee754fc 4251if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then
c906108c
SS
4252 echo $ac_n "(cached) $ac_c" 1>&6
4253else
4254 cat > conftest.$ac_ext <<EOF
226361c4 4255#line 4256 "configure"
c906108c
SS
4256#include "confdefs.h"
4257#include <sys/types.h>
5ee754fc
MK
4258#include <$ac_hdr>
4259int main() {
4260DIR *dirp = 0;
4261; return 0; }
4262EOF
226361c4 4263if { (eval echo configure:4264: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5ee754fc
MK
4264 rm -rf conftest*
4265 eval "ac_cv_header_dirent_$ac_safe=yes"
4266else
4267 echo "configure: failed program was:" >&5
4268 cat conftest.$ac_ext >&5
4269 rm -rf conftest*
4270 eval "ac_cv_header_dirent_$ac_safe=no"
4271fi
4272rm -f conftest*
4273fi
4274if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then
4275 echo "$ac_t""yes" 1>&6
4276 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4277 cat >> confdefs.h <<EOF
4278#define $ac_tr_hdr 1
4279EOF
4280 ac_header_dirent=$ac_hdr; break
4281else
4282 echo "$ac_t""no" 1>&6
4283fi
4284done
4285# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
4286if test $ac_header_dirent = dirent.h; then
4287echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
226361c4 4288echo "configure:4289: checking for opendir in -ldir" >&5
5ee754fc
MK
4289ac_lib_var=`echo dir'_'opendir | sed 'y%./+-%__p_%'`
4290if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4291 echo $ac_n "(cached) $ac_c" 1>&6
4292else
4293 ac_save_LIBS="$LIBS"
4294LIBS="-ldir $LIBS"
4295cat > conftest.$ac_ext <<EOF
226361c4 4296#line 4297 "configure"
5ee754fc
MK
4297#include "confdefs.h"
4298/* Override any gcc2 internal prototype to avoid an error. */
4299/* We use char because int might match the return type of a gcc2
4300 builtin and then its argument prototype would still apply. */
4301char opendir();
c906108c
SS
4302
4303int main() {
5ee754fc 4304opendir()
c906108c
SS
4305; return 0; }
4306EOF
226361c4 4307if { (eval echo configure:4308: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c 4308 rm -rf conftest*
5ee754fc 4309 eval "ac_cv_lib_$ac_lib_var=yes"
c906108c
SS
4310else
4311 echo "configure: failed program was:" >&5
4312 cat conftest.$ac_ext >&5
4313 rm -rf conftest*
5ee754fc 4314 eval "ac_cv_lib_$ac_lib_var=no"
c906108c
SS
4315fi
4316rm -f conftest*
5ee754fc
MK
4317LIBS="$ac_save_LIBS"
4318
4319fi
4320if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4321 echo "$ac_t""yes" 1>&6
4322 LIBS="$LIBS -ldir"
4323else
4324 echo "$ac_t""no" 1>&6
c906108c
SS
4325fi
4326
5ee754fc
MK
4327else
4328echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
226361c4 4329echo "configure:4330: checking for opendir in -lx" >&5
5ee754fc
MK
4330ac_lib_var=`echo x'_'opendir | sed 'y%./+-%__p_%'`
4331if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4332 echo $ac_n "(cached) $ac_c" 1>&6
4333else
4334 ac_save_LIBS="$LIBS"
4335LIBS="-lx $LIBS"
4336cat > conftest.$ac_ext <<EOF
226361c4 4337#line 4338 "configure"
5ee754fc
MK
4338#include "confdefs.h"
4339/* Override any gcc2 internal prototype to avoid an error. */
4340/* We use char because int might match the return type of a gcc2
4341 builtin and then its argument prototype would still apply. */
4342char opendir();
4343
4344int main() {
4345opendir()
4346; return 0; }
c906108c 4347EOF
226361c4 4348if { (eval echo configure:4349: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5ee754fc
MK
4349 rm -rf conftest*
4350 eval "ac_cv_lib_$ac_lib_var=yes"
4351else
4352 echo "configure: failed program was:" >&5
4353 cat conftest.$ac_ext >&5
4354 rm -rf conftest*
4355 eval "ac_cv_lib_$ac_lib_var=no"
4356fi
4357rm -f conftest*
4358LIBS="$ac_save_LIBS"
c906108c 4359
5ee754fc
MK
4360fi
4361if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4362 echo "$ac_t""yes" 1>&6
4363 LIBS="$LIBS -lx"
4364else
4365 echo "$ac_t""no" 1>&6
4366fi
c906108c 4367
5ee754fc 4368fi
c906108c 4369
5ee754fc 4370echo $ac_n "checking whether stat file-mode macros are broken""... $ac_c" 1>&6
226361c4 4371echo "configure:4372: checking whether stat file-mode macros are broken" >&5
5ee754fc 4372if eval "test \"`echo '$''{'ac_cv_header_stat_broken'+set}'`\" = set"; then
9608ab8b
MK
4373 echo $ac_n "(cached) $ac_c" 1>&6
4374else
4375 cat > conftest.$ac_ext <<EOF
226361c4 4376#line 4377 "configure"
9608ab8b
MK
4377#include "confdefs.h"
4378#include <sys/types.h>
5ee754fc
MK
4379#include <sys/stat.h>
4380
4381#if defined(S_ISBLK) && defined(S_IFDIR)
4382# if S_ISBLK (S_IFDIR)
4383You lose.
4384# endif
4385#endif
4386
4387#if defined(S_ISBLK) && defined(S_IFCHR)
4388# if S_ISBLK (S_IFCHR)
4389You lose.
4390# endif
4391#endif
4392
4393#if defined(S_ISLNK) && defined(S_IFREG)
4394# if S_ISLNK (S_IFREG)
4395You lose.
4396# endif
4397#endif
4398
4399#if defined(S_ISSOCK) && defined(S_IFREG)
4400# if S_ISSOCK (S_IFREG)
4401You lose.
4402# endif
4403#endif
4404
9608ab8b 4405EOF
5ee754fc
MK
4406if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4407 egrep "You lose" >/dev/null 2>&1; then
9608ab8b 4408 rm -rf conftest*
5ee754fc
MK
4409 ac_cv_header_stat_broken=yes
4410else
4411 rm -rf conftest*
4412 ac_cv_header_stat_broken=no
4413fi
4414rm -f conftest*
4415
4416fi
4417
4418echo "$ac_t""$ac_cv_header_stat_broken" 1>&6
4419if test $ac_cv_header_stat_broken = yes; then
4420 cat >> confdefs.h <<\EOF
4421#define STAT_MACROS_BROKEN 1
4422EOF
4423
4424fi
4425
4426echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
226361c4 4427echo "configure:4428: checking for ANSI C header files" >&5
5ee754fc
MK
4428if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
4429 echo $ac_n "(cached) $ac_c" 1>&6
4430else
4431 cat > conftest.$ac_ext <<EOF
226361c4 4432#line 4433 "configure"
5ee754fc
MK
4433#include "confdefs.h"
4434#include <stdlib.h>
4435#include <stdarg.h>
4436#include <string.h>
4437#include <float.h>
4438EOF
4439ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
226361c4 4440{ (eval echo configure:4441: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
4441ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4442if test -z "$ac_err"; then
4443 rm -rf conftest*
4444 ac_cv_header_stdc=yes
4445else
4446 echo "$ac_err" >&5
4447 echo "configure: failed program was:" >&5
4448 cat conftest.$ac_ext >&5
4449 rm -rf conftest*
4450 ac_cv_header_stdc=no
4451fi
4452rm -f conftest*
4453
4454if test $ac_cv_header_stdc = yes; then
4455 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
4456cat > conftest.$ac_ext <<EOF
226361c4 4457#line 4458 "configure"
5ee754fc
MK
4458#include "confdefs.h"
4459#include <string.h>
4460EOF
4461if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4462 egrep "memchr" >/dev/null 2>&1; then
4463 :
4464else
4465 rm -rf conftest*
4466 ac_cv_header_stdc=no
4467fi
4468rm -f conftest*
4469
4470fi
4471
4472if test $ac_cv_header_stdc = yes; then
4473 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
4474cat > conftest.$ac_ext <<EOF
226361c4 4475#line 4476 "configure"
5ee754fc
MK
4476#include "confdefs.h"
4477#include <stdlib.h>
4478EOF
4479if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4480 egrep "free" >/dev/null 2>&1; then
4481 :
4482else
4483 rm -rf conftest*
4484 ac_cv_header_stdc=no
4485fi
4486rm -f conftest*
4487
4488fi
4489
4490if test $ac_cv_header_stdc = yes; then
4491 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
4492if test "$cross_compiling" = yes; then
4493 :
4494else
4495 cat > conftest.$ac_ext <<EOF
226361c4 4496#line 4497 "configure"
5ee754fc
MK
4497#include "confdefs.h"
4498#include <ctype.h>
4499#define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
4500#define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
4501#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
4502int main () { int i; for (i = 0; i < 256; i++)
4503if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
4504exit (0); }
4505
4506EOF
226361c4 4507if { (eval echo configure:4508: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
5ee754fc
MK
4508then
4509 :
9608ab8b 4510else
5ee754fc
MK
4511 echo "configure: failed program was:" >&5
4512 cat conftest.$ac_ext >&5
4513 rm -fr conftest*
4514 ac_cv_header_stdc=no
4515fi
4516rm -fr conftest*
4517fi
4518
4519fi
4520fi
4521
4522echo "$ac_t""$ac_cv_header_stdc" 1>&6
4523if test $ac_cv_header_stdc = yes; then
4524 cat >> confdefs.h <<\EOF
4525#define STDC_HEADERS 1
4526EOF
4527
4528fi
4529
4530for ac_hdr in link.h
4531do
4532ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4533echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
226361c4 4534echo "configure:4535: checking for $ac_hdr" >&5
5ee754fc
MK
4535if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4536 echo $ac_n "(cached) $ac_c" 1>&6
4537else
4538 cat > conftest.$ac_ext <<EOF
226361c4 4539#line 4540 "configure"
5ee754fc
MK
4540#include "confdefs.h"
4541#include <$ac_hdr>
4542EOF
4543ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
226361c4 4544{ (eval echo configure:4545: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
4545ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4546if test -z "$ac_err"; then
4547 rm -rf conftest*
4548 eval "ac_cv_header_$ac_safe=yes"
4549else
4550 echo "$ac_err" >&5
4551 echo "configure: failed program was:" >&5
4552 cat conftest.$ac_ext >&5
4553 rm -rf conftest*
4554 eval "ac_cv_header_$ac_safe=no"
4555fi
4556rm -f conftest*
4557fi
4558if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4559 echo "$ac_t""yes" 1>&6
4560 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4561 cat >> confdefs.h <<EOF
4562#define $ac_tr_hdr 1
4563EOF
4564
4565else
4566 echo "$ac_t""no" 1>&6
4567fi
4568done
4569
78434e59 4570for ac_hdr in machine/reg.h
5ee754fc
MK
4571do
4572ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4573echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
226361c4 4574echo "configure:4575: checking for $ac_hdr" >&5
5ee754fc
MK
4575if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4576 echo $ac_n "(cached) $ac_c" 1>&6
4577else
4578 cat > conftest.$ac_ext <<EOF
226361c4 4579#line 4580 "configure"
5ee754fc
MK
4580#include "confdefs.h"
4581#include <$ac_hdr>
4582EOF
4583ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
226361c4 4584{ (eval echo configure:4585: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
4585ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4586if test -z "$ac_err"; then
4587 rm -rf conftest*
4588 eval "ac_cv_header_$ac_safe=yes"
4589else
4590 echo "$ac_err" >&5
4591 echo "configure: failed program was:" >&5
4592 cat conftest.$ac_ext >&5
4593 rm -rf conftest*
4594 eval "ac_cv_header_$ac_safe=no"
4595fi
4596rm -f conftest*
4597fi
4598if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4599 echo "$ac_t""yes" 1>&6
4600 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4601 cat >> confdefs.h <<EOF
4602#define $ac_tr_hdr 1
4603EOF
4604
4605else
4606 echo "$ac_t""no" 1>&6
4607fi
4608done
4609
78434e59 4610for ac_hdr in nlist.h
5ee754fc
MK
4611do
4612ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4613echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
226361c4 4614echo "configure:4615: checking for $ac_hdr" >&5
5ee754fc
MK
4615if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4616 echo $ac_n "(cached) $ac_c" 1>&6
4617else
4618 cat > conftest.$ac_ext <<EOF
226361c4 4619#line 4620 "configure"
5ee754fc
MK
4620#include "confdefs.h"
4621#include <$ac_hdr>
4622EOF
4623ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
226361c4 4624{ (eval echo configure:4625: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
4625ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4626if test -z "$ac_err"; then
4627 rm -rf conftest*
4628 eval "ac_cv_header_$ac_safe=yes"
4629else
4630 echo "$ac_err" >&5
4631 echo "configure: failed program was:" >&5
4632 cat conftest.$ac_ext >&5
4633 rm -rf conftest*
4634 eval "ac_cv_header_$ac_safe=no"
4635fi
4636rm -f conftest*
4637fi
4638if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4639 echo "$ac_t""yes" 1>&6
4640 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4641 cat >> confdefs.h <<EOF
4642#define $ac_tr_hdr 1
4643EOF
4644
4645else
4646 echo "$ac_t""no" 1>&6
4647fi
4648done
4649
78434e59 4650for ac_hdr in poll.h sys/poll.h
5ee754fc
MK
4651do
4652ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4653echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
226361c4 4654echo "configure:4655: checking for $ac_hdr" >&5
5ee754fc
MK
4655if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4656 echo $ac_n "(cached) $ac_c" 1>&6
4657else
4658 cat > conftest.$ac_ext <<EOF
226361c4 4659#line 4660 "configure"
5ee754fc
MK
4660#include "confdefs.h"
4661#include <$ac_hdr>
4662EOF
4663ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
226361c4 4664{ (eval echo configure:4665: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
4665ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4666if test -z "$ac_err"; then
4667 rm -rf conftest*
4668 eval "ac_cv_header_$ac_safe=yes"
4669else
4670 echo "$ac_err" >&5
4671 echo "configure: failed program was:" >&5
4672 cat conftest.$ac_ext >&5
4673 rm -rf conftest*
4674 eval "ac_cv_header_$ac_safe=no"
4675fi
4676rm -f conftest*
4677fi
4678if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4679 echo "$ac_t""yes" 1>&6
4680 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4681 cat >> confdefs.h <<EOF
4682#define $ac_tr_hdr 1
4683EOF
4684
4685else
4686 echo "$ac_t""no" 1>&6
4687fi
4688done
4689
78434e59 4690for ac_hdr in proc_service.h thread_db.h
5ee754fc
MK
4691do
4692ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4693echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
226361c4 4694echo "configure:4695: checking for $ac_hdr" >&5
5ee754fc
MK
4695if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4696 echo $ac_n "(cached) $ac_c" 1>&6
4697else
4698 cat > conftest.$ac_ext <<EOF
226361c4 4699#line 4700 "configure"
5ee754fc
MK
4700#include "confdefs.h"
4701#include <$ac_hdr>
4702EOF
4703ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
226361c4 4704{ (eval echo configure:4705: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
4705ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4706if test -z "$ac_err"; then
4707 rm -rf conftest*
4708 eval "ac_cv_header_$ac_safe=yes"
4709else
4710 echo "$ac_err" >&5
4711 echo "configure: failed program was:" >&5
4712 cat conftest.$ac_ext >&5
4713 rm -rf conftest*
4714 eval "ac_cv_header_$ac_safe=no"
4715fi
4716rm -f conftest*
4717fi
4718if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4719 echo "$ac_t""yes" 1>&6
4720 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4721 cat >> confdefs.h <<EOF
4722#define $ac_tr_hdr 1
4723EOF
4724
4725else
4726 echo "$ac_t""no" 1>&6
4727fi
4728done
4729
78434e59 4730for ac_hdr in stddef.h
5ee754fc
MK
4731do
4732ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4733echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
226361c4 4734echo "configure:4735: checking for $ac_hdr" >&5
5ee754fc
MK
4735if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4736 echo $ac_n "(cached) $ac_c" 1>&6
4737else
4738 cat > conftest.$ac_ext <<EOF
226361c4 4739#line 4740 "configure"
5ee754fc
MK
4740#include "confdefs.h"
4741#include <$ac_hdr>
4742EOF
4743ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
226361c4 4744{ (eval echo configure:4745: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
4745ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4746if test -z "$ac_err"; then
4747 rm -rf conftest*
4748 eval "ac_cv_header_$ac_safe=yes"
4749else
4750 echo "$ac_err" >&5
4751 echo "configure: failed program was:" >&5
4752 cat conftest.$ac_ext >&5
4753 rm -rf conftest*
4754 eval "ac_cv_header_$ac_safe=no"
4755fi
4756rm -f conftest*
4757fi
4758if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4759 echo "$ac_t""yes" 1>&6
4760 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4761 cat >> confdefs.h <<EOF
4762#define $ac_tr_hdr 1
4763EOF
4764
4765else
4766 echo "$ac_t""no" 1>&6
4767fi
4768done
4769
78434e59 4770for ac_hdr in stdlib.h
5ee754fc
MK
4771do
4772ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4773echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
226361c4 4774echo "configure:4775: checking for $ac_hdr" >&5
5ee754fc
MK
4775if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4776 echo $ac_n "(cached) $ac_c" 1>&6
4777else
4778 cat > conftest.$ac_ext <<EOF
226361c4 4779#line 4780 "configure"
5ee754fc
MK
4780#include "confdefs.h"
4781#include <$ac_hdr>
4782EOF
4783ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
226361c4 4784{ (eval echo configure:4785: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
4785ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4786if test -z "$ac_err"; then
4787 rm -rf conftest*
4788 eval "ac_cv_header_$ac_safe=yes"
4789else
4790 echo "$ac_err" >&5
4791 echo "configure: failed program was:" >&5
4792 cat conftest.$ac_ext >&5
4793 rm -rf conftest*
4794 eval "ac_cv_header_$ac_safe=no"
4795fi
4796rm -f conftest*
4797fi
4798if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4799 echo "$ac_t""yes" 1>&6
4800 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4801 cat >> confdefs.h <<EOF
4802#define $ac_tr_hdr 1
4803EOF
4804
4805else
4806 echo "$ac_t""no" 1>&6
4807fi
4808done
4809
78434e59 4810for ac_hdr in stdint.h
5ee754fc
MK
4811do
4812ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4813echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
226361c4 4814echo "configure:4815: checking for $ac_hdr" >&5
5ee754fc
MK
4815if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4816 echo $ac_n "(cached) $ac_c" 1>&6
4817else
4818 cat > conftest.$ac_ext <<EOF
226361c4 4819#line 4820 "configure"
5ee754fc
MK
4820#include "confdefs.h"
4821#include <$ac_hdr>
4822EOF
4823ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
226361c4 4824{ (eval echo configure:4825: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
4825ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4826if test -z "$ac_err"; then
4827 rm -rf conftest*
4828 eval "ac_cv_header_$ac_safe=yes"
4829else
4830 echo "$ac_err" >&5
4831 echo "configure: failed program was:" >&5
4832 cat conftest.$ac_ext >&5
4833 rm -rf conftest*
4834 eval "ac_cv_header_$ac_safe=no"
4835fi
4836rm -f conftest*
4837fi
4838if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4839 echo "$ac_t""yes" 1>&6
4840 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4841 cat >> confdefs.h <<EOF
4842#define $ac_tr_hdr 1
4843EOF
4844
4845else
4846 echo "$ac_t""no" 1>&6
4847fi
4848done
4849
78434e59 4850for ac_hdr in string.h memory.h strings.h
5ee754fc
MK
4851do
4852ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4853echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
226361c4 4854echo "configure:4855: checking for $ac_hdr" >&5
5ee754fc
MK
4855if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4856 echo $ac_n "(cached) $ac_c" 1>&6
4857else
4858 cat > conftest.$ac_ext <<EOF
226361c4 4859#line 4860 "configure"
5ee754fc
MK
4860#include "confdefs.h"
4861#include <$ac_hdr>
4862EOF
4863ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
226361c4 4864{ (eval echo configure:4865: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
4865ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4866if test -z "$ac_err"; then
4867 rm -rf conftest*
4868 eval "ac_cv_header_$ac_safe=yes"
4869else
4870 echo "$ac_err" >&5
4871 echo "configure: failed program was:" >&5
4872 cat conftest.$ac_ext >&5
4873 rm -rf conftest*
4874 eval "ac_cv_header_$ac_safe=no"
4875fi
4876rm -f conftest*
4877fi
4878if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4879 echo "$ac_t""yes" 1>&6
4880 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4881 cat >> confdefs.h <<EOF
4882#define $ac_tr_hdr 1
4883EOF
4884
4885else
4886 echo "$ac_t""no" 1>&6
4887fi
4888done
4889
78434e59 4890for ac_hdr in sys/fault.h
5ee754fc
MK
4891do
4892ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4893echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
226361c4 4894echo "configure:4895: checking for $ac_hdr" >&5
5ee754fc
MK
4895if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4896 echo $ac_n "(cached) $ac_c" 1>&6
4897else
4898 cat > conftest.$ac_ext <<EOF
226361c4 4899#line 4900 "configure"
5ee754fc
MK
4900#include "confdefs.h"
4901#include <$ac_hdr>
4902EOF
4903ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
226361c4 4904{ (eval echo configure:4905: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
4905ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4906if test -z "$ac_err"; then
4907 rm -rf conftest*
4908 eval "ac_cv_header_$ac_safe=yes"
4909else
4910 echo "$ac_err" >&5
4911 echo "configure: failed program was:" >&5
4912 cat conftest.$ac_ext >&5
4913 rm -rf conftest*
4914 eval "ac_cv_header_$ac_safe=no"
4915fi
4916rm -f conftest*
4917fi
4918if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4919 echo "$ac_t""yes" 1>&6
4920 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4921 cat >> confdefs.h <<EOF
4922#define $ac_tr_hdr 1
4923EOF
4924
4925else
4926 echo "$ac_t""no" 1>&6
4927fi
4928done
4929
78434e59 4930for ac_hdr in sys/file.h
5ee754fc
MK
4931do
4932ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4933echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
226361c4 4934echo "configure:4935: checking for $ac_hdr" >&5
5ee754fc
MK
4935if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4936 echo $ac_n "(cached) $ac_c" 1>&6
4937else
4938 cat > conftest.$ac_ext <<EOF
226361c4 4939#line 4940 "configure"
5ee754fc
MK
4940#include "confdefs.h"
4941#include <$ac_hdr>
4942EOF
4943ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
226361c4 4944{ (eval echo configure:4945: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
4945ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4946if test -z "$ac_err"; then
4947 rm -rf conftest*
4948 eval "ac_cv_header_$ac_safe=yes"
4949else
4950 echo "$ac_err" >&5
4951 echo "configure: failed program was:" >&5
4952 cat conftest.$ac_ext >&5
4953 rm -rf conftest*
4954 eval "ac_cv_header_$ac_safe=no"
4955fi
4956rm -f conftest*
4957fi
4958if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4959 echo "$ac_t""yes" 1>&6
4960 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4961 cat >> confdefs.h <<EOF
4962#define $ac_tr_hdr 1
4963EOF
4964
4965else
4966 echo "$ac_t""no" 1>&6
4967fi
4968done
4969
78434e59 4970for ac_hdr in sys/filio.h
5ee754fc
MK
4971do
4972ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4973echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
226361c4 4974echo "configure:4975: checking for $ac_hdr" >&5
5ee754fc
MK
4975if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4976 echo $ac_n "(cached) $ac_c" 1>&6
4977else
4978 cat > conftest.$ac_ext <<EOF
226361c4 4979#line 4980 "configure"
5ee754fc
MK
4980#include "confdefs.h"
4981#include <$ac_hdr>
4982EOF
4983ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
226361c4 4984{ (eval echo configure:4985: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
4985ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4986if test -z "$ac_err"; then
4987 rm -rf conftest*
4988 eval "ac_cv_header_$ac_safe=yes"
4989else
4990 echo "$ac_err" >&5
4991 echo "configure: failed program was:" >&5
4992 cat conftest.$ac_ext >&5
4993 rm -rf conftest*
4994 eval "ac_cv_header_$ac_safe=no"
4995fi
4996rm -f conftest*
4997fi
4998if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4999 echo "$ac_t""yes" 1>&6
5000 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5001 cat >> confdefs.h <<EOF
5002#define $ac_tr_hdr 1
5003EOF
5004
5005else
5006 echo "$ac_t""no" 1>&6
5007fi
5008done
5009
78434e59 5010for ac_hdr in sys/ioctl.h
5ee754fc
MK
5011do
5012ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5013echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
226361c4 5014echo "configure:5015: checking for $ac_hdr" >&5
5ee754fc
MK
5015if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5016 echo $ac_n "(cached) $ac_c" 1>&6
5017else
5018 cat > conftest.$ac_ext <<EOF
226361c4 5019#line 5020 "configure"
5ee754fc
MK
5020#include "confdefs.h"
5021#include <$ac_hdr>
5022EOF
5023ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
226361c4 5024{ (eval echo configure:5025: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
5025ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5026if test -z "$ac_err"; then
5027 rm -rf conftest*
5028 eval "ac_cv_header_$ac_safe=yes"
5029else
5030 echo "$ac_err" >&5
5031 echo "configure: failed program was:" >&5
5032 cat conftest.$ac_ext >&5
5033 rm -rf conftest*
5034 eval "ac_cv_header_$ac_safe=no"
5035fi
5036rm -f conftest*
5037fi
5038if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5039 echo "$ac_t""yes" 1>&6
5040 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5041 cat >> confdefs.h <<EOF
5042#define $ac_tr_hdr 1
5043EOF
5044
5045else
5046 echo "$ac_t""no" 1>&6
5047fi
5048done
5049
78434e59 5050for ac_hdr in sys/param.h
5ee754fc
MK
5051do
5052ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5053echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
226361c4 5054echo "configure:5055: checking for $ac_hdr" >&5
5ee754fc
MK
5055if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5056 echo $ac_n "(cached) $ac_c" 1>&6
5057else
5058 cat > conftest.$ac_ext <<EOF
226361c4 5059#line 5060 "configure"
5ee754fc
MK
5060#include "confdefs.h"
5061#include <$ac_hdr>
5062EOF
5063ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
226361c4 5064{ (eval echo configure:5065: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
5065ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5066if test -z "$ac_err"; then
5067 rm -rf conftest*
5068 eval "ac_cv_header_$ac_safe=yes"
5069else
5070 echo "$ac_err" >&5
5071 echo "configure: failed program was:" >&5
5072 cat conftest.$ac_ext >&5
5073 rm -rf conftest*
5074 eval "ac_cv_header_$ac_safe=no"
5075fi
5076rm -f conftest*
5077fi
5078if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5079 echo "$ac_t""yes" 1>&6
5080 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5081 cat >> confdefs.h <<EOF
5082#define $ac_tr_hdr 1
5083EOF
5084
5085else
5086 echo "$ac_t""no" 1>&6
5087fi
5088done
5089
78434e59 5090for ac_hdr in sys/proc.h
5ee754fc
MK
5091do
5092ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5093echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
226361c4 5094echo "configure:5095: checking for $ac_hdr" >&5
5ee754fc
MK
5095if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5096 echo $ac_n "(cached) $ac_c" 1>&6
5097else
5098 cat > conftest.$ac_ext <<EOF
226361c4 5099#line 5100 "configure"
5ee754fc
MK
5100#include "confdefs.h"
5101#include <$ac_hdr>
5102EOF
5103ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
226361c4 5104{ (eval echo configure:5105: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
5105ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5106if test -z "$ac_err"; then
5107 rm -rf conftest*
5108 eval "ac_cv_header_$ac_safe=yes"
5109else
5110 echo "$ac_err" >&5
5111 echo "configure: failed program was:" >&5
5112 cat conftest.$ac_ext >&5
5113 rm -rf conftest*
5114 eval "ac_cv_header_$ac_safe=no"
5115fi
5116rm -f conftest*
5117fi
5118if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5119 echo "$ac_t""yes" 1>&6
5120 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5121 cat >> confdefs.h <<EOF
5122#define $ac_tr_hdr 1
5123EOF
5124
5125else
5126 echo "$ac_t""no" 1>&6
5127fi
5128done
5129
78434e59 5130for ac_hdr in sys/procfs.h
5ee754fc
MK
5131do
5132ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5133echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
226361c4 5134echo "configure:5135: checking for $ac_hdr" >&5
5ee754fc
MK
5135if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5136 echo $ac_n "(cached) $ac_c" 1>&6
5137else
5138 cat > conftest.$ac_ext <<EOF
226361c4 5139#line 5140 "configure"
5ee754fc
MK
5140#include "confdefs.h"
5141#include <$ac_hdr>
5142EOF
5143ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
226361c4 5144{ (eval echo configure:5145: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
5145ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5146if test -z "$ac_err"; then
5147 rm -rf conftest*
5148 eval "ac_cv_header_$ac_safe=yes"
5149else
5150 echo "$ac_err" >&5
5151 echo "configure: failed program was:" >&5
5152 cat conftest.$ac_ext >&5
5153 rm -rf conftest*
5154 eval "ac_cv_header_$ac_safe=no"
5155fi
5156rm -f conftest*
5157fi
5158if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5159 echo "$ac_t""yes" 1>&6
5160 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5161 cat >> confdefs.h <<EOF
5162#define $ac_tr_hdr 1
5163EOF
5164
5165else
5166 echo "$ac_t""no" 1>&6
5167fi
5168done
5169
78434e59 5170for ac_hdr in sys/ptrace.h ptrace.h
5ee754fc
MK
5171do
5172ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5173echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
226361c4 5174echo "configure:5175: checking for $ac_hdr" >&5
5ee754fc
MK
5175if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5176 echo $ac_n "(cached) $ac_c" 1>&6
5177else
5178 cat > conftest.$ac_ext <<EOF
226361c4 5179#line 5180 "configure"
5ee754fc
MK
5180#include "confdefs.h"
5181#include <$ac_hdr>
5182EOF
5183ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
226361c4 5184{ (eval echo configure:5185: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
5185ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5186if test -z "$ac_err"; then
5187 rm -rf conftest*
5188 eval "ac_cv_header_$ac_safe=yes"
5189else
5190 echo "$ac_err" >&5
5191 echo "configure: failed program was:" >&5
5192 cat conftest.$ac_ext >&5
5193 rm -rf conftest*
5194 eval "ac_cv_header_$ac_safe=no"
5195fi
5196rm -f conftest*
5197fi
5198if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5199 echo "$ac_t""yes" 1>&6
5200 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5201 cat >> confdefs.h <<EOF
5202#define $ac_tr_hdr 1
5203EOF
5204
5205else
5206 echo "$ac_t""no" 1>&6
5207fi
5208done
5209
78434e59 5210for ac_hdr in sys/reg.h sys/debugreg.h
5ee754fc
MK
5211do
5212ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5213echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
226361c4 5214echo "configure:5215: checking for $ac_hdr" >&5
5ee754fc
MK
5215if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5216 echo $ac_n "(cached) $ac_c" 1>&6
5217else
5218 cat > conftest.$ac_ext <<EOF
226361c4 5219#line 5220 "configure"
5ee754fc
MK
5220#include "confdefs.h"
5221#include <$ac_hdr>
5222EOF
5223ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
226361c4 5224{ (eval echo configure:5225: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
5225ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5226if test -z "$ac_err"; then
5227 rm -rf conftest*
5228 eval "ac_cv_header_$ac_safe=yes"
5229else
5230 echo "$ac_err" >&5
5231 echo "configure: failed program was:" >&5
5232 cat conftest.$ac_ext >&5
5233 rm -rf conftest*
5234 eval "ac_cv_header_$ac_safe=no"
5235fi
5236rm -f conftest*
5237fi
5238if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5239 echo "$ac_t""yes" 1>&6
5240 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5241 cat >> confdefs.h <<EOF
5242#define $ac_tr_hdr 1
5243EOF
5244
5245else
5246 echo "$ac_t""no" 1>&6
5247fi
5248done
5249
78434e59 5250for ac_hdr in sys/select.h
5ee754fc
MK
5251do
5252ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5253echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
226361c4 5254echo "configure:5255: checking for $ac_hdr" >&5
5ee754fc
MK
5255if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5256 echo $ac_n "(cached) $ac_c" 1>&6
5257else
5258 cat > conftest.$ac_ext <<EOF
226361c4 5259#line 5260 "configure"
5ee754fc
MK
5260#include "confdefs.h"
5261#include <$ac_hdr>
5262EOF
5263ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
226361c4 5264{ (eval echo configure:5265: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
5265ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5266if test -z "$ac_err"; then
5267 rm -rf conftest*
5268 eval "ac_cv_header_$ac_safe=yes"
5269else
5270 echo "$ac_err" >&5
5271 echo "configure: failed program was:" >&5
5272 cat conftest.$ac_ext >&5
5273 rm -rf conftest*
5274 eval "ac_cv_header_$ac_safe=no"
5275fi
5276rm -f conftest*
5277fi
5278if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5279 echo "$ac_t""yes" 1>&6
5280 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5281 cat >> confdefs.h <<EOF
5282#define $ac_tr_hdr 1
5283EOF
5284
5285else
5286 echo "$ac_t""no" 1>&6
5287fi
5288done
5289
78434e59 5290for ac_hdr in sys/syscall.h
5ee754fc
MK
5291do
5292ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5293echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
226361c4 5294echo "configure:5295: checking for $ac_hdr" >&5
5ee754fc
MK
5295if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5296 echo $ac_n "(cached) $ac_c" 1>&6
5297else
5298 cat > conftest.$ac_ext <<EOF
226361c4 5299#line 5300 "configure"
5ee754fc
MK
5300#include "confdefs.h"
5301#include <$ac_hdr>
5302EOF
5303ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
226361c4 5304{ (eval echo configure:5305: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
5305ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5306if test -z "$ac_err"; then
5307 rm -rf conftest*
5308 eval "ac_cv_header_$ac_safe=yes"
5309else
5310 echo "$ac_err" >&5
5311 echo "configure: failed program was:" >&5
5312 cat conftest.$ac_ext >&5
5313 rm -rf conftest*
5314 eval "ac_cv_header_$ac_safe=no"
5315fi
5316rm -f conftest*
5317fi
5318if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5319 echo "$ac_t""yes" 1>&6
5320 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5321 cat >> confdefs.h <<EOF
5322#define $ac_tr_hdr 1
5323EOF
5324
5325else
5326 echo "$ac_t""no" 1>&6
5327fi
5328done
5329
78434e59 5330for ac_hdr in sys/user.h
5ee754fc
MK
5331do
5332ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5333echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
226361c4 5334echo "configure:5335: checking for $ac_hdr" >&5
5ee754fc
MK
5335if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5336 echo $ac_n "(cached) $ac_c" 1>&6
5337else
5338 cat > conftest.$ac_ext <<EOF
226361c4 5339#line 5340 "configure"
5ee754fc
MK
5340#include "confdefs.h"
5341#include <$ac_hdr>
5342EOF
5343ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
226361c4 5344{ (eval echo configure:5345: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
5345ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5346if test -z "$ac_err"; then
5347 rm -rf conftest*
5348 eval "ac_cv_header_$ac_safe=yes"
5349else
5350 echo "$ac_err" >&5
9608ab8b
MK
5351 echo "configure: failed program was:" >&5
5352 cat conftest.$ac_ext >&5
5353 rm -rf conftest*
5ee754fc 5354 eval "ac_cv_header_$ac_safe=no"
9608ab8b
MK
5355fi
5356rm -f conftest*
5357fi
5ee754fc 5358if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9608ab8b
MK
5359 echo "$ac_t""yes" 1>&6
5360 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5361 cat >> confdefs.h <<EOF
5362#define $ac_tr_hdr 1
5363EOF
5ee754fc 5364
9608ab8b
MK
5365else
5366 echo "$ac_t""no" 1>&6
5367fi
5368done
5ee754fc 5369
78434e59 5370for ac_hdr in sys/wait.h wait.h
5ee754fc
MK
5371do
5372ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5373echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
226361c4 5374echo "configure:5375: checking for $ac_hdr" >&5
5ee754fc 5375if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
9608ab8b
MK
5376 echo $ac_n "(cached) $ac_c" 1>&6
5377else
5ee754fc 5378 cat > conftest.$ac_ext <<EOF
226361c4 5379#line 5380 "configure"
9608ab8b 5380#include "confdefs.h"
5ee754fc 5381#include <$ac_hdr>
9608ab8b 5382EOF
5ee754fc 5383ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
226361c4 5384{ (eval echo configure:5385: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
5385ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5386if test -z "$ac_err"; then
9608ab8b 5387 rm -rf conftest*
5ee754fc 5388 eval "ac_cv_header_$ac_safe=yes"
9608ab8b 5389else
5ee754fc 5390 echo "$ac_err" >&5
9608ab8b
MK
5391 echo "configure: failed program was:" >&5
5392 cat conftest.$ac_ext >&5
5393 rm -rf conftest*
5ee754fc 5394 eval "ac_cv_header_$ac_safe=no"
9608ab8b
MK
5395fi
5396rm -f conftest*
9608ab8b 5397fi
5ee754fc 5398if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9608ab8b 5399 echo "$ac_t""yes" 1>&6
5ee754fc
MK
5400 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5401 cat >> confdefs.h <<EOF
5402#define $ac_tr_hdr 1
5403EOF
5404
9608ab8b
MK
5405else
5406 echo "$ac_t""no" 1>&6
5407fi
5ee754fc 5408done
9608ab8b 5409
78434e59 5410for ac_hdr in termios.h termio.h sgtty.h
5ee754fc
MK
5411do
5412ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5413echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
226361c4 5414echo "configure:5415: checking for $ac_hdr" >&5
5ee754fc 5415if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
9608ab8b
MK
5416 echo $ac_n "(cached) $ac_c" 1>&6
5417else
5ee754fc 5418 cat > conftest.$ac_ext <<EOF
226361c4 5419#line 5420 "configure"
9608ab8b 5420#include "confdefs.h"
5ee754fc 5421#include <$ac_hdr>
9608ab8b 5422EOF
5ee754fc 5423ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
226361c4 5424{ (eval echo configure:5425: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
5425ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5426if test -z "$ac_err"; then
9608ab8b 5427 rm -rf conftest*
5ee754fc 5428 eval "ac_cv_header_$ac_safe=yes"
9608ab8b 5429else
5ee754fc 5430 echo "$ac_err" >&5
9608ab8b
MK
5431 echo "configure: failed program was:" >&5
5432 cat conftest.$ac_ext >&5
5433 rm -rf conftest*
5ee754fc 5434 eval "ac_cv_header_$ac_safe=no"
9608ab8b
MK
5435fi
5436rm -f conftest*
9608ab8b 5437fi
5ee754fc 5438if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9608ab8b 5439 echo "$ac_t""yes" 1>&6
5ee754fc
MK
5440 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5441 cat >> confdefs.h <<EOF
5442#define $ac_tr_hdr 1
5443EOF
5444
9608ab8b
MK
5445else
5446 echo "$ac_t""no" 1>&6
5447fi
5ee754fc 5448done
9608ab8b 5449
78434e59
MK
5450for ac_hdr in unistd.h
5451do
5452ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5453echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
226361c4 5454echo "configure:5455: checking for $ac_hdr" >&5
78434e59
MK
5455if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5456 echo $ac_n "(cached) $ac_c" 1>&6
5457else
5458 cat > conftest.$ac_ext <<EOF
226361c4 5459#line 5460 "configure"
78434e59
MK
5460#include "confdefs.h"
5461#include <$ac_hdr>
5462EOF
5463ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
226361c4 5464{ (eval echo configure:5465: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
78434e59
MK
5465ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5466if test -z "$ac_err"; then
5467 rm -rf conftest*
5468 eval "ac_cv_header_$ac_safe=yes"
5469else
5470 echo "$ac_err" >&5
5471 echo "configure: failed program was:" >&5
5472 cat conftest.$ac_ext >&5
5473 rm -rf conftest*
5474 eval "ac_cv_header_$ac_safe=no"
5475fi
5476rm -f conftest*
5477fi
5478if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5479 echo "$ac_t""yes" 1>&6
5480 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5481 cat >> confdefs.h <<EOF
5482#define $ac_tr_hdr 1
5483EOF
5484
5485else
5486 echo "$ac_t""no" 1>&6
5487fi
5488done
5489
9608ab8b 5490
5ee754fc
MK
5491# On Solaris 2.[78], we need to define _MSE_INT_H to avoid a clash
5492# between <widec.h> and <wchar.h> that would cause AC_CHECK_HEADERS to
5493# think that we don't have <curses.h> if we're using GCC.
5494case $host_os in
5495 solaris2.[78])
5496 if test "$GCC" = yes; then
5497 cat >> confdefs.h <<\EOF
5498#define _MSE_INT_H 1
5499EOF
5500
5501 fi ;;
5502esac
5503for ac_hdr in curses.h ncurses.h term.h
5504do
5505ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5506echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
226361c4 5507echo "configure:5508: checking for $ac_hdr" >&5
5ee754fc 5508if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
c906108c
SS
5509 echo $ac_n "(cached) $ac_c" 1>&6
5510else
5511 cat > conftest.$ac_ext <<EOF
226361c4 5512#line 5513 "configure"
c906108c 5513#include "confdefs.h"
5ee754fc 5514#include <$ac_hdr>
c906108c
SS
5515EOF
5516ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
226361c4 5517{ (eval echo configure:5518: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
c906108c
SS
5518ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5519if test -z "$ac_err"; then
5520 rm -rf conftest*
5ee754fc 5521 eval "ac_cv_header_$ac_safe=yes"
c906108c
SS
5522else
5523 echo "$ac_err" >&5
5524 echo "configure: failed program was:" >&5
5525 cat conftest.$ac_ext >&5
5526 rm -rf conftest*
5ee754fc 5527 eval "ac_cv_header_$ac_safe=no"
c906108c
SS
5528fi
5529rm -f conftest*
c906108c 5530fi
5ee754fc
MK
5531if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5532 echo "$ac_t""yes" 1>&6
5533 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5534 cat >> confdefs.h <<EOF
5535#define $ac_tr_hdr 1
c906108c 5536EOF
5ee754fc 5537
c906108c 5538else
5ee754fc 5539 echo "$ac_t""no" 1>&6
c906108c 5540fi
5ee754fc 5541done
c906108c
SS
5542
5543
5ee754fc
MK
5544# FIXME: kettenis/20030102: In most cases we include these
5545# unconditionally, so what's the point in checking these?
5546for ac_hdr in ctype.h time.h
c906108c
SS
5547do
5548ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5549echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
226361c4 5550echo "configure:5551: checking for $ac_hdr" >&5
c906108c
SS
5551if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5552 echo $ac_n "(cached) $ac_c" 1>&6
5553else
5554 cat > conftest.$ac_ext <<EOF
226361c4 5555#line 5556 "configure"
c906108c
SS
5556#include "confdefs.h"
5557#include <$ac_hdr>
5558EOF
5559ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
226361c4 5560{ (eval echo configure:5561: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
c906108c
SS
5561ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5562if test -z "$ac_err"; then
5563 rm -rf conftest*
5564 eval "ac_cv_header_$ac_safe=yes"
5565else
5566 echo "$ac_err" >&5
5567 echo "configure: failed program was:" >&5
5568 cat conftest.$ac_ext >&5
5569 rm -rf conftest*
5570 eval "ac_cv_header_$ac_safe=no"
5571fi
5572rm -f conftest*
5573fi
5574if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5575 echo "$ac_t""yes" 1>&6
5576 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5577 cat >> confdefs.h <<EOF
5578#define $ac_tr_hdr 1
5579EOF
5580
5581else
5582 echo "$ac_t""no" 1>&6
5583fi
5584done
5585
5ee754fc 5586
40a7debc 5587echo $ac_n "checking for member st_blocks in struct stat""... $ac_c" 1>&6
226361c4 5588echo "configure:5589: checking for member st_blocks in struct stat" >&5
40a7debc
EZ
5589if eval "test \"`echo '$''{'gdb_cv_have_struct_stat_with_st_blocks_member'+set}'`\" = set"; then
5590 echo $ac_n "(cached) $ac_c" 1>&6
5591else
5592 cat > conftest.$ac_ext <<EOF
226361c4 5593#line 5594 "configure"
40a7debc
EZ
5594#include "confdefs.h"
5595#include <sys/types.h>
5596#include <sys/stat.h>
5597int main() {
5598struct stat st; (void) st.st_blocks;
5599; return 0; }
5600EOF
226361c4 5601if { (eval echo configure:5602: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
40a7debc
EZ
5602 rm -rf conftest*
5603 gdb_cv_have_struct_stat_with_st_blocks_member=yes
5604else
5605 echo "configure: failed program was:" >&5
5606 cat conftest.$ac_ext >&5
5607 rm -rf conftest*
5608 gdb_cv_have_struct_stat_with_st_blocks_member=no
5609fi
5610rm -f conftest*
5611fi
5612
5613echo "$ac_t""$gdb_cv_have_struct_stat_with_st_blocks_member" 1>&6
5614if test $gdb_cv_have_struct_stat_with_st_blocks_member = yes; then
5615 cat >> confdefs.h <<\EOF
5616#define HAVE_STRUCT_STAT_ST_BLOCKS 1
5617EOF
5618
5619fi
b9362cc7
AC
5620# ------------------------- #
5621# Checks for declarations. #
5622# ------------------------- #
5623
5624for ac_func in getopt
5625do
5626 ac_tr_decl=HAVE_DECL_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5627echo $ac_n "checking whether $ac_func is declared""... $ac_c" 1>&6
226361c4 5628echo "configure:5629: checking whether $ac_func is declared" >&5
b9362cc7
AC
5629if eval "test \"`echo '$''{'gcc_cv_have_decl_$ac_func'+set}'`\" = set"; then
5630 echo $ac_n "(cached) $ac_c" 1>&6
5631else
5632 cat > conftest.$ac_ext <<EOF
226361c4 5633#line 5634 "configure"
b9362cc7
AC
5634#include "confdefs.h"
5635#undef $ac_tr_decl
5636#define $ac_tr_decl 1
5637
5638
5639int main() {
5640#ifndef $ac_func
5641char *(*pfn) = (char *(*)) $ac_func ;
5642#endif
5643; return 0; }
5644EOF
226361c4 5645if { (eval echo configure:5646: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
b9362cc7
AC
5646 rm -rf conftest*
5647 eval "gcc_cv_have_decl_$ac_func=yes"
5648else
5649 echo "configure: failed program was:" >&5
5650 cat conftest.$ac_ext >&5
5651 rm -rf conftest*
5652 eval "gcc_cv_have_decl_$ac_func=no"
5653fi
5654rm -f conftest*
5655fi
5656
5657if eval "test \"`echo '$gcc_cv_have_decl_'$ac_func`\" = yes"; then
5658 echo "$ac_t""yes" 1>&6 ; cat >> confdefs.h <<EOF
5659#define $ac_tr_decl 1
5660EOF
5661
5662else
5663 echo "$ac_t""no" 1>&6 ; cat >> confdefs.h <<EOF
5664#define $ac_tr_decl 0
5665EOF
5666
5667fi
5668
5669done
5670if test x = y ; then
5671 cat >> confdefs.h <<\EOF
5672#define HAVE_DECL_GETOPT 1
5673EOF
5674fi
5675
5676
5ee754fc
MK
5677# ------------------ #
5678# Checks for types. #
5679# ------------------ #
5680
5681echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
226361c4 5682echo "configure:5683: checking return type of signal handlers" >&5
5ee754fc 5683if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
c906108c
SS
5684 echo $ac_n "(cached) $ac_c" 1>&6
5685else
5686 cat > conftest.$ac_ext <<EOF
226361c4 5687#line 5688 "configure"
c906108c
SS
5688#include "confdefs.h"
5689#include <sys/types.h>
5ee754fc
MK
5690#include <signal.h>
5691#ifdef signal
5692#undef signal
c906108c 5693#endif
5ee754fc
MK
5694#ifdef __cplusplus
5695extern "C" void (*signal (int, void (*)(int)))(int);
5696#else
5697void (*signal ()) ();
c906108c
SS
5698#endif
5699
5ee754fc
MK
5700int main() {
5701int i;
5702; return 0; }
c906108c 5703EOF
226361c4 5704if { (eval echo configure:5705: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c 5705 rm -rf conftest*
5ee754fc 5706 ac_cv_type_signal=void
c906108c 5707else
5ee754fc
MK
5708 echo "configure: failed program was:" >&5
5709 cat conftest.$ac_ext >&5
c906108c 5710 rm -rf conftest*
5ee754fc 5711 ac_cv_type_signal=int
c906108c
SS
5712fi
5713rm -f conftest*
c906108c
SS
5714fi
5715
5ee754fc
MK
5716echo "$ac_t""$ac_cv_type_signal" 1>&6
5717cat >> confdefs.h <<EOF
5718#define RETSIGTYPE $ac_cv_type_signal
c906108c
SS
5719EOF
5720
c906108c
SS
5721
5722
5ee754fc
MK
5723# ------------------------------------- #
5724# Checks for compiler characteristics. #
5725# ------------------------------------- #
5726
c906108c 5727echo $ac_n "checking for working const""... $ac_c" 1>&6
226361c4 5728echo "configure:5729: checking for working const" >&5
c906108c
SS
5729if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
5730 echo $ac_n "(cached) $ac_c" 1>&6
5731else
5732 cat > conftest.$ac_ext <<EOF
226361c4 5733#line 5734 "configure"
c906108c
SS
5734#include "confdefs.h"
5735
5736int main() {
5737
5738/* Ultrix mips cc rejects this. */
5739typedef int charset[2]; const charset x;
5740/* SunOS 4.1.1 cc rejects this. */
5741char const *const *ccp;
5742char **p;
5743/* NEC SVR4.0.2 mips cc rejects this. */
5744struct point {int x, y;};
5745static struct point const zero = {0,0};
5746/* AIX XL C 1.02.0.0 rejects this.
5747 It does not let you subtract one const X* pointer from another in an arm
5748 of an if-expression whose if-part is not a constant expression */
5749const char *g = "string";
5750ccp = &g + (g ? g-g : 0);
5751/* HPUX 7.0 cc rejects these. */
5752++ccp;
5753p = (char**) ccp;
5754ccp = (char const *const *) p;
5755{ /* SCO 3.2v4 cc rejects this. */
5756 char *t;
5757 char const *s = 0 ? (char *) 0 : (char const *) 0;
5758
5759 *t++ = 0;
5760}
5761{ /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
5762 int x[] = {25, 17};
5763 const int *foo = &x[0];
5764 ++foo;
5765}
5766{ /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
5767 typedef const int *iptr;
5768 iptr p = 0;
5769 ++p;
5770}
5771{ /* AIX XL C 1.02.0.0 rejects this saying
5772 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
5773 struct s { int j; const int *ap[3]; };
5774 struct s *b; b->j = 5;
5775}
5776{ /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
5777 const int foo = 10;
5778}
5779
5780; return 0; }
5781EOF
226361c4 5782if { (eval echo configure:5783: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c
SS
5783 rm -rf conftest*
5784 ac_cv_c_const=yes
5785else
5786 echo "configure: failed program was:" >&5
5787 cat conftest.$ac_ext >&5
5788 rm -rf conftest*
5789 ac_cv_c_const=no
5790fi
5791rm -f conftest*
5792fi
5793
5794echo "$ac_t""$ac_cv_c_const" 1>&6
5795if test $ac_cv_c_const = no; then
5796 cat >> confdefs.h <<\EOF
5797#define const
5798EOF
5799
5800fi
5801
bce58c09 5802echo $ac_n "checking for inline""... $ac_c" 1>&6
226361c4 5803echo "configure:5804: checking for inline" >&5
bce58c09
JB
5804if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then
5805 echo $ac_n "(cached) $ac_c" 1>&6
5806else
5807 ac_cv_c_inline=no
5808for ac_kw in inline __inline__ __inline; do
5809 cat > conftest.$ac_ext <<EOF
226361c4 5810#line 5811 "configure"
bce58c09
JB
5811#include "confdefs.h"
5812
5813int main() {
5814} $ac_kw foo() {
5815; return 0; }
5816EOF
226361c4 5817if { (eval echo configure:5818: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
bce58c09
JB
5818 rm -rf conftest*
5819 ac_cv_c_inline=$ac_kw; break
5820else
5821 echo "configure: failed program was:" >&5
5822 cat conftest.$ac_ext >&5
5823fi
5824rm -f conftest*
5825done
5826
5827fi
5828
5829echo "$ac_t""$ac_cv_c_inline" 1>&6
5830case "$ac_cv_c_inline" in
5831 inline | yes) ;;
5832 no) cat >> confdefs.h <<\EOF
5833#define inline
5834EOF
5835 ;;
5836 *) cat >> confdefs.h <<EOF
5837#define inline $ac_cv_c_inline
5838EOF
5839 ;;
5840esac
5841
c906108c 5842
5ee754fc
MK
5843# ------------------------------ #
5844# Checks for library functions. #
5845# ------------------------------ #
5846
46711df8
MK
5847# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
5848# for constant arguments. Useless!
5849echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6
226361c4 5850echo "configure:5851: checking for working alloca.h" >&5
46711df8
MK
5851if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then
5852 echo $ac_n "(cached) $ac_c" 1>&6
5853else
5854 cat > conftest.$ac_ext <<EOF
226361c4 5855#line 5856 "configure"
46711df8
MK
5856#include "confdefs.h"
5857#include <alloca.h>
5858int main() {
5859char *p = alloca(2 * sizeof(int));
5860; return 0; }
5861EOF
226361c4 5862if { (eval echo configure:5863: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
46711df8
MK
5863 rm -rf conftest*
5864 ac_cv_header_alloca_h=yes
5865else
5866 echo "configure: failed program was:" >&5
5867 cat conftest.$ac_ext >&5
5868 rm -rf conftest*
5869 ac_cv_header_alloca_h=no
5870fi
5871rm -f conftest*
5872fi
5873
5874echo "$ac_t""$ac_cv_header_alloca_h" 1>&6
5875if test $ac_cv_header_alloca_h = yes; then
5876 cat >> confdefs.h <<\EOF
5877#define HAVE_ALLOCA_H 1
5878EOF
5879
5880fi
5881
5882echo $ac_n "checking for alloca""... $ac_c" 1>&6
226361c4 5883echo "configure:5884: checking for alloca" >&5
46711df8
MK
5884if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then
5885 echo $ac_n "(cached) $ac_c" 1>&6
5886else
5887 cat > conftest.$ac_ext <<EOF
226361c4 5888#line 5889 "configure"
46711df8
MK
5889#include "confdefs.h"
5890
5891#ifdef __GNUC__
5892# define alloca __builtin_alloca
5893#else
5894# ifdef _MSC_VER
5895# include <malloc.h>
5896# define alloca _alloca
5897# else
5898# if HAVE_ALLOCA_H
5899# include <alloca.h>
5900# else
5901# ifdef _AIX
5902 #pragma alloca
5903# else
5904# ifndef alloca /* predefined by HP cc +Olibcalls */
5905char *alloca ();
5906# endif
5907# endif
5908# endif
5909# endif
5910#endif
5911
5912int main() {
5913char *p = (char *) alloca(1);
5914; return 0; }
5915EOF
226361c4 5916if { (eval echo configure:5917: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
46711df8
MK
5917 rm -rf conftest*
5918 ac_cv_func_alloca_works=yes
5919else
5920 echo "configure: failed program was:" >&5
5921 cat conftest.$ac_ext >&5
5922 rm -rf conftest*
5923 ac_cv_func_alloca_works=no
5924fi
5925rm -f conftest*
5926fi
5927
5928echo "$ac_t""$ac_cv_func_alloca_works" 1>&6
5929if test $ac_cv_func_alloca_works = yes; then
5930 cat >> confdefs.h <<\EOF
5931#define HAVE_ALLOCA 1
5932EOF
5933
5934fi
5935
5936if test $ac_cv_func_alloca_works = no; then
5937 # The SVR3 libPW and SVR4 libucb both contain incompatible functions
5938 # that cause trouble. Some versions do not even contain alloca or
5939 # contain a buggy version. If you still want to use their alloca,
5940 # use ar to extract alloca.o from them instead of compiling alloca.c.
5941 ALLOCA=alloca.${ac_objext}
5942 cat >> confdefs.h <<\EOF
5943#define C_ALLOCA 1
5944EOF
5945
5946
5947echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
226361c4 5948echo "configure:5949: checking whether alloca needs Cray hooks" >&5
46711df8
MK
5949if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then
5950 echo $ac_n "(cached) $ac_c" 1>&6
5951else
5952 cat > conftest.$ac_ext <<EOF
226361c4 5953#line 5954 "configure"
46711df8
MK
5954#include "confdefs.h"
5955#if defined(CRAY) && ! defined(CRAY2)
5956webecray
5957#else
5958wenotbecray
5959#endif
5960
5961EOF
5962if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5963 egrep "webecray" >/dev/null 2>&1; then
5964 rm -rf conftest*
5965 ac_cv_os_cray=yes
5966else
5967 rm -rf conftest*
5968 ac_cv_os_cray=no
5969fi
5970rm -f conftest*
5971
5972fi
5973
5974echo "$ac_t""$ac_cv_os_cray" 1>&6
5975if test $ac_cv_os_cray = yes; then
5976for ac_func in _getb67 GETB67 getb67; do
5977 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
226361c4 5978echo "configure:5979: checking for $ac_func" >&5
46711df8
MK
5979if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5980 echo $ac_n "(cached) $ac_c" 1>&6
5981else
5982 cat > conftest.$ac_ext <<EOF
226361c4 5983#line 5984 "configure"
46711df8
MK
5984#include "confdefs.h"
5985/* System header to define __stub macros and hopefully few prototypes,
5986 which can conflict with char $ac_func(); below. */
5987#include <assert.h>
5988/* Override any gcc2 internal prototype to avoid an error. */
5989/* We use char because int might match the return type of a gcc2
5990 builtin and then its argument prototype would still apply. */
5991char $ac_func();
5992
5993int main() {
5994
5995/* The GNU C library defines this for functions which it implements
5996 to always fail with ENOSYS. Some functions are actually named
5997 something starting with __ and the normal name is an alias. */
5998#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5999choke me
6000#else
6001$ac_func();
6002#endif
6003
6004; return 0; }
6005EOF
226361c4 6006if { (eval echo configure:6007: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
46711df8
MK
6007 rm -rf conftest*
6008 eval "ac_cv_func_$ac_func=yes"
6009else
6010 echo "configure: failed program was:" >&5
6011 cat conftest.$ac_ext >&5
6012 rm -rf conftest*
6013 eval "ac_cv_func_$ac_func=no"
6014fi
6015rm -f conftest*
6016fi
6017
6018if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6019 echo "$ac_t""yes" 1>&6
6020 cat >> confdefs.h <<EOF
6021#define CRAY_STACKSEG_END $ac_func
6022EOF
6023
6024 break
6025else
6026 echo "$ac_t""no" 1>&6
6027fi
6028
6029done
6030fi
6031
6032echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
226361c4 6033echo "configure:6034: checking stack direction for C alloca" >&5
46711df8
MK
6034if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then
6035 echo $ac_n "(cached) $ac_c" 1>&6
6036else
6037 if test "$cross_compiling" = yes; then
6038 ac_cv_c_stack_direction=0
6039else
6040 cat > conftest.$ac_ext <<EOF
226361c4 6041#line 6042 "configure"
46711df8
MK
6042#include "confdefs.h"
6043find_stack_direction ()
6044{
6045 static char *addr = 0;
6046 auto char dummy;
6047 if (addr == 0)
6048 {
6049 addr = &dummy;
6050 return find_stack_direction ();
6051 }
6052 else
6053 return (&dummy > addr) ? 1 : -1;
6054}
6055main ()
6056{
6057 exit (find_stack_direction() < 0);
6058}
6059EOF
226361c4 6060if { (eval echo configure:6061: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
46711df8
MK
6061then
6062 ac_cv_c_stack_direction=1
6063else
6064 echo "configure: failed program was:" >&5
6065 cat conftest.$ac_ext >&5
6066 rm -fr conftest*
6067 ac_cv_c_stack_direction=-1
6068fi
6069rm -fr conftest*
6070fi
6071
6072fi
6073
6074echo "$ac_t""$ac_cv_c_stack_direction" 1>&6
6075cat >> confdefs.h <<EOF
6076#define STACK_DIRECTION $ac_cv_c_stack_direction
6077EOF
6078
6079fi
6080
d836ee13 6081for ac_hdr in unistd.h
97bf5e38
MK
6082do
6083ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6084echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
226361c4 6085echo "configure:6086: checking for $ac_hdr" >&5
74c1b268
AC
6086if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
6087 echo $ac_n "(cached) $ac_c" 1>&6
6088else
6089 cat > conftest.$ac_ext <<EOF
226361c4 6090#line 6091 "configure"
74c1b268 6091#include "confdefs.h"
97bf5e38 6092#include <$ac_hdr>
74c1b268
AC
6093EOF
6094ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
226361c4 6095{ (eval echo configure:6096: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
74c1b268
AC
6096ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6097if test -z "$ac_err"; then
6098 rm -rf conftest*
6099 eval "ac_cv_header_$ac_safe=yes"
6100else
6101 echo "$ac_err" >&5
6102 echo "configure: failed program was:" >&5
6103 cat conftest.$ac_ext >&5
6104 rm -rf conftest*
6105 eval "ac_cv_header_$ac_safe=no"
6106fi
6107rm -f conftest*
6108fi
6109if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6110 echo "$ac_t""yes" 1>&6
97bf5e38
MK
6111 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6112 cat >> confdefs.h <<EOF
6113#define $ac_tr_hdr 1
74c1b268 6114EOF
97bf5e38 6115
74c1b268
AC
6116else
6117 echo "$ac_t""no" 1>&6
6118fi
97bf5e38 6119done
74c1b268 6120
97bf5e38
MK
6121for ac_func in getpagesize
6122do
6123echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
226361c4 6124echo "configure:6125: checking for $ac_func" >&5
97bf5e38 6125if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
74c1b268
AC
6126 echo $ac_n "(cached) $ac_c" 1>&6
6127else
6128 cat > conftest.$ac_ext <<EOF
226361c4 6129#line 6130 "configure"
74c1b268
AC
6130#include "confdefs.h"
6131/* System header to define __stub macros and hopefully few prototypes,
97bf5e38 6132 which can conflict with char $ac_func(); below. */
74c1b268
AC
6133#include <assert.h>
6134/* Override any gcc2 internal prototype to avoid an error. */
6135/* We use char because int might match the return type of a gcc2
6136 builtin and then its argument prototype would still apply. */
97bf5e38 6137char $ac_func();
74c1b268
AC
6138
6139int main() {
6140
6141/* The GNU C library defines this for functions which it implements
6142 to always fail with ENOSYS. Some functions are actually named
6143 something starting with __ and the normal name is an alias. */
97bf5e38 6144#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
74c1b268
AC
6145choke me
6146#else
97bf5e38 6147$ac_func();
74c1b268
AC
6148#endif
6149
6150; return 0; }
6151EOF
226361c4 6152if { (eval echo configure:6153: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
74c1b268 6153 rm -rf conftest*
97bf5e38 6154 eval "ac_cv_func_$ac_func=yes"
74c1b268
AC
6155else
6156 echo "configure: failed program was:" >&5
6157 cat conftest.$ac_ext >&5
6158 rm -rf conftest*
97bf5e38 6159 eval "ac_cv_func_$ac_func=no"
74c1b268
AC
6160fi
6161rm -f conftest*
6162fi
6163
97bf5e38 6164if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
74c1b268 6165 echo "$ac_t""yes" 1>&6
97bf5e38
MK
6166 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6167 cat >> confdefs.h <<EOF
6168#define $ac_tr_func 1
6169EOF
6170
74c1b268
AC
6171else
6172 echo "$ac_t""no" 1>&6
6173fi
97bf5e38 6174done
74c1b268 6175
97bf5e38 6176echo $ac_n "checking for working mmap""... $ac_c" 1>&6
226361c4 6177echo "configure:6178: checking for working mmap" >&5
97bf5e38
MK
6178if eval "test \"`echo '$''{'ac_cv_func_mmap_fixed_mapped'+set}'`\" = set"; then
6179 echo $ac_n "(cached) $ac_c" 1>&6
6180else
6181 if test "$cross_compiling" = yes; then
6182 ac_cv_func_mmap_fixed_mapped=no
74c1b268
AC
6183else
6184 cat > conftest.$ac_ext <<EOF
226361c4 6185#line 6186 "configure"
74c1b268 6186#include "confdefs.h"
97bf5e38
MK
6187
6188/* Thanks to Mike Haertel and Jim Avera for this test.
6189 Here is a matrix of mmap possibilities:
6190 mmap private not fixed
6191 mmap private fixed at somewhere currently unmapped
6192 mmap private fixed at somewhere already mapped
6193 mmap shared not fixed
6194 mmap shared fixed at somewhere currently unmapped
6195 mmap shared fixed at somewhere already mapped
6196 For private mappings, we should verify that changes cannot be read()
6197 back from the file, nor mmap's back from the file at a different
6198 address. (There have been systems where private was not correctly
6199 implemented like the infamous i386 svr4.0, and systems where the
6200 VM page cache was not coherent with the filesystem buffer cache
6201 like early versions of FreeBSD and possibly contemporary NetBSD.)
6202 For shared mappings, we should conversely verify that changes get
6203 propogated back to all the places they're supposed to be.
6204
6205 Grep wants private fixed already mapped.
6206 The main things grep needs to know about mmap are:
6207 * does it exist and is it safe to write into the mmap'd area
6208 * how to use it (BSD variants) */
74c1b268 6209#include <sys/types.h>
97bf5e38
MK
6210#include <fcntl.h>
6211#include <sys/mman.h>
6212
6213/* This mess was copied from the GNU getpagesize.h. */
6214#ifndef HAVE_GETPAGESIZE
d836ee13
AC
6215# ifdef HAVE_UNISTD_H
6216# include <unistd.h>
6217# endif
97bf5e38
MK
6218
6219/* Assume that all systems that can run configure have sys/param.h. */
6220# ifndef HAVE_SYS_PARAM_H
6221# define HAVE_SYS_PARAM_H 1
6222# endif
6223
6224# ifdef _SC_PAGESIZE
6225# define getpagesize() sysconf(_SC_PAGESIZE)
6226# else /* no _SC_PAGESIZE */
6227# ifdef HAVE_SYS_PARAM_H
6228# include <sys/param.h>
6229# ifdef EXEC_PAGESIZE
6230# define getpagesize() EXEC_PAGESIZE
6231# else /* no EXEC_PAGESIZE */
6232# ifdef NBPG
6233# define getpagesize() NBPG * CLSIZE
6234# ifndef CLSIZE
6235# define CLSIZE 1
6236# endif /* no CLSIZE */
6237# else /* no NBPG */
6238# ifdef NBPC
6239# define getpagesize() NBPC
6240# else /* no NBPC */
6241# ifdef PAGESIZE
6242# define getpagesize() PAGESIZE
6243# endif /* PAGESIZE */
6244# endif /* no NBPC */
6245# endif /* no NBPG */
6246# endif /* no EXEC_PAGESIZE */
6247# else /* no HAVE_SYS_PARAM_H */
6248# define getpagesize() 8192 /* punt totally */
6249# endif /* no HAVE_SYS_PARAM_H */
6250# endif /* no _SC_PAGESIZE */
6251
6252#endif /* no HAVE_GETPAGESIZE */
6253
74c1b268 6254#ifdef __cplusplus
97bf5e38 6255extern "C" { void *malloc(unsigned); }
74c1b268 6256#else
97bf5e38 6257char *malloc();
74c1b268 6258#endif
74c1b268 6259
97bf5e38
MK
6260int
6261main()
6262{
6263 char *data, *data2, *data3;
6264 int i, pagesize;
6265 int fd;
74c1b268 6266
97bf5e38 6267 pagesize = getpagesize();
74c1b268 6268
97bf5e38
MK
6269 /*
6270 * First, make a file with some known garbage in it.
6271 */
6272 data = malloc(pagesize);
6273 if (!data)
6274 exit(1);
6275 for (i = 0; i < pagesize; ++i)
6276 *(data + i) = rand();
6277 umask(0);
6278 fd = creat("conftestmmap", 0600);
6279 if (fd < 0)
6280 exit(1);
6281 if (write(fd, data, pagesize) != pagesize)
6282 exit(1);
6283 close(fd);
74c1b268 6284
97bf5e38
MK
6285 /*
6286 * Next, try to mmap the file at a fixed address which
6287 * already has something else allocated at it. If we can,
6288 * also make sure that we see the same garbage.
6289 */
6290 fd = open("conftestmmap", O_RDWR);
6291 if (fd < 0)
6292 exit(1);
6293 data2 = malloc(2 * pagesize);
6294 if (!data2)
6295 exit(1);
6296 data2 += (pagesize - ((int) data2 & (pagesize - 1))) & (pagesize - 1);
6297 if (data2 != mmap(data2, pagesize, PROT_READ | PROT_WRITE,
6298 MAP_PRIVATE | MAP_FIXED, fd, 0L))
6299 exit(1);
6300 for (i = 0; i < pagesize; ++i)
6301 if (*(data + i) != *(data2 + i))
6302 exit(1);
74c1b268 6303
97bf5e38
MK
6304 /*
6305 * Finally, make sure that changes to the mapped area
6306 * do not percolate back to the file as seen by read().
6307 * (This is a bug on some variants of i386 svr4.0.)
6308 */
6309 for (i = 0; i < pagesize; ++i)
6310 *(data2 + i) = *(data2 + i) + 1;
6311 data3 = malloc(pagesize);
6312 if (!data3)
6313 exit(1);
6314 if (read(fd, data3, pagesize) != pagesize)
6315 exit(1);
6316 for (i = 0; i < pagesize; ++i)
6317 if (*(data + i) != *(data3 + i))
6318 exit(1);
6319 close(fd);
6320 unlink("conftestmmap");
6321 exit(0);
74c1b268 6322}
97bf5e38 6323
74c1b268 6324EOF
226361c4 6325if { (eval echo configure:6326: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
74c1b268 6326then
97bf5e38 6327 ac_cv_func_mmap_fixed_mapped=yes
74c1b268
AC
6328else
6329 echo "configure: failed program was:" >&5
6330 cat conftest.$ac_ext >&5
6331 rm -fr conftest*
97bf5e38 6332 ac_cv_func_mmap_fixed_mapped=no
74c1b268
AC
6333fi
6334rm -fr conftest*
6335fi
6336
6337fi
6338
97bf5e38
MK
6339echo "$ac_t""$ac_cv_func_mmap_fixed_mapped" 1>&6
6340if test $ac_cv_func_mmap_fixed_mapped = yes; then
74c1b268 6341 cat >> confdefs.h <<\EOF
97bf5e38 6342#define HAVE_MMAP 1
74c1b268
AC
6343EOF
6344
6345fi
6346
97bf5e38 6347echo $ac_n "checking for pid_t""... $ac_c" 1>&6
226361c4 6348echo "configure:6349: checking for pid_t" >&5
97bf5e38 6349if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then
0200359f 6350 echo $ac_n "(cached) $ac_c" 1>&6
0200359f
MK
6351else
6352 cat > conftest.$ac_ext <<EOF
226361c4 6353#line 6354 "configure"
0200359f 6354#include "confdefs.h"
97bf5e38
MK
6355#include <sys/types.h>
6356#if STDC_HEADERS
6357#include <stdlib.h>
6358#include <stddef.h>
0200359f 6359#endif
0200359f 6360EOF
97bf5e38
MK
6361if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6362 egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
6363 rm -rf conftest*
6364 ac_cv_type_pid_t=yes
0200359f 6365else
97bf5e38
MK
6366 rm -rf conftest*
6367 ac_cv_type_pid_t=no
0200359f 6368fi
97bf5e38 6369rm -f conftest*
0200359f
MK
6370
6371fi
97bf5e38
MK
6372echo "$ac_t""$ac_cv_type_pid_t" 1>&6
6373if test $ac_cv_type_pid_t = no; then
0200359f 6374 cat >> confdefs.h <<\EOF
97bf5e38 6375#define pid_t int
0200359f
MK
6376EOF
6377
6378fi
6379
97bf5e38
MK
6380ac_safe=`echo "vfork.h" | sed 'y%./+-%__p_%'`
6381echo $ac_n "checking for vfork.h""... $ac_c" 1>&6
226361c4 6382echo "configure:6383: checking for vfork.h" >&5
97bf5e38 6383if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
72473524
DJ
6384 echo $ac_n "(cached) $ac_c" 1>&6
6385else
6386 cat > conftest.$ac_ext <<EOF
226361c4 6387#line 6388 "configure"
72473524 6388#include "confdefs.h"
97bf5e38 6389#include <vfork.h>
72473524 6390EOF
97bf5e38 6391ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
226361c4 6392{ (eval echo configure:6393: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
97bf5e38
MK
6393ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6394if test -z "$ac_err"; then
72473524 6395 rm -rf conftest*
97bf5e38 6396 eval "ac_cv_header_$ac_safe=yes"
72473524 6397else
97bf5e38 6398 echo "$ac_err" >&5
72473524
DJ
6399 echo "configure: failed program was:" >&5
6400 cat conftest.$ac_ext >&5
6401 rm -rf conftest*
97bf5e38 6402 eval "ac_cv_header_$ac_safe=no"
72473524
DJ
6403fi
6404rm -f conftest*
6405fi
97bf5e38
MK
6406if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6407 echo "$ac_t""yes" 1>&6
72473524 6408 cat >> confdefs.h <<\EOF
97bf5e38 6409#define HAVE_VFORK_H 1
72473524
DJ
6410EOF
6411
97bf5e38
MK
6412else
6413 echo "$ac_t""no" 1>&6
72473524 6414fi
c906108c 6415
97bf5e38 6416echo $ac_n "checking for working vfork""... $ac_c" 1>&6
226361c4 6417echo "configure:6418: checking for working vfork" >&5
97bf5e38
MK
6418if eval "test \"`echo '$''{'ac_cv_func_vfork_works'+set}'`\" = set"; then
6419 echo $ac_n "(cached) $ac_c" 1>&6
6420else
6421 if test "$cross_compiling" = yes; then
6422 echo $ac_n "checking for vfork""... $ac_c" 1>&6
226361c4 6423echo "configure:6424: checking for vfork" >&5
97bf5e38 6424if eval "test \"`echo '$''{'ac_cv_func_vfork'+set}'`\" = set"; then
2b2d558c
MK
6425 echo $ac_n "(cached) $ac_c" 1>&6
6426else
6427 cat > conftest.$ac_ext <<EOF
226361c4 6428#line 6429 "configure"
2b2d558c 6429#include "confdefs.h"
97bf5e38
MK
6430/* System header to define __stub macros and hopefully few prototypes,
6431 which can conflict with char vfork(); below. */
6432#include <assert.h>
6433/* Override any gcc2 internal prototype to avoid an error. */
6434/* We use char because int might match the return type of a gcc2
6435 builtin and then its argument prototype would still apply. */
6436char vfork();
2b2d558c
MK
6437
6438int main() {
97bf5e38
MK
6439
6440/* The GNU C library defines this for functions which it implements
6441 to always fail with ENOSYS. Some functions are actually named
6442 something starting with __ and the normal name is an alias. */
6443#if defined (__stub_vfork) || defined (__stub___vfork)
6444choke me
6445#else
6446vfork();
6447#endif
6448
2b2d558c
MK
6449; return 0; }
6450EOF
226361c4 6451if { (eval echo configure:6452: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2b2d558c 6452 rm -rf conftest*
97bf5e38 6453 eval "ac_cv_func_vfork=yes"
2b2d558c
MK
6454else
6455 echo "configure: failed program was:" >&5
6456 cat conftest.$ac_ext >&5
6457 rm -rf conftest*
97bf5e38 6458 eval "ac_cv_func_vfork=no"
2b2d558c
MK
6459fi
6460rm -f conftest*
6461fi
6462
97bf5e38
MK
6463if eval "test \"`echo '$ac_cv_func_'vfork`\" = yes"; then
6464 echo "$ac_t""yes" 1>&6
6465 :
6466else
6467 echo "$ac_t""no" 1>&6
2b2d558c
MK
6468fi
6469
97bf5e38 6470ac_cv_func_vfork_works=$ac_cv_func_vfork
7dfa765c
MK
6471else
6472 cat > conftest.$ac_ext <<EOF
226361c4 6473#line 6474 "configure"
7dfa765c 6474#include "confdefs.h"
97bf5e38
MK
6475/* Thanks to Paul Eggert for this test. */
6476#include <stdio.h>
6477#include <sys/types.h>
6478#include <sys/stat.h>
6479#ifdef HAVE_UNISTD_H
6480#include <unistd.h>
6481#endif
6482#ifdef HAVE_VFORK_H
6483#include <vfork.h>
6484#endif
6485/* On some sparc systems, changes by the child to local and incoming
6486 argument registers are propagated back to the parent.
6487 The compiler is told about this with #include <vfork.h>,
6488 but some compilers (e.g. gcc -O) don't grok <vfork.h>.
6489 Test for this by using a static variable whose address
6490 is put into a register that is clobbered by the vfork. */
6491static
6492#ifdef __cplusplus
6493sparc_address_test (int arg)
6494#else
6495sparc_address_test (arg) int arg;
6496#endif
6497{
6498 static pid_t child;
6499 if (!child) {
6500 child = vfork ();
6501 if (child < 0) {
6502 perror ("vfork");
6503 _exit(2);
6504 }
6505 if (!child) {
6506 arg = getpid();
6507 write(-1, "", 0);
6508 _exit (arg);
6509 }
6510 }
6511}
6512main() {
6513 pid_t parent = getpid ();
6514 pid_t child;
7dfa765c 6515
97bf5e38 6516 sparc_address_test ();
7dfa765c 6517
97bf5e38 6518 child = vfork ();
7dfa765c 6519
97bf5e38
MK
6520 if (child == 0) {
6521 /* Here is another test for sparc vfork register problems.
6522 This test uses lots of local variables, at least
6523 as many local variables as main has allocated so far
6524 including compiler temporaries. 4 locals are enough for
6525 gcc 1.40.3 on a Solaris 4.1.3 sparc, but we use 8 to be safe.
6526 A buggy compiler should reuse the register of parent
6527 for one of the local variables, since it will think that
6528 parent can't possibly be used any more in this routine.
6529 Assigning to the local variable will thus munge parent
6530 in the parent process. */
6531 pid_t
6532 p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
6533 p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
6534 /* Convince the compiler that p..p7 are live; otherwise, it might
6535 use the same hardware register for all 8 local variables. */
6536 if (p != p1 || p != p2 || p != p3 || p != p4
6537 || p != p5 || p != p6 || p != p7)
6538 _exit(1);
7dfa765c 6539
97bf5e38
MK
6540 /* On some systems (e.g. IRIX 3.3),
6541 vfork doesn't separate parent from child file descriptors.
6542 If the child closes a descriptor before it execs or exits,
6543 this munges the parent's descriptor as well.
6544 Test for this by closing stdout in the child. */
6545 _exit(close(fileno(stdout)) != 0);
6546 } else {
6547 int status;
6548 struct stat st;
64bb1671 6549
97bf5e38
MK
6550 while (wait(&status) != child)
6551 ;
6552 exit(
6553 /* Was there some problem with vforking? */
6554 child < 0
64bb1671 6555
97bf5e38
MK
6556 /* Did the child fail? (This shouldn't happen.) */
6557 || status
64bb1671 6558
97bf5e38
MK
6559 /* Did the vfork/compiler bug occur? */
6560 || parent != getpid()
6561
6562 /* Did the file descriptor bug occur? */
6563 || fstat(fileno(stdout), &st) != 0
6564 );
6565 }
6566}
5c44784c 6567EOF
226361c4 6568if { (eval echo configure:6569: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
97bf5e38
MK
6569then
6570 ac_cv_func_vfork_works=yes
5c44784c
JM
6571else
6572 echo "configure: failed program was:" >&5
6573 cat conftest.$ac_ext >&5
97bf5e38
MK
6574 rm -fr conftest*
6575 ac_cv_func_vfork_works=no
5c44784c 6576fi
97bf5e38 6577rm -fr conftest*
5c44784c
JM
6578fi
6579
0afdd437
MK
6580fi
6581
97bf5e38
MK
6582echo "$ac_t""$ac_cv_func_vfork_works" 1>&6
6583if test $ac_cv_func_vfork_works = no; then
0afdd437 6584 cat >> confdefs.h <<\EOF
97bf5e38 6585#define vfork fork
0afdd437
MK
6586EOF
6587
6588fi
6589
97bf5e38
MK
6590for ac_func in canonicalize_file_name realpath
6591do
6592echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
226361c4 6593echo "configure:6594: checking for $ac_func" >&5
97bf5e38 6594if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7e89e357
JT
6595 echo $ac_n "(cached) $ac_c" 1>&6
6596else
6597 cat > conftest.$ac_ext <<EOF
226361c4 6598#line 6599 "configure"
7e89e357 6599#include "confdefs.h"
97bf5e38
MK
6600/* System header to define __stub macros and hopefully few prototypes,
6601 which can conflict with char $ac_func(); below. */
6602#include <assert.h>
6603/* Override any gcc2 internal prototype to avoid an error. */
6604/* We use char because int might match the return type of a gcc2
6605 builtin and then its argument prototype would still apply. */
6606char $ac_func();
6607
7e89e357 6608int main() {
97bf5e38
MK
6609
6610/* The GNU C library defines this for functions which it implements
6611 to always fail with ENOSYS. Some functions are actually named
6612 something starting with __ and the normal name is an alias. */
6613#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6614choke me
6615#else
6616$ac_func();
6617#endif
6618
7e89e357
JT
6619; return 0; }
6620EOF
226361c4 6621if { (eval echo configure:6622: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7e89e357 6622 rm -rf conftest*
97bf5e38 6623 eval "ac_cv_func_$ac_func=yes"
7e89e357
JT
6624else
6625 echo "configure: failed program was:" >&5
6626 cat conftest.$ac_ext >&5
6627 rm -rf conftest*
97bf5e38 6628 eval "ac_cv_func_$ac_func=no"
7e89e357
JT
6629fi
6630rm -f conftest*
6631fi
6632
97bf5e38
MK
6633if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6634 echo "$ac_t""yes" 1>&6
6635 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6636 cat >> confdefs.h <<EOF
6637#define $ac_tr_func 1
7e89e357 6638EOF
97bf5e38
MK
6639
6640else
6641 echo "$ac_t""no" 1>&6
7e89e357 6642fi
97bf5e38 6643done
7e89e357 6644
97bf5e38 6645for ac_func in poll
7be570e7
JM
6646do
6647echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
226361c4 6648echo "configure:6649: checking for $ac_func" >&5
7be570e7
JM
6649if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6650 echo $ac_n "(cached) $ac_c" 1>&6
6651else
6652 cat > conftest.$ac_ext <<EOF
226361c4 6653#line 6654 "configure"
7be570e7
JM
6654#include "confdefs.h"
6655/* System header to define __stub macros and hopefully few prototypes,
6656 which can conflict with char $ac_func(); below. */
6657#include <assert.h>
6658/* Override any gcc2 internal prototype to avoid an error. */
6659/* We use char because int might match the return type of a gcc2
6660 builtin and then its argument prototype would still apply. */
6661char $ac_func();
6662
6663int main() {
6664
6665/* The GNU C library defines this for functions which it implements
6666 to always fail with ENOSYS. Some functions are actually named
6667 something starting with __ and the normal name is an alias. */
6668#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6669choke me
6670#else
6671$ac_func();
6672#endif
6673
6674; return 0; }
6675EOF
226361c4 6676if { (eval echo configure:6677: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14abd0fb
MK
6677 rm -rf conftest*
6678 eval "ac_cv_func_$ac_func=yes"
6679else
6680 echo "configure: failed program was:" >&5
6681 cat conftest.$ac_ext >&5
6682 rm -rf conftest*
6683 eval "ac_cv_func_$ac_func=no"
6684fi
6685rm -f conftest*
6686fi
6687
6688if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6689 echo "$ac_t""yes" 1>&6
6690 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6691 cat >> confdefs.h <<EOF
6692#define $ac_tr_func 1
6693EOF
6694
6695else
6696 echo "$ac_t""no" 1>&6
6697fi
6698done
6699
6700for ac_func in pread64
6701do
6702echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
226361c4 6703echo "configure:6704: checking for $ac_func" >&5
14abd0fb
MK
6704if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6705 echo $ac_n "(cached) $ac_c" 1>&6
6706else
6707 cat > conftest.$ac_ext <<EOF
226361c4 6708#line 6709 "configure"
14abd0fb
MK
6709#include "confdefs.h"
6710/* System header to define __stub macros and hopefully few prototypes,
6711 which can conflict with char $ac_func(); below. */
6712#include <assert.h>
6713/* Override any gcc2 internal prototype to avoid an error. */
6714/* We use char because int might match the return type of a gcc2
6715 builtin and then its argument prototype would still apply. */
6716char $ac_func();
6717
6718int main() {
6719
6720/* The GNU C library defines this for functions which it implements
6721 to always fail with ENOSYS. Some functions are actually named
6722 something starting with __ and the normal name is an alias. */
6723#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6724choke me
6725#else
6726$ac_func();
6727#endif
6728
6729; return 0; }
6730EOF
226361c4 6731if { (eval echo configure:6732: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7be570e7
JM
6732 rm -rf conftest*
6733 eval "ac_cv_func_$ac_func=yes"
6734else
6735 echo "configure: failed program was:" >&5
6736 cat conftest.$ac_ext >&5
6737 rm -rf conftest*
6738 eval "ac_cv_func_$ac_func=no"
6739fi
6740rm -f conftest*
6741fi
6742
6743if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6744 echo "$ac_t""yes" 1>&6
6745 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6746 cat >> confdefs.h <<EOF
6747#define $ac_tr_func 1
6748EOF
6749
6750else
6751 echo "$ac_t""no" 1>&6
6752fi
6753done
6754
97bf5e38
MK
6755for ac_func in sbrk
6756do
6757echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
226361c4 6758echo "configure:6759: checking for $ac_func" >&5
97bf5e38 6759if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
c906108c
SS
6760 echo $ac_n "(cached) $ac_c" 1>&6
6761else
6762 cat > conftest.$ac_ext <<EOF
226361c4 6763#line 6764 "configure"
c906108c 6764#include "confdefs.h"
97bf5e38
MK
6765/* System header to define __stub macros and hopefully few prototypes,
6766 which can conflict with char $ac_func(); below. */
6767#include <assert.h>
6768/* Override any gcc2 internal prototype to avoid an error. */
6769/* We use char because int might match the return type of a gcc2
6770 builtin and then its argument prototype would still apply. */
6771char $ac_func();
c906108c 6772
97bf5e38
MK
6773int main() {
6774
6775/* The GNU C library defines this for functions which it implements
6776 to always fail with ENOSYS. Some functions are actually named
6777 something starting with __ and the normal name is an alias. */
6778#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6779choke me
c906108c 6780#else
97bf5e38 6781$ac_func();
c906108c 6782#endif
97bf5e38 6783
c906108c
SS
6784; return 0; }
6785EOF
226361c4 6786if { (eval echo configure:6787: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c 6787 rm -rf conftest*
97bf5e38 6788 eval "ac_cv_func_$ac_func=yes"
c906108c
SS
6789else
6790 echo "configure: failed program was:" >&5
6791 cat conftest.$ac_ext >&5
6792 rm -rf conftest*
97bf5e38 6793 eval "ac_cv_func_$ac_func=no"
c906108c
SS
6794fi
6795rm -f conftest*
6796fi
6797
97bf5e38
MK
6798if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6799 echo "$ac_t""yes" 1>&6
6800 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6801 cat >> confdefs.h <<EOF
6802#define $ac_tr_func 1
c906108c 6803EOF
97bf5e38
MK
6804
6805else
6806 echo "$ac_t""no" 1>&6
c906108c 6807fi
97bf5e38 6808done
c906108c 6809
97bf5e38
MK
6810for ac_func in setpgid setpgrp
6811do
6812echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
226361c4 6813echo "configure:6814: checking for $ac_func" >&5
97bf5e38 6814if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
c906108c
SS
6815 echo $ac_n "(cached) $ac_c" 1>&6
6816else
6817 cat > conftest.$ac_ext <<EOF
226361c4 6818#line 6819 "configure"
c906108c 6819#include "confdefs.h"
97bf5e38
MK
6820/* System header to define __stub macros and hopefully few prototypes,
6821 which can conflict with char $ac_func(); below. */
6822#include <assert.h>
6823/* Override any gcc2 internal prototype to avoid an error. */
6824/* We use char because int might match the return type of a gcc2
6825 builtin and then its argument prototype would still apply. */
6826char $ac_func();
c906108c 6827
97bf5e38
MK
6828int main() {
6829
6830/* The GNU C library defines this for functions which it implements
6831 to always fail with ENOSYS. Some functions are actually named
6832 something starting with __ and the normal name is an alias. */
6833#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6834choke me
c906108c 6835#else
97bf5e38 6836$ac_func();
c906108c 6837#endif
97bf5e38 6838
c906108c
SS
6839; return 0; }
6840EOF
226361c4 6841if { (eval echo configure:6842: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c 6842 rm -rf conftest*
97bf5e38 6843 eval "ac_cv_func_$ac_func=yes"
c906108c
SS
6844else
6845 echo "configure: failed program was:" >&5
6846 cat conftest.$ac_ext >&5
6847 rm -rf conftest*
97bf5e38 6848 eval "ac_cv_func_$ac_func=no"
c906108c
SS
6849fi
6850rm -f conftest*
6851fi
6852
97bf5e38
MK
6853if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6854 echo "$ac_t""yes" 1>&6
6855 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6856 cat >> confdefs.h <<EOF
6857#define $ac_tr_func 1
c906108c 6858EOF
97bf5e38
MK
6859
6860else
6861 echo "$ac_t""no" 1>&6
c906108c 6862fi
97bf5e38 6863done
c906108c 6864
e1ea1d75 6865for ac_func in sigaction sigprocmask sigsetmask
97bf5e38
MK
6866do
6867echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
226361c4 6868echo "configure:6869: checking for $ac_func" >&5
97bf5e38 6869if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
c906108c
SS
6870 echo $ac_n "(cached) $ac_c" 1>&6
6871else
6872 cat > conftest.$ac_ext <<EOF
226361c4 6873#line 6874 "configure"
c906108c 6874#include "confdefs.h"
97bf5e38
MK
6875/* System header to define __stub macros and hopefully few prototypes,
6876 which can conflict with char $ac_func(); below. */
6877#include <assert.h>
6878/* Override any gcc2 internal prototype to avoid an error. */
6879/* We use char because int might match the return type of a gcc2
6880 builtin and then its argument prototype would still apply. */
6881char $ac_func();
c906108c 6882
97bf5e38
MK
6883int main() {
6884
6885/* The GNU C library defines this for functions which it implements
6886 to always fail with ENOSYS. Some functions are actually named
6887 something starting with __ and the normal name is an alias. */
6888#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6889choke me
c906108c 6890#else
97bf5e38 6891$ac_func();
c906108c 6892#endif
97bf5e38 6893
c906108c
SS
6894; return 0; }
6895EOF
226361c4 6896if { (eval echo configure:6897: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c 6897 rm -rf conftest*
97bf5e38 6898 eval "ac_cv_func_$ac_func=yes"
c906108c
SS
6899else
6900 echo "configure: failed program was:" >&5
6901 cat conftest.$ac_ext >&5
6902 rm -rf conftest*
97bf5e38 6903 eval "ac_cv_func_$ac_func=no"
c906108c
SS
6904fi
6905rm -f conftest*
6906fi
6907
97bf5e38
MK
6908if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6909 echo "$ac_t""yes" 1>&6
6910 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6911 cat >> confdefs.h <<EOF
6912#define $ac_tr_func 1
c906108c 6913EOF
e1ea1d75 6914
97bf5e38
MK
6915else
6916 echo "$ac_t""no" 1>&6
c906108c 6917fi
97bf5e38 6918done
c906108c 6919
97bf5e38
MK
6920for ac_func in socketpair
6921do
6922echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
226361c4 6923echo "configure:6924: checking for $ac_func" >&5
97bf5e38 6924if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
c906108c
SS
6925 echo $ac_n "(cached) $ac_c" 1>&6
6926else
6927 cat > conftest.$ac_ext <<EOF
226361c4 6928#line 6929 "configure"
c906108c 6929#include "confdefs.h"
97bf5e38
MK
6930/* System header to define __stub macros and hopefully few prototypes,
6931 which can conflict with char $ac_func(); below. */
6932#include <assert.h>
6933/* Override any gcc2 internal prototype to avoid an error. */
6934/* We use char because int might match the return type of a gcc2
6935 builtin and then its argument prototype would still apply. */
6936char $ac_func();
c906108c 6937
97bf5e38
MK
6938int main() {
6939
6940/* The GNU C library defines this for functions which it implements
6941 to always fail with ENOSYS. Some functions are actually named
6942 something starting with __ and the normal name is an alias. */
6943#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6944choke me
c906108c 6945#else
97bf5e38 6946$ac_func();
c906108c 6947#endif
97bf5e38 6948
c906108c
SS
6949; return 0; }
6950EOF
226361c4 6951if { (eval echo configure:6952: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c 6952 rm -rf conftest*
97bf5e38 6953 eval "ac_cv_func_$ac_func=yes"
c906108c
SS
6954else
6955 echo "configure: failed program was:" >&5
6956 cat conftest.$ac_ext >&5
6957 rm -rf conftest*
97bf5e38 6958 eval "ac_cv_func_$ac_func=no"
c906108c
SS
6959fi
6960rm -f conftest*
6961fi
6962
97bf5e38
MK
6963if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6964 echo "$ac_t""yes" 1>&6
6965 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6966 cat >> confdefs.h <<EOF
6967#define $ac_tr_func 1
c906108c 6968EOF
97bf5e38
MK
6969
6970else
6971 echo "$ac_t""no" 1>&6
c906108c 6972fi
97bf5e38 6973done
c906108c 6974
b757528f
JJ
6975for ac_func in syscall
6976do
6977echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
226361c4 6978echo "configure:6979: checking for $ac_func" >&5
b757528f
JJ
6979if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6980 echo $ac_n "(cached) $ac_c" 1>&6
6981else
6982 cat > conftest.$ac_ext <<EOF
226361c4 6983#line 6984 "configure"
b757528f
JJ
6984#include "confdefs.h"
6985/* System header to define __stub macros and hopefully few prototypes,
6986 which can conflict with char $ac_func(); below. */
6987#include <assert.h>
6988/* Override any gcc2 internal prototype to avoid an error. */
6989/* We use char because int might match the return type of a gcc2
6990 builtin and then its argument prototype would still apply. */
6991char $ac_func();
6992
6993int main() {
6994
6995/* The GNU C library defines this for functions which it implements
6996 to always fail with ENOSYS. Some functions are actually named
6997 something starting with __ and the normal name is an alias. */
6998#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6999choke me
7000#else
7001$ac_func();
7002#endif
7003
7004; return 0; }
7005EOF
226361c4 7006if { (eval echo configure:7007: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
b757528f
JJ
7007 rm -rf conftest*
7008 eval "ac_cv_func_$ac_func=yes"
7009else
7010 echo "configure: failed program was:" >&5
7011 cat conftest.$ac_ext >&5
7012 rm -rf conftest*
7013 eval "ac_cv_func_$ac_func=no"
7014fi
7015rm -f conftest*
7016fi
7017
7018if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7019 echo "$ac_t""yes" 1>&6
7020 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7021 cat >> confdefs.h <<EOF
7022#define $ac_tr_func 1
7023EOF
7024
7025else
7026 echo "$ac_t""no" 1>&6
7027fi
7028done
7029
97bf5e38
MK
7030
7031if test "$cross_compiling" = no; then
7032 echo $ac_n "checking whether setpgrp takes no argument""... $ac_c" 1>&6
226361c4 7033echo "configure:7034: checking whether setpgrp takes no argument" >&5
97bf5e38 7034if eval "test \"`echo '$''{'ac_cv_func_setpgrp_void'+set}'`\" = set"; then
c906108c 7035 echo $ac_n "(cached) $ac_c" 1>&6
97bf5e38
MK
7036else
7037 if test "$cross_compiling" = yes; then
7038 { echo "configure: error: cannot check setpgrp if cross compiling" 1>&2; exit 1; }
c906108c
SS
7039else
7040 cat > conftest.$ac_ext <<EOF
226361c4 7041#line 7042 "configure"
c906108c
SS
7042#include "confdefs.h"
7043
c906108c
SS
7044#ifdef HAVE_UNISTD_H
7045#include <unistd.h>
7046#endif
97bf5e38
MK
7047
7048/*
7049 * If this system has a BSD-style setpgrp, which takes arguments, exit
7050 * successfully.
7051 */
7052main()
7053{
7054 if (setpgrp(1,1) == -1)
7055 exit(0);
7056 else
7057 exit(1);
7058}
7059
c906108c 7060EOF
226361c4 7061if { (eval echo configure:7062: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
97bf5e38
MK
7062then
7063 ac_cv_func_setpgrp_void=no
c906108c
SS
7064else
7065 echo "configure: failed program was:" >&5
7066 cat conftest.$ac_ext >&5
97bf5e38
MK
7067 rm -fr conftest*
7068 ac_cv_func_setpgrp_void=yes
c906108c 7069fi
97bf5e38 7070rm -fr conftest*
c906108c
SS
7071fi
7072
97bf5e38
MK
7073
7074fi
7075
7076echo "$ac_t""$ac_cv_func_setpgrp_void" 1>&6
7077if test $ac_cv_func_setpgrp_void = yes; then
7078 cat >> confdefs.h <<\EOF
7079#define SETPGRP_VOID 1
c906108c
SS
7080EOF
7081
7082fi
7083
97bf5e38
MK
7084else
7085 echo $ac_n "checking whether setpgrp takes no argument""... $ac_c" 1>&6
226361c4 7086echo "configure:7087: checking whether setpgrp takes no argument" >&5
97bf5e38 7087if eval "test \"`echo '$''{'ac_cv_func_setpgrp_void'+set}'`\" = set"; then
b83266a0
SS
7088 echo $ac_n "(cached) $ac_c" 1>&6
7089else
7090 cat > conftest.$ac_ext <<EOF
226361c4 7091#line 7092 "configure"
b83266a0
SS
7092#include "confdefs.h"
7093
b83266a0 7094#include <unistd.h>
97bf5e38 7095
b83266a0 7096int main() {
97bf5e38
MK
7097
7098 if (setpgrp(1,1) == -1)
7099 exit (0);
7100 else
7101 exit (1);
7102
b83266a0
SS
7103; return 0; }
7104EOF
226361c4 7105if { (eval echo configure:7106: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
b83266a0 7106 rm -rf conftest*
97bf5e38 7107 ac_cv_func_setpgrp_void=no
b83266a0
SS
7108else
7109 echo "configure: failed program was:" >&5
7110 cat conftest.$ac_ext >&5
7111 rm -rf conftest*
97bf5e38 7112 ac_cv_func_setpgrp_void=yes
b83266a0
SS
7113fi
7114rm -f conftest*
7115fi
7116
97bf5e38
MK
7117echo "$ac_t""$ac_cv_func_setpgrp_void" 1>&6
7118if test $ac_cv_func_setpgrp_void = yes; then
b83266a0 7119 cat >> confdefs.h <<\EOF
97bf5e38 7120#define SETPGRP_VOID 1
b83266a0
SS
7121EOF
7122
97bf5e38 7123fi
b83266a0
SS
7124fi
7125
97bf5e38
MK
7126# Check if sigsetjmp is available. Using AC_CHECK_FUNCS won't do
7127# since sigsetjmp might only be defined as a macro.
7128echo $ac_n "checking for sigsetjmp""... $ac_c" 1>&6
226361c4 7129echo "configure:7130: checking for sigsetjmp" >&5
97bf5e38 7130if eval "test \"`echo '$''{'gdb_cv_func_sigsetjmp'+set}'`\" = set"; then
a4db0f07
RH
7131 echo $ac_n "(cached) $ac_c" 1>&6
7132else
7133 cat > conftest.$ac_ext <<EOF
226361c4 7134#line 7135 "configure"
a4db0f07
RH
7135#include "confdefs.h"
7136
97bf5e38
MK
7137#include <setjmp.h>
7138
a4db0f07 7139int main() {
97bf5e38 7140sigjmp_buf env; while (! sigsetjmp (env, 1)) siglongjmp (env, 1);
a4db0f07
RH
7141; return 0; }
7142EOF
226361c4 7143if { (eval echo configure:7144: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
a4db0f07 7144 rm -rf conftest*
97bf5e38 7145 gdb_cv_func_sigsetjmp=yes
a4db0f07
RH
7146else
7147 echo "configure: failed program was:" >&5
7148 cat conftest.$ac_ext >&5
7149 rm -rf conftest*
97bf5e38 7150 gdb_cv_func_sigsetjmp=no
a4db0f07
RH
7151fi
7152rm -f conftest*
7153fi
7154
97bf5e38
MK
7155echo "$ac_t""$gdb_cv_func_sigsetjmp" 1>&6
7156if test $gdb_cv_func_sigsetjmp = yes; then
a4db0f07 7157 cat >> confdefs.h <<\EOF
97bf5e38 7158#define HAVE_SIGSETJMP 1
a4db0f07
RH
7159EOF
7160
7161fi
c906108c 7162
06825bd1
MK
7163# Assume we'll default to using the included libiberty regex.
7164gdb_use_included_regex=yes
7165
7166# However, if the system regex is GNU regex, then default to *not*
7167# using the included regex.
7168echo $ac_n "checking for GNU regex""... $ac_c" 1>&6
226361c4 7169echo "configure:7170: checking for GNU regex" >&5
06825bd1
MK
7170if eval "test \"`echo '$''{'gdb_cv_have_gnu_regex'+set}'`\" = set"; then
7171 echo $ac_n "(cached) $ac_c" 1>&6
7172else
7173 cat > conftest.$ac_ext <<EOF
226361c4 7174#line 7175 "configure"
06825bd1
MK
7175#include "confdefs.h"
7176#include <gnu-versions.h>
7177int main() {
7178#define REGEX_INTERFACE_VERSION 1
7179#if _GNU_REGEX_INTERFACE_VERSION != REGEX_INTERFACE_VERSION
7180# error "Version mismatch"
7181#endif
7182; return 0; }
7183EOF
226361c4 7184if { (eval echo configure:7185: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
06825bd1
MK
7185 rm -rf conftest*
7186 gdb_cv_have_gnu_regex=yes
7187else
7188 echo "configure: failed program was:" >&5
7189 cat conftest.$ac_ext >&5
7190 rm -rf conftest*
7191 gdb_cv_have_gnu_regex=no
7192fi
7193rm -f conftest*
7194fi
7195
7196echo "$ac_t""$gdb_cv_have_gnu_regex" 1>&6
7197if test $gdb_cv_have_gnu_regex = yes; then
7198 gdb_use_included_regex=no
7199fi
7200
7201# Check whether --with-included-regex or --without-included-regex was given.
7202if test "${with_included_regex+set}" = set; then
7203 withval="$with_included_regex"
7204 gdb_with_regex=$withval
7205else
7206 gdb_with_regex=$gdb_use_included_regex
7207fi
7208
7209if test "$gdb_with_regex" = yes; then
7210 cat >> confdefs.h <<\EOF
7211#define USE_INCLUDED_REGEX 1
7212EOF
7213
7214fi
7215
78434e59
MK
7216# See if <machine/reg.h> degines `struct reg'.
7217echo $ac_n "checking for struct reg in machine/reg.h""... $ac_c" 1>&6
226361c4 7218echo "configure:7219: checking for struct reg in machine/reg.h" >&5
78434e59
MK
7219if eval "test \"`echo '$''{'gdb_cv_struct_reg'+set}'`\" = set"; then
7220 echo $ac_n "(cached) $ac_c" 1>&6
7221else
7222 cat > conftest.$ac_ext <<EOF
226361c4 7223#line 7224 "configure"
78434e59
MK
7224#include "confdefs.h"
7225#include <sys/types.h>
7226#include <machine/reg.h>
7227int main() {
7228struct reg r;
7229; return 0; }
7230EOF
226361c4 7231if { (eval echo configure:7232: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
78434e59
MK
7232 rm -rf conftest*
7233 gdb_cv_struct_reg=yes
7234else
7235 echo "configure: failed program was:" >&5
7236 cat conftest.$ac_ext >&5
7237 rm -rf conftest*
7238 gdb_cv_struct_reg=no
7239fi
7240rm -f conftest*
7241fi
7242
7243echo "$ac_t""$gdb_cv_struct_reg" 1>&6
7244if test $gdb_cv_struct_reg = yes; then
7245 cat >> confdefs.h <<\EOF
7246#define HAVE_STRUCT_REG 1
7247EOF
7248
7249fi
7250
97bf5e38
MK
7251# See if <machine/reg.h> supports the %fs and %gs i386 segment registers.
7252# Older i386 BSD's don't have the r_fs and r_gs members of `struct reg'.
7253echo $ac_n "checking for r_fs in struct reg""... $ac_c" 1>&6
226361c4 7254echo "configure:7255: checking for r_fs in struct reg" >&5
97bf5e38
MK
7255if eval "test \"`echo '$''{'gdb_cv_struct_reg_r_fs'+set}'`\" = set"; then
7256 echo $ac_n "(cached) $ac_c" 1>&6
7257else
7258 cat > conftest.$ac_ext <<EOF
226361c4 7259#line 7260 "configure"
c906108c 7260#include "confdefs.h"
97bf5e38
MK
7261#include <machine/reg.h>
7262int main() {
7263struct reg r; r.r_fs;
7264; return 0; }
c906108c 7265EOF
226361c4 7266if { (eval echo configure:7267: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c 7267 rm -rf conftest*
97bf5e38 7268 gdb_cv_struct_reg_r_fs=yes
c906108c 7269else
97bf5e38
MK
7270 echo "configure: failed program was:" >&5
7271 cat conftest.$ac_ext >&5
c906108c 7272 rm -rf conftest*
97bf5e38 7273 gdb_cv_struct_reg_r_fs=no
c906108c
SS
7274fi
7275rm -f conftest*
97bf5e38 7276fi
c906108c 7277
97bf5e38
MK
7278echo "$ac_t""$gdb_cv_struct_reg_r_fs" 1>&6
7279if test $gdb_cv_struct_reg_r_fs = yes; then
7280 cat >> confdefs.h <<\EOF
7281#define HAVE_STRUCT_REG_R_FS 1
7282EOF
7283
7284fi
7285echo $ac_n "checking for r_gs in struct reg""... $ac_c" 1>&6
226361c4 7286echo "configure:7287: checking for r_gs in struct reg" >&5
97bf5e38
MK
7287if eval "test \"`echo '$''{'gdb_cv_struct_reg_r_gs'+set}'`\" = set"; then
7288 echo $ac_n "(cached) $ac_c" 1>&6
7289else
7290 cat > conftest.$ac_ext <<EOF
226361c4 7291#line 7292 "configure"
c906108c 7292#include "confdefs.h"
97bf5e38
MK
7293#include <machine/reg.h>
7294int main() {
7295struct reg r; r.r_gs;
7296; return 0; }
c906108c 7297EOF
226361c4 7298if { (eval echo configure:7299: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c 7299 rm -rf conftest*
97bf5e38 7300 gdb_cv_struct_reg_r_gs=yes
c906108c 7301else
97bf5e38
MK
7302 echo "configure: failed program was:" >&5
7303 cat conftest.$ac_ext >&5
c906108c 7304 rm -rf conftest*
97bf5e38 7305 gdb_cv_struct_reg_r_gs=no
c906108c
SS
7306fi
7307rm -f conftest*
c906108c 7308fi
c906108c 7309
97bf5e38
MK
7310echo "$ac_t""$gdb_cv_struct_reg_r_gs" 1>&6
7311if test $gdb_cv_struct_reg_r_gs = yes; then
7312 cat >> confdefs.h <<\EOF
7313#define HAVE_STRUCT_REG_R_GS 1
c3f6f71d
JM
7314EOF
7315
c906108c
SS
7316fi
7317
97bf5e38
MK
7318# See if <sys/ptrace.h> provides the PTRACE_GETREGS request.
7319echo $ac_n "checking for PTRACE_GETREGS""... $ac_c" 1>&6
226361c4 7320echo "configure:7321: checking for PTRACE_GETREGS" >&5
97bf5e38 7321if eval "test \"`echo '$''{'gdb_cv_have_ptrace_getregs'+set}'`\" = set"; then
c906108c
SS
7322 echo $ac_n "(cached) $ac_c" 1>&6
7323else
7324 cat > conftest.$ac_ext <<EOF
226361c4 7325#line 7326 "configure"
c906108c 7326#include "confdefs.h"
97bf5e38 7327#include <sys/ptrace.h>
c906108c 7328int main() {
97bf5e38 7329PTRACE_GETREGS;
c906108c
SS
7330; return 0; }
7331EOF
226361c4 7332if { (eval echo configure:7333: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c 7333 rm -rf conftest*
97bf5e38 7334 gdb_cv_have_ptrace_getregs=yes
c906108c
SS
7335else
7336 echo "configure: failed program was:" >&5
7337 cat conftest.$ac_ext >&5
7338 rm -rf conftest*
97bf5e38 7339 gdb_cv_have_ptrace_getregs=no
c906108c
SS
7340fi
7341rm -f conftest*
7342fi
7343
97bf5e38
MK
7344echo "$ac_t""$gdb_cv_have_ptrace_getregs" 1>&6
7345if test $gdb_cv_have_ptrace_getregs = yes; then
7346 cat >> confdefs.h <<\EOF
7347#define HAVE_PTRACE_GETREGS 1
c906108c
SS
7348EOF
7349
97bf5e38 7350fi
c906108c 7351
97bf5e38
MK
7352# See if <sys/ptrace.h> provides the PTRACE_GETFPXREGS request.
7353echo $ac_n "checking for PTRACE_GETFPXREGS""... $ac_c" 1>&6
226361c4 7354echo "configure:7355: checking for PTRACE_GETFPXREGS" >&5
97bf5e38 7355if eval "test \"`echo '$''{'gdb_cv_have_ptrace_getfpxregs'+set}'`\" = set"; then
c906108c
SS
7356 echo $ac_n "(cached) $ac_c" 1>&6
7357else
7358 cat > conftest.$ac_ext <<EOF
226361c4 7359#line 7360 "configure"
c906108c 7360#include "confdefs.h"
97bf5e38 7361#include <sys/ptrace.h>
c906108c 7362int main() {
97bf5e38 7363PTRACE_GETFPXREGS;
c906108c
SS
7364; return 0; }
7365EOF
226361c4 7366if { (eval echo configure:7367: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c 7367 rm -rf conftest*
97bf5e38 7368 gdb_cv_have_ptrace_getfpxregs=yes
c906108c
SS
7369else
7370 echo "configure: failed program was:" >&5
7371 cat conftest.$ac_ext >&5
7372 rm -rf conftest*
97bf5e38 7373 gdb_cv_have_ptrace_getfpxregs=no
c906108c
SS
7374fi
7375rm -f conftest*
7376fi
7377
97bf5e38
MK
7378echo "$ac_t""$gdb_cv_have_ptrace_getfpxregs" 1>&6
7379if test $gdb_cv_have_ptrace_getfpxregs = yes; then
7380 cat >> confdefs.h <<\EOF
7381#define HAVE_PTRACE_GETFPXREGS 1
c906108c
SS
7382EOF
7383
97bf5e38 7384fi
c906108c 7385
97bf5e38
MK
7386# See if <sys/ptrace.h> provides the PT_GETDBREGS request.
7387echo $ac_n "checking for PT_GETDBREGS""... $ac_c" 1>&6
226361c4 7388echo "configure:7389: checking for PT_GETDBREGS" >&5
97bf5e38 7389if eval "test \"`echo '$''{'gdb_cv_have_pt_getdbregs'+set}'`\" = set"; then
c906108c
SS
7390 echo $ac_n "(cached) $ac_c" 1>&6
7391else
7392 cat > conftest.$ac_ext <<EOF
226361c4 7393#line 7394 "configure"
c906108c 7394#include "confdefs.h"
97bf5e38
MK
7395#include <sys/types.h>
7396#include <sys/ptrace.h>
c906108c 7397int main() {
97bf5e38 7398PT_GETDBREGS;
c906108c
SS
7399; return 0; }
7400EOF
226361c4 7401if { (eval echo configure:7402: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c 7402 rm -rf conftest*
97bf5e38 7403 gdb_cv_have_pt_getdbregs=yes
c906108c
SS
7404else
7405 echo "configure: failed program was:" >&5
7406 cat conftest.$ac_ext >&5
7407 rm -rf conftest*
97bf5e38 7408 gdb_cv_have_pt_getdbregs=no
c906108c
SS
7409fi
7410rm -f conftest*
7411fi
7412
97bf5e38
MK
7413echo "$ac_t""$gdb_cv_have_pt_getdbregs" 1>&6
7414if test $gdb_cv_have_pt_getdbregs = yes; then
7415 cat >> confdefs.h <<\EOF
7416#define HAVE_PT_GETDBREGS 1
c906108c
SS
7417EOF
7418
97bf5e38 7419fi
c906108c 7420
97bf5e38
MK
7421# See if <sys/ptrace.h> provides the PT_GETXMMREGS request.
7422echo $ac_n "checking for PT_GETXMMREGS""... $ac_c" 1>&6
226361c4 7423echo "configure:7424: checking for PT_GETXMMREGS" >&5
97bf5e38 7424if eval "test \"`echo '$''{'gdb_cv_have_pt_getxmmregs'+set}'`\" = set"; then
c906108c
SS
7425 echo $ac_n "(cached) $ac_c" 1>&6
7426else
7427 cat > conftest.$ac_ext <<EOF
226361c4 7428#line 7429 "configure"
c906108c 7429#include "confdefs.h"
97bf5e38
MK
7430#include <sys/types.h>
7431#include <sys/ptrace.h>
c906108c 7432int main() {
97bf5e38 7433PT_GETXMMREGS;
c906108c
SS
7434; return 0; }
7435EOF
226361c4 7436if { (eval echo configure:7437: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c 7437 rm -rf conftest*
97bf5e38 7438 gdb_cv_have_pt_getxmmregs=yes
c906108c
SS
7439else
7440 echo "configure: failed program was:" >&5
7441 cat conftest.$ac_ext >&5
7442 rm -rf conftest*
97bf5e38 7443 gdb_cv_have_pt_getxmmregs=no
c906108c
SS
7444fi
7445rm -f conftest*
7446fi
7447
97bf5e38
MK
7448echo "$ac_t""$gdb_cv_have_pt_getxmmregs" 1>&6
7449if test $gdb_cv_have_pt_getxmmregs = yes; then
7450 cat >> confdefs.h <<\EOF
7451#define HAVE_PT_GETXMMREGS 1
c906108c
SS
7452EOF
7453
97bf5e38 7454fi
c906108c 7455
27ca5dad 7456# See if stdint.h provides the uintptr_t type.
d3e0a5bf 7457# Autoconf 2.5X has an improved AC_CHECK_TYPE which will simplify this.
27ca5dad 7458echo $ac_n "checking for uintptr_t in stdint.h""... $ac_c" 1>&6
226361c4 7459echo "configure:7460: checking for uintptr_t in stdint.h" >&5
27ca5dad
MC
7460if eval "test \"`echo '$''{'gdb_cv_have_uintptr_t'+set}'`\" = set"; then
7461 echo $ac_n "(cached) $ac_c" 1>&6
7462else
7463 cat > conftest.$ac_ext <<EOF
226361c4 7464#line 7465 "configure"
27ca5dad
MC
7465#include "confdefs.h"
7466#include <stdint.h>
7467int main() {
7468uintptr_t foo = 0;
7469; return 0; }
7470EOF
226361c4 7471if { (eval echo configure:7472: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
27ca5dad
MC
7472 rm -rf conftest*
7473 gdb_cv_have_uintptr_t=yes
7474else
7475 echo "configure: failed program was:" >&5
7476 cat conftest.$ac_ext >&5
7477 rm -rf conftest*
7478 gdb_cv_have_uintptr_t=no
7479fi
7480rm -f conftest*
7481fi
7482
7483echo "$ac_t""$gdb_cv_have_uintptr_t" 1>&6
7484if test $gdb_cv_have_uintptr_t = yes; then
7485 cat >> confdefs.h <<\EOF
7486#define HAVE_UINTPTR_T 1
7487EOF
7488
7489fi
97bf5e38
MK
7490
7491echo $ac_n "checking whether malloc must be declared""... $ac_c" 1>&6
226361c4 7492echo "configure:7493: checking whether malloc must be declared" >&5
97bf5e38 7493if eval "test \"`echo '$''{'bfd_cv_decl_needed_malloc'+set}'`\" = set"; then
3862412b
MK
7494 echo $ac_n "(cached) $ac_c" 1>&6
7495else
7496 cat > conftest.$ac_ext <<EOF
226361c4 7497#line 7498 "configure"
3862412b 7498#include "confdefs.h"
e17bf198 7499
97bf5e38
MK
7500#include <stdio.h>
7501#ifdef HAVE_STRING_H
7502#include <string.h>
7503#else
7504#ifdef HAVE_STRINGS_H
7505#include <strings.h>
7506#endif
7507#endif
7508#ifdef HAVE_STDLIB_H
7509#include <stdlib.h>
7510#endif
7511#ifdef HAVE_UNISTD_H
7512#include <unistd.h>
7513#endif
3862412b 7514int main() {
97bf5e38 7515char *(*pfn) = (char *(*)) malloc
3862412b
MK
7516; return 0; }
7517EOF
226361c4 7518if { (eval echo configure:7519: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3862412b 7519 rm -rf conftest*
97bf5e38 7520 bfd_cv_decl_needed_malloc=no
3862412b
MK
7521else
7522 echo "configure: failed program was:" >&5
7523 cat conftest.$ac_ext >&5
7524 rm -rf conftest*
97bf5e38 7525 bfd_cv_decl_needed_malloc=yes
3862412b
MK
7526fi
7527rm -f conftest*
7528fi
7529
97bf5e38
MK
7530echo "$ac_t""$bfd_cv_decl_needed_malloc" 1>&6
7531if test $bfd_cv_decl_needed_malloc = yes; then
7532 cat >> confdefs.h <<\EOF
7533#define NEED_DECLARATION_MALLOC 1
3862412b
MK
7534EOF
7535
97bf5e38 7536fi
3862412b 7537
97bf5e38 7538echo $ac_n "checking whether realloc must be declared""... $ac_c" 1>&6
226361c4 7539echo "configure:7540: checking whether realloc must be declared" >&5
97bf5e38 7540if eval "test \"`echo '$''{'bfd_cv_decl_needed_realloc'+set}'`\" = set"; then
3862412b
MK
7541 echo $ac_n "(cached) $ac_c" 1>&6
7542else
7543 cat > conftest.$ac_ext <<EOF
226361c4 7544#line 7545 "configure"
3862412b 7545#include "confdefs.h"
e17bf198 7546
97bf5e38
MK
7547#include <stdio.h>
7548#ifdef HAVE_STRING_H
7549#include <string.h>
7550#else
7551#ifdef HAVE_STRINGS_H
7552#include <strings.h>
7553#endif
7554#endif
7555#ifdef HAVE_STDLIB_H
7556#include <stdlib.h>
7557#endif
7558#ifdef HAVE_UNISTD_H
7559#include <unistd.h>
7560#endif
3862412b 7561int main() {
97bf5e38 7562char *(*pfn) = (char *(*)) realloc
3862412b
MK
7563; return 0; }
7564EOF
226361c4 7565if { (eval echo configure:7566: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3862412b 7566 rm -rf conftest*
97bf5e38 7567 bfd_cv_decl_needed_realloc=no
3862412b
MK
7568else
7569 echo "configure: failed program was:" >&5
7570 cat conftest.$ac_ext >&5
7571 rm -rf conftest*
97bf5e38 7572 bfd_cv_decl_needed_realloc=yes
3862412b
MK
7573fi
7574rm -f conftest*
7575fi
7576
97bf5e38
MK
7577echo "$ac_t""$bfd_cv_decl_needed_realloc" 1>&6
7578if test $bfd_cv_decl_needed_realloc = yes; then
7579 cat >> confdefs.h <<\EOF
7580#define NEED_DECLARATION_REALLOC 1
3862412b
MK
7581EOF
7582
97bf5e38 7583fi
3862412b 7584
97bf5e38 7585echo $ac_n "checking whether free must be declared""... $ac_c" 1>&6
226361c4 7586echo "configure:7587: checking whether free must be declared" >&5
97bf5e38 7587if eval "test \"`echo '$''{'bfd_cv_decl_needed_free'+set}'`\" = set"; then
451928c5
AC
7588 echo $ac_n "(cached) $ac_c" 1>&6
7589else
7590 cat > conftest.$ac_ext <<EOF
226361c4 7591#line 7592 "configure"
451928c5 7592#include "confdefs.h"
e17bf198 7593
97bf5e38
MK
7594#include <stdio.h>
7595#ifdef HAVE_STRING_H
7596#include <string.h>
7597#else
7598#ifdef HAVE_STRINGS_H
7599#include <strings.h>
7600#endif
7601#endif
7602#ifdef HAVE_STDLIB_H
7603#include <stdlib.h>
7604#endif
7605#ifdef HAVE_UNISTD_H
7606#include <unistd.h>
7607#endif
451928c5 7608int main() {
97bf5e38 7609char *(*pfn) = (char *(*)) free
451928c5
AC
7610; return 0; }
7611EOF
226361c4 7612if { (eval echo configure:7613: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
451928c5 7613 rm -rf conftest*
97bf5e38 7614 bfd_cv_decl_needed_free=no
451928c5
AC
7615else
7616 echo "configure: failed program was:" >&5
7617 cat conftest.$ac_ext >&5
7618 rm -rf conftest*
97bf5e38 7619 bfd_cv_decl_needed_free=yes
451928c5
AC
7620fi
7621rm -f conftest*
7622fi
7623
97bf5e38
MK
7624echo "$ac_t""$bfd_cv_decl_needed_free" 1>&6
7625if test $bfd_cv_decl_needed_free = yes; then
7626 cat >> confdefs.h <<\EOF
7627#define NEED_DECLARATION_FREE 1
451928c5
AC
7628EOF
7629
97bf5e38 7630fi
451928c5 7631
97bf5e38 7632echo $ac_n "checking whether strerror must be declared""... $ac_c" 1>&6
226361c4 7633echo "configure:7634: checking whether strerror must be declared" >&5
97bf5e38 7634if eval "test \"`echo '$''{'bfd_cv_decl_needed_strerror'+set}'`\" = set"; then
451928c5
AC
7635 echo $ac_n "(cached) $ac_c" 1>&6
7636else
7637 cat > conftest.$ac_ext <<EOF
226361c4 7638#line 7639 "configure"
451928c5 7639#include "confdefs.h"
e17bf198 7640
97bf5e38
MK
7641#include <stdio.h>
7642#ifdef HAVE_STRING_H
7643#include <string.h>
7644#else
7645#ifdef HAVE_STRINGS_H
7646#include <strings.h>
7647#endif
7648#endif
7649#ifdef HAVE_STDLIB_H
7650#include <stdlib.h>
7651#endif
7652#ifdef HAVE_UNISTD_H
7653#include <unistd.h>
7654#endif
451928c5 7655int main() {
97bf5e38 7656char *(*pfn) = (char *(*)) strerror
451928c5
AC
7657; return 0; }
7658EOF
226361c4 7659if { (eval echo configure:7660: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
451928c5 7660 rm -rf conftest*
97bf5e38 7661 bfd_cv_decl_needed_strerror=no
451928c5
AC
7662else
7663 echo "configure: failed program was:" >&5
7664 cat conftest.$ac_ext >&5
7665 rm -rf conftest*
97bf5e38 7666 bfd_cv_decl_needed_strerror=yes
451928c5
AC
7667fi
7668rm -f conftest*
7669fi
7670
97bf5e38
MK
7671echo "$ac_t""$bfd_cv_decl_needed_strerror" 1>&6
7672if test $bfd_cv_decl_needed_strerror = yes; then
7673 cat >> confdefs.h <<\EOF
7674#define NEED_DECLARATION_STRERROR 1
451928c5
AC
7675EOF
7676
97bf5e38 7677fi
451928c5 7678
97bf5e38 7679echo $ac_n "checking whether strdup must be declared""... $ac_c" 1>&6
226361c4 7680echo "configure:7681: checking whether strdup must be declared" >&5
97bf5e38 7681if eval "test \"`echo '$''{'bfd_cv_decl_needed_strdup'+set}'`\" = set"; then
3862412b
MK
7682 echo $ac_n "(cached) $ac_c" 1>&6
7683else
7684 cat > conftest.$ac_ext <<EOF
226361c4 7685#line 7686 "configure"
3862412b 7686#include "confdefs.h"
e17bf198 7687
97bf5e38
MK
7688#include <stdio.h>
7689#ifdef HAVE_STRING_H
7690#include <string.h>
7691#else
7692#ifdef HAVE_STRINGS_H
7693#include <strings.h>
7694#endif
7695#endif
7696#ifdef HAVE_STDLIB_H
7697#include <stdlib.h>
7698#endif
7699#ifdef HAVE_UNISTD_H
7700#include <unistd.h>
7701#endif
3862412b 7702int main() {
97bf5e38 7703char *(*pfn) = (char *(*)) strdup
3862412b
MK
7704; return 0; }
7705EOF
226361c4 7706if { (eval echo configure:7707: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3862412b 7707 rm -rf conftest*
97bf5e38 7708 bfd_cv_decl_needed_strdup=no
3862412b
MK
7709else
7710 echo "configure: failed program was:" >&5
7711 cat conftest.$ac_ext >&5
7712 rm -rf conftest*
97bf5e38 7713 bfd_cv_decl_needed_strdup=yes
3862412b
MK
7714fi
7715rm -f conftest*
7716fi
7717
97bf5e38
MK
7718echo "$ac_t""$bfd_cv_decl_needed_strdup" 1>&6
7719if test $bfd_cv_decl_needed_strdup = yes; then
7720 cat >> confdefs.h <<\EOF
7721#define NEED_DECLARATION_STRDUP 1
3862412b
MK
7722EOF
7723
97bf5e38 7724fi
3862412b 7725
97bf5e38 7726echo $ac_n "checking whether strstr must be declared""... $ac_c" 1>&6
226361c4 7727echo "configure:7728: checking whether strstr must be declared" >&5
97bf5e38 7728if eval "test \"`echo '$''{'bfd_cv_decl_needed_strstr'+set}'`\" = set"; then
3862412b
MK
7729 echo $ac_n "(cached) $ac_c" 1>&6
7730else
7731 cat > conftest.$ac_ext <<EOF
226361c4 7732#line 7733 "configure"
3862412b 7733#include "confdefs.h"
e17bf198 7734
97bf5e38
MK
7735#include <stdio.h>
7736#ifdef HAVE_STRING_H
7737#include <string.h>
7738#else
7739#ifdef HAVE_STRINGS_H
7740#include <strings.h>
7741#endif
7742#endif
7743#ifdef HAVE_STDLIB_H
7744#include <stdlib.h>
7745#endif
7746#ifdef HAVE_UNISTD_H
7747#include <unistd.h>
7748#endif
3862412b 7749int main() {
97bf5e38 7750char *(*pfn) = (char *(*)) strstr
3862412b
MK
7751; return 0; }
7752EOF
226361c4 7753if { (eval echo configure:7754: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3862412b 7754 rm -rf conftest*
97bf5e38 7755 bfd_cv_decl_needed_strstr=no
3862412b
MK
7756else
7757 echo "configure: failed program was:" >&5
7758 cat conftest.$ac_ext >&5
7759 rm -rf conftest*
97bf5e38 7760 bfd_cv_decl_needed_strstr=yes
3862412b
MK
7761fi
7762rm -f conftest*
7763fi
7764
97bf5e38
MK
7765echo "$ac_t""$bfd_cv_decl_needed_strstr" 1>&6
7766if test $bfd_cv_decl_needed_strstr = yes; then
7767 cat >> confdefs.h <<\EOF
7768#define NEED_DECLARATION_STRSTR 1
3862412b
MK
7769EOF
7770
97bf5e38 7771fi
3862412b 7772
97bf5e38 7773echo $ac_n "checking whether canonicalize_file_name must be declared""... $ac_c" 1>&6
226361c4 7774echo "configure:7775: checking whether canonicalize_file_name must be declared" >&5
97bf5e38 7775if eval "test \"`echo '$''{'bfd_cv_decl_needed_canonicalize_file_name'+set}'`\" = set"; then
596c9d4b
KB
7776 echo $ac_n "(cached) $ac_c" 1>&6
7777else
7778 cat > conftest.$ac_ext <<EOF
226361c4 7779#line 7780 "configure"
596c9d4b
KB
7780#include "confdefs.h"
7781
97bf5e38
MK
7782#include <stdio.h>
7783#ifdef HAVE_STRING_H
7784#include <string.h>
7785#else
7786#ifdef HAVE_STRINGS_H
7787#include <strings.h>
7788#endif
7789#endif
7790#ifdef HAVE_STDLIB_H
7791#include <stdlib.h>
7792#endif
7793#ifdef HAVE_UNISTD_H
7794#include <unistd.h>
7795#endif
596c9d4b 7796int main() {
97bf5e38 7797char *(*pfn) = (char *(*)) canonicalize_file_name
596c9d4b
KB
7798; return 0; }
7799EOF
226361c4 7800if { (eval echo configure:7801: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
596c9d4b 7801 rm -rf conftest*
97bf5e38 7802 bfd_cv_decl_needed_canonicalize_file_name=no
596c9d4b
KB
7803else
7804 echo "configure: failed program was:" >&5
7805 cat conftest.$ac_ext >&5
7806 rm -rf conftest*
97bf5e38 7807 bfd_cv_decl_needed_canonicalize_file_name=yes
596c9d4b
KB
7808fi
7809rm -f conftest*
7810fi
7811
97bf5e38
MK
7812echo "$ac_t""$bfd_cv_decl_needed_canonicalize_file_name" 1>&6
7813if test $bfd_cv_decl_needed_canonicalize_file_name = yes; then
7814 cat >> confdefs.h <<\EOF
7815#define NEED_DECLARATION_CANONICALIZE_FILE_NAME 1
596c9d4b
KB
7816EOF
7817
97bf5e38 7818fi
596c9d4b 7819
97bf5e38
MK
7820
7821# The following save_state_t checkery is only necessary for HPUX
7822# versions earlier than 10.20. When those fade from memory, this
7823# could be expunged. --jsm 1999-03-22
7824
7825echo $ac_n "checking for HPUX save_state structure""... $ac_c" 1>&6
226361c4 7826echo "configure:7827: checking for HPUX save_state structure" >&5
97bf5e38 7827cat > conftest.$ac_ext <<EOF
226361c4 7828#line 7829 "configure"
97bf5e38
MK
7829#include "confdefs.h"
7830#include <machine/save_state.h>
7831EOF
7832if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7833 egrep "save_state_t" >/dev/null 2>&1; then
7834 rm -rf conftest*
7835 gdb_cv_hpux_savestate=yes
7836else
7837 rm -rf conftest*
7838 gdb_cv_hpux_savestate=no
7839fi
7840rm -f conftest*
7841
7842cat > conftest.$ac_ext <<EOF
226361c4 7843#line 7844 "configure"
97bf5e38
MK
7844#include "confdefs.h"
7845#include <machine/save_state.h>
7846EOF
7847if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7848 egrep "ss_wide" >/dev/null 2>&1; then
7849 rm -rf conftest*
7850 gdb_cv_hpux_sswide=yes
7851else
7852 rm -rf conftest*
7853 gdb_cv_hpux_sswide=no
7854fi
7855rm -f conftest*
7856
7857if test $gdb_cv_hpux_savestate = yes
7858then
7859 cat >> confdefs.h <<\EOF
7860#define HAVE_STRUCT_SAVE_STATE_T 1
7861EOF
7862
7863fi
7864if test $gdb_cv_hpux_sswide = yes
7865then
7866 cat >> confdefs.h <<\EOF
7867#define HAVE_STRUCT_MEMBER_SS_WIDE 1
7868EOF
7869
7870fi
7871echo "$ac_t""$gdb_cv_hpux_sswide" 1>&6
7872
7873
7874# If we are configured native on GNU/Linux, work around problems with
7875# sys/procfs.h
7876# Also detect which type of /proc is in use, such as for Unixware or Solaris.
7877
7878if test "${target}" = "${host}"; then
7879 case "${host}" in
7880 i[3456]86-*-linux*)
7881 cat >> confdefs.h <<\EOF
7882#define START_INFERIOR_TRAPS_EXPECTED 2
7883EOF
7884
7885 cat >> confdefs.h <<\EOF
7886#define sys_quotactl 1
7887EOF
7888
7889 ;;
7890 ia64-*-aix*)
7891 cat >> confdefs.h <<\EOF
7892#define NEW_PROC_API 1
7893EOF
7894
7895 ;;
7896 *-*-unixware* | *-*-sysv4.2* | *-*-sysv5* | *-*-interix* )
7897 cat >> confdefs.h <<\EOF
7898#define NEW_PROC_API 1
7899EOF
7900
7901 ;;
e7c61be3 7902 *-*-solaris2.[6789])
97bf5e38
MK
7903 cat >> confdefs.h <<\EOF
7904#define NEW_PROC_API 1
7905EOF
7906
7907 ;;
7908 esac
7909fi
7910
7911if test "$ac_cv_header_sys_procfs_h" = yes; then
7912 echo $ac_n "checking for pstatus_t in sys/procfs.h""... $ac_c" 1>&6
226361c4 7913echo "configure:7914: checking for pstatus_t in sys/procfs.h" >&5
97bf5e38 7914 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_pstatus_t'+set}'`\" = set"; then
596c9d4b
KB
7915 echo $ac_n "(cached) $ac_c" 1>&6
7916else
7917 cat > conftest.$ac_ext <<EOF
226361c4 7918#line 7919 "configure"
596c9d4b
KB
7919#include "confdefs.h"
7920
7921#define _SYSCALL32
7922#include <sys/procfs.h>
7923int main() {
97bf5e38 7924pstatus_t avar
596c9d4b
KB
7925; return 0; }
7926EOF
226361c4 7927if { (eval echo configure:7928: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
596c9d4b 7928 rm -rf conftest*
97bf5e38 7929 bfd_cv_have_sys_procfs_type_pstatus_t=yes
596c9d4b
KB
7930else
7931 echo "configure: failed program was:" >&5
7932 cat conftest.$ac_ext >&5
7933 rm -rf conftest*
97bf5e38 7934 bfd_cv_have_sys_procfs_type_pstatus_t=no
596c9d4b
KB
7935
7936fi
7937rm -f conftest*
7938fi
7939
97bf5e38 7940 if test $bfd_cv_have_sys_procfs_type_pstatus_t = yes; then
596c9d4b 7941 cat >> confdefs.h <<\EOF
97bf5e38 7942#define HAVE_PSTATUS_T 1
596c9d4b
KB
7943EOF
7944
7945 fi
97bf5e38 7946 echo "$ac_t""$bfd_cv_have_sys_procfs_type_pstatus_t" 1>&6
596c9d4b 7947
97bf5e38 7948 echo $ac_n "checking for prrun_t in sys/procfs.h""... $ac_c" 1>&6
226361c4 7949echo "configure:7950: checking for prrun_t in sys/procfs.h" >&5
97bf5e38 7950 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prrun_t'+set}'`\" = set"; then
596c9d4b
KB
7951 echo $ac_n "(cached) $ac_c" 1>&6
7952else
7953 cat > conftest.$ac_ext <<EOF
226361c4 7954#line 7955 "configure"
596c9d4b
KB
7955#include "confdefs.h"
7956
7957#define _SYSCALL32
7958#include <sys/procfs.h>
7959int main() {
97bf5e38 7960prrun_t avar
596c9d4b
KB
7961; return 0; }
7962EOF
226361c4 7963if { (eval echo configure:7964: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
596c9d4b 7964 rm -rf conftest*
97bf5e38 7965 bfd_cv_have_sys_procfs_type_prrun_t=yes
596c9d4b
KB
7966else
7967 echo "configure: failed program was:" >&5
7968 cat conftest.$ac_ext >&5
7969 rm -rf conftest*
97bf5e38 7970 bfd_cv_have_sys_procfs_type_prrun_t=no
596c9d4b
KB
7971
7972fi
7973rm -f conftest*
7974fi
7975
97bf5e38 7976 if test $bfd_cv_have_sys_procfs_type_prrun_t = yes; then
596c9d4b 7977 cat >> confdefs.h <<\EOF
97bf5e38 7978#define HAVE_PRRUN_T 1
596c9d4b
KB
7979EOF
7980
7981 fi
97bf5e38 7982 echo "$ac_t""$bfd_cv_have_sys_procfs_type_prrun_t" 1>&6
596c9d4b 7983
97bf5e38 7984 echo $ac_n "checking for gregset_t in sys/procfs.h""... $ac_c" 1>&6
226361c4 7985echo "configure:7986: checking for gregset_t in sys/procfs.h" >&5
97bf5e38 7986 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_gregset_t'+set}'`\" = set"; then
596c9d4b
KB
7987 echo $ac_n "(cached) $ac_c" 1>&6
7988else
7989 cat > conftest.$ac_ext <<EOF
226361c4 7990#line 7991 "configure"
596c9d4b
KB
7991#include "confdefs.h"
7992
7993#define _SYSCALL32
7994#include <sys/procfs.h>
7995int main() {
97bf5e38 7996gregset_t avar
596c9d4b
KB
7997; return 0; }
7998EOF
226361c4 7999if { (eval echo configure:8000: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
596c9d4b 8000 rm -rf conftest*
97bf5e38 8001 bfd_cv_have_sys_procfs_type_gregset_t=yes
596c9d4b
KB
8002else
8003 echo "configure: failed program was:" >&5
8004 cat conftest.$ac_ext >&5
8005 rm -rf conftest*
97bf5e38 8006 bfd_cv_have_sys_procfs_type_gregset_t=no
596c9d4b
KB
8007
8008fi
8009rm -f conftest*
8010fi
8011
97bf5e38 8012 if test $bfd_cv_have_sys_procfs_type_gregset_t = yes; then
596c9d4b 8013 cat >> confdefs.h <<\EOF
97bf5e38 8014#define HAVE_GREGSET_T 1
596c9d4b
KB
8015EOF
8016
8017 fi
97bf5e38 8018 echo "$ac_t""$bfd_cv_have_sys_procfs_type_gregset_t" 1>&6
451928c5 8019
97bf5e38 8020 echo $ac_n "checking for fpregset_t in sys/procfs.h""... $ac_c" 1>&6
226361c4 8021echo "configure:8022: checking for fpregset_t in sys/procfs.h" >&5
97bf5e38 8022 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_fpregset_t'+set}'`\" = set"; then
d84dd0c5 8023 echo $ac_n "(cached) $ac_c" 1>&6
d84dd0c5
MK
8024else
8025 cat > conftest.$ac_ext <<EOF
226361c4 8026#line 8027 "configure"
d84dd0c5 8027#include "confdefs.h"
97bf5e38
MK
8028
8029#define _SYSCALL32
d84dd0c5 8030#include <sys/procfs.h>
97bf5e38
MK
8031int main() {
8032fpregset_t avar
8033; return 0; }
d84dd0c5 8034EOF
226361c4 8035if { (eval echo configure:8036: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
97bf5e38
MK
8036 rm -rf conftest*
8037 bfd_cv_have_sys_procfs_type_fpregset_t=yes
d84dd0c5
MK
8038else
8039 echo "configure: failed program was:" >&5
8040 cat conftest.$ac_ext >&5
97bf5e38
MK
8041 rm -rf conftest*
8042 bfd_cv_have_sys_procfs_type_fpregset_t=no
8043
d84dd0c5 8044fi
97bf5e38 8045rm -f conftest*
d84dd0c5
MK
8046fi
8047
97bf5e38
MK
8048 if test $bfd_cv_have_sys_procfs_type_fpregset_t = yes; then
8049 cat >> confdefs.h <<\EOF
8050#define HAVE_FPREGSET_T 1
d84dd0c5
MK
8051EOF
8052
97bf5e38
MK
8053 fi
8054 echo "$ac_t""$bfd_cv_have_sys_procfs_type_fpregset_t" 1>&6
d84dd0c5 8055
97bf5e38 8056 echo $ac_n "checking for prgregset_t in sys/procfs.h""... $ac_c" 1>&6
226361c4 8057echo "configure:8058: checking for prgregset_t in sys/procfs.h" >&5
97bf5e38 8058 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prgregset_t'+set}'`\" = set"; then
c906108c
SS
8059 echo $ac_n "(cached) $ac_c" 1>&6
8060else
8061 cat > conftest.$ac_ext <<EOF
226361c4 8062#line 8063 "configure"
c906108c 8063#include "confdefs.h"
c906108c 8064
97bf5e38
MK
8065#define _SYSCALL32
8066#include <sys/procfs.h>
c906108c 8067int main() {
97bf5e38 8068prgregset_t avar
c906108c
SS
8069; return 0; }
8070EOF
226361c4 8071if { (eval echo configure:8072: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c 8072 rm -rf conftest*
97bf5e38 8073 bfd_cv_have_sys_procfs_type_prgregset_t=yes
c906108c
SS
8074else
8075 echo "configure: failed program was:" >&5
8076 cat conftest.$ac_ext >&5
8077 rm -rf conftest*
97bf5e38
MK
8078 bfd_cv_have_sys_procfs_type_prgregset_t=no
8079
c906108c
SS
8080fi
8081rm -f conftest*
8082fi
8083
97bf5e38
MK
8084 if test $bfd_cv_have_sys_procfs_type_prgregset_t = yes; then
8085 cat >> confdefs.h <<\EOF
8086#define HAVE_PRGREGSET_T 1
c906108c
SS
8087EOF
8088
97bf5e38
MK
8089 fi
8090 echo "$ac_t""$bfd_cv_have_sys_procfs_type_prgregset_t" 1>&6
c906108c 8091
97bf5e38 8092 echo $ac_n "checking for prfpregset_t in sys/procfs.h""... $ac_c" 1>&6
226361c4 8093echo "configure:8094: checking for prfpregset_t in sys/procfs.h" >&5
97bf5e38 8094 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prfpregset_t'+set}'`\" = set"; then
d45fe813
KB
8095 echo $ac_n "(cached) $ac_c" 1>&6
8096else
8097 cat > conftest.$ac_ext <<EOF
226361c4 8098#line 8099 "configure"
d45fe813 8099#include "confdefs.h"
97bf5e38
MK
8100
8101#define _SYSCALL32
8102#include <sys/procfs.h>
d45fe813 8103int main() {
97bf5e38 8104prfpregset_t avar
d45fe813
KB
8105; return 0; }
8106EOF
226361c4 8107if { (eval echo configure:8108: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
d45fe813 8108 rm -rf conftest*
97bf5e38 8109 bfd_cv_have_sys_procfs_type_prfpregset_t=yes
d45fe813
KB
8110else
8111 echo "configure: failed program was:" >&5
8112 cat conftest.$ac_ext >&5
8113 rm -rf conftest*
97bf5e38
MK
8114 bfd_cv_have_sys_procfs_type_prfpregset_t=no
8115
d45fe813
KB
8116fi
8117rm -f conftest*
8118fi
8119
97bf5e38
MK
8120 if test $bfd_cv_have_sys_procfs_type_prfpregset_t = yes; then
8121 cat >> confdefs.h <<\EOF
8122#define HAVE_PRFPREGSET_T 1
d45fe813
KB
8123EOF
8124
97bf5e38
MK
8125 fi
8126 echo "$ac_t""$bfd_cv_have_sys_procfs_type_prfpregset_t" 1>&6
d45fe813 8127
97bf5e38 8128 echo $ac_n "checking for prgregset32_t in sys/procfs.h""... $ac_c" 1>&6
226361c4 8129echo "configure:8130: checking for prgregset32_t in sys/procfs.h" >&5
97bf5e38 8130 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prgregset32_t'+set}'`\" = set"; then
d45fe813
KB
8131 echo $ac_n "(cached) $ac_c" 1>&6
8132else
8133 cat > conftest.$ac_ext <<EOF
226361c4 8134#line 8135 "configure"
d45fe813 8135#include "confdefs.h"
97bf5e38
MK
8136
8137#define _SYSCALL32
8138#include <sys/procfs.h>
d45fe813 8139int main() {
97bf5e38 8140prgregset32_t avar
d45fe813
KB
8141; return 0; }
8142EOF
226361c4 8143if { (eval echo configure:8144: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
d45fe813 8144 rm -rf conftest*
97bf5e38 8145 bfd_cv_have_sys_procfs_type_prgregset32_t=yes
d45fe813
KB
8146else
8147 echo "configure: failed program was:" >&5
8148 cat conftest.$ac_ext >&5
8149 rm -rf conftest*
97bf5e38
MK
8150 bfd_cv_have_sys_procfs_type_prgregset32_t=no
8151
d45fe813
KB
8152fi
8153rm -f conftest*
8154fi
8155
97bf5e38
MK
8156 if test $bfd_cv_have_sys_procfs_type_prgregset32_t = yes; then
8157 cat >> confdefs.h <<\EOF
8158#define HAVE_PRGREGSET32_T 1
d45fe813
KB
8159EOF
8160
97bf5e38
MK
8161 fi
8162 echo "$ac_t""$bfd_cv_have_sys_procfs_type_prgregset32_t" 1>&6
d45fe813 8163
97bf5e38 8164 echo $ac_n "checking for prfpregset32_t in sys/procfs.h""... $ac_c" 1>&6
226361c4 8165echo "configure:8166: checking for prfpregset32_t in sys/procfs.h" >&5
97bf5e38 8166 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prfpregset32_t'+set}'`\" = set"; then
d45fe813
KB
8167 echo $ac_n "(cached) $ac_c" 1>&6
8168else
8169 cat > conftest.$ac_ext <<EOF
226361c4 8170#line 8171 "configure"
d45fe813 8171#include "confdefs.h"
97bf5e38
MK
8172
8173#define _SYSCALL32
8174#include <sys/procfs.h>
d45fe813 8175int main() {
97bf5e38 8176prfpregset32_t avar
d45fe813
KB
8177; return 0; }
8178EOF
226361c4 8179if { (eval echo configure:8180: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
d45fe813 8180 rm -rf conftest*
97bf5e38 8181 bfd_cv_have_sys_procfs_type_prfpregset32_t=yes
d45fe813
KB
8182else
8183 echo "configure: failed program was:" >&5
8184 cat conftest.$ac_ext >&5
8185 rm -rf conftest*
97bf5e38
MK
8186 bfd_cv_have_sys_procfs_type_prfpregset32_t=no
8187
d45fe813
KB
8188fi
8189rm -f conftest*
8190fi
8191
97bf5e38
MK
8192 if test $bfd_cv_have_sys_procfs_type_prfpregset32_t = yes; then
8193 cat >> confdefs.h <<\EOF
8194#define HAVE_PRFPREGSET32_T 1
d45fe813
KB
8195EOF
8196
97bf5e38
MK
8197 fi
8198 echo "$ac_t""$bfd_cv_have_sys_procfs_type_prfpregset32_t" 1>&6
d45fe813 8199
97bf5e38 8200 echo $ac_n "checking for lwpid_t in sys/procfs.h""... $ac_c" 1>&6
226361c4 8201echo "configure:8202: checking for lwpid_t in sys/procfs.h" >&5
97bf5e38 8202 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_lwpid_t'+set}'`\" = set"; then
d45fe813
KB
8203 echo $ac_n "(cached) $ac_c" 1>&6
8204else
8205 cat > conftest.$ac_ext <<EOF
226361c4 8206#line 8207 "configure"
d45fe813 8207#include "confdefs.h"
97bf5e38 8208
d45fe813 8209#define _SYSCALL32
97bf5e38 8210#include <sys/procfs.h>
d45fe813 8211int main() {
97bf5e38 8212lwpid_t avar
d45fe813
KB
8213; return 0; }
8214EOF
226361c4 8215if { (eval echo configure:8216: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
d45fe813 8216 rm -rf conftest*
97bf5e38 8217 bfd_cv_have_sys_procfs_type_lwpid_t=yes
d45fe813
KB
8218else
8219 echo "configure: failed program was:" >&5
8220 cat conftest.$ac_ext >&5
8221 rm -rf conftest*
97bf5e38
MK
8222 bfd_cv_have_sys_procfs_type_lwpid_t=no
8223
d45fe813
KB
8224fi
8225rm -f conftest*
8226fi
8227
97bf5e38
MK
8228 if test $bfd_cv_have_sys_procfs_type_lwpid_t = yes; then
8229 cat >> confdefs.h <<\EOF
8230#define HAVE_LWPID_T 1
d45fe813
KB
8231EOF
8232
97bf5e38
MK
8233 fi
8234 echo "$ac_t""$bfd_cv_have_sys_procfs_type_lwpid_t" 1>&6
c906108c 8235
97bf5e38 8236 echo $ac_n "checking for psaddr_t in sys/procfs.h""... $ac_c" 1>&6
226361c4 8237echo "configure:8238: checking for psaddr_t in sys/procfs.h" >&5
97bf5e38 8238 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_psaddr_t'+set}'`\" = set"; then
c906108c
SS
8239 echo $ac_n "(cached) $ac_c" 1>&6
8240else
8241 cat > conftest.$ac_ext <<EOF
226361c4 8242#line 8243 "configure"
c906108c
SS
8243#include "confdefs.h"
8244
97bf5e38
MK
8245#define _SYSCALL32
8246#include <sys/procfs.h>
c906108c 8247int main() {
97bf5e38 8248psaddr_t avar
c906108c
SS
8249; return 0; }
8250EOF
226361c4 8251if { (eval echo configure:8252: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c 8252 rm -rf conftest*
97bf5e38 8253 bfd_cv_have_sys_procfs_type_psaddr_t=yes
c906108c
SS
8254else
8255 echo "configure: failed program was:" >&5
8256 cat conftest.$ac_ext >&5
8257 rm -rf conftest*
97bf5e38
MK
8258 bfd_cv_have_sys_procfs_type_psaddr_t=no
8259
c906108c
SS
8260fi
8261rm -f conftest*
8262fi
8263
97bf5e38
MK
8264 if test $bfd_cv_have_sys_procfs_type_psaddr_t = yes; then
8265 cat >> confdefs.h <<\EOF
8266#define HAVE_PSADDR_T 1
c906108c
SS
8267EOF
8268
97bf5e38
MK
8269 fi
8270 echo "$ac_t""$bfd_cv_have_sys_procfs_type_psaddr_t" 1>&6
c906108c 8271
97bf5e38 8272 echo $ac_n "checking for prsysent_t in sys/procfs.h""... $ac_c" 1>&6
226361c4 8273echo "configure:8274: checking for prsysent_t in sys/procfs.h" >&5
97bf5e38 8274 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prsysent_t'+set}'`\" = set"; then
c906108c 8275 echo $ac_n "(cached) $ac_c" 1>&6
c906108c
SS
8276else
8277 cat > conftest.$ac_ext <<EOF
226361c4 8278#line 8279 "configure"
c906108c
SS
8279#include "confdefs.h"
8280
97bf5e38
MK
8281#define _SYSCALL32
8282#include <sys/procfs.h>
8283int main() {
8284prsysent_t avar
8285; return 0; }
c906108c 8286EOF
226361c4 8287if { (eval echo configure:8288: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
97bf5e38
MK
8288 rm -rf conftest*
8289 bfd_cv_have_sys_procfs_type_prsysent_t=yes
c906108c
SS
8290else
8291 echo "configure: failed program was:" >&5
8292 cat conftest.$ac_ext >&5
97bf5e38
MK
8293 rm -rf conftest*
8294 bfd_cv_have_sys_procfs_type_prsysent_t=no
8295
c906108c 8296fi
97bf5e38 8297rm -f conftest*
c906108c
SS
8298fi
8299
97bf5e38
MK
8300 if test $bfd_cv_have_sys_procfs_type_prsysent_t = yes; then
8301 cat >> confdefs.h <<\EOF
8302#define HAVE_PRSYSENT_T 1
c906108c
SS
8303EOF
8304
97bf5e38
MK
8305 fi
8306 echo "$ac_t""$bfd_cv_have_sys_procfs_type_prsysent_t" 1>&6
c906108c 8307
97bf5e38 8308 echo $ac_n "checking for pr_sigset_t in sys/procfs.h""... $ac_c" 1>&6
226361c4 8309echo "configure:8310: checking for pr_sigset_t in sys/procfs.h" >&5
97bf5e38 8310 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_pr_sigset_t'+set}'`\" = set"; then
c906108c
SS
8311 echo $ac_n "(cached) $ac_c" 1>&6
8312else
8313 cat > conftest.$ac_ext <<EOF
226361c4 8314#line 8315 "configure"
c906108c
SS
8315#include "confdefs.h"
8316
97bf5e38
MK
8317#define _SYSCALL32
8318#include <sys/procfs.h>
c906108c 8319int main() {
97bf5e38 8320pr_sigset_t avar
c906108c
SS
8321; return 0; }
8322EOF
226361c4 8323if { (eval echo configure:8324: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c 8324 rm -rf conftest*
97bf5e38 8325 bfd_cv_have_sys_procfs_type_pr_sigset_t=yes
c906108c
SS
8326else
8327 echo "configure: failed program was:" >&5
8328 cat conftest.$ac_ext >&5
8329 rm -rf conftest*
97bf5e38
MK
8330 bfd_cv_have_sys_procfs_type_pr_sigset_t=no
8331
c906108c
SS
8332fi
8333rm -f conftest*
8334fi
8335
97bf5e38
MK
8336 if test $bfd_cv_have_sys_procfs_type_pr_sigset_t = yes; then
8337 cat >> confdefs.h <<\EOF
8338#define HAVE_PR_SIGSET_T 1
c906108c
SS
8339EOF
8340
97bf5e38
MK
8341 fi
8342 echo "$ac_t""$bfd_cv_have_sys_procfs_type_pr_sigset_t" 1>&6
c906108c 8343
97bf5e38 8344 echo $ac_n "checking for pr_sigaction64_t in sys/procfs.h""... $ac_c" 1>&6
226361c4 8345echo "configure:8346: checking for pr_sigaction64_t in sys/procfs.h" >&5
97bf5e38 8346 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_pr_sigaction64_t'+set}'`\" = set"; then
c906108c 8347 echo $ac_n "(cached) $ac_c" 1>&6
c906108c
SS
8348else
8349 cat > conftest.$ac_ext <<EOF
226361c4 8350#line 8351 "configure"
c906108c
SS
8351#include "confdefs.h"
8352
97bf5e38
MK
8353#define _SYSCALL32
8354#include <sys/procfs.h>
8355int main() {
8356pr_sigaction64_t avar
8357; return 0; }
c906108c 8358EOF
226361c4 8359if { (eval echo configure:8360: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
97bf5e38
MK
8360 rm -rf conftest*
8361 bfd_cv_have_sys_procfs_type_pr_sigaction64_t=yes
c906108c
SS
8362else
8363 echo "configure: failed program was:" >&5
8364 cat conftest.$ac_ext >&5
97bf5e38
MK
8365 rm -rf conftest*
8366 bfd_cv_have_sys_procfs_type_pr_sigaction64_t=no
8367
c906108c 8368fi
97bf5e38 8369rm -f conftest*
c906108c
SS
8370fi
8371
97bf5e38
MK
8372 if test $bfd_cv_have_sys_procfs_type_pr_sigaction64_t = yes; then
8373 cat >> confdefs.h <<\EOF
8374#define HAVE_PR_SIGACTION64_T 1
c906108c
SS
8375EOF
8376
97bf5e38
MK
8377 fi
8378 echo "$ac_t""$bfd_cv_have_sys_procfs_type_pr_sigaction64_t" 1>&6
8379
8380 echo $ac_n "checking for pr_siginfo64_t in sys/procfs.h""... $ac_c" 1>&6
226361c4 8381echo "configure:8382: checking for pr_siginfo64_t in sys/procfs.h" >&5
97bf5e38
MK
8382 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_pr_siginfo64_t'+set}'`\" = set"; then
8383 echo $ac_n "(cached) $ac_c" 1>&6
8384else
8385 cat > conftest.$ac_ext <<EOF
226361c4 8386#line 8387 "configure"
97bf5e38
MK
8387#include "confdefs.h"
8388
8389#define _SYSCALL32
8390#include <sys/procfs.h>
8391int main() {
8392pr_siginfo64_t avar
8393; return 0; }
8394EOF
226361c4 8395if { (eval echo configure:8396: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
97bf5e38
MK
8396 rm -rf conftest*
8397 bfd_cv_have_sys_procfs_type_pr_siginfo64_t=yes
8398else
8399 echo "configure: failed program was:" >&5
8400 cat conftest.$ac_ext >&5
8401 rm -rf conftest*
8402 bfd_cv_have_sys_procfs_type_pr_siginfo64_t=no
8403
8404fi
8405rm -f conftest*
c906108c 8406fi
c906108c 8407
97bf5e38
MK
8408 if test $bfd_cv_have_sys_procfs_type_pr_siginfo64_t = yes; then
8409 cat >> confdefs.h <<\EOF
8410#define HAVE_PR_SIGINFO64_T 1
8411EOF
c906108c 8412
97bf5e38
MK
8413 fi
8414 echo "$ac_t""$bfd_cv_have_sys_procfs_type_pr_siginfo64_t" 1>&6
8415
8416
8417
8418
8419
8420 if test $bfd_cv_have_sys_procfs_type_prfpregset_t = yes; then
8421 echo $ac_n "checking whether prfpregset_t type is broken""... $ac_c" 1>&6
226361c4 8422echo "configure:8423: checking whether prfpregset_t type is broken" >&5
97bf5e38 8423 if eval "test \"`echo '$''{'gdb_cv_prfpregset_t_broken'+set}'`\" = set"; then
c906108c
SS
8424 echo $ac_n "(cached) $ac_c" 1>&6
8425else
8426 if test "$cross_compiling" = yes; then
97bf5e38 8427 gdb_cv_prfpregset_t_broken=yes
c906108c
SS
8428else
8429 cat > conftest.$ac_ext <<EOF
226361c4 8430#line 8431 "configure"
c906108c 8431#include "confdefs.h"
97bf5e38
MK
8432#include <sys/procfs.h>
8433 int main ()
8434 {
8435 if (sizeof (prfpregset_t) == sizeof (void *))
8436 return 1;
8437 return 0;
8438 }
c906108c 8439EOF
226361c4 8440if { (eval echo configure:8441: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
c906108c 8441then
97bf5e38 8442 gdb_cv_prfpregset_t_broken=no
c906108c
SS
8443else
8444 echo "configure: failed program was:" >&5
8445 cat conftest.$ac_ext >&5
8446 rm -fr conftest*
97bf5e38 8447 gdb_cv_prfpregset_t_broken=yes
c906108c
SS
8448fi
8449rm -fr conftest*
8450fi
8451
8452fi
8453
97bf5e38
MK
8454 echo "$ac_t""$gdb_cv_prfpregset_t_broken" 1>&6
8455 if test $gdb_cv_prfpregset_t_broken = yes; then
8456 cat >> confdefs.h <<\EOF
8457#define PRFPREGSET_T_BROKEN 1
c906108c
SS
8458EOF
8459
97bf5e38
MK
8460 fi
8461 fi
c906108c 8462
97bf5e38
MK
8463
8464 echo $ac_n "checking for PIOCSET ioctl entry in sys/procfs.h""... $ac_c" 1>&6
226361c4 8465echo "configure:8466: checking for PIOCSET ioctl entry in sys/procfs.h" >&5
97bf5e38 8466 if eval "test \"`echo '$''{'gdb_cv_have_procfs_piocset'+set}'`\" = set"; then
c906108c
SS
8467 echo $ac_n "(cached) $ac_c" 1>&6
8468else
8469 cat > conftest.$ac_ext <<EOF
226361c4 8470#line 8471 "configure"
c906108c 8471#include "confdefs.h"
97bf5e38
MK
8472#include <unistd.h>
8473#include <sys/types.h>
8474#include <sys/procfs.h>
8475
8476int main() {
8477
8478 int dummy;;
8479 dummy = ioctl(0, PIOCSET, &dummy);
8480
8481; return 0; }
c906108c 8482EOF
226361c4 8483if { (eval echo configure:8484: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c 8484 rm -rf conftest*
97bf5e38 8485 gdb_cv_have_procfs_piocset=yes
c906108c 8486else
c906108c
SS
8487 echo "configure: failed program was:" >&5
8488 cat conftest.$ac_ext >&5
8489 rm -rf conftest*
97bf5e38 8490 gdb_cv_have_procfs_piocset=no
c906108c
SS
8491fi
8492rm -f conftest*
8493fi
97bf5e38
MK
8494
8495 echo "$ac_t""$gdb_cv_have_procfs_piocset" 1>&6
8496 if test $gdb_cv_have_procfs_piocset = yes; then
8497 cat >> confdefs.h <<\EOF
8498#define HAVE_PROCFS_PIOCSET 1
c906108c 8499EOF
97bf5e38
MK
8500
8501 fi
c906108c 8502fi
c906108c 8503
97bf5e38
MK
8504if test ${host} = ${target} ; then
8505
8506 echo $ac_n "checking for member l_addr in struct link_map""... $ac_c" 1>&6
226361c4 8507echo "configure:8508: checking for member l_addr in struct link_map" >&5
97bf5e38 8508 if eval "test \"`echo '$''{'gdb_cv_have_struct_link_map_with_l_members'+set}'`\" = set"; then
c906108c
SS
8509 echo $ac_n "(cached) $ac_c" 1>&6
8510else
8511 cat > conftest.$ac_ext <<EOF
226361c4 8512#line 8513 "configure"
c906108c 8513#include "confdefs.h"
97bf5e38 8514#include <link.h>
c906108c 8515int main() {
97bf5e38 8516struct link_map lm; (void) lm.l_addr;
c906108c
SS
8517; return 0; }
8518EOF
226361c4 8519if { (eval echo configure:8520: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c 8520 rm -rf conftest*
97bf5e38 8521 gdb_cv_have_struct_link_map_with_l_members=yes
c906108c
SS
8522else
8523 echo "configure: failed program was:" >&5
8524 cat conftest.$ac_ext >&5
8525 rm -rf conftest*
97bf5e38 8526 gdb_cv_have_struct_link_map_with_l_members=no
c906108c
SS
8527fi
8528rm -f conftest*
8529fi
8530
97bf5e38
MK
8531 echo "$ac_t""$gdb_cv_have_struct_link_map_with_l_members" 1>&6
8532 if test $gdb_cv_have_struct_link_map_with_l_members = yes; then
8533 cat >> confdefs.h <<\EOF
8534#define HAVE_STRUCT_LINK_MAP_WITH_L_MEMBERS 1
c906108c 8535EOF
97bf5e38
MK
8536
8537 fi
8538
8539
8540 echo $ac_n "checking for member lm_addr in struct link_map""... $ac_c" 1>&6
226361c4 8541echo "configure:8542: checking for member lm_addr in struct link_map" >&5
97bf5e38
MK
8542 if eval "test \"`echo '$''{'gdb_cv_have_struct_link_map_with_lm_members'+set}'`\" = set"; then
8543 echo $ac_n "(cached) $ac_c" 1>&6
c906108c 8544else
97bf5e38 8545 cat > conftest.$ac_ext <<EOF
226361c4 8546#line 8547 "configure"
97bf5e38
MK
8547#include "confdefs.h"
8548#include <sys/types.h>
8549#include <link.h>
8550int main() {
8551struct link_map lm; (void) lm.lm_addr;
8552; return 0; }
8553EOF
226361c4 8554if { (eval echo configure:8555: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
97bf5e38
MK
8555 rm -rf conftest*
8556 gdb_cv_have_struct_link_map_with_lm_members=yes
8557else
8558 echo "configure: failed program was:" >&5
8559 cat conftest.$ac_ext >&5
8560 rm -rf conftest*
8561 gdb_cv_have_struct_link_map_with_lm_members=no
8562fi
8563rm -f conftest*
c906108c 8564fi
c906108c 8565
97bf5e38
MK
8566 echo "$ac_t""$gdb_cv_have_struct_link_map_with_lm_members" 1>&6
8567 if test $gdb_cv_have_struct_link_map_with_lm_members = yes; then
8568 cat >> confdefs.h <<\EOF
8569#define HAVE_STRUCT_LINK_MAP_WITH_LM_MEMBERS 1
8570EOF
8571
8572 fi
8573
8574
8575 echo $ac_n "checking for member som_addr in struct so_map""... $ac_c" 1>&6
226361c4 8576echo "configure:8577: checking for member som_addr in struct so_map" >&5
97bf5e38 8577 if eval "test \"`echo '$''{'gdb_cv_have_struct_so_map_with_som_members'+set}'`\" = set"; then
c906108c 8578 echo $ac_n "(cached) $ac_c" 1>&6
c906108c
SS
8579else
8580 cat > conftest.$ac_ext <<EOF
226361c4 8581#line 8582 "configure"
c906108c 8582#include "confdefs.h"
97bf5e38
MK
8583#include <sys/types.h>
8584#ifdef HAVE_NLIST_H
8585#include <nlist.h>
8586#endif
8587#include <link.h>
8588int main() {
8589struct so_map lm; (void) lm.som_addr;
8590; return 0; }
8591EOF
226361c4 8592if { (eval echo configure:8593: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
97bf5e38
MK
8593 rm -rf conftest*
8594 gdb_cv_have_struct_so_map_with_som_members=yes
8595else
8596 echo "configure: failed program was:" >&5
8597 cat conftest.$ac_ext >&5
8598 rm -rf conftest*
8599 gdb_cv_have_struct_so_map_with_som_members=no
8600fi
8601rm -f conftest*
8602fi
c906108c 8603
97bf5e38
MK
8604 echo "$ac_t""$gdb_cv_have_struct_so_map_with_som_members" 1>&6
8605 if test $gdb_cv_have_struct_so_map_with_som_members = yes; then
8606 cat >> confdefs.h <<\EOF
8607#define HAVE_STRUCT_SO_MAP_WITH_SOM_MEMBERS 1
8608EOF
c906108c 8609
97bf5e38 8610 fi
c906108c 8611
97bf5e38
MK
8612
8613 echo $ac_n "checking for struct link_map32 in sys/link.h""... $ac_c" 1>&6
226361c4 8614echo "configure:8615: checking for struct link_map32 in sys/link.h" >&5
97bf5e38
MK
8615 if eval "test \"`echo '$''{'gdb_cv_have_struct_link_map32'+set}'`\" = set"; then
8616 echo $ac_n "(cached) $ac_c" 1>&6
8617else
8618 cat > conftest.$ac_ext <<EOF
226361c4 8619#line 8620 "configure"
97bf5e38
MK
8620#include "confdefs.h"
8621#define _SYSCALL32
8622#include <sys/link.h>
8623int main() {
8624struct link_map32 l;
8625; return 0; }
8626EOF
226361c4 8627if { (eval echo configure:8628: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
97bf5e38
MK
8628 rm -rf conftest*
8629 gdb_cv_have_struct_link_map32=yes
8630else
8631 echo "configure: failed program was:" >&5
8632 cat conftest.$ac_ext >&5
8633 rm -rf conftest*
8634 gdb_cv_have_struct_link_map32=no
8635fi
8636rm -f conftest*
8637fi
c906108c 8638
97bf5e38
MK
8639 echo "$ac_t""$gdb_cv_have_struct_link_map32" 1>&6
8640 if test $gdb_cv_have_struct_link_map32 = yes; then
8641 cat >> confdefs.h <<\EOF
8642#define HAVE_STRUCT_LINK_MAP32 1
8643EOF
c906108c 8644
97bf5e38
MK
8645 cat >> confdefs.h <<\EOF
8646#define _SYSCALL32 1
8647EOF
c906108c 8648
97bf5e38
MK
8649 fi
8650fi
c906108c 8651
c906108c 8652
97bf5e38 8653echo $ac_n "checking for long long support in compiler""... $ac_c" 1>&6
226361c4 8654echo "configure:8655: checking for long long support in compiler" >&5
97bf5e38
MK
8655if eval "test \"`echo '$''{'gdb_cv_c_long_long'+set}'`\" = set"; then
8656 echo $ac_n "(cached) $ac_c" 1>&6
8657else
8658 cat > conftest.$ac_ext <<EOF
226361c4 8659#line 8660 "configure"
97bf5e38 8660#include "confdefs.h"
c906108c 8661
97bf5e38 8662int main() {
c906108c 8663
97bf5e38
MK
8664 extern long long foo;
8665 switch (foo & 2) { case 0: return 1; }
c906108c 8666
97bf5e38
MK
8667; return 0; }
8668EOF
226361c4 8669if { (eval echo configure:8670: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
97bf5e38
MK
8670 rm -rf conftest*
8671 gdb_cv_c_long_long=yes
8672else
8673 echo "configure: failed program was:" >&5
8674 cat conftest.$ac_ext >&5
8675 rm -rf conftest*
8676 gdb_cv_c_long_long=no
8677fi
8678rm -f conftest*
8679fi
c906108c 8680
97bf5e38
MK
8681echo "$ac_t""$gdb_cv_c_long_long" 1>&6
8682if test $gdb_cv_c_long_long = yes; then
8683 cat >> confdefs.h <<\EOF
8684#define CC_HAS_LONG_LONG 1
8685EOF
8686
8687fi
8688
8689
8690echo $ac_n "checking for long long support in printf""... $ac_c" 1>&6
226361c4 8691echo "configure:8692: checking for long long support in printf" >&5
97bf5e38
MK
8692if eval "test \"`echo '$''{'gdb_cv_printf_has_long_long'+set}'`\" = set"; then
8693 echo $ac_n "(cached) $ac_c" 1>&6
8694else
8695 if test "$cross_compiling" = yes; then
8696 gdb_cv_printf_has_long_long=no
8697else
8698 cat > conftest.$ac_ext <<EOF
226361c4 8699#line 8700 "configure"
97bf5e38
MK
8700#include "confdefs.h"
8701
8702int main () {
8703 char buf[32];
8704 long long l = 0;
8705 l = (l << 16) + 0x0123;
8706 l = (l << 16) + 0x4567;
8707 l = (l << 16) + 0x89ab;
8708 l = (l << 16) + 0xcdef;
8709 sprintf (buf, "0x%016llx", l);
8710 return (strcmp ("0x0123456789abcdef", buf));
c906108c 8711}
97bf5e38 8712EOF
226361c4 8713if { (eval echo configure:8714: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
97bf5e38
MK
8714then
8715 gdb_cv_printf_has_long_long=yes
8716else
8717 echo "configure: failed program was:" >&5
8718 cat conftest.$ac_ext >&5
8719 rm -fr conftest*
8720 gdb_cv_printf_has_long_long=no
8721fi
8722rm -fr conftest*
8723fi
8724
8725fi
8726
8727if test $gdb_cv_printf_has_long_long = yes; then
8728 cat >> confdefs.h <<\EOF
8729#define PRINTF_HAS_LONG_LONG 1
8730EOF
8731
8732fi
8733echo "$ac_t""$gdb_cv_printf_has_long_long" 1>&6
8734
8735
8736echo $ac_n "checking for long double support in compiler""... $ac_c" 1>&6
226361c4 8737echo "configure:8738: checking for long double support in compiler" >&5
97bf5e38
MK
8738if eval "test \"`echo '$''{'ac_cv_c_long_double'+set}'`\" = set"; then
8739 echo $ac_n "(cached) $ac_c" 1>&6
8740else
8741 cat > conftest.$ac_ext <<EOF
226361c4 8742#line 8743 "configure"
97bf5e38
MK
8743#include "confdefs.h"
8744
8745int main() {
8746long double foo;
8747; return 0; }
8748EOF
226361c4 8749if { (eval echo configure:8750: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
97bf5e38
MK
8750 rm -rf conftest*
8751 ac_cv_c_long_double=yes
8752else
8753 echo "configure: failed program was:" >&5
8754 cat conftest.$ac_ext >&5
8755 rm -rf conftest*
8756 ac_cv_c_long_double=no
8757fi
8758rm -f conftest*
8759fi
c906108c 8760
97bf5e38
MK
8761echo "$ac_t""$ac_cv_c_long_double" 1>&6
8762if test $ac_cv_c_long_double = yes; then
8763 cat >> confdefs.h <<\EOF
8764#define HAVE_LONG_DOUBLE 1
c906108c 8765EOF
97bf5e38
MK
8766
8767fi
8768
8769
8770echo $ac_n "checking for long double support in printf""... $ac_c" 1>&6
226361c4 8771echo "configure:8772: checking for long double support in printf" >&5
97bf5e38
MK
8772if eval "test \"`echo '$''{'gdb_cv_printf_has_long_double'+set}'`\" = set"; then
8773 echo $ac_n "(cached) $ac_c" 1>&6
8774else
8775 if test "$cross_compiling" = yes; then
8776 gdb_cv_printf_has_long_double=no
8777else
8778 cat > conftest.$ac_ext <<EOF
226361c4 8779#line 8780 "configure"
97bf5e38
MK
8780#include "confdefs.h"
8781
8782int main () {
8783 char buf[16];
8784 long double f = 3.141592653;
8785 sprintf (buf, "%Lg", f);
8786 return (strncmp ("3.14159", buf, 7));
8787}
8788EOF
226361c4 8789if { (eval echo configure:8790: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
c906108c 8790then
97bf5e38 8791 gdb_cv_printf_has_long_double=yes
c906108c
SS
8792else
8793 echo "configure: failed program was:" >&5
8794 cat conftest.$ac_ext >&5
8795 rm -fr conftest*
97bf5e38 8796 gdb_cv_printf_has_long_double=no
c906108c
SS
8797fi
8798rm -fr conftest*
8799fi
8800
8801fi
8802
97bf5e38 8803if test $gdb_cv_printf_has_long_double = yes; then
c906108c 8804 cat >> confdefs.h <<\EOF
97bf5e38
MK
8805#define PRINTF_HAS_LONG_DOUBLE 1
8806EOF
8807
8808fi
8809echo "$ac_t""$gdb_cv_printf_has_long_double" 1>&6
8810
8811
8812echo $ac_n "checking for long double support in scanf""... $ac_c" 1>&6
226361c4 8813echo "configure:8814: checking for long double support in scanf" >&5
97bf5e38
MK
8814if eval "test \"`echo '$''{'gdb_cv_scanf_has_long_double'+set}'`\" = set"; then
8815 echo $ac_n "(cached) $ac_c" 1>&6
8816else
8817 if test "$cross_compiling" = yes; then
8818 gdb_cv_scanf_has_long_double=no
8819else
8820 cat > conftest.$ac_ext <<EOF
226361c4 8821#line 8822 "configure"
97bf5e38
MK
8822#include "confdefs.h"
8823
8824int main () {
8825 char *buf = "3.141592653";
8826 long double f = 0;
8827 sscanf (buf, "%Lg", &f);
8828 return !(f > 3.14159 && f < 3.14160);
8829}
c906108c 8830EOF
226361c4 8831if { (eval echo configure:8832: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
97bf5e38
MK
8832then
8833 gdb_cv_scanf_has_long_double=yes
8834else
8835 echo "configure: failed program was:" >&5
8836 cat conftest.$ac_ext >&5
8837 rm -fr conftest*
8838 gdb_cv_scanf_has_long_double=no
8839fi
8840rm -fr conftest*
8841fi
c906108c
SS
8842
8843fi
8844
97bf5e38
MK
8845if test $gdb_cv_scanf_has_long_double = yes; then
8846 cat >> confdefs.h <<\EOF
8847#define SCANF_HAS_LONG_DOUBLE 1
8848EOF
8849
8850fi
8851echo "$ac_t""$gdb_cv_scanf_has_long_double" 1>&6
c906108c 8852
438013df
AO
8853case ${host_os} in
8854aix*)
8855 echo $ac_n "checking for -bbigtoc option""... $ac_c" 1>&6
226361c4 8856echo "configure:8857: checking for -bbigtoc option" >&5
438013df
AO
8857if eval "test \"`echo '$''{'gdb_cv_bigtoc'+set}'`\" = set"; then
8858 echo $ac_n "(cached) $ac_c" 1>&6
8859else
8860
8861 SAVE_LDFLAGS=$LDFLAGS
8862
8863 case $GCC in
8864 yes) gdb_cv_bigtoc=-Wl,-bbigtoc ;;
8865 *) gdb_cv_bigtoc=-bbigtoc ;;
8866 esac
8867
8868 LDFLAGS=$LDFLAGS\ $gdb_cv_bigtoc
8869 cat > conftest.$ac_ext <<EOF
226361c4 8870#line 8871 "configure"
438013df
AO
8871#include "confdefs.h"
8872
8873int main() {
8874int i;
8875; return 0; }
8876EOF
226361c4 8877if { (eval echo configure:8878: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
438013df
AO
8878 :
8879else
8880 echo "configure: failed program was:" >&5
8881 cat conftest.$ac_ext >&5
8882 rm -rf conftest*
8883 gdb_cv_bigtoc=
8884fi
8885rm -f conftest*
8886
8887fi
8888
8889echo "$ac_t""$gdb_cv_bigtoc" 1>&6
8890 CONFIG_LDFLAGS="${CONFIG_LDFLAGS} ${gdb_cv_bigtoc}"
8891 ;;
8892esac
8893
c906108c
SS
8894
8895
8896if test ${build} = ${host} -a ${host} = ${target} ; then
8897 case ${host_os} in
8898 hpux*)
8899 echo $ac_n "checking for HPUX/OSF thread support""... $ac_c" 1>&6
226361c4 8900echo "configure:8901: checking for HPUX/OSF thread support" >&5
c906108c
SS
8901 if test -f /usr/include/dce/cma_config.h ; then
8902 if test "$GCC" = "yes" ; then
8903 echo "$ac_t""yes" 1>&6
8904 cat >> confdefs.h <<\EOF
8905#define HAVE_HPUX_THREAD_SUPPORT 1
8906EOF
8907
3483b318 8908 CONFIG_OBS="${CONFIG_OBS} hpux-thread.o"
c906108c
SS
8909 CONFIG_SRCS="${CONFIG_SRCS} hpux-thread.c"
8910 else
8911 echo "$ac_t""no (suppressed because you are not using GCC)" 1>&6
8912 fi
8913 else
8914 echo "$ac_t""no" 1>&6
8915 fi
8916 ;;
8917 solaris*)
d92419e5
JB
8918 # See if thread_db library is around for Solaris thread debugging.
8919 # Note that we must explicitly test for version 1 of the library
8920 # because version 0 (present on Solaris 2.4 or earlier) doesn't have
8921 # the same API.
c906108c 8922 echo $ac_n "checking for Solaris thread debugging library""... $ac_c" 1>&6
226361c4 8923echo "configure:8924: checking for Solaris thread debugging library" >&5
c906108c
SS
8924 if test -f /usr/lib/libthread_db.so.1 ; then
8925 echo "$ac_t""yes" 1>&6
8926 cat >> confdefs.h <<\EOF
8927#define HAVE_THREAD_DB_LIB 1
8928EOF
8929
3483b318 8930 CONFIG_OBS="${CONFIG_OBS} sol-thread.o"
c906108c
SS
8931 CONFIG_SRCS="${CONFIG_SRCS} sol-thread.c"
8932 echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
226361c4 8933echo "configure:8934: checking for dlopen in -ldl" >&5
c906108c
SS
8934ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'`
8935if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
8936 echo $ac_n "(cached) $ac_c" 1>&6
8937else
8938 ac_save_LIBS="$LIBS"
8939LIBS="-ldl $LIBS"
8940cat > conftest.$ac_ext <<EOF
226361c4 8941#line 8942 "configure"
c906108c
SS
8942#include "confdefs.h"
8943/* Override any gcc2 internal prototype to avoid an error. */
8944/* We use char because int might match the return type of a gcc2
8945 builtin and then its argument prototype would still apply. */
8946char dlopen();
8947
8948int main() {
8949dlopen()
8950; return 0; }
8951EOF
226361c4 8952if { (eval echo configure:8953: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c
SS
8953 rm -rf conftest*
8954 eval "ac_cv_lib_$ac_lib_var=yes"
8955else
8956 echo "configure: failed program was:" >&5
8957 cat conftest.$ac_ext >&5
8958 rm -rf conftest*
8959 eval "ac_cv_lib_$ac_lib_var=no"
8960fi
8961rm -f conftest*
8962LIBS="$ac_save_LIBS"
8963
8964fi
8965if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8966 echo "$ac_t""yes" 1>&6
8967 ac_tr_lib=HAVE_LIB`echo dl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
8968 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
8969 cat >> confdefs.h <<EOF
8970#define $ac_tr_lib 1
8971EOF
8972
8973 LIBS="-ldl $LIBS"
8974
8975else
8976 echo "$ac_t""no" 1>&6
8977fi
8978
8979 if test "$GCC" = "yes" ; then
8980 # The GNU linker requires the -export-dynamic option to make
8981 # all symbols visible in the dynamic symbol table.
8982 hold_ldflags=$LDFLAGS
8983 echo $ac_n "checking for the ld -export-dynamic flag""... $ac_c" 1>&6
226361c4 8984echo "configure:8985: checking for the ld -export-dynamic flag" >&5
c906108c
SS
8985 LDFLAGS="${LDFLAGS} -Wl,-export-dynamic"
8986 cat > conftest.$ac_ext <<EOF
226361c4 8987#line 8988 "configure"
c906108c
SS
8988#include "confdefs.h"
8989
8990int main() {
8991int i;
8992; return 0; }
8993EOF
226361c4 8994if { (eval echo configure:8995: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c
SS
8995 rm -rf conftest*
8996 found=yes
8997else
8998 echo "configure: failed program was:" >&5
8999 cat conftest.$ac_ext >&5
9000 rm -rf conftest*
9001 found=no
9002fi
9003rm -f conftest*
9004 LDFLAGS=$hold_ldflags
9005 echo "$ac_t""$found" 1>&6
9006 if test $found = yes; then
9007 CONFIG_LDFLAGS="${CONFIG_LDFLAGS} -Wl,-export-dynamic"
9008 fi
9009 fi
9010 # Sun randomly tweaked the prototypes in <proc_service.h>
9011 # at one point.
9012 echo $ac_n "checking if <proc_service.h> is old""... $ac_c" 1>&6
226361c4 9013echo "configure:9014: checking if <proc_service.h> is old" >&5
c906108c
SS
9014 if eval "test \"`echo '$''{'gdb_cv_proc_service_is_old'+set}'`\" = set"; then
9015 echo $ac_n "(cached) $ac_c" 1>&6
9016else
9017
9018 cat > conftest.$ac_ext <<EOF
226361c4 9019#line 9020 "configure"
c906108c
SS
9020#include "confdefs.h"
9021
9022 #include <proc_service.h>
9023 ps_err_e ps_pdwrite
9024 (struct ps_prochandle*, psaddr_t, const void*, size_t);
9025
9026int main() {
9027
9028; return 0; }
9029EOF
226361c4 9030if { (eval echo configure:9031: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c
SS
9031 rm -rf conftest*
9032 gdb_cv_proc_service_is_old=no
9033else
9034 echo "configure: failed program was:" >&5
9035 cat conftest.$ac_ext >&5
9036 rm -rf conftest*
9037 gdb_cv_proc_service_is_old=yes
9038fi
9039rm -f conftest*
9040
9041fi
9042
9043 echo "$ac_t""$gdb_cv_proc_service_is_old" 1>&6
9044 if test $gdb_cv_proc_service_is_old = yes; then
9045 cat >> confdefs.h <<\EOF
9046#define PROC_SERVICE_IS_OLD 1
9047EOF
9048
9049 fi
9050 else
9051 echo "$ac_t""no" 1>&6
9052 fi
9053 ;;
d92419e5
JB
9054 aix*)
9055 echo $ac_n "checking for AiX thread debugging library""... $ac_c" 1>&6
226361c4 9056echo "configure:9057: checking for AiX thread debugging library" >&5
d92419e5
JB
9057 if eval "test \"`echo '$''{'gdb_cv_have_aix_thread_debug'+set}'`\" = set"; then
9058 echo $ac_n "(cached) $ac_c" 1>&6
9059else
9060 cat > conftest.$ac_ext <<EOF
226361c4 9061#line 9062 "configure"
d92419e5
JB
9062#include "confdefs.h"
9063#include <sys/pthdebug.h>
9064int main() {
9065#ifndef PTHDB_VERSION_3
9066 #error
9067 #endif
9068; return 0; }
9069EOF
226361c4 9070if { (eval echo configure:9071: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
d92419e5
JB
9071 rm -rf conftest*
9072 gdb_cv_have_aix_thread_debug=yes
9073else
9074 echo "configure: failed program was:" >&5
9075 cat conftest.$ac_ext >&5
9076 rm -rf conftest*
9077 gdb_cv_have_aix_thread_debug=no
9078fi
9079rm -f conftest*
9080fi
9081
9082 echo "$ac_t""$gdb_cv_have_aix_thread_debug" 1>&6
9083 if test $gdb_cv_have_aix_thread_debug = yes; then
9084 CONFIG_SRCS="${CONFIG_SRCS} aix-thread.c"
3483b318 9085 CONFIG_OBS="${CONFIG_OBS} aix-thread.o"
d92419e5
JB
9086 CONFIG_LDFLAGS="${CONFIG_LDFLAGS} -lpthdebug"
9087 fi
9088 ;;
c906108c
SS
9089 esac
9090
9091fi
9092
3f47be5c
EZ
9093if test "x$ac_cv_header_thread_db_h" = "xyes"; then
9094 echo $ac_n "checking whether <thread_db.h> has TD_NOTALLOC""... $ac_c" 1>&6
226361c4 9095echo "configure:9096: checking whether <thread_db.h> has TD_NOTALLOC" >&5
3f47be5c
EZ
9096if eval "test \"`echo '$''{'gdb_cv_thread_db_h_has_td_notalloc'+set}'`\" = set"; then
9097 echo $ac_n "(cached) $ac_c" 1>&6
9098else
9099 cat > conftest.$ac_ext <<EOF
226361c4 9100#line 9101 "configure"
3f47be5c
EZ
9101#include "confdefs.h"
9102#include <thread_db.h>
9103int main() {
9104int i = TD_NOTALLOC;
9105; return 0; }
9106EOF
226361c4 9107if { (eval echo configure:9108: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3f47be5c
EZ
9108 rm -rf conftest*
9109 gdb_cv_thread_db_h_has_td_notalloc=yes
9110else
9111 echo "configure: failed program was:" >&5
9112 cat conftest.$ac_ext >&5
9113 rm -rf conftest*
9114 gdb_cv_thread_db_h_has_td_notalloc=no
9115
9116fi
9117rm -f conftest*
9118
9119fi
9120
9121echo "$ac_t""$gdb_cv_thread_db_h_has_td_notalloc" 1>&6
9122fi
9123if test "x$gdb_cv_thread_db_h_has_td_notalloc" = "xyes"; then
9124 cat >> confdefs.h <<\EOF
9125#define THREAD_DB_HAS_TD_NOTALLOC 1
9126EOF
9127
9128fi
9129
b757528f
JJ
9130if test "x$ac_cv_header_sys_syscall_h" = "xyes"; then
9131 echo $ac_n "checking whether <sys/syscall.h> has __NR_tkill""... $ac_c" 1>&6
226361c4 9132echo "configure:9133: checking whether <sys/syscall.h> has __NR_tkill" >&5
b757528f
JJ
9133if eval "test \"`echo '$''{'gdb_cv_sys_syscall_h_has_tkill'+set}'`\" = set"; then
9134 echo $ac_n "(cached) $ac_c" 1>&6
9135else
9136 cat > conftest.$ac_ext <<EOF
226361c4 9137#line 9138 "configure"
b757528f
JJ
9138#include "confdefs.h"
9139#include <sys/syscall.h>
9140int main() {
9141int i = __NR_tkill;
9142; return 0; }
9143EOF
226361c4 9144if { (eval echo configure:9145: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
b757528f
JJ
9145 rm -rf conftest*
9146 gdb_cv_sys_syscall_h_has_tkill=yes
9147else
9148 echo "configure: failed program was:" >&5
9149 cat conftest.$ac_ext >&5
9150 rm -rf conftest*
9151 gdb_cv_sys_syscall_h_has_tkill=no
9152
9153fi
9154rm -f conftest*
9155
9156fi
9157
9158echo "$ac_t""$gdb_cv_sys_syscall_h_has_tkill" 1>&6
9159fi
9160if test "x$gdb_cv_sys_syscall_h_has_tkill" = "xyes" && test "x$ac_cv_func_syscall" = "xyes"; then
9161 cat >> confdefs.h <<\EOF
9162#define HAVE_TKILL_SYSCALL 1
9163EOF
9164
9165fi
9166
fb40c209 9167
030292b7
DJ
9168# Check whether --with-sysroot or --without-sysroot was given.
9169if test "${with_sysroot+set}" = set; then
9170 withval="$with_sysroot"
9171
9172 case ${with_sysroot} in
715d1656 9173 yes) TARGET_SYSTEM_ROOT='${exec_prefix}/${target_alias}/sys-root' ;;
030292b7
DJ
9174 *) TARGET_SYSTEM_ROOT=$with_sysroot ;;
9175 esac
9176
9177 TARGET_SYSTEM_ROOT_DEFINE='-DTARGET_SYSTEM_ROOT=\"$(TARGET_SYSTEM_ROOT)\"'
9178
9179 if test "x$exec_prefix" = xNONE; then
9180 if test "x$prefix" = xNONE; then
9181 test_prefix=/usr/local
9182 else
9183 test_prefix=$prefix
9184 fi
9185 else
9186 test_prefix=$exec_prefix
9187 fi
9188 case ${TARGET_SYSTEM_ROOT} in
715d1656
AO
9189 "${test_prefix}"|"${test_prefix}/"*|\
9190 '${exec_prefix}'|'${exec_prefix}/'*)
030292b7
DJ
9191 t="$TARGET_SYSTEM_ROOT_DEFINE -DTARGET_SYSTEM_ROOT_RELOCATABLE"
9192 TARGET_SYSTEM_ROOT_DEFINE="$t"
9193 ;;
9194 esac
9195
9196else
9197
9198 TARGET_SYSTEM_ROOT=
9199 TARGET_SYSTEM_ROOT_DEFINE='-DTARGET_SYSTEM_ROOT=\"\"'
9200
9201fi
9202
9203
9204
9205
3b851bce
AC
9206# NOTE: Don't add -Wall or -Wunused, they both include
9207# -Wunused-parameter which reports bogus warnings.
9208# NOTE: If you add to this list, remember to update
9209# gdb/doc/gdbint.texinfo.
1decb323 9210build_warnings="-Wimplicit -Wreturn-type -Wcomment -Wtrigraphs \
0f0cffd2 9211-Wformat -Wparentheses -Wpointer-arith -Wuninitialized -Wformat-nonliteral \
4566dfcf 9212-Wunused-label -Wunused-function"
d8038014 9213# Up for debate: -Wswitch -Wcomment -trigraphs -Wtrigraphs
0f0cffd2 9214# -Wunused-function -Wunused-variable -Wunused-value
93d56215 9215# -Wchar-subscripts -Wtraditional -Wshadow -Wcast-qual
d8038014
AC
9216# -Wcast-align -Wwrite-strings -Wconversion -Wstrict-prototypes
9217# -Wmissing-prototypes -Wmissing-declarations -Wredundant-decls
9218# -Woverloaded-virtual -Winline -Werror"
c906108c
SS
9219# Check whether --enable-build-warnings or --disable-build-warnings was given.
9220if test "${enable_build_warnings+set}" = set; then
9221 enableval="$enable_build_warnings"
1decb323 9222 case "${enableval}" in
c906108c
SS
9223 yes) ;;
9224 no) build_warnings="-w";;
9225 ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"`
9226 build_warnings="${build_warnings} ${t}";;
9227 *,) t=`echo "${enableval}" | sed -e "s/,/ /g"`
9228 build_warnings="${t} ${build_warnings}";;
9229 *) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;;
9230esac
d4f3574e 9231if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then
746a987d 9232 echo "Setting compiler warning flags = $build_warnings" 6>&1
c906108c 9233fi
1decb323 9234fi
3b851bce
AC
9235# Check whether --enable-gdb-build-warnings or --disable-gdb-build-warnings was given.
9236if test "${enable_gdb_build_warnings+set}" = set; then
9237 enableval="$enable_gdb_build_warnings"
9238 case "${enableval}" in
9239 yes) ;;
9240 no) build_warnings="-w";;
9241 ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"`
9242 build_warnings="${build_warnings} ${t}";;
9243 *,) t=`echo "${enableval}" | sed -e "s/,/ /g"`
9244 build_warnings="${t} ${build_warnings}";;
9245 *) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;;
9246esac
9247if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then
9248 echo "Setting GDB specific compiler warning flags = $build_warnings" 6>&1
9249fi
9250fi
104c1213
JM
9251WARN_CFLAGS=""
9252WERROR_CFLAGS=""
c906108c
SS
9253if test "x${build_warnings}" != x -a "x$GCC" = xyes
9254then
746a987d 9255 echo $ac_n "checking compiler warning flags""... $ac_c" 1>&6
226361c4 9256echo "configure:9257: checking compiler warning flags" >&5
746a987d
AC
9257 # Separate out the -Werror flag as some files just cannot be
9258 # compiled with it enabled.
9259 for w in ${build_warnings}; do
9260 case $w in
9261 -Werr*) WERROR_CFLAGS=-Werror ;;
9262 *) # Check that GCC accepts it
4536bbc6
AC
9263 saved_CFLAGS="$CFLAGS"
9264 CFLAGS="$CFLAGS $w"
9265 cat > conftest.$ac_ext <<EOF
226361c4 9266#line 9267 "configure"
4536bbc6
AC
9267#include "confdefs.h"
9268
9269int main() {
9270
9271; return 0; }
9272EOF
226361c4 9273if { (eval echo configure:9274: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4536bbc6
AC
9274 rm -rf conftest*
9275 WARN_CFLAGS="${WARN_CFLAGS} $w"
9276else
9277 echo "configure: failed program was:" >&5
9278 cat conftest.$ac_ext >&5
9279fi
9280rm -f conftest*
9281 CFLAGS="$saved_CFLAGS"
746a987d
AC
9282 esac
9283 done
9284 echo "$ac_t""${WARN_CFLAGS}${WERROR_CFLAGS}" 1>&6
c906108c
SS
9285fi
9286
9287
104c1213 9288
7a292a7a
SS
9289# In the Cygwin environment, we need some additional flags.
9290echo $ac_n "checking for cygwin""... $ac_c" 1>&6
226361c4 9291echo "configure:9292: checking for cygwin" >&5
7a292a7a
SS
9292if eval "test \"`echo '$''{'gdb_cv_os_cygwin'+set}'`\" = set"; then
9293 echo $ac_n "(cached) $ac_c" 1>&6
9294else
9295 cat > conftest.$ac_ext <<EOF
226361c4 9296#line 9297 "configure"
7a292a7a
SS
9297#include "confdefs.h"
9298
9299#if defined (__CYGWIN__) || defined (__CYGWIN32__)
9300lose
9301#endif
9302EOF
9303if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9304 egrep "lose" >/dev/null 2>&1; then
9305 rm -rf conftest*
9306 gdb_cv_os_cygwin=yes
9307else
9308 rm -rf conftest*
9309 gdb_cv_os_cygwin=no
9310fi
9311rm -f conftest*
9312
9313fi
9314
9315echo "$ac_t""$gdb_cv_os_cygwin" 1>&6
9316
aff38e61
AC
9317
9318SER_HARDWIRE="ser-unix.o ser-pipe.o ser-tcp.o"
9319case ${host} in
95cbc983
AC
9320 *go32* ) SER_HARDWIRE=ser-go32.o ;;
9321 *djgpp* ) SER_HARDWIRE=ser-go32.o ;;
aff38e61
AC
9322esac
9323
9324
cd0fc7c3
SS
9325# libreadline needs libuser32.a in a cygwin environment
9326WIN32LIBS=
9327if test x$gdb_cv_os_cygwin = xyes; then
c5394b80
JM
9328 WIN32LIBS="-luser32"
9329 case "${target}" in
9330 *cygwin*) WIN32LIBS="$WIN32LIBS -limagehlp"
9331 ;;
9332 esac
cd0fc7c3 9333fi
c906108c 9334
7a292a7a 9335
3fc11d3e
JM
9336LIBGUI="../libgui/src/libgui.a"
9337GUI_CFLAGS_X="-I${srcdir}/../libgui/src"
9338
9339
7a292a7a 9340
3fc11d3e
JM
9341WIN32LDAPP=
9342
9343
9344
9345configdir="unix"
9346
9347GDBTKLIBS=
9348if test "${enable_gdbtk}" = "yes"; then
9349
d1c3b63a
KS
9350 # Gdbtk must have an absolute path to srcdir in order to run
9351 # properly when not installed.
9352 here=`pwd`
9353 cd ${srcdir}
9354 GDBTK_SRC_DIR=`pwd`
9355 cd $here
9356
3fc11d3e
JM
9357
9358#
9359# Ok, lets find the tcl configuration
9360# First, look for one uninstalled.
9361# the alternative search directory is invoked by --with-tclconfig
9362#
9363
9364if test x"${no_tcl}" = x ; then
9365 # we reset no_tcl in case something fails here
9366 no_tcl=true
9367 # Check whether --with-tclconfig or --without-tclconfig was given.
9368if test "${with_tclconfig+set}" = set; then
9369 withval="$with_tclconfig"
9370 with_tclconfig=${withval}
9371fi
9372
9373 echo $ac_n "checking for Tcl configuration""... $ac_c" 1>&6
226361c4 9374echo "configure:9375: checking for Tcl configuration" >&5
3fc11d3e
JM
9375 if eval "test \"`echo '$''{'ac_cv_c_tclconfig'+set}'`\" = set"; then
9376 echo $ac_n "(cached) $ac_c" 1>&6
9377else
9378
9379
9380 # First check to see if --with-tclconfig was specified.
9381 if test x"${with_tclconfig}" != x ; then
9382 if test -f "${with_tclconfig}/tclConfig.sh" ; then
9383 ac_cv_c_tclconfig=`(cd ${with_tclconfig}; pwd)`
9384 else
9385 { echo "configure: error: ${with_tclconfig} directory doesn't contain tclConfig.sh" 1>&2; exit 1; }
9386 fi
9387 fi
9388
9389 # then check for a private Tcl installation
9390 if test x"${ac_cv_c_tclconfig}" = x ; then
9391 for i in \
9392 ../tcl \
9393 `ls -dr ../tcl[7-9]* 2>/dev/null` \
9394 ../../tcl \
9395 `ls -dr ../../tcl[7-9]* 2>/dev/null` \
9396 ../../../tcl \
9397 `ls -dr ../../../tcl[7-9]* 2>/dev/null` ; do
9398 if test -f "$i/${configdir}/tclConfig.sh" ; then
9399 ac_cv_c_tclconfig=`(cd $i/${configdir}; pwd)`
9400 break
9401 fi
9402 done
9403 fi
9404 # check in a few common install locations
9405 if test x"${ac_cv_c_tclconfig}" = x ; then
9406 for i in `ls -d ${prefix}/lib /usr/local/lib 2>/dev/null` ; do
9407 if test -f "$i/tclConfig.sh" ; then
9408 ac_cv_c_tclconfig=`(cd $i; pwd)`
9409 break
9410 fi
9411 done
9412 fi
9413 # check in a few other private locations
9414 if test x"${ac_cv_c_tclconfig}" = x ; then
9415 for i in \
9416 ${srcdir}/../tcl \
9417 `ls -dr ${srcdir}/../tcl[7-9]* 2>/dev/null` ; do
9418 if test -f "$i/${configdir}/tclConfig.sh" ; then
9419 ac_cv_c_tclconfig=`(cd $i/${configdir}; pwd)`
9420 break
9421 fi
9422 done
9423 fi
9424
9425fi
9426
9427 if test x"${ac_cv_c_tclconfig}" = x ; then
9428 TCLCONFIG="# no Tcl configs found"
9429 echo "configure: warning: Can't find Tcl configuration definitions" 1>&2
9430 else
9431 no_tcl=
9432 TCLCONFIG=${ac_cv_c_tclconfig}/tclConfig.sh
9433 echo "$ac_t""found $TCLCONFIG" 1>&6
9434 fi
9435fi
9436
9437 if test -z "${no_tcl}"; then
9438
9439 . $TCLCONFIG
9440
9441
9442
9443
9444
9445
9446
9447
9448
9449
9450
9451
9452
9453
9454
9455
9456
9457
9458
9459
033afc63 9460
3fc11d3e
JM
9461
9462
9463
9464
9465
9466
9467#
9468# Ok, lets find the tk configuration
9469# First, look for one uninstalled.
9470# the alternative search directory is invoked by --with-tkconfig
9471#
9472
9473if test x"${no_tk}" = x ; then
9474 # we reset no_tk in case something fails here
9475 no_tk=true
9476 # Check whether --with-tkconfig or --without-tkconfig was given.
9477if test "${with_tkconfig+set}" = set; then
9478 withval="$with_tkconfig"
9479 with_tkconfig=${withval}
9480fi
9481
9482 echo $ac_n "checking for Tk configuration""... $ac_c" 1>&6
226361c4 9483echo "configure:9484: checking for Tk configuration" >&5
3fc11d3e
JM
9484 if eval "test \"`echo '$''{'ac_cv_c_tkconfig'+set}'`\" = set"; then
9485 echo $ac_n "(cached) $ac_c" 1>&6
9486else
9487
9488
9489 # First check to see if --with-tkconfig was specified.
9490 if test x"${with_tkconfig}" != x ; then
9491 if test -f "${with_tkconfig}/tkConfig.sh" ; then
9492 ac_cv_c_tkconfig=`(cd ${with_tkconfig}; pwd)`
9493 else
9494 { echo "configure: error: ${with_tkconfig} directory doesn't contain tkConfig.sh" 1>&2; exit 1; }
9495 fi
9496 fi
9497
9498 # then check for a private Tk library
9499 if test x"${ac_cv_c_tkconfig}" = x ; then
9500 for i in \
9501 ../tk \
9502 `ls -dr ../tk[4-9]* 2>/dev/null` \
9503 ../../tk \
9504 `ls -dr ../../tk[4-9]* 2>/dev/null` \
9505 ../../../tk \
9506 `ls -dr ../../../tk[4-9]* 2>/dev/null` ; do
9507 if test -f "$i/${configdir}/tkConfig.sh" ; then
9508 ac_cv_c_tkconfig=`(cd $i/${configdir}; pwd)`
9509 break
9510 fi
9511 done
9512 fi
9513 # check in a few common install locations
9514 if test x"${ac_cv_c_tkconfig}" = x ; then
9515 for i in `ls -d ${prefix}/lib /usr/local/lib 2>/dev/null` ; do
9516 if test -f "$i/tkConfig.sh" ; then
9517 ac_cv_c_tkconfig=`(cd $i; pwd)`
9518 break
9519 fi
9520 done
9521 fi
9522 # check in a few other private locations
9523 if test x"${ac_cv_c_tkconfig}" = x ; then
9524 for i in \
9525 ${srcdir}/../tk \
9526 `ls -dr ${srcdir}/../tk[4-9]* 2>/dev/null` ; do
9527 if test -f "$i/${configdir}/tkConfig.sh" ; then
9528 ac_cv_c_tkconfig=`(cd $i/${configdir}; pwd)`
9529 break
9530 fi
9531 done
9532 fi
9533
9534fi
9535
9536 if test x"${ac_cv_c_tkconfig}" = x ; then
9537 TKCONFIG="# no Tk configs found"
9538 echo "configure: warning: Can't find Tk configuration definitions" 1>&2
9539 else
9540 no_tk=
9541 TKCONFIG=${ac_cv_c_tkconfig}/tkConfig.sh
9542 echo "$ac_t""found $TKCONFIG" 1>&6
9543 fi
9544fi
9545
9546
9547
dd2504ab
JM
9548 # now look for Tcl library stuff
9549
9550 case "${host}" in
9551 *-*-cygwin*)
9552 tcldir=../tcl/win/
9553 ;;
9554 *)
9555 tcldir=../tcl/unix/
9556 ;;
9557 esac
9558
9559 TCL_DEPS="${tcldir}${TCL_LIB_FILE}"
9560
3fc11d3e
JM
9561 # If $no_tk is nonempty, then we can't do Tk, and there is no
9562 # point to doing Tcl.
9563 if test -z "${no_tk}"; then
9564
9565 if test -f "$TKCONFIG" ; then
9566 . $TKCONFIG
9567 fi
9568
9569
9570
9571
9572
9573
9574
9575
9576
9577
9578
9579
9580
9581
9582#
9583# Ok, lets find the tcl source trees so we can use the headers
9584# Warning: transition of version 9 to 10 will break this algorithm
9585# because 10 sorts before 9. We also look for just tcl. We have to
9586# be careful that we don't match stuff like tclX by accident.
9587# the alternative search directory is involked by --with-tclinclude
9588#
9589
9590no_tcl=true
9591echo $ac_n "checking for Tcl private headers. dir=${configdir}""... $ac_c" 1>&6
226361c4 9592echo "configure:9593: checking for Tcl private headers. dir=${configdir}" >&5
3fc11d3e
JM
9593# Check whether --with-tclinclude or --without-tclinclude was given.
9594if test "${with_tclinclude+set}" = set; then
9595 withval="$with_tclinclude"
9596 with_tclinclude=${withval}
9597fi
9598
9599if eval "test \"`echo '$''{'ac_cv_c_tclh'+set}'`\" = set"; then
9600 echo $ac_n "(cached) $ac_c" 1>&6
9601else
9602
9603# first check to see if --with-tclinclude was specified
9604if test x"${with_tclinclude}" != x ; then
9605 if test -f ${with_tclinclude}/tclInt.h ; then
9606 ac_cv_c_tclh=`(cd ${with_tclinclude}; pwd)`
9607 elif test -f ${with_tclinclude}/generic/tclInt.h ; then
9608 ac_cv_c_tclh=`(cd ${with_tclinclude}/generic; pwd)`
9609 else
9610 { echo "configure: error: ${with_tclinclude} directory doesn't contain private headers" 1>&2; exit 1; }
9611 fi
9612fi
9613
9614# next check if it came with Tcl configuration file
9615if test x"${ac_cv_c_tclconfig}" = x ; then
9616 if test -f $ac_cv_c_tclconfig/../generic/tclInt.h ; then
9617 ac_cv_c_tclh=`(cd $ac_cv_c_tclconfig/..; pwd)`
9618 fi
9619fi
9620
9621# next check in private source directory
9622#
9623# since ls returns lowest version numbers first, reverse its output
9624if test x"${ac_cv_c_tclh}" = x ; then
9625 for i in \
9626 ${srcdir}/../tcl \
9627 `ls -dr ${srcdir}/../tcl[7-9]* 2>/dev/null` \
9628 ${srcdir}/../../tcl \
9629 `ls -dr ${srcdir}/../../tcl[7-9]* 2>/dev/null` \
9630 ${srcdir}/../../../tcl \
9631 `ls -dr ${srcdir}/../../../tcl[7-9]* 2>/dev/null ` ; do
9632 if test -f $i/generic/tclInt.h ; then
9633 ac_cv_c_tclh=`(cd $i/generic; pwd)`
9634 break
9635 fi
9636 done
9637fi
9638# finally check in a few common install locations
9639#
9640# since ls returns lowest version numbers first, reverse its output
9641if test x"${ac_cv_c_tclh}" = x ; then
9642 for i in \
9643 `ls -dr /usr/local/src/tcl[7-9]* 2>/dev/null` \
9644 `ls -dr /usr/local/lib/tcl[7-9]* 2>/dev/null` \
9645 /usr/local/src/tcl \
9646 /usr/local/lib/tcl \
9647 ${prefix}/include ; do
9648 if test -f $i/generic/tclInt.h ; then
9649 ac_cv_c_tclh=`(cd $i/generic; pwd)`
9650 break
9651 fi
9652 done
9653fi
9654# see if one is installed
9655if test x"${ac_cv_c_tclh}" = x ; then
9656 ac_safe=`echo "tclInt.h" | sed 'y%./+-%__p_%'`
9657echo $ac_n "checking for tclInt.h""... $ac_c" 1>&6
226361c4 9658echo "configure:9659: checking for tclInt.h" >&5
3fc11d3e
JM
9659if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
9660 echo $ac_n "(cached) $ac_c" 1>&6
9661else
9662 cat > conftest.$ac_ext <<EOF
226361c4 9663#line 9664 "configure"
3fc11d3e
JM
9664#include "confdefs.h"
9665#include <tclInt.h>
9666EOF
9667ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
226361c4 9668{ (eval echo configure:9669: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3fc11d3e
JM
9669ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9670if test -z "$ac_err"; then
9671 rm -rf conftest*
9672 eval "ac_cv_header_$ac_safe=yes"
9673else
9674 echo "$ac_err" >&5
9675 echo "configure: failed program was:" >&5
9676 cat conftest.$ac_ext >&5
9677 rm -rf conftest*
9678 eval "ac_cv_header_$ac_safe=no"
9679fi
9680rm -f conftest*
9681fi
9682if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9683 echo "$ac_t""yes" 1>&6
9684 ac_cv_c_tclh=installed
9685else
9686 echo "$ac_t""no" 1>&6
9687ac_cv_c_tclh=""
9688fi
9689
9690fi
9691
9692fi
9693
9694if test x"${ac_cv_c_tclh}" = x ; then
9695 TCLHDIR="# no Tcl private headers found"
9696 { echo "configure: error: Can't find Tcl private headers" 1>&2; exit 1; }
9697fi
9698if test x"${ac_cv_c_tclh}" != x ; then
9699 no_tcl=""
9700 if test x"${ac_cv_c_tclh}" = x"installed" ; then
9701 echo "$ac_t""is installed" 1>&6
9702 TCLHDIR=""
9703 else
9704 echo "$ac_t""found in ${ac_cv_c_tclh}" 1>&6
9705 # this hack is cause the TCLHDIR won't print if there is a "-I" in it.
9706 TCLHDIR="-I${ac_cv_c_tclh}"
9707 fi
9708fi
9709
9710
9711
9712
9713#
9714# Ok, lets find the tk source trees so we can use the headers
9715# If the directory (presumably symlink) named "tk" exists, use that one
9716# in preference to any others. Same logic is used when choosing library
9717# and again with Tcl. The search order is the best place to look first, then in
9718# decreasing significance. The loop breaks if the trigger file is found.
9719# Note the gross little conversion here of srcdir by cd'ing to the found
9720# directory. This converts the path from a relative to an absolute, so
9721# recursive cache variables for the path will work right. We check all
9722# the possible paths in one loop rather than many seperate loops to speed
9723# things up.
9724# the alternative search directory is involked by --with-tkinclude
9725#
9726no_tk=true
9727echo $ac_n "checking for Tk private headers""... $ac_c" 1>&6
226361c4 9728echo "configure:9729: checking for Tk private headers" >&5
3fc11d3e
JM
9729# Check whether --with-tkinclude or --without-tkinclude was given.
9730if test "${with_tkinclude+set}" = set; then
9731 withval="$with_tkinclude"
9732 with_tkinclude=${withval}
9733fi
9734
9735if eval "test \"`echo '$''{'ac_cv_c_tkh'+set}'`\" = set"; then
9736 echo $ac_n "(cached) $ac_c" 1>&6
9737else
9738
9739# first check to see if --with-tkinclude was specified
9740if test x"${with_tkinclude}" != x ; then
9741 if test -f ${with_tkinclude}/tk.h ; then
9742 ac_cv_c_tkh=`(cd ${with_tkinclude}; pwd)`
9743 elif test -f ${with_tkinclude}/generic/tk.h ; then
9744 ac_cv_c_tkh=`(cd ${with_tkinclude}/generic; pwd)`
9745 else
9746 { echo "configure: error: ${with_tkinclude} directory doesn't contain private headers" 1>&2; exit 1; }
9747 fi
9748fi
9749
9750# next check if it came with Tk configuration file
9751if test x"${ac_cv_c_tkconfig}" = x ; then
9752 if test -f $ac_cv_c_tkconfig/../generic/tk.h ; then
9753 ac_cv_c_tkh=`(cd $ac_cv_c_tkconfig/..; pwd)`
9754 fi
9755fi
9756
9757# next check in private source directory
9758#
9759# since ls returns lowest version numbers first, reverse its output
9760if test x"${ac_cv_c_tkh}" = x ; then
9761 for i in \
9762 ${srcdir}/../tk \
9763 `ls -dr ${srcdir}/../tk[4-9]* 2>/dev/null` \
9764 ${srcdir}/../../tk \
9765 `ls -dr ${srcdir}/../../tk[4-9]* 2>/dev/null` \
9766 ${srcdir}/../../../tk \
9767 `ls -dr ${srcdir}/../../../tk[4-9]* 2>/dev/null ` ; do
9768 if test -f $i/generic/tk.h ; then
9769 ac_cv_c_tkh=`(cd $i/generic; pwd)`
9770 break
9771 fi
9772 done
9773fi
9774# finally check in a few common install locations
9775#
9776# since ls returns lowest version numbers first, reverse its output
9777if test x"${ac_cv_c_tkh}" = x ; then
9778 for i in \
9779 `ls -dr /usr/local/src/tk[4-9]* 2>/dev/null` \
9780 `ls -dr /usr/local/lib/tk[4-9]* 2>/dev/null` \
9781 /usr/local/src/tk \
9782 /usr/local/lib/tk \
9783 ${prefix}/include ; do
9784 if test -f $i/generic/tk.h ; then
9785 ac_cv_c_tkh=`(cd $i/generic; pwd)`
9786 break
9787 fi
9788 done
9789fi
9790# see if one is installed
9791if test x"${ac_cv_c_tkh}" = x ; then
9792 ac_safe=`echo "tk.h" | sed 'y%./+-%__p_%'`
9793echo $ac_n "checking for tk.h""... $ac_c" 1>&6
226361c4 9794echo "configure:9795: checking for tk.h" >&5
3fc11d3e
JM
9795if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
9796 echo $ac_n "(cached) $ac_c" 1>&6
9797else
9798 cat > conftest.$ac_ext <<EOF
226361c4 9799#line 9800 "configure"
3fc11d3e
JM
9800#include "confdefs.h"
9801#include <tk.h>
9802EOF
9803ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
226361c4 9804{ (eval echo configure:9805: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3fc11d3e
JM
9805ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9806if test -z "$ac_err"; then
9807 rm -rf conftest*
9808 eval "ac_cv_header_$ac_safe=yes"
9809else
9810 echo "$ac_err" >&5
9811 echo "configure: failed program was:" >&5
9812 cat conftest.$ac_ext >&5
9813 rm -rf conftest*
9814 eval "ac_cv_header_$ac_safe=no"
9815fi
9816rm -f conftest*
9817fi
9818if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9819 echo "$ac_t""yes" 1>&6
9820 ac_cv_c_tkh=installed
9821else
9822 echo "$ac_t""no" 1>&6
9823ac_cv_c_tkh=""
9824fi
9825
9826fi
9827
9828fi
9829
9830if test x"${ac_cv_c_tkh}" != x ; then
9831 no_tk=""
9832 if test x"${ac_cv_c_tkh}" = x"installed" ; then
9833 echo "$ac_t""is installed" 1>&6
9834 TKHDIR=""
9835 else
9836 echo "$ac_t""found in ${ac_cv_c_tkh}" 1>&6
9837 # this hack is cause the TKHDIR won't print if there is a "-I" in it.
9838 TKHDIR="-I${ac_cv_c_tkh}"
9839 fi
9840else
9841 TKHDIR="# no Tk directory found"
9842 echo "configure: warning: Can't find Tk private headers" 1>&2
9843 no_tk=true
9844fi
9845
9846
9847
9848
9849echo $ac_n "checking for Itcl private headers. srcdir=${srcdir}""... $ac_c" 1>&6
226361c4 9850echo "configure:9851: checking for Itcl private headers. srcdir=${srcdir}" >&5
3fc11d3e
JM
9851if test x"${ac_cv_c_itclh}" = x ; then
9852 for i in ${srcdir}/../itcl ${srcdir}/../../itcl ${srcdir}/../../../itcl ${srcdir}/../itcl/itcl; do
9853 if test -f $i/generic/itcl.h ; then
9854 ac_cv_c_itclh=`(cd $i/generic; pwd)`
9855 break
9856 fi
9857 done
9858fi
9859if test x"${ac_cv_c_itclh}" = x ; then
9860 ITCLHDIR="# no Itcl private headers found"
9861 { echo "configure: error: Can't find Itcl private headers" 1>&2; exit 1; }
9862fi
9863if test x"${ac_cv_c_itclh}" != x ; then
9864 ITCLHDIR="-I${ac_cv_c_itclh}"
9865fi
9866# should always be here
9867# ITCLLIB="../itcl/itcl/unix/libitcl.a"
9868
9869#AC_SUBST(ITCLLIB)
9870
9871
9872echo $ac_n "checking for Itk private headers. srcdir=${srcdir}""... $ac_c" 1>&6
226361c4 9873echo "configure:9874: checking for Itk private headers. srcdir=${srcdir}" >&5
3fc11d3e
JM
9874if test x"${ac_cv_c_itkh}" = x ; then
9875 for i in ${srcdir}/../itcl ${srcdir}/../../itcl ${srcdir}/../../../itcl ${srcdir}/../itcl/itk; do
9876 if test -f $i/generic/itk.h ; then
9877 ac_cv_c_itkh=`(cd $i/generic; pwd)`
9878 break
9879 fi
9880 done
9881fi
9882if test x"${ac_cv_c_itkh}" = x ; then
9883 ITKHDIR="# no Itk private headers found"
9884 { echo "configure: error: Can't find Itk private headers" 1>&2; exit 1; }
9885fi
9886if test x"${ac_cv_c_itkh}" != x ; then
9887 ITKHDIR="-I${ac_cv_c_itkh}"
9888fi
9889# should always be here
9890# ITKLIB="../itcl/itk/unix/libitk.a"
9891
9892#AC_SUBST(ITKLIB)
9893
3fc11d3e 9894
dd2504ab
JM
9895
9896 # now look for Tk library stuff
9897
9898 case "${host}" in
9899 *-*-cygwin*)
9900 tkdir=../tk/win/
9901 ;;
9902 *)
9903 tkdir=../tk/unix/
9904 ;;
9905 esac
9906
9907 TK_DEPS="${tkdir}${TK_LIB_FILE}"
9908
3fc11d3e
JM
9909 # now look for Itcl library stuff
9910
9911
9912#
9913# Ok, lets find the itcl configuration
9914# First, look for one uninstalled.
9915# the alternative search directory is invoked by --with-itclconfig
9916#
9917
9918if test x"${no_itcl}" = x ; then
9919 # we reset no_itcl in case something fails here
9920 no_itcl=true
9921 # Check whether --with-itclconfig or --without-itclconfig was given.
9922if test "${with_itclconfig+set}" = set; then
9923 withval="$with_itclconfig"
9924 with_itclconfig=${withval}
9925fi
9926
9927 echo $ac_n "checking for Itcl configuration""... $ac_c" 1>&6
226361c4 9928echo "configure:9929: checking for Itcl configuration" >&5
3fc11d3e
JM
9929 if eval "test \"`echo '$''{'ac_cv_c_itclconfig'+set}'`\" = set"; then
9930 echo $ac_n "(cached) $ac_c" 1>&6
9931else
9932
9933
9934 # First check to see if --with-itclconfig was specified.
9935 if test x"${with_itclconfig}" != x ; then
9936 if test -f "${with_itclconfig}/itclConfig.sh" ; then
9937 ac_cv_c_itclconfig=`(cd ${with_itclconfig}; pwd)`
9938 else
9939 { echo "configure: error: ${with_itclconfig} directory doesn't contain itclConfig.sh" 1>&2; exit 1; }
9940 fi
9941 fi
9942
9943 # then check for a private Itcl library
9944 if test x"${ac_cv_c_itclconfig}" = x ; then
9945 for i in \
9946 ../itcl/itcl \
9947 `ls -dr ../itcl[4-9]*/itcl 2>/dev/null` \
9948 ../../itcl \
9949 `ls -dr ../../itcl[4-9]*/itcl 2>/dev/null` \
9950 ../../../itcl \
9951 `ls -dr ../../../itcl[4-9]*/itcl 2>/dev/null` ; do
9952 if test -f "$i/itclConfig.sh" ; then
9953 ac_cv_c_itclconfig=`(cd $i; pwd)`
9954 break
9955 fi
9956 done
9957 fi
9958 # check in a few common install locations
9959 if test x"${ac_cv_c_itclconfig}" = x ; then
9960 for i in `ls -d ${prefix}/lib /usr/local/lib 2>/dev/null` ; do
9961 if test -f "$i/itclConfig.sh" ; then
9962 ac_cv_c_itclconfig=`(cd $i; pwd)`
9963 break
9964 fi
9965 done
9966 fi
9967 # check in a few other private locations
9968 if test x"${ac_cv_c_itclconfig}" = x ; then
9969 for i in \
9970 ${srcdir}/../itcl/itcl \
9971 `ls -dr ${srcdir}/../itcl[4-9]*/itcl 2>/dev/null` ; do
9972 if test -f "$i/itclConfig.sh" ; then
9973 ac_cv_c_itclconfig=`(cd $i; pwd)`
9974 break
9975 fi
9976 done
9977 fi
9978
9979fi
9980
9981 if test x"${ac_cv_c_itclconfig}" = x ; then
9982 ITCLCONFIG="# no Itcl configs found"
9983 echo "configure: warning: Can't find Itcl configuration definitions" 1>&2
9984 else
9985 no_itcl=
9986 ITCLCONFIG=${ac_cv_c_itclconfig}/itclConfig.sh
9987 echo "$ac_t""found $ITCLCONFIG" 1>&6
9988 fi
9989fi
9990
9991 if test -z "${no_itcl}"; then
9992
9993 if test -f "$ITCLCONFIG" ; then
9994 . $ITCLCONFIG
9995 fi
9996
9997
9998
9999
10000
10001
10002
10003
10004
10005
3fc11d3e
JM
10006
10007
10008 ITCLLIB="${ITCL_BUILD_LIB_SPEC}"
b381d62d 10009 ITCL_DEPS="${ITCL_LIB_FULL_PATH}"
3fc11d3e
JM
10010 fi
10011
10012
10013 # now look for Itk library stuff
10014
10015#
10016# Ok, lets find the itk configuration
10017# First, look for one uninstalled.
10018# the alternative search directory is invoked by --with-itkconfig
10019#
10020
10021if test x"${no_itk}" = x ; then
10022 # we reset no_itk in case something fails here
10023 no_itk=true
10024 # Check whether --with-itkconfig or --without-itkconfig was given.
10025if test "${with_itkconfig+set}" = set; then
10026 withval="$with_itkconfig"
10027 with_itkconfig=${withval}
10028fi
10029
10030 echo $ac_n "checking for Itk configuration""... $ac_c" 1>&6
226361c4 10031echo "configure:10032: checking for Itk configuration" >&5
3fc11d3e
JM
10032 if eval "test \"`echo '$''{'ac_cv_c_itkconfig'+set}'`\" = set"; then
10033 echo $ac_n "(cached) $ac_c" 1>&6
10034else
10035
10036
10037 # First check to see if --with-itkconfig was specified.
10038 if test x"${with_itkconfig}" != x ; then
10039 if test -f "${with_itkconfig}/itkConfig.sh" ; then
10040 ac_cv_c_itkconfig=`(cd ${with_itkconfig}; pwd)`
10041 else
10042 { echo "configure: error: ${with_itkconfig} directory doesn't contain itkConfig.sh" 1>&2; exit 1; }
10043 fi
10044 fi
10045
10046 # then check for a private Itk library
10047 if test x"${ac_cv_c_itkconfig}" = x ; then
10048 for i in \
10049 ../itcl/itk \
10050 `ls -dr ../itcl[4-9]*/itk 2>/dev/null` \
10051 ../../itk \
10052 `ls -dr ../../itcl[4-9]*/itk 2>/dev/null` \
10053 ../../../itk \
10054 `ls -dr ../../../itcl[4-9]*/itk 2>/dev/null` ; do
10055 if test -f "$i/itkConfig.sh" ; then
10056 ac_cv_c_itkconfig=`(cd $i; pwd)`
10057 break
10058 fi
10059 done
10060 fi
10061 # check in a few common install locations
10062 if test x"${ac_cv_c_itkconfig}" = x ; then
10063 for i in `ls -d ${prefix}/lib /usr/local/lib 2>/dev/null` ; do
10064 if test -f "$i/itkConfig.sh" ; then
10065 ac_cv_c_itkconfig=`(cd $i; pwd)`
10066 break
10067 fi
10068 done
10069 fi
10070 # check in a few other private locations
10071 if test x"${ac_cv_c_itkconfig}" = x ; then
10072 for i in \
10073 ${srcdir}/../itcl/itk \
10074 `ls -dr ${srcdir}/../itcl[4-9]*/itk 2>/dev/null` ; do
10075 if test -f "$i/itkConfig.sh" ; then
10076 ac_cv_c_itkconfig=`(cd $i; pwd)`
10077 break
10078 fi
10079 done
10080 fi
10081
10082fi
10083
10084 if test x"${ac_cv_c_itkconfig}" = x ; then
10085 ITKCONFIG="# no Itk configs found"
10086 echo "configure: warning: Can't find Itk configuration definitions" 1>&2
10087 else
10088 no_itk=
10089 ITKCONFIG=${ac_cv_c_itkconfig}/itkConfig.sh
10090 echo "$ac_t""found $ITKCONFIG" 1>&6
10091 fi
10092fi
10093
10094
10095 if test -z "${no_itcl}"; then
10096
10097 if test -f "$ITKCONFIG" ; then
10098 . $ITKCONFIG
10099 fi
10100
10101
10102
10103
10104
10105
10106
10107
10108
10109
10110
10111
3fc11d3e 10112 ITKLIB="${ITK_BUILD_LIB_SPEC}"
b381d62d 10113 ITK_DEPS="${ITK_LIB_FULL_PATH}"
3fc11d3e
JM
10114 fi
10115
4226a5a5 10116 ENABLE_CFLAGS="${ENABLE_CFLAGS} \$(SUBDIR_GDBTK_CFLAGS)"
3fc11d3e
JM
10117 # Tcl/Tk 8.1 require -fwritable strings. I don't
10118 # know whether 8.2 will or not, but I bet it will.
10119 # I don't have to worry about 7.x since we don't support it.
10120 GDBTK_CFLAGS=""
10121 if test "$GCC" = "yes"; then
10122 if test "$TCL_VERSION" != "8.0" ; then
10123 GDBTK_CFLAGS="-fwritable-strings"
10124 fi
10125 fi
10126
10127 # Include some libraries that Tcl and Tk want.
b2a1bd4f 10128 TCL_LIBS='$(LIBGUI) $(ITCL) $(ITK) $(TK) $(TCL) $(X11_LDFLAGS) $(X11_LIBS)'
3fc11d3e
JM
10129 # Yes, the ordering seems wrong here. But it isn't.
10130 # TK_LIBS is the list of libraries that need to be linked
10131 # after Tcl/Tk. Note that this isn't put into LIBS. If it
10132 # were in LIBS then any link tests after this point would
10133 # try to include things like `$(LIBGUI)', which wouldn't work.
10134 GDBTKLIBS="${TCL_LIBS} ${TK_LIBS}"
4226a5a5
FN
10135
10136 CONFIG_OBS="${CONFIG_OBS} \$(SUBDIR_GDBTK_OBS)"
10137 CONFIG_DEPS="${CONFIG_DEPS} \$(SUBDIR_GDBTK_DEPS)"
10138 CONFIG_SRCS="${CONFIG_SRCS} \$(SUBDIR_GDBTK_SRCS)"
33f8ca73
AC
10139 CONFIG_ALL="${CONFIG_ALL} all-gdbtk"
10140 CONFIG_CLEAN="${CONFIG_CLEAN} clean-gdbtk"
10141 CONFIG_INSTALL="${CONFIG_INSTALL} install-gdbtk"
10142 CONFIG_UNINSTALL="${CONFIG_UNINSTALL} uninstall-gdbtk"
3fc11d3e
JM
10143
10144 if test x$gdb_cv_os_cygwin = xyes; then
10145 WIN32LIBS="${WIN32LIBS} -lshell32 -lgdi32 -lcomdlg32 -ladvapi32"
10146 WIN32LDAPP="-Wl,--subsystem,console"
10147 CONFIG_OBS="${CONFIG_OBS} gdbres.o"
10148 fi
10149 fi
10150 fi
ffc6a242 10151
ffc6a242 10152 configdirs="${configdirs} gdbtk"
3fc11d3e
JM
10153fi
10154
10155
10156
10157
10158
10159
10160
10161
10162
10163
10164
10165
10166
dd2504ab 10167
c906108c
SS
10168# If we find X, set shell vars x_includes and x_libraries to the
10169# paths, otherwise set no_x=yes.
10170# Uses ac_ vars as temps to allow command line to override cache and checks.
10171# --without-x overrides everything else, but does not touch the cache.
10172echo $ac_n "checking for X""... $ac_c" 1>&6
226361c4 10173echo "configure:10174: checking for X" >&5
c906108c
SS
10174
10175# Check whether --with-x or --without-x was given.
10176if test "${with_x+set}" = set; then
10177 withval="$with_x"
10178 :
10179fi
10180
10181# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
10182if test "x$with_x" = xno; then
10183 # The user explicitly disabled X.
10184 have_x=disabled
10185else
10186 if test "x$x_includes" != xNONE && test "x$x_libraries" != xNONE; then
10187 # Both variables are already set.
10188 have_x=yes
10189 else
10190if eval "test \"`echo '$''{'ac_cv_have_x'+set}'`\" = set"; then
10191 echo $ac_n "(cached) $ac_c" 1>&6
10192else
10193 # One or both of the vars are not set, and there is no cached value.
10194ac_x_includes=NO ac_x_libraries=NO
10195rm -fr conftestdir
10196if mkdir conftestdir; then
10197 cd conftestdir
10198 # Make sure to not put "make" in the Imakefile rules, since we grep it out.
10199 cat > Imakefile <<'EOF'
10200acfindx:
10201 @echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"'
10202EOF
10203 if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
10204 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
10205 eval `${MAKE-make} acfindx 2>/dev/null | grep -v make`
10206 # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
10207 for ac_extension in a so sl; do
10208 if test ! -f $ac_im_usrlibdir/libX11.$ac_extension &&
10209 test -f $ac_im_libdir/libX11.$ac_extension; then
10210 ac_im_usrlibdir=$ac_im_libdir; break
10211 fi
10212 done
10213 # Screen out bogus values from the imake configuration. They are
10214 # bogus both because they are the default anyway, and because
10215 # using them would break gcc on systems where it needs fixed includes.
10216 case "$ac_im_incroot" in
10217 /usr/include) ;;
10218 *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes="$ac_im_incroot" ;;
10219 esac
10220 case "$ac_im_usrlibdir" in
10221 /usr/lib | /lib) ;;
10222 *) test -d "$ac_im_usrlibdir" && ac_x_libraries="$ac_im_usrlibdir" ;;
10223 esac
10224 fi
10225 cd ..
10226 rm -fr conftestdir
10227fi
10228
10229if test "$ac_x_includes" = NO; then
10230 # Guess where to find include files, by looking for this one X11 .h file.
10231 test -z "$x_direct_test_include" && x_direct_test_include=X11/Intrinsic.h
10232
10233 # First, try using that file with no special directory specified.
10234cat > conftest.$ac_ext <<EOF
226361c4 10235#line 10236 "configure"
c906108c
SS
10236#include "confdefs.h"
10237#include <$x_direct_test_include>
10238EOF
10239ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
226361c4 10240{ (eval echo configure:10241: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
c906108c
SS
10241ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10242if test -z "$ac_err"; then
10243 rm -rf conftest*
10244 # We can compile using X headers with no special include directory.
10245ac_x_includes=
10246else
10247 echo "$ac_err" >&5
10248 echo "configure: failed program was:" >&5
10249 cat conftest.$ac_ext >&5
10250 rm -rf conftest*
10251 # Look for the header file in a standard set of common directories.
10252# Check X11 before X11Rn because it is often a symlink to the current release.
10253 for ac_dir in \
10254 /usr/X11/include \
10255 /usr/X11R6/include \
10256 /usr/X11R5/include \
10257 /usr/X11R4/include \
10258 \
10259 /usr/include/X11 \
10260 /usr/include/X11R6 \
10261 /usr/include/X11R5 \
10262 /usr/include/X11R4 \
10263 \
10264 /usr/local/X11/include \
10265 /usr/local/X11R6/include \
10266 /usr/local/X11R5/include \
10267 /usr/local/X11R4/include \
10268 \
10269 /usr/local/include/X11 \
10270 /usr/local/include/X11R6 \
10271 /usr/local/include/X11R5 \
10272 /usr/local/include/X11R4 \
10273 \
10274 /usr/X386/include \
10275 /usr/x386/include \
10276 /usr/XFree86/include/X11 \
10277 \
10278 /usr/include \
10279 /usr/local/include \
10280 /usr/unsupported/include \
10281 /usr/athena/include \
10282 /usr/local/x11r5/include \
10283 /usr/lpp/Xamples/include \
10284 \
10285 /usr/openwin/include \
10286 /usr/openwin/share/include \
10287 ; \
10288 do
10289 if test -r "$ac_dir/$x_direct_test_include"; then
10290 ac_x_includes=$ac_dir
10291 break
10292 fi
10293 done
10294fi
10295rm -f conftest*
10296fi # $ac_x_includes = NO
10297
10298if test "$ac_x_libraries" = NO; then
10299 # Check for the libraries.
10300
10301 test -z "$x_direct_test_library" && x_direct_test_library=Xt
10302 test -z "$x_direct_test_function" && x_direct_test_function=XtMalloc
10303
10304 # See if we find them without any special options.
10305 # Don't add to $LIBS permanently.
10306 ac_save_LIBS="$LIBS"
10307 LIBS="-l$x_direct_test_library $LIBS"
10308cat > conftest.$ac_ext <<EOF
226361c4 10309#line 10310 "configure"
c906108c
SS
10310#include "confdefs.h"
10311
10312int main() {
10313${x_direct_test_function}()
10314; return 0; }
10315EOF
226361c4 10316if { (eval echo configure:10317: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c
SS
10317 rm -rf conftest*
10318 LIBS="$ac_save_LIBS"
10319# We can link X programs with no special library path.
10320ac_x_libraries=
10321else
10322 echo "configure: failed program was:" >&5
10323 cat conftest.$ac_ext >&5
10324 rm -rf conftest*
10325 LIBS="$ac_save_LIBS"
10326# First see if replacing the include by lib works.
10327# Check X11 before X11Rn because it is often a symlink to the current release.
10328for ac_dir in `echo "$ac_x_includes" | sed s/include/lib/` \
10329 /usr/X11/lib \
10330 /usr/X11R6/lib \
10331 /usr/X11R5/lib \
10332 /usr/X11R4/lib \
10333 \
10334 /usr/lib/X11 \
10335 /usr/lib/X11R6 \
10336 /usr/lib/X11R5 \
10337 /usr/lib/X11R4 \
10338 \
10339 /usr/local/X11/lib \
10340 /usr/local/X11R6/lib \
10341 /usr/local/X11R5/lib \
10342 /usr/local/X11R4/lib \
10343 \
10344 /usr/local/lib/X11 \
10345 /usr/local/lib/X11R6 \
10346 /usr/local/lib/X11R5 \
10347 /usr/local/lib/X11R4 \
10348 \
10349 /usr/X386/lib \
10350 /usr/x386/lib \
10351 /usr/XFree86/lib/X11 \
10352 \
10353 /usr/lib \
10354 /usr/local/lib \
10355 /usr/unsupported/lib \
10356 /usr/athena/lib \
10357 /usr/local/x11r5/lib \
10358 /usr/lpp/Xamples/lib \
10359 /lib/usr/lib/X11 \
10360 \
10361 /usr/openwin/lib \
10362 /usr/openwin/share/lib \
10363 ; \
10364do
10365 for ac_extension in a so sl; do
10366 if test -r $ac_dir/lib${x_direct_test_library}.$ac_extension; then
10367 ac_x_libraries=$ac_dir
10368 break 2
10369 fi
10370 done
10371done
10372fi
10373rm -f conftest*
10374fi # $ac_x_libraries = NO
10375
10376if test "$ac_x_includes" = NO || test "$ac_x_libraries" = NO; then
10377 # Didn't find X anywhere. Cache the known absence of X.
10378 ac_cv_have_x="have_x=no"
10379else
10380 # Record where we found X for the cache.
10381 ac_cv_have_x="have_x=yes \
10382 ac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries"
10383fi
10384fi
10385 fi
10386 eval "$ac_cv_have_x"
10387fi # $with_x != no
10388
10389if test "$have_x" != yes; then
10390 echo "$ac_t""$have_x" 1>&6
10391 no_x=yes
10392else
10393 # If each of the values was on the command line, it overrides each guess.
10394 test "x$x_includes" = xNONE && x_includes=$ac_x_includes
10395 test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
10396 # Update the cache value to reflect the command line values.
10397 ac_cv_have_x="have_x=yes \
10398 ac_x_includes=$x_includes ac_x_libraries=$x_libraries"
10399 echo "$ac_t""libraries $x_libraries, headers $x_includes" 1>&6
10400fi
10401
10402
7a292a7a
SS
10403
10404# Unlike the sim directory, whether a simulator is linked is controlled by
10405# presence of a SIM= and a SIM_OBS= definition in the target '.mt' file.
10406# This code just checks for a few cases where we'd like to ignore those
10407# definitions, even when they're present in the '.mt' file. These cases
10408# are when --disable-sim is specified, or if the simulator directory is
6c5cfe5b 10409# not part of the source tree.
7a292a7a
SS
10410#
10411# Check whether --enable-sim or --disable-sim was given.
10412if test "${enable_sim+set}" = set; then
10413 enableval="$enable_sim"
10414 echo "enable_sim = $enable_sim";
10415 echo "enableval = ${enableval}";
10416 case "${enableval}" in
10417 yes) ignore_sim=false ;;
10418 no) ignore_sim=true ;;
10419 *) ignore_sim=false ;;
10420 esac
10421else
10422 ignore_sim=false
10423fi
10424
10425
10426if test ! -d "${srcdir}/../sim"; then
10427 ignore_sim=true
10428fi
10429
10430if test "${ignore_sim}" = "true"; then
10431 IGNORE_SIM="SIM="
10432 IGNORE_SIM_OBS="SIM_OBS="
10433else
10434 IGNORE_SIM=""
10435 IGNORE_SIM_OBS=""
10436 cat >> confdefs.h <<\EOF
10437#define WITH_SIM 1
10438EOF
10439
10440fi
10441
10442
10443
c906108c
SS
10444
10445
10446
10447
10448
10449
dfcd3bfb 10450
e56ac5c3
AC
10451
10452
b3a90332
AC
10453
10454
c906108c
SS
10455# target_subdir is used by the testsuite to find the target libraries.
10456target_subdir=
10457if test "${host}" != "${target}"; then
10458 target_subdir="${target_alias}/"
10459fi
10460
10461
10462frags=
10463host_makefile_frag=${srcdir}/config/${gdb_host_cpu}/${gdb_host}.mh
10464if test ! -f ${host_makefile_frag}; then
7fd60527
AC
10465 # When building a native debuger the .mh file containing things
10466 # like NATDEPFILES is needed. Cross debuggers don't need .mh
10467 # since it no longer contains anything useful.
10468 if test "${target}" = "${host}"; then
10469 { echo "configure: error: "*** Gdb does not support native target ${host}"" 1>&2; exit 1; }
10470 else
10471 host_makefile_frag=/dev/null
10472 fi
c906108c
SS
10473fi
10474frags="$frags $host_makefile_frag"
10475
10476target_makefile_frag=${srcdir}/config/${gdb_target_cpu}/${gdb_target}.mt
10477if test ! -f ${target_makefile_frag}; then
10478{ echo "configure: error: "*** Gdb does not support target ${target}"" 1>&2; exit 1; }
10479fi
10480frags="$frags $target_makefile_frag"
10481
10482
10483
10484
10485
10486hostfile=`sed -n '
10487s/XM_FILE[ ]*=[ ]*\([^ ]*\)/\1/p
10488' ${host_makefile_frag}`
10489
10490targetfile=`sed -n '
10491s/TM_FILE[ ]*=[ ]*\([^ ]*\)/\1/p
10492' ${target_makefile_frag}`
10493
c906108c 10494if test "${target}" = "${host}"; then
a85f51e7
DJ
10495# We pick this up from the host configuration file (.mh) because we
10496# do not have a native configuration Makefile fragment.
c906108c
SS
10497nativefile=`sed -n '
10498s/NAT_FILE[ ]*=[ ]*\([^ ]*\)/\1/p
10499' ${host_makefile_frag}`
c906108c
SS
10500fi
10501
10502
b00a8037
DJ
10503if test x"${gdb_osabi}" != x ; then
10504 cat >> confdefs.h <<EOF
10505#define GDB_OSABI_DEFAULT $gdb_osabi
10506EOF
10507
10508fi
10509
8dcde887
MK
10510# Enable multi-ice-gdb-server.
10511# Check whether --enable-multi-ice or --disable-multi-ice was given.
10512if test "${enable_multi_ice+set}" = set; then
10513 enableval="$enable_multi_ice"
10514 case $enableval in
10515 yes | no)
10516 ;;
10517 *) { echo "configure: error: bad value $enableval for --enable-multi-ice" 1>&2; exit 1; } ;;
10518 esac
96baa820
JM
10519fi
10520
8dcde887
MK
10521if test "x$enable_multi_ice" = xyes; then
10522 configdirs="$configdirs multi-ice"
a85f51e7
DJ
10523fi
10524
8dcde887
MK
10525# We only build gdbserver automatically if host and target are the same.
10526if test "x$target" = "x$host"; then
10527 echo $ac_n "checking whether gdbserver is supported on this host""... $ac_c" 1>&6
226361c4 10528echo "configure:10529: checking whether gdbserver is supported on this host" >&5
8dcde887
MK
10529 if test "x$build_gdbserver" = xyes; then
10530 configdirs="$configdirs gdbserver"
10531 echo "$ac_t""yes" 1>&6
10532 else
10533 echo "$ac_t""no" 1>&6
10534 fi
10535fi
10536
10537subdirs="doc testsuite $configdirs"
10538
96baa820 10539
c906108c 10540# If hostfile (XM_FILE) and/or targetfile (TM_FILE) and/or nativefile
5a2402b8
AC
10541# (NAT_FILE) is not set in config/*/*.m[ht] files, we link to an empty
10542# version.
c906108c
SS
10543
10544files=
10545links=
5a2402b8 10546
c906108c 10547rm -f xm.h
5a2402b8 10548xm_h=""
c906108c 10549if test "${hostfile}" != ""; then
5a2402b8
AC
10550 xm_h=xm.h
10551 GDB_XM_FILE="config/${gdb_host_cpu}/${hostfile}"
10552 files="${files} ${GDB_XM_FILE}"
10553 links="${links} xm.h"
10554 cat >> confdefs.h <<EOF
10555#define GDB_XM_FILE ${GDB_XM_FILE}
10556EOF
10557
c906108c 10558fi
5a2402b8
AC
10559
10560
c906108c 10561rm -f tm.h
5a2402b8 10562tm_h=""
c906108c 10563if test "${targetfile}" != ""; then
5a2402b8
AC
10564 tm_h=tm.h
10565 GDB_TM_FILE="config/${gdb_target_cpu}/${targetfile}"
10566 files="${files} ${GDB_TM_FILE}"
10567 links="${links} tm.h"
10568 cat >> confdefs.h <<EOF
10569#define GDB_TM_FILE ${GDB_TM_FILE}
10570EOF
10571
c906108c 10572fi
5a2402b8
AC
10573
10574
c906108c 10575rm -f nm.h
5a2402b8 10576nm_h=""
c906108c 10577if test "${nativefile}" != ""; then
5a2402b8
AC
10578 nm_h=nm.h
10579 GDB_NM_FILE="config/${gdb_host_cpu}/${nativefile}"
10580 files="${files} ${GDB_NM_FILE}"
10581 links="${links} nm.h"
10582 cat >> confdefs.h <<EOF
10583#define GDB_NM_FILE ${GDB_NM_FILE}
10584EOF
10585
c906108c 10586fi
5a2402b8
AC
10587
10588
c906108c
SS
10589
10590
10591echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
226361c4 10592echo "configure:10593: checking for Cygwin environment" >&5
c906108c
SS
10593if eval "test \"`echo '$''{'ac_cv_cygwin'+set}'`\" = set"; then
10594 echo $ac_n "(cached) $ac_c" 1>&6
10595else
10596 cat > conftest.$ac_ext <<EOF
226361c4 10597#line 10598 "configure"
c906108c
SS
10598#include "confdefs.h"
10599
10600int main() {
10601
10602#ifndef __CYGWIN__
10603#define __CYGWIN__ __CYGWIN32__
10604#endif
10605return __CYGWIN__;
10606; return 0; }
10607EOF
226361c4 10608if { (eval echo configure:10609: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c
SS
10609 rm -rf conftest*
10610 ac_cv_cygwin=yes
10611else
10612 echo "configure: failed program was:" >&5
10613 cat conftest.$ac_ext >&5
10614 rm -rf conftest*
10615 ac_cv_cygwin=no
10616fi
10617rm -f conftest*
10618rm -f conftest*
10619fi
10620
10621echo "$ac_t""$ac_cv_cygwin" 1>&6
10622CYGWIN=
10623test "$ac_cv_cygwin" = yes && CYGWIN=yes
10624echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
226361c4 10625echo "configure:10626: checking for mingw32 environment" >&5
c906108c
SS
10626if eval "test \"`echo '$''{'ac_cv_mingw32'+set}'`\" = set"; then
10627 echo $ac_n "(cached) $ac_c" 1>&6
10628else
10629 cat > conftest.$ac_ext <<EOF
226361c4 10630#line 10631 "configure"
c906108c
SS
10631#include "confdefs.h"
10632
10633int main() {
10634return __MINGW32__;
10635; return 0; }
10636EOF
226361c4 10637if { (eval echo configure:10638: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c
SS
10638 rm -rf conftest*
10639 ac_cv_mingw32=yes
10640else
10641 echo "configure: failed program was:" >&5
10642 cat conftest.$ac_ext >&5
10643 rm -rf conftest*
10644 ac_cv_mingw32=no
10645fi
10646rm -f conftest*
10647rm -f conftest*
10648fi
10649
10650echo "$ac_t""$ac_cv_mingw32" 1>&6
10651MINGW32=
10652test "$ac_cv_mingw32" = yes && MINGW32=yes
10653
10654
10655echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
226361c4 10656echo "configure:10657: checking for executable suffix" >&5
c906108c
SS
10657if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then
10658 echo $ac_n "(cached) $ac_c" 1>&6
10659else
10660 if test "$CYGWIN" = yes || test "$MINGW32" = yes; then
10661 ac_cv_exeext=.exe
10662else
10663 rm -f conftest*
10664 echo 'int main () { return 0; }' > conftest.$ac_ext
10665 ac_cv_exeext=
226361c4 10666 if { (eval echo configure:10667: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
c906108c
SS
10667 for file in conftest.*; do
10668 case $file in
d836ee13 10669 *.c | *.o | *.obj | *.ilk | *.pdb) ;;
c906108c
SS
10670 *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
10671 esac
10672 done
10673 else
10674 { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
10675 fi
10676 rm -f conftest*
10677 test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
10678fi
10679fi
10680
10681EXEEXT=""
10682test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
10683echo "$ac_t""${ac_cv_exeext}" 1>&6
10684ac_exeext=$EXEEXT
10685
10686
234b45d4
KB
10687
10688cat >> confdefs.h <<\EOF
10689#define GDB_DEFAULT_HOST_CHARSET "ISO-8859-1"
10690EOF
10691
10692
10693
10694
10695 # Check whether --with-libiconv-prefix or --without-libiconv-prefix was given.
10696if test "${with_libiconv_prefix+set}" = set; then
10697 withval="$with_libiconv_prefix"
10698
10699 for dir in `echo "$withval" | tr : ' '`; do
10700 if test -d $dir/include; then CPPFLAGS="$CPPFLAGS -I$dir/include"; fi
10701 if test -d $dir/lib; then LDFLAGS="$LDFLAGS -L$dir/lib"; fi
10702 done
10703
10704fi
10705
10706
10707 echo $ac_n "checking for iconv""... $ac_c" 1>&6
226361c4 10708echo "configure:10709: checking for iconv" >&5
234b45d4
KB
10709if eval "test \"`echo '$''{'am_cv_func_iconv'+set}'`\" = set"; then
10710 echo $ac_n "(cached) $ac_c" 1>&6
10711else
10712
10713 am_cv_func_iconv="no, consider installing GNU libiconv"
10714 am_cv_lib_iconv=no
10715 cat > conftest.$ac_ext <<EOF
226361c4 10716#line 10717 "configure"
234b45d4
KB
10717#include "confdefs.h"
10718#include <stdlib.h>
10719#include <iconv.h>
10720int main() {
10721iconv_t cd = iconv_open("","");
10722 iconv(cd,NULL,NULL,NULL,NULL);
10723 iconv_close(cd);
10724; return 0; }
10725EOF
226361c4 10726if { (eval echo configure:10727: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
234b45d4
KB
10727 rm -rf conftest*
10728 am_cv_func_iconv=yes
10729else
10730 echo "configure: failed program was:" >&5
10731 cat conftest.$ac_ext >&5
10732fi
10733rm -f conftest*
10734 if test "$am_cv_func_iconv" != yes; then
10735 am_save_LIBS="$LIBS"
10736 LIBS="$LIBS -liconv"
10737 cat > conftest.$ac_ext <<EOF
226361c4 10738#line 10739 "configure"
234b45d4
KB
10739#include "confdefs.h"
10740#include <stdlib.h>
10741#include <iconv.h>
10742int main() {
10743iconv_t cd = iconv_open("","");
10744 iconv(cd,NULL,NULL,NULL,NULL);
10745 iconv_close(cd);
10746; return 0; }
10747EOF
226361c4 10748if { (eval echo configure:10749: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
234b45d4
KB
10749 rm -rf conftest*
10750 am_cv_lib_iconv=yes
10751 am_cv_func_iconv=yes
10752else
10753 echo "configure: failed program was:" >&5
10754 cat conftest.$ac_ext >&5
10755fi
10756rm -f conftest*
10757 LIBS="$am_save_LIBS"
10758 fi
10759
10760fi
10761
10762echo "$ac_t""$am_cv_func_iconv" 1>&6
10763 if test "$am_cv_func_iconv" = yes; then
10764 cat >> confdefs.h <<\EOF
10765#define HAVE_ICONV 1
10766EOF
10767
10768 echo $ac_n "checking for iconv declaration""... $ac_c" 1>&6
226361c4 10769echo "configure:10770: checking for iconv declaration" >&5
234b45d4
KB
10770 if eval "test \"`echo '$''{'am_cv_proto_iconv'+set}'`\" = set"; then
10771 echo $ac_n "(cached) $ac_c" 1>&6
10772else
10773
10774 cat > conftest.$ac_ext <<EOF
226361c4 10775#line 10776 "configure"
234b45d4
KB
10776#include "confdefs.h"
10777
10778#include <stdlib.h>
10779#include <iconv.h>
10780extern
10781#ifdef __cplusplus
10782"C"
10783#endif
10784#if defined(__STDC__) || defined(__cplusplus)
10785size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
10786#else
10787size_t iconv();
10788#endif
10789
10790int main() {
10791
10792; return 0; }
10793EOF
226361c4 10794if { (eval echo configure:10795: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
234b45d4
KB
10795 rm -rf conftest*
10796 am_cv_proto_iconv_arg1=""
10797else
10798 echo "configure: failed program was:" >&5
10799 cat conftest.$ac_ext >&5
10800 rm -rf conftest*
10801 am_cv_proto_iconv_arg1="const"
10802fi
10803rm -f conftest*
10804 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);"
10805fi
10806
10807 am_cv_proto_iconv=`echo "$am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'`
10808 echo "$ac_t""${ac_t:-
10809 }$am_cv_proto_iconv" 1>&6
10810 cat >> confdefs.h <<EOF
10811#define ICONV_CONST $am_cv_proto_iconv_arg1
10812EOF
10813
10814 fi
10815 LIBICONV=
10816 if test "$am_cv_lib_iconv" = yes; then
10817 LIBICONV="-liconv"
10818 fi
10819
10820
10821
c906108c
SS
10822trap '' 1 2 15
10823cat > confcache <<\EOF
10824# This file is a shell script that caches the results of configure
10825# tests run on this system so they can be shared between configure
10826# scripts and configure runs. It is not useful on other systems.
10827# If it contains results you don't want to keep, you may remove or edit it.
10828#
10829# By default, configure uses ./config.cache as the cache file,
10830# creating it if it does not exist already. You can give configure
10831# the --cache-file=FILE option to use a different cache file; that is
10832# what configure does when it calls configure scripts in
10833# subdirectories, so they share the cache.
10834# Giving --cache-file=/dev/null disables caching, for debugging configure.
10835# config.status only pays attention to the cache file if you give it the
10836# --recheck option to rerun configure.
10837#
10838EOF
10839# The following way of writing the cache mishandles newlines in values,
10840# but we know of no workaround that is simple, portable, and efficient.
10841# So, don't put newlines in cache variables' values.
10842# Ultrix sh set writes to stderr and can't be redirected directly,
10843# and sets the high bit in the cache file unless we assign to the vars.
10844(set) 2>&1 |
10845 case `(ac_space=' '; set | grep ac_space) 2>&1` in
10846 *ac_space=\ *)
10847 # `set' does not quote correctly, so add quotes (double-quote substitution
10848 # turns \\\\ into \\, and sed turns \\ into \).
10849 sed -n \
10850 -e "s/'/'\\\\''/g" \
10851 -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
10852 ;;
10853 *)
10854 # `set' quotes correctly as required by POSIX, so do not add quotes.
10855 sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
10856 ;;
10857 esac >> confcache
10858if cmp -s $cache_file confcache; then
10859 :
10860else
10861 if test -w $cache_file; then
10862 echo "updating cache $cache_file"
10863 cat confcache > $cache_file
10864 else
10865 echo "not updating unwritable cache $cache_file"
10866 fi
10867fi
10868rm -f confcache
10869
10870trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
10871
10872test "x$prefix" = xNONE && prefix=$ac_default_prefix
10873# Let make expand exec_prefix.
10874test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
10875
10876# Any assignment to VPATH causes Sun make to only execute
10877# the first set of double-colon rules, so remove it if not needed.
10878# If there is a colon in the path, we need to keep it.
10879if test "x$srcdir" = x.; then
10880 ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d'
10881fi
10882
10883trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
10884
10885DEFS=-DHAVE_CONFIG_H
10886
10887# Without the "./", some shells look in PATH for config.status.
10888: ${CONFIG_STATUS=./config.status}
10889
10890echo creating $CONFIG_STATUS
10891rm -f $CONFIG_STATUS
10892cat > $CONFIG_STATUS <<EOF
10893#! /bin/sh
10894# Generated automatically by configure.
10895# Run this file to recreate the current configuration.
10896# This directory was configured as follows,
10897# on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
10898#
10899# $0 $ac_configure_args
10900#
10901# Compiler output produced by configure, useful for debugging
10902# configure, is in ./config.log if it exists.
10903
10904ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
10905for ac_option
10906do
10907 case "\$ac_option" in
10908 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
10909 echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
10910 exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
10911 -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
10912 echo "$CONFIG_STATUS generated by autoconf version 2.13"
10913 exit 0 ;;
10914 -help | --help | --hel | --he | --h)
10915 echo "\$ac_cs_usage"; exit 0 ;;
10916 *) echo "\$ac_cs_usage"; exit 1 ;;
10917 esac
10918done
10919
10920ac_given_srcdir=$srcdir
10921ac_given_INSTALL="$INSTALL"
10922
ed952ac5 10923trap 'rm -fr `echo "Makefile .gdbinit:gdbinit.in config.h:config.in" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
c906108c
SS
10924EOF
10925cat >> $CONFIG_STATUS <<EOF
10926
10927# Protect against being on the right side of a sed subst in config.status.
10928sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
10929 s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
10930$ac_vpsub
10931$extrasub
10932s%@SHELL@%$SHELL%g
10933s%@CFLAGS@%$CFLAGS%g
10934s%@CPPFLAGS@%$CPPFLAGS%g
10935s%@CXXFLAGS@%$CXXFLAGS%g
10936s%@FFLAGS@%$FFLAGS%g
10937s%@DEFS@%$DEFS%g
10938s%@LDFLAGS@%$LDFLAGS%g
10939s%@LIBS@%$LIBS%g
10940s%@exec_prefix@%$exec_prefix%g
10941s%@prefix@%$prefix%g
10942s%@program_transform_name@%$program_transform_name%g
10943s%@bindir@%$bindir%g
10944s%@sbindir@%$sbindir%g
10945s%@libexecdir@%$libexecdir%g
10946s%@datadir@%$datadir%g
10947s%@sysconfdir@%$sysconfdir%g
10948s%@sharedstatedir@%$sharedstatedir%g
10949s%@localstatedir@%$localstatedir%g
10950s%@libdir@%$libdir%g
10951s%@includedir@%$includedir%g
10952s%@oldincludedir@%$oldincludedir%g
10953s%@infodir@%$infodir%g
10954s%@mandir@%$mandir%g
413ccac7
AC
10955s%@MAINTAINER_MODE_TRUE@%$MAINTAINER_MODE_TRUE%g
10956s%@MAINTAINER_MODE_FALSE@%$MAINTAINER_MODE_FALSE%g
10957s%@MAINT@%$MAINT%g
c906108c
SS
10958s%@CC@%$CC%g
10959s%@CPP@%$CPP%g
10960s%@host@%$host%g
10961s%@host_alias@%$host_alias%g
10962s%@host_cpu@%$host_cpu%g
10963s%@host_vendor@%$host_vendor%g
10964s%@host_os@%$host_os%g
10965s%@target@%$target%g
10966s%@target_alias@%$target_alias%g
10967s%@target_cpu@%$target_cpu%g
10968s%@target_vendor@%$target_vendor%g
10969s%@target_os@%$target_os%g
10970s%@build@%$build%g
10971s%@build_alias@%$build_alias%g
10972s%@build_cpu@%$build_cpu%g
10973s%@build_vendor@%$build_vendor%g
10974s%@build_os@%$build_os%g
c906108c 10975s%@RANLIB@%$RANLIB%g
8bb2c122 10976s%@SET_MAKE@%$SET_MAKE%g
c906108c
SS
10977s%@ALLOCA@%$ALLOCA%g
10978s%@USE_NLS@%$USE_NLS%g
10979s%@MSGFMT@%$MSGFMT%g
10980s%@GMSGFMT@%$GMSGFMT%g
10981s%@XGETTEXT@%$XGETTEXT%g
10982s%@USE_INCLUDED_LIBINTL@%$USE_INCLUDED_LIBINTL%g
10983s%@CATALOGS@%$CATALOGS%g
10984s%@CATOBJEXT@%$CATOBJEXT%g
10985s%@DATADIRNAME@%$DATADIRNAME%g
10986s%@GMOFILES@%$GMOFILES%g
10987s%@INSTOBJEXT@%$INSTOBJEXT%g
10988s%@INTLDEPS@%$INTLDEPS%g
10989s%@INTLLIBS@%$INTLLIBS%g
10990s%@INTLOBJS@%$INTLOBJS%g
10991s%@POFILES@%$POFILES%g
10992s%@POSUB@%$POSUB%g
10993s%@INCLUDE_LOCALE_H@%$INCLUDE_LOCALE_H%g
10994s%@GT_NO@%$GT_NO%g
10995s%@GT_YES@%$GT_YES%g
10996s%@MKINSTALLDIRS@%$MKINSTALLDIRS%g
10997s%@l@%$l%g
8dcde887 10998s%@subdirs@%$subdirs%g
7a292a7a 10999s%@AWK@%$AWK%g
c906108c
SS
11000s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
11001s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
11002s%@INSTALL_DATA@%$INSTALL_DATA%g
8bb2c122
MK
11003s%@LN_S@%$LN_S%g
11004s%@YACC@%$YACC%g
c906108c 11005s%@AR@%$AR%g
95ca63c4
CF
11006s%@DLLTOOL@%$DLLTOOL%g
11007s%@WINDRES@%$WINDRES%g
75c6e08a 11008s%@MIG@%$MIG%g
c906108c 11009s%@CONFIG_LDFLAGS@%$CONFIG_LDFLAGS%g
030292b7
DJ
11010s%@TARGET_SYSTEM_ROOT@%$TARGET_SYSTEM_ROOT%g
11011s%@TARGET_SYSTEM_ROOT_DEFINE@%$TARGET_SYSTEM_ROOT_DEFINE%g
c906108c 11012s%@WARN_CFLAGS@%$WARN_CFLAGS%g
104c1213 11013s%@WERROR_CFLAGS@%$WERROR_CFLAGS%g
aff38e61 11014s%@SER_HARDWIRE@%$SER_HARDWIRE%g
cd0fc7c3 11015s%@WIN32LIBS@%$WIN32LIBS%g
7a292a7a
SS
11016s%@LIBGUI@%$LIBGUI%g
11017s%@GUI_CFLAGS_X@%$GUI_CFLAGS_X%g
7a292a7a
SS
11018s%@WIN32LDAPP@%$WIN32LDAPP%g
11019s%@TCL_VERSION@%$TCL_VERSION%g
11020s%@TCL_MAJOR_VERSION@%$TCL_MAJOR_VERSION%g
11021s%@TCL_MINOR_VERSION@%$TCL_MINOR_VERSION%g
11022s%@TCL_CC@%$TCL_CC%g
11023s%@TCL_DEFS@%$TCL_DEFS%g
11024s%@TCL_SHLIB_CFLAGS@%$TCL_SHLIB_CFLAGS%g
11025s%@TCL_SHLIB_LD@%$TCL_SHLIB_LD%g
11026s%@TCL_SHLIB_LD_LIBS@%$TCL_SHLIB_LD_LIBS%g
11027s%@TCL_SHLIB_SUFFIX@%$TCL_SHLIB_SUFFIX%g
11028s%@TCL_DL_LIBS@%$TCL_DL_LIBS%g
11029s%@TCL_LD_FLAGS@%$TCL_LD_FLAGS%g
11030s%@TCL_LD_SEARCH_FLAGS@%$TCL_LD_SEARCH_FLAGS%g
033afc63 11031s%@TCL_CC_SEARCH_FLAGS@%$TCL_CC_SEARCH_FLAGS%g
7a292a7a
SS
11032s%@TCL_COMPAT_OBJS@%$TCL_COMPAT_OBJS%g
11033s%@TCL_RANLIB@%$TCL_RANLIB%g
11034s%@TCL_BUILD_LIB_SPEC@%$TCL_BUILD_LIB_SPEC%g
11035s%@TCL_LIB_SPEC@%$TCL_LIB_SPEC%g
11036s%@TCL_LIB_VERSIONS_OK@%$TCL_LIB_VERSIONS_OK%g
11037s%@TK_VERSION@%$TK_VERSION%g
11038s%@TK_DEFS@%$TK_DEFS%g
11039s%@TK_BUILD_INCLUDES@%$TK_BUILD_INCLUDES%g
11040s%@TK_XINCLUDES@%$TK_XINCLUDES%g
11041s%@TK_XLIBSW@%$TK_XLIBSW%g
11042s%@TK_BUILD_LIB_SPEC@%$TK_BUILD_LIB_SPEC%g
11043s%@TK_LIB_SPEC@%$TK_LIB_SPEC%g
11044s%@TCLHDIR@%$TCLHDIR%g
11045s%@TKHDIR@%$TKHDIR%g
11046s%@ITCLHDIR@%$ITCLHDIR%g
11047s%@ITKHDIR@%$ITKHDIR%g
7a292a7a
SS
11048s%@ITCL_VERSION@%$ITCL_VERSION%g
11049s%@ITCL_DEFS@%$ITCL_DEFS%g
11050s%@ITCL_BUILD_INCLUDES@%$ITCL_BUILD_INCLUDES%g
11051s%@ITCL_BUILD_LIB_SPEC@%$ITCL_BUILD_LIB_SPEC%g
11052s%@ITCL_LIB_SPEC@%$ITCL_LIB_SPEC%g
11053s%@ITK_VERSION@%$ITK_VERSION%g
11054s%@ITK_DEFS@%$ITK_DEFS%g
11055s%@ITK_BUILD_INCLUDES@%$ITK_BUILD_INCLUDES%g
11056s%@ITK_BUILD_LIB_SPEC@%$ITK_BUILD_LIB_SPEC%g
11057s%@ITK_LIB_SPEC@%$ITK_LIB_SPEC%g
7a292a7a
SS
11058s%@X_CFLAGS@%$X_CFLAGS%g
11059s%@X_LDFLAGS@%$X_LDFLAGS%g
11060s%@X_LIBS@%$X_LIBS%g
dd2504ab
JM
11061s%@TCL_DEPS@%$TCL_DEPS%g
11062s%@TK_DEPS@%$TK_DEPS%g
7a292a7a
SS
11063s%@ITCLLIB@%$ITCLLIB%g
11064s%@ITCL_DEPS@%$ITCL_DEPS%g
11065s%@ITKLIB@%$ITKLIB%g
11066s%@ITK_DEPS@%$ITK_DEPS%g
7a292a7a
SS
11067s%@GDBTKLIBS@%$GDBTKLIBS%g
11068s%@GDBTK_CFLAGS@%$GDBTK_CFLAGS%g
d1c3b63a 11069s%@GDBTK_SRC_DIR@%$GDBTK_SRC_DIR%g
7a292a7a
SS
11070s%@IGNORE_SIM@%$IGNORE_SIM%g
11071s%@IGNORE_SIM_OBS@%$IGNORE_SIM_OBS%g
c906108c 11072s%@ENABLE_CFLAGS@%$ENABLE_CFLAGS%g
d28f9cdf 11073s%@PROFILE_CFLAGS@%$PROFILE_CFLAGS%g
c906108c
SS
11074s%@CONFIG_OBS@%$CONFIG_OBS%g
11075s%@CONFIG_DEPS@%$CONFIG_DEPS%g
11076s%@CONFIG_SRCS@%$CONFIG_SRCS%g
b3a90332
AC
11077s%@CONFIG_ALL@%$CONFIG_ALL%g
11078s%@CONFIG_CLEAN@%$CONFIG_CLEAN%g
e56ac5c3
AC
11079s%@CONFIG_INSTALL@%$CONFIG_INSTALL%g
11080s%@CONFIG_UNINSTALL@%$CONFIG_UNINSTALL%g
c906108c
SS
11081s%@target_subdir@%$target_subdir%g
11082/@host_makefile_frag@/r $host_makefile_frag
11083s%@host_makefile_frag@%%g
11084/@target_makefile_frag@/r $target_makefile_frag
11085s%@target_makefile_frag@%%g
11086s%@frags@%$frags%g
5a2402b8
AC
11087s%@xm_h@%$xm_h%g
11088s%@tm_h@%$tm_h%g
11089s%@nm_h@%$nm_h%g
c906108c 11090s%@EXEEXT@%$EXEEXT%g
234b45d4 11091s%@LIBICONV@%$LIBICONV%g
c906108c
SS
11092
11093CEOF
11094EOF
11095
11096cat >> $CONFIG_STATUS <<\EOF
11097
11098# Split the substitutions into bite-sized pieces for seds with
11099# small command number limits, like on Digital OSF/1 and HP-UX.
234b45d4 11100ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
c906108c
SS
11101ac_file=1 # Number of current file.
11102ac_beg=1 # First line for current file.
11103ac_end=$ac_max_sed_cmds # Line after last line for current file.
11104ac_more_lines=:
11105ac_sed_cmds=""
11106while $ac_more_lines; do
11107 if test $ac_beg -gt 1; then
11108 sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
11109 else
11110 sed "${ac_end}q" conftest.subs > conftest.s$ac_file
11111 fi
11112 if test ! -s conftest.s$ac_file; then
11113 ac_more_lines=false
11114 rm -f conftest.s$ac_file
11115 else
11116 if test -z "$ac_sed_cmds"; then
11117 ac_sed_cmds="sed -f conftest.s$ac_file"
11118 else
11119 ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
11120 fi
11121 ac_file=`expr $ac_file + 1`
11122 ac_beg=$ac_end
11123 ac_end=`expr $ac_end + $ac_max_sed_cmds`
11124 fi
11125done
11126if test -z "$ac_sed_cmds"; then
11127 ac_sed_cmds=cat
11128fi
11129EOF
11130
11131cat >> $CONFIG_STATUS <<EOF
11132
ed952ac5 11133CONFIG_FILES=\${CONFIG_FILES-"Makefile .gdbinit:gdbinit.in"}
c906108c
SS
11134EOF
11135cat >> $CONFIG_STATUS <<\EOF
11136for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
11137 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
11138 case "$ac_file" in
11139 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
11140 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
11141 *) ac_file_in="${ac_file}.in" ;;
11142 esac
11143
11144 # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
11145
11146 # Remove last slash and all that follows it. Not all systems have dirname.
11147 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
11148 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
11149 # The file is in a subdirectory.
11150 test ! -d "$ac_dir" && mkdir "$ac_dir"
11151 ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
11152 # A "../" for each directory in $ac_dir_suffix.
11153 ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
11154 else
11155 ac_dir_suffix= ac_dots=
11156 fi
11157
11158 case "$ac_given_srcdir" in
11159 .) srcdir=.
11160 if test -z "$ac_dots"; then top_srcdir=.
11161 else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
11162 /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
11163 *) # Relative path.
11164 srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
11165 top_srcdir="$ac_dots$ac_given_srcdir" ;;
11166 esac
11167
11168 case "$ac_given_INSTALL" in
11169 [/$]*) INSTALL="$ac_given_INSTALL" ;;
11170 *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
11171 esac
11172
11173 echo creating "$ac_file"
11174 rm -f "$ac_file"
11175 configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
11176 case "$ac_file" in
11177 *Makefile*) ac_comsub="1i\\
11178# $configure_input" ;;
11179 *) ac_comsub= ;;
11180 esac
11181
11182 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
11183 sed -e "$ac_comsub
11184s%@configure_input@%$configure_input%g
11185s%@srcdir@%$srcdir%g
11186s%@top_srcdir@%$top_srcdir%g
11187s%@INSTALL@%$INSTALL%g
11188" $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
11189fi; done
11190rm -f conftest.s*
11191
11192# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
11193# NAME is the cpp macro being defined and VALUE is the value it is being given.
11194#
11195# ac_d sets the value in "#define NAME VALUE" lines.
11196ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)'
11197ac_dB='\([ ][ ]*\)[^ ]*%\1#\2'
11198ac_dC='\3'
11199ac_dD='%g'
11200# ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
11201ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
11202ac_uB='\([ ]\)%\1#\2define\3'
11203ac_uC=' '
11204ac_uD='\4%g'
11205# ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
11206ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
11207ac_eB='$%\1#\2define\3'
11208ac_eC=' '
11209ac_eD='%g'
11210
11211if test "${CONFIG_HEADERS+set}" != set; then
11212EOF
11213cat >> $CONFIG_STATUS <<EOF
11214 CONFIG_HEADERS="config.h:config.in"
11215EOF
11216cat >> $CONFIG_STATUS <<\EOF
11217fi
11218for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
11219 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
11220 case "$ac_file" in
11221 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
11222 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
11223 *) ac_file_in="${ac_file}.in" ;;
11224 esac
11225
11226 echo creating $ac_file
11227
11228 rm -f conftest.frag conftest.in conftest.out
11229 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
11230 cat $ac_file_inputs > conftest.in
11231
11232EOF
11233
11234# Transform confdefs.h into a sed script conftest.vals that substitutes
11235# the proper values into config.h.in to produce config.h. And first:
11236# Protect against being on the right side of a sed subst in config.status.
11237# Protect against being in an unquoted here document in config.status.
11238rm -f conftest.vals
11239cat > conftest.hdr <<\EOF
11240s/[\\&%]/\\&/g
11241s%[\\$`]%\\&%g
11242s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
11243s%ac_d%ac_u%gp
11244s%ac_u%ac_e%gp
11245EOF
11246sed -n -f conftest.hdr confdefs.h > conftest.vals
11247rm -f conftest.hdr
11248
11249# This sed command replaces #undef with comments. This is necessary, for
11250# example, in the case of _POSIX_SOURCE, which is predefined and required
11251# on some systems where configure will not decide to define it.
11252cat >> conftest.vals <<\EOF
11253s%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
11254EOF
11255
11256# Break up conftest.vals because some shells have a limit on
11257# the size of here documents, and old seds have small limits too.
11258
11259rm -f conftest.tail
11260while :
11261do
11262 ac_lines=`grep -c . conftest.vals`
11263 # grep -c gives empty output for an empty file on some AIX systems.
11264 if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
11265 # Write a limited-size here document to conftest.frag.
11266 echo ' cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
11267 sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
11268 echo 'CEOF
11269 sed -f conftest.frag conftest.in > conftest.out
11270 rm -f conftest.in
11271 mv conftest.out conftest.in
11272' >> $CONFIG_STATUS
11273 sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
11274 rm -f conftest.vals
11275 mv conftest.tail conftest.vals
11276done
11277rm -f conftest.vals
11278
11279cat >> $CONFIG_STATUS <<\EOF
11280 rm -f conftest.frag conftest.h
11281 echo "/* $ac_file. Generated automatically by configure. */" > conftest.h
11282 cat conftest.in >> conftest.h
11283 rm -f conftest.in
11284 if cmp -s $ac_file conftest.h 2>/dev/null; then
11285 echo "$ac_file is unchanged"
11286 rm -f conftest.h
11287 else
11288 # Remove last slash and all that follows it. Not all systems have dirname.
11289 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
11290 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
11291 # The file is in a subdirectory.
11292 test ! -d "$ac_dir" && mkdir "$ac_dir"
11293 fi
11294 rm -f $ac_file
11295 mv conftest.h $ac_file
11296 fi
11297fi; done
11298
11299EOF
11300
11301cat >> $CONFIG_STATUS <<EOF
11302ac_sources="$files"
11303ac_dests="$links"
11304EOF
11305
11306cat >> $CONFIG_STATUS <<\EOF
11307srcdir=$ac_given_srcdir
11308while test -n "$ac_sources"; do
11309 set $ac_dests; ac_dest=$1; shift; ac_dests=$*
11310 set $ac_sources; ac_source=$1; shift; ac_sources=$*
11311
11312 echo "linking $srcdir/$ac_source to $ac_dest"
11313
11314 if test ! -r $srcdir/$ac_source; then
11315 { echo "configure: error: $srcdir/$ac_source: File not found" 1>&2; exit 1; }
11316 fi
11317 rm -f $ac_dest
11318
11319 # Make relative symlinks.
11320 # Remove last slash and all that follows it. Not all systems have dirname.
11321 ac_dest_dir=`echo $ac_dest|sed 's%/[^/][^/]*$%%'`
11322 if test "$ac_dest_dir" != "$ac_dest" && test "$ac_dest_dir" != .; then
11323 # The dest file is in a subdirectory.
11324 test ! -d "$ac_dest_dir" && mkdir "$ac_dest_dir"
11325 ac_dest_dir_suffix="/`echo $ac_dest_dir|sed 's%^\./%%'`"
11326 # A "../" for each directory in $ac_dest_dir_suffix.
11327 ac_dots=`echo $ac_dest_dir_suffix|sed 's%/[^/]*%../%g'`
11328 else
11329 ac_dest_dir_suffix= ac_dots=
11330 fi
11331
11332 case "$srcdir" in
11333 [/$]*) ac_rel_source="$srcdir/$ac_source" ;;
11334 *) ac_rel_source="$ac_dots$srcdir/$ac_source" ;;
11335 esac
11336
11337 # Make a symlink if possible; otherwise try a hard link.
11338 if ln -s $ac_rel_source $ac_dest 2>/dev/null ||
11339 ln $srcdir/$ac_source $ac_dest; then :
11340 else
11341 { echo "configure: error: can not link $ac_dest to $srcdir/$ac_source" 1>&2; exit 1; }
11342 fi
11343done
11344EOF
11345cat >> $CONFIG_STATUS <<EOF
11346
11347gdb_host_cpu=$gdb_host_cpu
11348gdb_target_cpu=$gdb_target_cpu
11349nativefile=$nativefile
11350
11351EOF
11352cat >> $CONFIG_STATUS <<\EOF
11353
7ee6d7eb 11354if test "${nativefile}" = ""; then
c4620205 11355 < Makefile \
e27da16d
JT
11356 sed -e '/^NATDEPFILES[ ]*=.*\\$/,/[^\\]$/s/^/# /' \
11357 -e '/^NATDEPFILES[ ]*=/s/^/# /' \
c4620205
JB
11358 | sed -e '/^\(NATDEPFILES[ ]*[+]=[ ]*\)/s//# \1/' \
11359 > Makefile.tem
c906108c
SS
11360mv -f Makefile.tem Makefile
11361fi
11362
11363sed -e '/^TM_FILE[ ]*=/s,^TM_FILE[ ]*=[ ]*,&config/'"${gdb_target_cpu}"'/,
11364/^XM_FILE[ ]*=/s,^XM_FILE[ ]*=[ ]*,&config/'"${gdb_host_cpu}"'/,
11365/^NAT_FILE[ ]*=/s,^NAT_FILE[ ]*=[ ]*,&config/'"${gdb_host_cpu}"'/,' <Makefile >Makefile.tmp
11366mv -f Makefile.tmp Makefile
11367
2acceee2 11368
c906108c
SS
11369case x$CONFIG_HEADERS in
11370xconfig.h:config.in)
11371echo > stamp-h ;;
11372esac
11373
11374exit 0
11375EOF
11376chmod +x $CONFIG_STATUS
11377rm -fr confdefs* $ac_clean_files
11378test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
11379
11380if test "$no_recursion" != yes; then
11381
11382 # Remove --cache-file and --srcdir arguments so they do not pile up.
11383 ac_sub_configure_args=
11384 ac_prev=
11385 for ac_arg in $ac_configure_args; do
11386 if test -n "$ac_prev"; then
11387 ac_prev=
11388 continue
11389 fi
11390 case "$ac_arg" in
11391 -cache-file | --cache-file | --cache-fil | --cache-fi \
11392 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
11393 ac_prev=cache_file ;;
11394 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
11395 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
11396 ;;
11397 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
11398 ac_prev=srcdir ;;
11399 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
11400 ;;
11401 *) ac_sub_configure_args="$ac_sub_configure_args $ac_arg" ;;
11402 esac
11403 done
11404
8dcde887 11405 for ac_config_dir in doc testsuite $configdirs; do
c906108c
SS
11406
11407 # Do not complain, so a configure script can configure whichever
11408 # parts of a large source tree are present.
11409 if test ! -d $srcdir/$ac_config_dir; then
11410 continue
11411 fi
11412
11413 echo configuring in $ac_config_dir
11414
11415 case "$srcdir" in
11416 .) ;;
11417 *)
11418 if test -d ./$ac_config_dir || mkdir ./$ac_config_dir; then :;
11419 else
11420 { echo "configure: error: can not create `pwd`/$ac_config_dir" 1>&2; exit 1; }
11421 fi
11422 ;;
11423 esac
11424
11425 ac_popdir=`pwd`
11426 cd $ac_config_dir
11427
11428 # A "../" for each directory in /$ac_config_dir.
11429 ac_dots=`echo $ac_config_dir|sed -e 's%^\./%%' -e 's%[^/]$%&/%' -e 's%[^/]*/%../%g'`
11430
11431 case "$srcdir" in
11432 .) # No --srcdir option. We are building in place.
11433 ac_sub_srcdir=$srcdir ;;
11434 /*) # Absolute path.
11435 ac_sub_srcdir=$srcdir/$ac_config_dir ;;
11436 *) # Relative path.
11437 ac_sub_srcdir=$ac_dots$srcdir/$ac_config_dir ;;
11438 esac
11439
11440 # Check for guested configure; otherwise get Cygnus style configure.
11441 if test -f $ac_sub_srcdir/configure; then
11442 ac_sub_configure=$ac_sub_srcdir/configure
11443 elif test -f $ac_sub_srcdir/configure.in; then
11444 ac_sub_configure=$ac_configure
11445 else
11446 echo "configure: warning: no configuration information is in $ac_config_dir" 1>&2
11447 ac_sub_configure=
11448 fi
11449
11450 # The recursion is here.
11451 if test -n "$ac_sub_configure"; then
11452
11453 # Make the cache file name correct relative to the subdirectory.
11454 case "$cache_file" in
11455 /*) ac_sub_cache_file=$cache_file ;;
11456 *) # Relative path.
11457 ac_sub_cache_file="$ac_dots$cache_file" ;;
11458 esac
11459 case "$ac_given_INSTALL" in
11460 [/$]*) INSTALL="$ac_given_INSTALL" ;;
11461 *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
11462 esac
11463
11464 echo "running ${CONFIG_SHELL-/bin/sh} $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_sub_srcdir"
11465 # The eval makes quoting arguments work.
11466 if eval ${CONFIG_SHELL-/bin/sh} $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_sub_srcdir
11467 then :
11468 else
11469 { echo "configure: error: $ac_sub_configure failed for $ac_config_dir" 1>&2; exit 1; }
11470 fi
11471 fi
11472
11473 cd $ac_popdir
11474 done
11475fi
11476
11477
11478exit 0
This page took 1.014673 seconds and 4 git commands to generate.