* Makefile.tpl (BASE_FLAGS_TO_PASS): Also pass DESTDIR.
[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"
627af7ea
MK
21ac_help="$ac_help
22 --disable-gdbcli disable command-line interface (CLI)"
23ac_help="$ac_help
24 --disable-gdbmi disable machine-interface (MI)"
06825bd1
MK
25ac_help="$ac_help
26 --enable-tui enable full-screen terminal user interface (TUI)"
8ee53726
MK
27ac_help="$ac_help
28 --enable-gtk enable gdbtk graphical user interface (GUI)"
06825bd1
MK
29ac_help="$ac_help
30 --without-included-regex don't use included regex; this is the default
31 on systems with version 2 of the GNU C library
32 (use with caution on other system)"
c906108c
SS
33ac_help="$ac_help
34 --enable-build-warnings Enable build-time compiler warnings if gcc is used"
3b851bce
AC
35ac_help="$ac_help
36 --enable-gdb-build-warnings Enable GDB specific build-time compiler warnings if gcc is used"
c906108c
SS
37ac_help="$ac_help
38 --with-mmalloc Use memory mapped malloc package"
7a292a7a
SS
39ac_help="$ac_help
40 --with-tclconfig=DIR Directory containing tcl configuration (tclConfig.sh)"
41ac_help="$ac_help
42 --with-tkconfig=DIR Directory containing tk configuration (tkConfig.sh)"
43ac_help="$ac_help
44 --with-tclinclude=DIR Directory where tcl private headers are"
45ac_help="$ac_help
46 --with-tkinclude=DIR Directory where tk private headers are"
47ac_help="$ac_help
48 --with-itclconfig Directory containing itcl configuration (itclConfig.sh)"
49ac_help="$ac_help
50 --with-itkconfig Directory containing itk configuration (itkConfig.sh)"
c906108c
SS
51ac_help="$ac_help
52 --with-x use the X Window System"
7a292a7a
SS
53ac_help="$ac_help
54 --enable-sim Link gdb with simulator"
8dcde887
MK
55ac_help="$ac_help
56 --enable-multi-ice build the multi-ice-gdb-server"
234b45d4
KB
57ac_help="$ac_help
58 --with-libiconv-prefix=DIR search for libiconv in DIR/include and DIR/lib"
c906108c
SS
59
60# Initialize some variables set by options.
61# The variables have the same names as the options, with
62# dashes changed to underlines.
63build=NONE
64cache_file=./config.cache
65exec_prefix=NONE
66host=NONE
67no_create=
68nonopt=NONE
69no_recursion=
70prefix=NONE
71program_prefix=NONE
72program_suffix=NONE
73program_transform_name=s,x,x,
74silent=
75site=
c41b7eb1 76sitefile=
c906108c
SS
77srcdir=
78target=NONE
79verbose=
80x_includes=NONE
81x_libraries=NONE
82bindir='${exec_prefix}/bin'
83sbindir='${exec_prefix}/sbin'
84libexecdir='${exec_prefix}/libexec'
85datadir='${prefix}/share'
86sysconfdir='${prefix}/etc'
87sharedstatedir='${prefix}/com'
88localstatedir='${prefix}/var'
89libdir='${exec_prefix}/lib'
90includedir='${prefix}/include'
91oldincludedir='/usr/include'
92infodir='${prefix}/info'
93mandir='${prefix}/man'
94
95# Initialize some other variables.
96subdirs=
97MFLAGS= MAKEFLAGS=
98SHELL=${CONFIG_SHELL-/bin/sh}
99# Maximum number of lines to put in a shell here document.
100ac_max_here_lines=12
101
102ac_prev=
103for ac_option
104do
105
106 # If the previous option needs an argument, assign it.
107 if test -n "$ac_prev"; then
108 eval "$ac_prev=\$ac_option"
109 ac_prev=
110 continue
111 fi
112
113 case "$ac_option" in
114 -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
115 *) ac_optarg= ;;
116 esac
117
118 # Accept the important Cygnus configure options, so we can diagnose typos.
119
120 case "$ac_option" in
121
122 -bindir | --bindir | --bindi | --bind | --bin | --bi)
123 ac_prev=bindir ;;
124 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
125 bindir="$ac_optarg" ;;
126
127 -build | --build | --buil | --bui | --bu)
128 ac_prev=build ;;
129 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
130 build="$ac_optarg" ;;
131
132 -cache-file | --cache-file | --cache-fil | --cache-fi \
133 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
134 ac_prev=cache_file ;;
135 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
136 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
137 cache_file="$ac_optarg" ;;
138
139 -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
140 ac_prev=datadir ;;
141 -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
142 | --da=*)
143 datadir="$ac_optarg" ;;
144
145 -disable-* | --disable-*)
146 ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
147 # Reject names that are not valid shell variable names.
148 if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
149 { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
150 fi
151 ac_feature=`echo $ac_feature| sed 's/-/_/g'`
152 eval "enable_${ac_feature}=no" ;;
153
154 -enable-* | --enable-*)
155 ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
156 # Reject names that are not valid shell variable names.
157 if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
158 { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
159 fi
160 ac_feature=`echo $ac_feature| sed 's/-/_/g'`
161 case "$ac_option" in
162 *=*) ;;
163 *) ac_optarg=yes ;;
164 esac
165 eval "enable_${ac_feature}='$ac_optarg'" ;;
166
167 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
168 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
169 | --exec | --exe | --ex)
170 ac_prev=exec_prefix ;;
171 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
172 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
173 | --exec=* | --exe=* | --ex=*)
174 exec_prefix="$ac_optarg" ;;
175
176 -gas | --gas | --ga | --g)
177 # Obsolete; use --with-gas.
178 with_gas=yes ;;
179
180 -help | --help | --hel | --he)
181 # Omit some internal or obsolete options to make the list less imposing.
182 # This message is too long to be a string in the A/UX 3.1 sh.
183 cat << EOF
184Usage: configure [options] [host]
185Options: [defaults in brackets after descriptions]
186Configuration:
187 --cache-file=FILE cache test results in FILE
188 --help print this message
189 --no-create do not create output files
190 --quiet, --silent do not print \`checking...' messages
c41b7eb1 191 --site-file=FILE use FILE as the site file
c906108c
SS
192 --version print the version of autoconf that created configure
193Directory and file names:
194 --prefix=PREFIX install architecture-independent files in PREFIX
195 [$ac_default_prefix]
196 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
197 [same as prefix]
198 --bindir=DIR user executables in DIR [EPREFIX/bin]
199 --sbindir=DIR system admin executables in DIR [EPREFIX/sbin]
200 --libexecdir=DIR program executables in DIR [EPREFIX/libexec]
201 --datadir=DIR read-only architecture-independent data in DIR
202 [PREFIX/share]
203 --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc]
204 --sharedstatedir=DIR modifiable architecture-independent data in DIR
205 [PREFIX/com]
206 --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var]
207 --libdir=DIR object code libraries in DIR [EPREFIX/lib]
208 --includedir=DIR C header files in DIR [PREFIX/include]
209 --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include]
210 --infodir=DIR info documentation in DIR [PREFIX/info]
211 --mandir=DIR man documentation in DIR [PREFIX/man]
212 --srcdir=DIR find the sources in DIR [configure dir or ..]
213 --program-prefix=PREFIX prepend PREFIX to installed program names
214 --program-suffix=SUFFIX append SUFFIX to installed program names
215 --program-transform-name=PROGRAM
216 run sed PROGRAM on installed program names
217EOF
218 cat << EOF
219Host type:
220 --build=BUILD configure for building on BUILD [BUILD=HOST]
221 --host=HOST configure for HOST [guessed]
222 --target=TARGET configure for TARGET [TARGET=HOST]
223Features and packages:
224 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
225 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
226 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
227 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
228 --x-includes=DIR X include files are in DIR
229 --x-libraries=DIR X library files are in DIR
230EOF
231 if test -n "$ac_help"; then
232 echo "--enable and --with options recognized:$ac_help"
233 fi
234 exit 0 ;;
235
236 -host | --host | --hos | --ho)
237 ac_prev=host ;;
238 -host=* | --host=* | --hos=* | --ho=*)
239 host="$ac_optarg" ;;
240
241 -includedir | --includedir | --includedi | --included | --include \
242 | --includ | --inclu | --incl | --inc)
243 ac_prev=includedir ;;
244 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
245 | --includ=* | --inclu=* | --incl=* | --inc=*)
246 includedir="$ac_optarg" ;;
247
248 -infodir | --infodir | --infodi | --infod | --info | --inf)
249 ac_prev=infodir ;;
250 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
251 infodir="$ac_optarg" ;;
252
253 -libdir | --libdir | --libdi | --libd)
254 ac_prev=libdir ;;
255 -libdir=* | --libdir=* | --libdi=* | --libd=*)
256 libdir="$ac_optarg" ;;
257
258 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
259 | --libexe | --libex | --libe)
260 ac_prev=libexecdir ;;
261 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
262 | --libexe=* | --libex=* | --libe=*)
263 libexecdir="$ac_optarg" ;;
264
265 -localstatedir | --localstatedir | --localstatedi | --localstated \
266 | --localstate | --localstat | --localsta | --localst \
267 | --locals | --local | --loca | --loc | --lo)
268 ac_prev=localstatedir ;;
269 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
270 | --localstate=* | --localstat=* | --localsta=* | --localst=* \
271 | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
272 localstatedir="$ac_optarg" ;;
273
274 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
275 ac_prev=mandir ;;
276 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
277 mandir="$ac_optarg" ;;
278
279 -nfp | --nfp | --nf)
280 # Obsolete; use --without-fp.
281 with_fp=no ;;
282
283 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
284 | --no-cr | --no-c)
285 no_create=yes ;;
286
287 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
288 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
289 no_recursion=yes ;;
290
291 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
292 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
293 | --oldin | --oldi | --old | --ol | --o)
294 ac_prev=oldincludedir ;;
295 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
296 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
297 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
298 oldincludedir="$ac_optarg" ;;
299
300 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
301 ac_prev=prefix ;;
302 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
303 prefix="$ac_optarg" ;;
304
305 -program-prefix | --program-prefix | --program-prefi | --program-pref \
306 | --program-pre | --program-pr | --program-p)
307 ac_prev=program_prefix ;;
308 -program-prefix=* | --program-prefix=* | --program-prefi=* \
309 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
310 program_prefix="$ac_optarg" ;;
311
312 -program-suffix | --program-suffix | --program-suffi | --program-suff \
313 | --program-suf | --program-su | --program-s)
314 ac_prev=program_suffix ;;
315 -program-suffix=* | --program-suffix=* | --program-suffi=* \
316 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
317 program_suffix="$ac_optarg" ;;
318
319 -program-transform-name | --program-transform-name \
320 | --program-transform-nam | --program-transform-na \
321 | --program-transform-n | --program-transform- \
322 | --program-transform | --program-transfor \
323 | --program-transfo | --program-transf \
324 | --program-trans | --program-tran \
325 | --progr-tra | --program-tr | --program-t)
326 ac_prev=program_transform_name ;;
327 -program-transform-name=* | --program-transform-name=* \
328 | --program-transform-nam=* | --program-transform-na=* \
329 | --program-transform-n=* | --program-transform-=* \
330 | --program-transform=* | --program-transfor=* \
331 | --program-transfo=* | --program-transf=* \
332 | --program-trans=* | --program-tran=* \
333 | --progr-tra=* | --program-tr=* | --program-t=*)
334 program_transform_name="$ac_optarg" ;;
335
336 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
337 | -silent | --silent | --silen | --sile | --sil)
338 silent=yes ;;
339
340 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
341 ac_prev=sbindir ;;
342 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
343 | --sbi=* | --sb=*)
344 sbindir="$ac_optarg" ;;
345
346 -sharedstatedir | --sharedstatedir | --sharedstatedi \
347 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
348 | --sharedst | --shareds | --shared | --share | --shar \
349 | --sha | --sh)
350 ac_prev=sharedstatedir ;;
351 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
352 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
353 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
354 | --sha=* | --sh=*)
355 sharedstatedir="$ac_optarg" ;;
356
357 -site | --site | --sit)
358 ac_prev=site ;;
359 -site=* | --site=* | --sit=*)
360 site="$ac_optarg" ;;
361
c41b7eb1
JB
362 -site-file | --site-file | --site-fil | --site-fi | --site-f)
363 ac_prev=sitefile ;;
364 -site-file=* | --site-file=* | --site-fil=* | --site-fi=* | --site-f=*)
365 sitefile="$ac_optarg" ;;
366
c906108c
SS
367 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
368 ac_prev=srcdir ;;
369 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
370 srcdir="$ac_optarg" ;;
371
372 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
373 | --syscon | --sysco | --sysc | --sys | --sy)
374 ac_prev=sysconfdir ;;
375 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
376 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
377 sysconfdir="$ac_optarg" ;;
378
379 -target | --target | --targe | --targ | --tar | --ta | --t)
380 ac_prev=target ;;
381 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
382 target="$ac_optarg" ;;
383
384 -v | -verbose | --verbose | --verbos | --verbo | --verb)
385 verbose=yes ;;
386
387 -version | --version | --versio | --versi | --vers)
388 echo "configure generated by autoconf version 2.13"
389 exit 0 ;;
390
391 -with-* | --with-*)
392 ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
393 # Reject names that are not valid shell variable names.
394 if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
395 { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
396 fi
397 ac_package=`echo $ac_package| sed 's/-/_/g'`
398 case "$ac_option" in
399 *=*) ;;
400 *) ac_optarg=yes ;;
401 esac
402 eval "with_${ac_package}='$ac_optarg'" ;;
403
404 -without-* | --without-*)
405 ac_package=`echo $ac_option|sed -e 's/-*without-//'`
406 # Reject names that are not valid shell variable names.
407 if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
408 { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
409 fi
410 ac_package=`echo $ac_package| sed 's/-/_/g'`
411 eval "with_${ac_package}=no" ;;
412
413 --x)
414 # Obsolete; use --with-x.
415 with_x=yes ;;
416
417 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
418 | --x-incl | --x-inc | --x-in | --x-i)
419 ac_prev=x_includes ;;
420 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
421 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
422 x_includes="$ac_optarg" ;;
423
424 -x-libraries | --x-libraries | --x-librarie | --x-librari \
425 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
426 ac_prev=x_libraries ;;
427 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
428 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
429 x_libraries="$ac_optarg" ;;
430
431 -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
432 ;;
433
434 *)
435 if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
436 echo "configure: warning: $ac_option: invalid host type" 1>&2
437 fi
438 if test "x$nonopt" != xNONE; then
439 { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
440 fi
441 nonopt="$ac_option"
442 ;;
443
444 esac
445done
446
447if test -n "$ac_prev"; then
448 { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
449fi
450
451trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
452
453# File descriptor usage:
454# 0 standard input
455# 1 file creation
456# 2 errors and warnings
457# 3 some systems may open it to /dev/tty
458# 4 used on the Kubota Titan
459# 6 checking for... messages and results
460# 5 compiler messages saved in config.log
461if test "$silent" = yes; then
462 exec 6>/dev/null
463else
464 exec 6>&1
465fi
466exec 5>./config.log
467
468echo "\
469This file contains any messages produced by compilers while
470running configure, to aid debugging if configure makes a mistake.
471" 1>&5
472
473# Strip out --no-create and --no-recursion so they do not pile up.
474# Also quote any args containing shell metacharacters.
475ac_configure_args=
476for ac_arg
477do
478 case "$ac_arg" in
479 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
480 | --no-cr | --no-c) ;;
481 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
482 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
483 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
484 ac_configure_args="$ac_configure_args '$ac_arg'" ;;
485 *) ac_configure_args="$ac_configure_args $ac_arg" ;;
486 esac
487done
488
489# NLS nuisances.
490# Only set these to C if already set. These must not be set unconditionally
491# because not all systems understand e.g. LANG=C (notably SCO).
492# Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
493# Non-C LC_CTYPE values break the ctype check.
494if test "${LANG+set}" = set; then LANG=C; export LANG; fi
495if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
496if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
497if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi
498
499# confdefs.h avoids OS command line length limits that DEFS can exceed.
500rm -rf conftest* confdefs.h
501# AIX cpp loses on an empty file, so make sure it contains at least a newline.
502echo > confdefs.h
503
504# A filename unique to this package, relative to the directory that
505# configure is in, which we can look for to find out if srcdir is correct.
506ac_unique_file=main.c
507
508# Find the source files, if location was not specified.
509if test -z "$srcdir"; then
510 ac_srcdir_defaulted=yes
511 # Try the directory containing this script, then its parent.
512 ac_prog=$0
513 ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
514 test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
515 srcdir=$ac_confdir
516 if test ! -r $srcdir/$ac_unique_file; then
517 srcdir=..
518 fi
519else
520 ac_srcdir_defaulted=no
521fi
522if test ! -r $srcdir/$ac_unique_file; then
523 if test "$ac_srcdir_defaulted" = yes; then
524 { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
525 else
526 { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
527 fi
528fi
529srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
530
531# Prefer explicitly selected file to automatically selected ones.
c41b7eb1
JB
532if test -z "$sitefile"; then
533 if test -z "$CONFIG_SITE"; then
534 if test "x$prefix" != xNONE; then
535 CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
536 else
537 CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
538 fi
c906108c 539 fi
c41b7eb1
JB
540else
541 CONFIG_SITE="$sitefile"
c906108c
SS
542fi
543for ac_site_file in $CONFIG_SITE; do
544 if test -r "$ac_site_file"; then
545 echo "loading site script $ac_site_file"
546 . "$ac_site_file"
547 fi
548done
549
550if test -r "$cache_file"; then
551 echo "loading cache $cache_file"
552 . $cache_file
553else
554 echo "creating cache $cache_file"
555 > $cache_file
556fi
557
558ac_ext=c
559# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
560ac_cpp='$CPP $CPPFLAGS'
561ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
562ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
563cross_compiling=$ac_cv_prog_cc_cross
564
565ac_exeext=
566ac_objext=o
567if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
568 # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
569 if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
570 ac_n= ac_c='
571' ac_t=' '
572 else
573 ac_n=-n ac_c= ac_t=
574 fi
575else
576 ac_n= ac_c='\c' ac_t=
577fi
578
579
580
413ccac7 581echo $ac_n "checking whether to enable maintainer-specific portions of Makefiles""... $ac_c" 1>&6
72cfdc76 582echo "configure:583: checking whether to enable maintainer-specific portions of Makefiles" >&5
413ccac7
AC
583 # Check whether --enable-maintainer-mode or --disable-maintainer-mode was given.
584if test "${enable_maintainer_mode+set}" = set; then
585 enableval="$enable_maintainer_mode"
586 USE_MAINTAINER_MODE=$enableval
587else
588 USE_MAINTAINER_MODE=no
589fi
590
591 echo "$ac_t""$USE_MAINTAINER_MODE" 1>&6
592
593
594if test $USE_MAINTAINER_MODE = yes; then
595 MAINTAINER_MODE_TRUE=
596 MAINTAINER_MODE_FALSE='#'
597else
598 MAINTAINER_MODE_TRUE='#'
599 MAINTAINER_MODE_FALSE=
600fi
601 MAINT=$MAINTAINER_MODE_TRUE
602
603
c906108c
SS
604
605# Extract the first word of "gcc", so it can be a program name with args.
606set dummy gcc; ac_word=$2
607echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
72cfdc76 608echo "configure:609: checking for $ac_word" >&5
c906108c
SS
609if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
610 echo $ac_n "(cached) $ac_c" 1>&6
611else
612 if test -n "$CC"; then
613 ac_cv_prog_CC="$CC" # Let the user override the test.
614else
615 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
616 ac_dummy="$PATH"
617 for ac_dir in $ac_dummy; do
618 test -z "$ac_dir" && ac_dir=.
619 if test -f $ac_dir/$ac_word; then
620 ac_cv_prog_CC="gcc"
621 break
622 fi
623 done
624 IFS="$ac_save_ifs"
625fi
626fi
627CC="$ac_cv_prog_CC"
628if test -n "$CC"; then
629 echo "$ac_t""$CC" 1>&6
630else
631 echo "$ac_t""no" 1>&6
632fi
633
634if test -z "$CC"; then
635 # Extract the first word of "cc", so it can be a program name with args.
636set dummy cc; ac_word=$2
637echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
72cfdc76 638echo "configure:639: checking for $ac_word" >&5
c906108c
SS
639if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
640 echo $ac_n "(cached) $ac_c" 1>&6
641else
642 if test -n "$CC"; then
643 ac_cv_prog_CC="$CC" # Let the user override the test.
644else
645 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
646 ac_prog_rejected=no
647 ac_dummy="$PATH"
648 for ac_dir in $ac_dummy; do
649 test -z "$ac_dir" && ac_dir=.
650 if test -f $ac_dir/$ac_word; then
651 if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
652 ac_prog_rejected=yes
653 continue
654 fi
655 ac_cv_prog_CC="cc"
656 break
657 fi
658 done
659 IFS="$ac_save_ifs"
660if test $ac_prog_rejected = yes; then
661 # We found a bogon in the path, so make sure we never use it.
662 set dummy $ac_cv_prog_CC
663 shift
664 if test $# -gt 0; then
665 # We chose a different compiler from the bogus one.
666 # However, it has the same basename, so the bogon will be chosen
667 # first if we set CC to just the basename; use the full file name.
668 shift
669 set dummy "$ac_dir/$ac_word" "$@"
670 shift
671 ac_cv_prog_CC="$@"
672 fi
673fi
674fi
675fi
676CC="$ac_cv_prog_CC"
677if test -n "$CC"; then
678 echo "$ac_t""$CC" 1>&6
679else
680 echo "$ac_t""no" 1>&6
681fi
682
683 if test -z "$CC"; then
684 case "`uname -s`" in
685 *win32* | *WIN32*)
686 # Extract the first word of "cl", so it can be a program name with args.
687set dummy cl; ac_word=$2
688echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
72cfdc76 689echo "configure:690: checking for $ac_word" >&5
c906108c
SS
690if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
691 echo $ac_n "(cached) $ac_c" 1>&6
692else
693 if test -n "$CC"; then
694 ac_cv_prog_CC="$CC" # Let the user override the test.
695else
696 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
697 ac_dummy="$PATH"
698 for ac_dir in $ac_dummy; do
699 test -z "$ac_dir" && ac_dir=.
700 if test -f $ac_dir/$ac_word; then
701 ac_cv_prog_CC="cl"
702 break
703 fi
704 done
705 IFS="$ac_save_ifs"
706fi
707fi
708CC="$ac_cv_prog_CC"
709if test -n "$CC"; then
710 echo "$ac_t""$CC" 1>&6
711else
712 echo "$ac_t""no" 1>&6
713fi
714 ;;
715 esac
716 fi
717 test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
718fi
719
720echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
72cfdc76 721echo "configure:722: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
c906108c
SS
722
723ac_ext=c
724# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
725ac_cpp='$CPP $CPPFLAGS'
726ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
727ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
728cross_compiling=$ac_cv_prog_cc_cross
729
730cat > conftest.$ac_ext << EOF
731
72cfdc76 732#line 733 "configure"
c906108c
SS
733#include "confdefs.h"
734
735main(){return(0);}
736EOF
72cfdc76 737if { (eval echo configure:738: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c
SS
738 ac_cv_prog_cc_works=yes
739 # If we can't run a trivial program, we are probably using a cross compiler.
740 if (./conftest; exit) 2>/dev/null; then
741 ac_cv_prog_cc_cross=no
742 else
743 ac_cv_prog_cc_cross=yes
744 fi
745else
746 echo "configure: failed program was:" >&5
747 cat conftest.$ac_ext >&5
748 ac_cv_prog_cc_works=no
749fi
750rm -fr conftest*
751ac_ext=c
752# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
753ac_cpp='$CPP $CPPFLAGS'
754ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
755ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
756cross_compiling=$ac_cv_prog_cc_cross
757
758echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
759if test $ac_cv_prog_cc_works = no; then
760 { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
761fi
762echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
72cfdc76 763echo "configure:764: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
c906108c
SS
764echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
765cross_compiling=$ac_cv_prog_cc_cross
766
767echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
72cfdc76 768echo "configure:769: checking whether we are using GNU C" >&5
c906108c
SS
769if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
770 echo $ac_n "(cached) $ac_c" 1>&6
771else
772 cat > conftest.c <<EOF
773#ifdef __GNUC__
774 yes;
775#endif
776EOF
72cfdc76 777if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:778: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
c906108c
SS
778 ac_cv_prog_gcc=yes
779else
780 ac_cv_prog_gcc=no
781fi
782fi
783
784echo "$ac_t""$ac_cv_prog_gcc" 1>&6
785
786if test $ac_cv_prog_gcc = yes; then
787 GCC=yes
788else
789 GCC=
790fi
791
792ac_test_CFLAGS="${CFLAGS+set}"
793ac_save_CFLAGS="$CFLAGS"
794CFLAGS=
795echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
72cfdc76 796echo "configure:797: checking whether ${CC-cc} accepts -g" >&5
c906108c
SS
797if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
798 echo $ac_n "(cached) $ac_c" 1>&6
799else
800 echo 'void f(){}' > conftest.c
801if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
802 ac_cv_prog_cc_g=yes
803else
804 ac_cv_prog_cc_g=no
805fi
806rm -f conftest*
807
808fi
809
810echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
811if test "$ac_test_CFLAGS" = set; then
812 CFLAGS="$ac_save_CFLAGS"
813elif test $ac_cv_prog_cc_g = yes; then
814 if test "$GCC" = yes; then
815 CFLAGS="-g -O2"
816 else
817 CFLAGS="-g"
818 fi
819else
820 if test "$GCC" = yes; then
821 CFLAGS="-O2"
822 else
823 CFLAGS=
824 fi
825fi
826
14abd0fb
MK
827cat >> confdefs.h <<\EOF
828#define _GNU_SOURCE 1
829EOF
830
831
c906108c 832echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
72cfdc76 833echo "configure:834: checking how to run the C preprocessor" >&5
c906108c
SS
834# On Suns, sometimes $CPP names a directory.
835if test -n "$CPP" && test -d "$CPP"; then
836 CPP=
837fi
838if test -z "$CPP"; then
839if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
840 echo $ac_n "(cached) $ac_c" 1>&6
841else
842 # This must be in double quotes, not single quotes, because CPP may get
843 # substituted into the Makefile and "${CC-cc}" will confuse make.
844 CPP="${CC-cc} -E"
845 # On the NeXT, cc -E runs the code through the compiler's parser,
846 # not just through cpp.
847 cat > conftest.$ac_ext <<EOF
72cfdc76 848#line 849 "configure"
c906108c
SS
849#include "confdefs.h"
850#include <assert.h>
851Syntax Error
852EOF
853ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
72cfdc76 854{ (eval echo configure:855: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
c906108c
SS
855ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
856if test -z "$ac_err"; then
857 :
858else
859 echo "$ac_err" >&5
860 echo "configure: failed program was:" >&5
861 cat conftest.$ac_ext >&5
862 rm -rf conftest*
863 CPP="${CC-cc} -E -traditional-cpp"
864 cat > conftest.$ac_ext <<EOF
72cfdc76 865#line 866 "configure"
c906108c
SS
866#include "confdefs.h"
867#include <assert.h>
868Syntax Error
869EOF
870ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
72cfdc76 871{ (eval echo configure:872: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
c906108c
SS
872ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
873if test -z "$ac_err"; then
874 :
875else
876 echo "$ac_err" >&5
877 echo "configure: failed program was:" >&5
878 cat conftest.$ac_ext >&5
879 rm -rf conftest*
880 CPP="${CC-cc} -nologo -E"
881 cat > conftest.$ac_ext <<EOF
72cfdc76 882#line 883 "configure"
c906108c
SS
883#include "confdefs.h"
884#include <assert.h>
885Syntax Error
886EOF
887ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
72cfdc76 888{ (eval echo configure:889: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
c906108c
SS
889ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
890if test -z "$ac_err"; then
891 :
892else
893 echo "$ac_err" >&5
894 echo "configure: failed program was:" >&5
895 cat conftest.$ac_ext >&5
896 rm -rf conftest*
897 CPP=/lib/cpp
898fi
899rm -f conftest*
900fi
901rm -f conftest*
902fi
903rm -f conftest*
904 ac_cv_prog_CPP="$CPP"
905fi
906 CPP="$ac_cv_prog_CPP"
907else
908 ac_cv_prog_CPP="$CPP"
909fi
910echo "$ac_t""$CPP" 1>&6
911
912echo $ac_n "checking for AIX""... $ac_c" 1>&6
72cfdc76 913echo "configure:914: checking for AIX" >&5
c906108c 914cat > conftest.$ac_ext <<EOF
72cfdc76 915#line 916 "configure"
c906108c
SS
916#include "confdefs.h"
917#ifdef _AIX
918 yes
919#endif
920
921EOF
922if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
923 egrep "yes" >/dev/null 2>&1; then
924 rm -rf conftest*
925 echo "$ac_t""yes" 1>&6; cat >> confdefs.h <<\EOF
926#define _ALL_SOURCE 1
927EOF
928
929else
930 rm -rf conftest*
931 echo "$ac_t""no" 1>&6
932fi
933rm -f conftest*
934
935
56157b4a 936echo $ac_n "checking for POSIXized ISC""... $ac_c" 1>&6
72cfdc76 937echo "configure:938: checking for POSIXized ISC" >&5
56157b4a
AC
938if test -d /etc/conf/kconfig.d &&
939 grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1
940then
941 echo "$ac_t""yes" 1>&6
942 ISC=yes # If later tests want to check for ISC.
943 cat >> confdefs.h <<\EOF
944#define _POSIX_SOURCE 1
c906108c
SS
945EOF
946
56157b4a
AC
947 if test "$GCC" = yes; then
948 CC="$CC -posix"
949 else
950 CC="$CC -Xp"
951 fi
c906108c
SS
952else
953 echo "$ac_t""no" 1>&6
56157b4a 954 ISC=
c906108c
SS
955fi
956
957
958
959
960echo $ac_n "checking for ${CC-cc} option to accept ANSI C""... $ac_c" 1>&6
72cfdc76 961echo "configure:962: checking for ${CC-cc} option to accept ANSI C" >&5
c906108c
SS
962if eval "test \"`echo '$''{'am_cv_prog_cc_stdc'+set}'`\" = set"; then
963 echo $ac_n "(cached) $ac_c" 1>&6
964else
965 am_cv_prog_cc_stdc=no
966ac_save_CC="$CC"
967# Don't try gcc -ansi; that turns off useful extensions and
968# breaks some systems' header files.
969# AIX -qlanglvl=ansi
970# Ultrix and OSF/1 -std1
56157b4a
AC
971# HP-UX 10.20 and later -Ae
972# HP-UX older versions -Aa -D_HPUX_SOURCE
c906108c 973# SVR4 -Xc -D__EXTENSIONS__
56157b4a 974for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
c906108c
SS
975do
976 CC="$ac_save_CC $ac_arg"
977 cat > conftest.$ac_ext <<EOF
72cfdc76 978#line 979 "configure"
c906108c
SS
979#include "confdefs.h"
980#include <stdarg.h>
981#include <stdio.h>
982#include <sys/types.h>
983#include <sys/stat.h>
984/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
985struct buf { int x; };
986FILE * (*rcsopen) (struct buf *, struct stat *, int);
987static char *e (p, i)
988 char **p;
989 int i;
990{
991 return p[i];
992}
993static char *f (char * (*g) (char **, int), char **p, ...)
994{
995 char *s;
996 va_list v;
997 va_start (v,p);
998 s = g (p, va_arg (v,int));
999 va_end (v);
1000 return s;
1001}
1002int test (int i, double x);
1003struct s1 {int (*f) (int a);};
1004struct s2 {int (*f) (double a);};
1005int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
1006int argc;
1007char **argv;
1008
1009int main() {
1010
1011return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
1012
1013; return 0; }
1014EOF
72cfdc76 1015if { (eval echo configure:1016: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c
SS
1016 rm -rf conftest*
1017 am_cv_prog_cc_stdc="$ac_arg"; break
1018else
1019 echo "configure: failed program was:" >&5
1020 cat conftest.$ac_ext >&5
1021fi
1022rm -f conftest*
1023done
1024CC="$ac_save_CC"
1025
1026fi
1027
1028if test -z "$am_cv_prog_cc_stdc"; then
1029 echo "$ac_t""none needed" 1>&6
1030else
1031 echo "$ac_t""$am_cv_prog_cc_stdc" 1>&6
1032fi
1033case "x$am_cv_prog_cc_stdc" in
1034 x|xno) ;;
1035 *) CC="$CC $am_cv_prog_cc_stdc" ;;
1036esac
1037
1038
1039ac_aux_dir=
1040for ac_dir in `cd $srcdir;pwd`/.. $srcdir/`cd $srcdir;pwd`/..; do
1041 if test -f $ac_dir/install-sh; then
1042 ac_aux_dir=$ac_dir
1043 ac_install_sh="$ac_aux_dir/install-sh -c"
1044 break
1045 elif test -f $ac_dir/install.sh; then
1046 ac_aux_dir=$ac_dir
1047 ac_install_sh="$ac_aux_dir/install.sh -c"
1048 break
1049 fi
1050done
1051if test -z "$ac_aux_dir"; then
1052 { echo "configure: error: can not find install-sh or install.sh in `cd $srcdir;pwd`/.. $srcdir/`cd $srcdir;pwd`/.." 1>&2; exit 1; }
1053fi
1054ac_config_guess=$ac_aux_dir/config.guess
1055ac_config_sub=$ac_aux_dir/config.sub
1056ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
1057
1058
1059# Do some error checking and defaulting for the host and target type.
1060# The inputs are:
1061# configure --host=HOST --target=TARGET --build=BUILD NONOPT
1062#
1063# The rules are:
1064# 1. You are not allowed to specify --host, --target, and nonopt at the
1065# same time.
1066# 2. Host defaults to nonopt.
1067# 3. If nonopt is not specified, then host defaults to the current host,
1068# as determined by config.guess.
1069# 4. Target and build default to nonopt.
1070# 5. If nonopt is not specified, then target and build default to host.
1071
1072# The aliases save the names the user supplied, while $host etc.
1073# will get canonicalized.
1074case $host---$target---$nonopt in
1075NONE---*---* | *---NONE---* | *---*---NONE) ;;
1076*) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;;
1077esac
1078
1079
1080# Make sure we can run config.sub.
1081if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then :
1082else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
1083fi
1084
1085echo $ac_n "checking host system type""... $ac_c" 1>&6
72cfdc76 1086echo "configure:1087: checking host system type" >&5
c906108c
SS
1087
1088host_alias=$host
1089case "$host_alias" in
1090NONE)
1091 case $nonopt in
1092 NONE)
1093 if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then :
1094 else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
1095 fi ;;
1096 *) host_alias=$nonopt ;;
1097 esac ;;
1098esac
1099
1100host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias`
1101host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1102host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1103host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1104echo "$ac_t""$host" 1>&6
1105
1106echo $ac_n "checking target system type""... $ac_c" 1>&6
72cfdc76 1107echo "configure:1108: checking target system type" >&5
c906108c
SS
1108
1109target_alias=$target
1110case "$target_alias" in
1111NONE)
1112 case $nonopt in
1113 NONE) target_alias=$host_alias ;;
1114 *) target_alias=$nonopt ;;
1115 esac ;;
1116esac
1117
1118target=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $target_alias`
1119target_cpu=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1120target_vendor=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1121target_os=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1122echo "$ac_t""$target" 1>&6
1123
1124echo $ac_n "checking build system type""... $ac_c" 1>&6
72cfdc76 1125echo "configure:1126: checking build system type" >&5
c906108c
SS
1126
1127build_alias=$build
1128case "$build_alias" in
1129NONE)
1130 case $nonopt in
1131 NONE) build_alias=$host_alias ;;
1132 *) build_alias=$nonopt ;;
1133 esac ;;
1134esac
1135
1136build=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $build_alias`
1137build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1138build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1139build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1140echo "$ac_t""$build" 1>&6
1141
1142test "$host_alias" != "$target_alias" &&
1143 test "$program_prefix$program_suffix$program_transform_name" = \
1144 NONENONEs,x,x, &&
1145 program_prefix=${target_alias}-
1146
1147
8bb2c122
MK
1148# FIXME: kettenis/20030102: The AC_PROG_RANLIB from Autoconf 2.13
1149# doesn't support cross-compilation, but the one from Autoconf 2.5x
1150# does. Override RANLIB here (i.e. before running AC_PROG_RANLIB) to
1151# deal with the lossage. Note that CY_GNU_GETTEXT currently calls
1152# AC_PROG_RANLIB. This can be removed when we switch to # Autoconf
1153# 2.5x.
1154if test $host != $build; then
1155 ac_tool_prefix=${host_alias}-
1156else
1157 ac_tool_prefix=
1158fi
1159
1160# Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
1161set dummy ${ac_tool_prefix}ranlib; ac_word=$2
1162echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
72cfdc76 1163echo "configure:1164: checking for $ac_word" >&5
8bb2c122
MK
1164if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
1165 echo $ac_n "(cached) $ac_c" 1>&6
1166else
1167 if test -n "$RANLIB"; then
1168 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
1169else
1170 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1171 ac_dummy="$PATH"
1172 for ac_dir in $ac_dummy; do
1173 test -z "$ac_dir" && ac_dir=.
1174 if test -f $ac_dir/$ac_word; then
1175 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
1176 break
1177 fi
1178 done
1179 IFS="$ac_save_ifs"
1180fi
1181fi
1182RANLIB="$ac_cv_prog_RANLIB"
1183if test -n "$RANLIB"; then
1184 echo "$ac_t""$RANLIB" 1>&6
1185else
1186 echo "$ac_t""no" 1>&6
1187fi
1188
1189
1190if test -z "$ac_cv_prog_RANLIB"; then
1191if test -n "$ac_tool_prefix"; then
1192 # Extract the first word of "ranlib", so it can be a program name with args.
1193set dummy ranlib; ac_word=$2
1194echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
72cfdc76 1195echo "configure:1196: checking for $ac_word" >&5
8bb2c122
MK
1196if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
1197 echo $ac_n "(cached) $ac_c" 1>&6
1198else
1199 if test -n "$RANLIB"; then
1200 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
1201else
1202 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1203 ac_dummy="$PATH"
1204 for ac_dir in $ac_dummy; do
1205 test -z "$ac_dir" && ac_dir=.
1206 if test -f $ac_dir/$ac_word; then
1207 ac_cv_prog_RANLIB="ranlib"
1208 break
1209 fi
1210 done
1211 IFS="$ac_save_ifs"
1212 test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
1213fi
1214fi
1215RANLIB="$ac_cv_prog_RANLIB"
1216if test -n "$RANLIB"; then
1217 echo "$ac_t""$RANLIB" 1>&6
1218else
1219 echo "$ac_t""no" 1>&6
1220fi
1221
1222else
1223 RANLIB=":"
1224fi
1225fi
1226
1227
c906108c
SS
1228ALL_LINGUAS=
1229echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
72cfdc76 1230echo "configure:1231: checking whether ${MAKE-make} sets \${MAKE}" >&5
c906108c
SS
1231set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
1232if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
1233 echo $ac_n "(cached) $ac_c" 1>&6
1234else
1235 cat > conftestmake <<\EOF
1236all:
1237 @echo 'ac_maketemp="${MAKE}"'
1238EOF
1239# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
1240eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
1241if test -n "$ac_maketemp"; then
1242 eval ac_cv_prog_make_${ac_make}_set=yes
1243else
1244 eval ac_cv_prog_make_${ac_make}_set=no
1245fi
1246rm -f conftestmake
1247fi
1248if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
1249 echo "$ac_t""yes" 1>&6
1250 SET_MAKE=
1251else
1252 echo "$ac_t""no" 1>&6
1253 SET_MAKE="MAKE=${MAKE-make}"
1254fi
1255
1256# Extract the first word of "ranlib", so it can be a program name with args.
1257set dummy ranlib; ac_word=$2
1258echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
72cfdc76 1259echo "configure:1260: checking for $ac_word" >&5
c906108c
SS
1260if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
1261 echo $ac_n "(cached) $ac_c" 1>&6
1262else
1263 if test -n "$RANLIB"; then
1264 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
1265else
1266 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1267 ac_dummy="$PATH"
1268 for ac_dir in $ac_dummy; do
1269 test -z "$ac_dir" && ac_dir=.
1270 if test -f $ac_dir/$ac_word; then
1271 ac_cv_prog_RANLIB="ranlib"
1272 break
1273 fi
1274 done
1275 IFS="$ac_save_ifs"
1276 test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
1277fi
1278fi
1279RANLIB="$ac_cv_prog_RANLIB"
1280if test -n "$RANLIB"; then
1281 echo "$ac_t""$RANLIB" 1>&6
1282else
1283 echo "$ac_t""no" 1>&6
1284fi
1285
1286echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
72cfdc76 1287echo "configure:1288: checking for ANSI C header files" >&5
c906108c
SS
1288if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
1289 echo $ac_n "(cached) $ac_c" 1>&6
1290else
1291 cat > conftest.$ac_ext <<EOF
72cfdc76 1292#line 1293 "configure"
c906108c
SS
1293#include "confdefs.h"
1294#include <stdlib.h>
1295#include <stdarg.h>
1296#include <string.h>
1297#include <float.h>
1298EOF
1299ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
72cfdc76 1300{ (eval echo configure:1301: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
c906108c
SS
1301ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1302if test -z "$ac_err"; then
1303 rm -rf conftest*
1304 ac_cv_header_stdc=yes
1305else
1306 echo "$ac_err" >&5
1307 echo "configure: failed program was:" >&5
1308 cat conftest.$ac_ext >&5
1309 rm -rf conftest*
1310 ac_cv_header_stdc=no
1311fi
1312rm -f conftest*
1313
1314if test $ac_cv_header_stdc = yes; then
1315 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
1316cat > conftest.$ac_ext <<EOF
72cfdc76 1317#line 1318 "configure"
c906108c
SS
1318#include "confdefs.h"
1319#include <string.h>
1320EOF
1321if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1322 egrep "memchr" >/dev/null 2>&1; then
1323 :
1324else
1325 rm -rf conftest*
1326 ac_cv_header_stdc=no
1327fi
1328rm -f conftest*
1329
1330fi
1331
1332if test $ac_cv_header_stdc = yes; then
1333 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
1334cat > conftest.$ac_ext <<EOF
72cfdc76 1335#line 1336 "configure"
c906108c
SS
1336#include "confdefs.h"
1337#include <stdlib.h>
1338EOF
1339if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1340 egrep "free" >/dev/null 2>&1; then
1341 :
1342else
1343 rm -rf conftest*
1344 ac_cv_header_stdc=no
1345fi
1346rm -f conftest*
1347
1348fi
1349
1350if test $ac_cv_header_stdc = yes; then
1351 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
1352if test "$cross_compiling" = yes; then
1353 :
1354else
1355 cat > conftest.$ac_ext <<EOF
72cfdc76 1356#line 1357 "configure"
c906108c
SS
1357#include "confdefs.h"
1358#include <ctype.h>
1359#define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
1360#define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
1361#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
1362int main () { int i; for (i = 0; i < 256; i++)
1363if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
1364exit (0); }
1365
1366EOF
72cfdc76 1367if { (eval echo configure:1368: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
c906108c
SS
1368then
1369 :
1370else
1371 echo "configure: failed program was:" >&5
1372 cat conftest.$ac_ext >&5
1373 rm -fr conftest*
1374 ac_cv_header_stdc=no
1375fi
1376rm -fr conftest*
1377fi
1378
1379fi
1380fi
1381
1382echo "$ac_t""$ac_cv_header_stdc" 1>&6
1383if test $ac_cv_header_stdc = yes; then
1384 cat >> confdefs.h <<\EOF
1385#define STDC_HEADERS 1
1386EOF
1387
1388fi
1389
1390echo $ac_n "checking for working const""... $ac_c" 1>&6
72cfdc76 1391echo "configure:1392: checking for working const" >&5
c906108c
SS
1392if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
1393 echo $ac_n "(cached) $ac_c" 1>&6
1394else
1395 cat > conftest.$ac_ext <<EOF
72cfdc76 1396#line 1397 "configure"
c906108c
SS
1397#include "confdefs.h"
1398
1399int main() {
1400
1401/* Ultrix mips cc rejects this. */
1402typedef int charset[2]; const charset x;
1403/* SunOS 4.1.1 cc rejects this. */
1404char const *const *ccp;
1405char **p;
1406/* NEC SVR4.0.2 mips cc rejects this. */
1407struct point {int x, y;};
1408static struct point const zero = {0,0};
1409/* AIX XL C 1.02.0.0 rejects this.
1410 It does not let you subtract one const X* pointer from another in an arm
1411 of an if-expression whose if-part is not a constant expression */
1412const char *g = "string";
1413ccp = &g + (g ? g-g : 0);
1414/* HPUX 7.0 cc rejects these. */
1415++ccp;
1416p = (char**) ccp;
1417ccp = (char const *const *) p;
1418{ /* SCO 3.2v4 cc rejects this. */
1419 char *t;
1420 char const *s = 0 ? (char *) 0 : (char const *) 0;
1421
1422 *t++ = 0;
1423}
1424{ /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
1425 int x[] = {25, 17};
1426 const int *foo = &x[0];
1427 ++foo;
1428}
1429{ /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
1430 typedef const int *iptr;
1431 iptr p = 0;
1432 ++p;
1433}
1434{ /* AIX XL C 1.02.0.0 rejects this saying
1435 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
1436 struct s { int j; const int *ap[3]; };
1437 struct s *b; b->j = 5;
1438}
1439{ /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
1440 const int foo = 10;
1441}
1442
1443; return 0; }
1444EOF
72cfdc76 1445if { (eval echo configure:1446: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c
SS
1446 rm -rf conftest*
1447 ac_cv_c_const=yes
1448else
1449 echo "configure: failed program was:" >&5
1450 cat conftest.$ac_ext >&5
1451 rm -rf conftest*
1452 ac_cv_c_const=no
1453fi
1454rm -f conftest*
1455fi
1456
1457echo "$ac_t""$ac_cv_c_const" 1>&6
1458if test $ac_cv_c_const = no; then
1459 cat >> confdefs.h <<\EOF
1460#define const
1461EOF
1462
1463fi
1464
1465echo $ac_n "checking for inline""... $ac_c" 1>&6
72cfdc76 1466echo "configure:1467: checking for inline" >&5
c906108c
SS
1467if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then
1468 echo $ac_n "(cached) $ac_c" 1>&6
1469else
1470 ac_cv_c_inline=no
1471for ac_kw in inline __inline__ __inline; do
1472 cat > conftest.$ac_ext <<EOF
72cfdc76 1473#line 1474 "configure"
c906108c
SS
1474#include "confdefs.h"
1475
1476int main() {
1477} $ac_kw foo() {
1478; return 0; }
1479EOF
72cfdc76 1480if { (eval echo configure:1481: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c
SS
1481 rm -rf conftest*
1482 ac_cv_c_inline=$ac_kw; break
1483else
1484 echo "configure: failed program was:" >&5
1485 cat conftest.$ac_ext >&5
1486fi
1487rm -f conftest*
1488done
1489
1490fi
1491
1492echo "$ac_t""$ac_cv_c_inline" 1>&6
1493case "$ac_cv_c_inline" in
1494 inline | yes) ;;
1495 no) cat >> confdefs.h <<\EOF
1496#define inline
1497EOF
1498 ;;
1499 *) cat >> confdefs.h <<EOF
1500#define inline $ac_cv_c_inline
1501EOF
1502 ;;
1503esac
1504
1505echo $ac_n "checking for off_t""... $ac_c" 1>&6
72cfdc76 1506echo "configure:1507: checking for off_t" >&5
c906108c
SS
1507if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then
1508 echo $ac_n "(cached) $ac_c" 1>&6
1509else
1510 cat > conftest.$ac_ext <<EOF
72cfdc76 1511#line 1512 "configure"
c906108c
SS
1512#include "confdefs.h"
1513#include <sys/types.h>
1514#if STDC_HEADERS
1515#include <stdlib.h>
1516#include <stddef.h>
1517#endif
1518EOF
1519if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1520 egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
1521 rm -rf conftest*
1522 ac_cv_type_off_t=yes
1523else
1524 rm -rf conftest*
1525 ac_cv_type_off_t=no
1526fi
1527rm -f conftest*
1528
1529fi
1530echo "$ac_t""$ac_cv_type_off_t" 1>&6
1531if test $ac_cv_type_off_t = no; then
1532 cat >> confdefs.h <<\EOF
1533#define off_t long
1534EOF
1535
1536fi
1537
1538echo $ac_n "checking for size_t""... $ac_c" 1>&6
72cfdc76 1539echo "configure:1540: checking for size_t" >&5
c906108c
SS
1540if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
1541 echo $ac_n "(cached) $ac_c" 1>&6
1542else
1543 cat > conftest.$ac_ext <<EOF
72cfdc76 1544#line 1545 "configure"
c906108c
SS
1545#include "confdefs.h"
1546#include <sys/types.h>
1547#if STDC_HEADERS
1548#include <stdlib.h>
1549#include <stddef.h>
1550#endif
1551EOF
1552if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1553 egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
1554 rm -rf conftest*
1555 ac_cv_type_size_t=yes
1556else
1557 rm -rf conftest*
1558 ac_cv_type_size_t=no
1559fi
1560rm -f conftest*
1561
1562fi
1563echo "$ac_t""$ac_cv_type_size_t" 1>&6
1564if test $ac_cv_type_size_t = no; then
1565 cat >> confdefs.h <<\EOF
1566#define size_t unsigned
1567EOF
1568
1569fi
1570
1571# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
1572# for constant arguments. Useless!
1573echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6
72cfdc76 1574echo "configure:1575: checking for working alloca.h" >&5
c906108c
SS
1575if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then
1576 echo $ac_n "(cached) $ac_c" 1>&6
1577else
1578 cat > conftest.$ac_ext <<EOF
72cfdc76 1579#line 1580 "configure"
c906108c
SS
1580#include "confdefs.h"
1581#include <alloca.h>
1582int main() {
1583char *p = alloca(2 * sizeof(int));
1584; return 0; }
1585EOF
72cfdc76 1586if { (eval echo configure:1587: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c
SS
1587 rm -rf conftest*
1588 ac_cv_header_alloca_h=yes
1589else
1590 echo "configure: failed program was:" >&5
1591 cat conftest.$ac_ext >&5
1592 rm -rf conftest*
1593 ac_cv_header_alloca_h=no
1594fi
1595rm -f conftest*
1596fi
1597
1598echo "$ac_t""$ac_cv_header_alloca_h" 1>&6
1599if test $ac_cv_header_alloca_h = yes; then
1600 cat >> confdefs.h <<\EOF
1601#define HAVE_ALLOCA_H 1
1602EOF
1603
1604fi
1605
1606echo $ac_n "checking for alloca""... $ac_c" 1>&6
72cfdc76 1607echo "configure:1608: checking for alloca" >&5
c906108c
SS
1608if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then
1609 echo $ac_n "(cached) $ac_c" 1>&6
1610else
1611 cat > conftest.$ac_ext <<EOF
72cfdc76 1612#line 1613 "configure"
c906108c
SS
1613#include "confdefs.h"
1614
1615#ifdef __GNUC__
1616# define alloca __builtin_alloca
1617#else
1618# ifdef _MSC_VER
1619# include <malloc.h>
1620# define alloca _alloca
1621# else
1622# if HAVE_ALLOCA_H
1623# include <alloca.h>
1624# else
1625# ifdef _AIX
1626 #pragma alloca
1627# else
1628# ifndef alloca /* predefined by HP cc +Olibcalls */
1629char *alloca ();
1630# endif
1631# endif
1632# endif
1633# endif
1634#endif
1635
1636int main() {
1637char *p = (char *) alloca(1);
1638; return 0; }
1639EOF
72cfdc76 1640if { (eval echo configure:1641: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c
SS
1641 rm -rf conftest*
1642 ac_cv_func_alloca_works=yes
1643else
1644 echo "configure: failed program was:" >&5
1645 cat conftest.$ac_ext >&5
1646 rm -rf conftest*
1647 ac_cv_func_alloca_works=no
1648fi
1649rm -f conftest*
1650fi
1651
1652echo "$ac_t""$ac_cv_func_alloca_works" 1>&6
1653if test $ac_cv_func_alloca_works = yes; then
1654 cat >> confdefs.h <<\EOF
1655#define HAVE_ALLOCA 1
1656EOF
1657
1658fi
1659
1660if test $ac_cv_func_alloca_works = no; then
1661 # The SVR3 libPW and SVR4 libucb both contain incompatible functions
1662 # that cause trouble. Some versions do not even contain alloca or
1663 # contain a buggy version. If you still want to use their alloca,
1664 # use ar to extract alloca.o from them instead of compiling alloca.c.
1665 ALLOCA=alloca.${ac_objext}
1666 cat >> confdefs.h <<\EOF
1667#define C_ALLOCA 1
1668EOF
1669
1670
1671echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
72cfdc76 1672echo "configure:1673: checking whether alloca needs Cray hooks" >&5
c906108c
SS
1673if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then
1674 echo $ac_n "(cached) $ac_c" 1>&6
1675else
1676 cat > conftest.$ac_ext <<EOF
72cfdc76 1677#line 1678 "configure"
c906108c
SS
1678#include "confdefs.h"
1679#if defined(CRAY) && ! defined(CRAY2)
1680webecray
1681#else
1682wenotbecray
1683#endif
1684
1685EOF
1686if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1687 egrep "webecray" >/dev/null 2>&1; then
1688 rm -rf conftest*
1689 ac_cv_os_cray=yes
1690else
1691 rm -rf conftest*
1692 ac_cv_os_cray=no
1693fi
1694rm -f conftest*
1695
1696fi
1697
1698echo "$ac_t""$ac_cv_os_cray" 1>&6
1699if test $ac_cv_os_cray = yes; then
1700for ac_func in _getb67 GETB67 getb67; do
1701 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
72cfdc76 1702echo "configure:1703: checking for $ac_func" >&5
c906108c
SS
1703if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
1704 echo $ac_n "(cached) $ac_c" 1>&6
1705else
1706 cat > conftest.$ac_ext <<EOF
72cfdc76 1707#line 1708 "configure"
c906108c
SS
1708#include "confdefs.h"
1709/* System header to define __stub macros and hopefully few prototypes,
1710 which can conflict with char $ac_func(); below. */
1711#include <assert.h>
1712/* Override any gcc2 internal prototype to avoid an error. */
1713/* We use char because int might match the return type of a gcc2
1714 builtin and then its argument prototype would still apply. */
1715char $ac_func();
1716
1717int main() {
1718
1719/* The GNU C library defines this for functions which it implements
1720 to always fail with ENOSYS. Some functions are actually named
1721 something starting with __ and the normal name is an alias. */
1722#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
1723choke me
1724#else
1725$ac_func();
1726#endif
1727
1728; return 0; }
1729EOF
72cfdc76 1730if { (eval echo configure:1731: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c
SS
1731 rm -rf conftest*
1732 eval "ac_cv_func_$ac_func=yes"
1733else
1734 echo "configure: failed program was:" >&5
1735 cat conftest.$ac_ext >&5
1736 rm -rf conftest*
1737 eval "ac_cv_func_$ac_func=no"
1738fi
1739rm -f conftest*
1740fi
1741
1742if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
1743 echo "$ac_t""yes" 1>&6
1744 cat >> confdefs.h <<EOF
1745#define CRAY_STACKSEG_END $ac_func
1746EOF
1747
1748 break
1749else
1750 echo "$ac_t""no" 1>&6
1751fi
1752
1753done
1754fi
1755
1756echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
72cfdc76 1757echo "configure:1758: checking stack direction for C alloca" >&5
c906108c
SS
1758if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then
1759 echo $ac_n "(cached) $ac_c" 1>&6
1760else
1761 if test "$cross_compiling" = yes; then
1762 ac_cv_c_stack_direction=0
1763else
1764 cat > conftest.$ac_ext <<EOF
72cfdc76 1765#line 1766 "configure"
c906108c
SS
1766#include "confdefs.h"
1767find_stack_direction ()
1768{
1769 static char *addr = 0;
1770 auto char dummy;
1771 if (addr == 0)
1772 {
1773 addr = &dummy;
1774 return find_stack_direction ();
1775 }
1776 else
1777 return (&dummy > addr) ? 1 : -1;
1778}
1779main ()
1780{
1781 exit (find_stack_direction() < 0);
1782}
1783EOF
72cfdc76 1784if { (eval echo configure:1785: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
c906108c
SS
1785then
1786 ac_cv_c_stack_direction=1
1787else
1788 echo "configure: failed program was:" >&5
1789 cat conftest.$ac_ext >&5
1790 rm -fr conftest*
1791 ac_cv_c_stack_direction=-1
1792fi
1793rm -fr conftest*
1794fi
1795
1796fi
1797
1798echo "$ac_t""$ac_cv_c_stack_direction" 1>&6
1799cat >> confdefs.h <<EOF
1800#define STACK_DIRECTION $ac_cv_c_stack_direction
1801EOF
1802
1803fi
1804
c41b7eb1 1805for ac_hdr in unistd.h
c906108c
SS
1806do
1807ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
1808echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
72cfdc76 1809echo "configure:1810: checking for $ac_hdr" >&5
c906108c
SS
1810if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1811 echo $ac_n "(cached) $ac_c" 1>&6
1812else
1813 cat > conftest.$ac_ext <<EOF
72cfdc76 1814#line 1815 "configure"
c906108c
SS
1815#include "confdefs.h"
1816#include <$ac_hdr>
1817EOF
1818ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
72cfdc76 1819{ (eval echo configure:1820: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
c906108c
SS
1820ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1821if test -z "$ac_err"; then
1822 rm -rf conftest*
1823 eval "ac_cv_header_$ac_safe=yes"
1824else
1825 echo "$ac_err" >&5
1826 echo "configure: failed program was:" >&5
1827 cat conftest.$ac_ext >&5
1828 rm -rf conftest*
1829 eval "ac_cv_header_$ac_safe=no"
1830fi
1831rm -f conftest*
1832fi
1833if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1834 echo "$ac_t""yes" 1>&6
1835 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
1836 cat >> confdefs.h <<EOF
1837#define $ac_tr_hdr 1
1838EOF
1839
1840else
1841 echo "$ac_t""no" 1>&6
1842fi
1843done
1844
1845for ac_func in getpagesize
1846do
1847echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
72cfdc76 1848echo "configure:1849: checking for $ac_func" >&5
c906108c
SS
1849if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
1850 echo $ac_n "(cached) $ac_c" 1>&6
1851else
1852 cat > conftest.$ac_ext <<EOF
72cfdc76 1853#line 1854 "configure"
c906108c
SS
1854#include "confdefs.h"
1855/* System header to define __stub macros and hopefully few prototypes,
1856 which can conflict with char $ac_func(); below. */
1857#include <assert.h>
1858/* Override any gcc2 internal prototype to avoid an error. */
1859/* We use char because int might match the return type of a gcc2
1860 builtin and then its argument prototype would still apply. */
1861char $ac_func();
1862
1863int main() {
1864
1865/* The GNU C library defines this for functions which it implements
1866 to always fail with ENOSYS. Some functions are actually named
1867 something starting with __ and the normal name is an alias. */
1868#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
1869choke me
1870#else
1871$ac_func();
1872#endif
1873
1874; return 0; }
1875EOF
72cfdc76 1876if { (eval echo configure:1877: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c
SS
1877 rm -rf conftest*
1878 eval "ac_cv_func_$ac_func=yes"
1879else
1880 echo "configure: failed program was:" >&5
1881 cat conftest.$ac_ext >&5
1882 rm -rf conftest*
1883 eval "ac_cv_func_$ac_func=no"
1884fi
1885rm -f conftest*
1886fi
1887
1888if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
1889 echo "$ac_t""yes" 1>&6
1890 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
1891 cat >> confdefs.h <<EOF
1892#define $ac_tr_func 1
1893EOF
1894
1895else
1896 echo "$ac_t""no" 1>&6
1897fi
1898done
1899
1900echo $ac_n "checking for working mmap""... $ac_c" 1>&6
72cfdc76 1901echo "configure:1902: checking for working mmap" >&5
c906108c
SS
1902if eval "test \"`echo '$''{'ac_cv_func_mmap_fixed_mapped'+set}'`\" = set"; then
1903 echo $ac_n "(cached) $ac_c" 1>&6
1904else
1905 if test "$cross_compiling" = yes; then
1906 ac_cv_func_mmap_fixed_mapped=no
1907else
1908 cat > conftest.$ac_ext <<EOF
72cfdc76 1909#line 1910 "configure"
c906108c
SS
1910#include "confdefs.h"
1911
1912/* Thanks to Mike Haertel and Jim Avera for this test.
1913 Here is a matrix of mmap possibilities:
1914 mmap private not fixed
1915 mmap private fixed at somewhere currently unmapped
1916 mmap private fixed at somewhere already mapped
1917 mmap shared not fixed
1918 mmap shared fixed at somewhere currently unmapped
1919 mmap shared fixed at somewhere already mapped
1920 For private mappings, we should verify that changes cannot be read()
1921 back from the file, nor mmap's back from the file at a different
1922 address. (There have been systems where private was not correctly
1923 implemented like the infamous i386 svr4.0, and systems where the
1924 VM page cache was not coherent with the filesystem buffer cache
1925 like early versions of FreeBSD and possibly contemporary NetBSD.)
1926 For shared mappings, we should conversely verify that changes get
1927 propogated back to all the places they're supposed to be.
1928
1929 Grep wants private fixed already mapped.
1930 The main things grep needs to know about mmap are:
1931 * does it exist and is it safe to write into the mmap'd area
1932 * how to use it (BSD variants) */
1933#include <sys/types.h>
1934#include <fcntl.h>
1935#include <sys/mman.h>
1936
1937/* This mess was copied from the GNU getpagesize.h. */
1938#ifndef HAVE_GETPAGESIZE
c41b7eb1
JB
1939# ifdef HAVE_UNISTD_H
1940# include <unistd.h>
1941# endif
c906108c
SS
1942
1943/* Assume that all systems that can run configure have sys/param.h. */
1944# ifndef HAVE_SYS_PARAM_H
1945# define HAVE_SYS_PARAM_H 1
1946# endif
1947
1948# ifdef _SC_PAGESIZE
1949# define getpagesize() sysconf(_SC_PAGESIZE)
1950# else /* no _SC_PAGESIZE */
1951# ifdef HAVE_SYS_PARAM_H
1952# include <sys/param.h>
1953# ifdef EXEC_PAGESIZE
1954# define getpagesize() EXEC_PAGESIZE
1955# else /* no EXEC_PAGESIZE */
1956# ifdef NBPG
1957# define getpagesize() NBPG * CLSIZE
1958# ifndef CLSIZE
1959# define CLSIZE 1
1960# endif /* no CLSIZE */
1961# else /* no NBPG */
1962# ifdef NBPC
1963# define getpagesize() NBPC
1964# else /* no NBPC */
1965# ifdef PAGESIZE
1966# define getpagesize() PAGESIZE
1967# endif /* PAGESIZE */
1968# endif /* no NBPC */
1969# endif /* no NBPG */
1970# endif /* no EXEC_PAGESIZE */
1971# else /* no HAVE_SYS_PARAM_H */
1972# define getpagesize() 8192 /* punt totally */
1973# endif /* no HAVE_SYS_PARAM_H */
1974# endif /* no _SC_PAGESIZE */
1975
1976#endif /* no HAVE_GETPAGESIZE */
1977
1978#ifdef __cplusplus
1979extern "C" { void *malloc(unsigned); }
1980#else
1981char *malloc();
1982#endif
1983
1984int
1985main()
1986{
1987 char *data, *data2, *data3;
1988 int i, pagesize;
1989 int fd;
1990
1991 pagesize = getpagesize();
1992
1993 /*
1994 * First, make a file with some known garbage in it.
1995 */
1996 data = malloc(pagesize);
1997 if (!data)
1998 exit(1);
1999 for (i = 0; i < pagesize; ++i)
2000 *(data + i) = rand();
2001 umask(0);
2002 fd = creat("conftestmmap", 0600);
2003 if (fd < 0)
2004 exit(1);
2005 if (write(fd, data, pagesize) != pagesize)
2006 exit(1);
2007 close(fd);
2008
2009 /*
2010 * Next, try to mmap the file at a fixed address which
2011 * already has something else allocated at it. If we can,
2012 * also make sure that we see the same garbage.
2013 */
2014 fd = open("conftestmmap", O_RDWR);
2015 if (fd < 0)
2016 exit(1);
2017 data2 = malloc(2 * pagesize);
2018 if (!data2)
2019 exit(1);
2020 data2 += (pagesize - ((int) data2 & (pagesize - 1))) & (pagesize - 1);
2021 if (data2 != mmap(data2, pagesize, PROT_READ | PROT_WRITE,
2022 MAP_PRIVATE | MAP_FIXED, fd, 0L))
2023 exit(1);
2024 for (i = 0; i < pagesize; ++i)
2025 if (*(data + i) != *(data2 + i))
2026 exit(1);
2027
2028 /*
2029 * Finally, make sure that changes to the mapped area
2030 * do not percolate back to the file as seen by read().
2031 * (This is a bug on some variants of i386 svr4.0.)
2032 */
2033 for (i = 0; i < pagesize; ++i)
2034 *(data2 + i) = *(data2 + i) + 1;
2035 data3 = malloc(pagesize);
2036 if (!data3)
2037 exit(1);
2038 if (read(fd, data3, pagesize) != pagesize)
2039 exit(1);
2040 for (i = 0; i < pagesize; ++i)
2041 if (*(data + i) != *(data3 + i))
2042 exit(1);
2043 close(fd);
2044 unlink("conftestmmap");
2045 exit(0);
2046}
2047
2048EOF
72cfdc76 2049if { (eval echo configure:2050: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
c906108c
SS
2050then
2051 ac_cv_func_mmap_fixed_mapped=yes
2052else
2053 echo "configure: failed program was:" >&5
2054 cat conftest.$ac_ext >&5
2055 rm -fr conftest*
2056 ac_cv_func_mmap_fixed_mapped=no
2057fi
2058rm -fr conftest*
2059fi
2060
2061fi
2062
2063echo "$ac_t""$ac_cv_func_mmap_fixed_mapped" 1>&6
2064if test $ac_cv_func_mmap_fixed_mapped = yes; then
2065 cat >> confdefs.h <<\EOF
2066#define HAVE_MMAP 1
2067EOF
2068
2069fi
2070
2071
2072 for ac_hdr in argz.h limits.h locale.h nl_types.h malloc.h string.h \
2073unistd.h values.h sys/param.h
2074do
2075ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2076echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
72cfdc76 2077echo "configure:2078: checking for $ac_hdr" >&5
c906108c
SS
2078if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2079 echo $ac_n "(cached) $ac_c" 1>&6
2080else
2081 cat > conftest.$ac_ext <<EOF
72cfdc76 2082#line 2083 "configure"
c906108c
SS
2083#include "confdefs.h"
2084#include <$ac_hdr>
2085EOF
2086ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
72cfdc76 2087{ (eval echo configure:2088: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
c906108c
SS
2088ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2089if test -z "$ac_err"; then
2090 rm -rf conftest*
2091 eval "ac_cv_header_$ac_safe=yes"
2092else
2093 echo "$ac_err" >&5
2094 echo "configure: failed program was:" >&5
2095 cat conftest.$ac_ext >&5
2096 rm -rf conftest*
2097 eval "ac_cv_header_$ac_safe=no"
2098fi
2099rm -f conftest*
2100fi
2101if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2102 echo "$ac_t""yes" 1>&6
2103 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2104 cat >> confdefs.h <<EOF
2105#define $ac_tr_hdr 1
2106EOF
2107
2108else
2109 echo "$ac_t""no" 1>&6
2110fi
2111done
2112
2113 for ac_func in getcwd munmap putenv setenv setlocale strchr strcasecmp \
2114__argz_count __argz_stringify __argz_next
2115do
2116echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
72cfdc76 2117echo "configure:2118: checking for $ac_func" >&5
c906108c
SS
2118if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2119 echo $ac_n "(cached) $ac_c" 1>&6
2120else
2121 cat > conftest.$ac_ext <<EOF
72cfdc76 2122#line 2123 "configure"
c906108c
SS
2123#include "confdefs.h"
2124/* System header to define __stub macros and hopefully few prototypes,
2125 which can conflict with char $ac_func(); below. */
2126#include <assert.h>
2127/* Override any gcc2 internal prototype to avoid an error. */
2128/* We use char because int might match the return type of a gcc2
2129 builtin and then its argument prototype would still apply. */
2130char $ac_func();
2131
2132int main() {
2133
2134/* The GNU C library defines this for functions which it implements
2135 to always fail with ENOSYS. Some functions are actually named
2136 something starting with __ and the normal name is an alias. */
2137#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
2138choke me
2139#else
2140$ac_func();
2141#endif
2142
2143; return 0; }
2144EOF
72cfdc76 2145if { (eval echo configure:2146: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c
SS
2146 rm -rf conftest*
2147 eval "ac_cv_func_$ac_func=yes"
2148else
2149 echo "configure: failed program was:" >&5
2150 cat conftest.$ac_ext >&5
2151 rm -rf conftest*
2152 eval "ac_cv_func_$ac_func=no"
2153fi
2154rm -f conftest*
2155fi
2156
2157if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
2158 echo "$ac_t""yes" 1>&6
2159 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2160 cat >> confdefs.h <<EOF
2161#define $ac_tr_func 1
2162EOF
2163
2164else
2165 echo "$ac_t""no" 1>&6
2166fi
2167done
2168
2169
2170 if test "${ac_cv_func_stpcpy+set}" != "set"; then
2171 for ac_func in stpcpy
2172do
2173echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
72cfdc76 2174echo "configure:2175: checking for $ac_func" >&5
c906108c
SS
2175if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2176 echo $ac_n "(cached) $ac_c" 1>&6
2177else
2178 cat > conftest.$ac_ext <<EOF
72cfdc76 2179#line 2180 "configure"
c906108c
SS
2180#include "confdefs.h"
2181/* System header to define __stub macros and hopefully few prototypes,
2182 which can conflict with char $ac_func(); below. */
2183#include <assert.h>
2184/* Override any gcc2 internal prototype to avoid an error. */
2185/* We use char because int might match the return type of a gcc2
2186 builtin and then its argument prototype would still apply. */
2187char $ac_func();
2188
2189int main() {
2190
2191/* The GNU C library defines this for functions which it implements
2192 to always fail with ENOSYS. Some functions are actually named
2193 something starting with __ and the normal name is an alias. */
2194#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
2195choke me
2196#else
2197$ac_func();
2198#endif
2199
2200; return 0; }
2201EOF
72cfdc76 2202if { (eval echo configure:2203: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c
SS
2203 rm -rf conftest*
2204 eval "ac_cv_func_$ac_func=yes"
2205else
2206 echo "configure: failed program was:" >&5
2207 cat conftest.$ac_ext >&5
2208 rm -rf conftest*
2209 eval "ac_cv_func_$ac_func=no"
2210fi
2211rm -f conftest*
2212fi
2213
2214if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
2215 echo "$ac_t""yes" 1>&6
2216 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2217 cat >> confdefs.h <<EOF
2218#define $ac_tr_func 1
2219EOF
2220
2221else
2222 echo "$ac_t""no" 1>&6
2223fi
2224done
2225
2226 fi
2227 if test "${ac_cv_func_stpcpy}" = "yes"; then
2228 cat >> confdefs.h <<\EOF
2229#define HAVE_STPCPY 1
2230EOF
2231
2232 fi
2233
2234 if test $ac_cv_header_locale_h = yes; then
2235 echo $ac_n "checking for LC_MESSAGES""... $ac_c" 1>&6
72cfdc76 2236echo "configure:2237: checking for LC_MESSAGES" >&5
c906108c
SS
2237if eval "test \"`echo '$''{'am_cv_val_LC_MESSAGES'+set}'`\" = set"; then
2238 echo $ac_n "(cached) $ac_c" 1>&6
2239else
2240 cat > conftest.$ac_ext <<EOF
72cfdc76 2241#line 2242 "configure"
c906108c
SS
2242#include "confdefs.h"
2243#include <locale.h>
2244int main() {
2245return LC_MESSAGES
2246; return 0; }
2247EOF
72cfdc76 2248if { (eval echo configure:2249: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c
SS
2249 rm -rf conftest*
2250 am_cv_val_LC_MESSAGES=yes
2251else
2252 echo "configure: failed program was:" >&5
2253 cat conftest.$ac_ext >&5
2254 rm -rf conftest*
2255 am_cv_val_LC_MESSAGES=no
2256fi
2257rm -f conftest*
2258fi
2259
2260echo "$ac_t""$am_cv_val_LC_MESSAGES" 1>&6
2261 if test $am_cv_val_LC_MESSAGES = yes; then
2262 cat >> confdefs.h <<\EOF
2263#define HAVE_LC_MESSAGES 1
2264EOF
2265
2266 fi
2267 fi
2268 echo $ac_n "checking whether NLS is requested""... $ac_c" 1>&6
72cfdc76 2269echo "configure:2270: checking whether NLS is requested" >&5
c906108c
SS
2270 # Check whether --enable-nls or --disable-nls was given.
2271if test "${enable_nls+set}" = set; then
2272 enableval="$enable_nls"
2273 USE_NLS=$enableval
2274else
2275 USE_NLS=yes
2276fi
2277
2278 echo "$ac_t""$USE_NLS" 1>&6
2279
2280
2281 USE_INCLUDED_LIBINTL=no
2282
2283 if test "$USE_NLS" = "yes"; then
2284 cat >> confdefs.h <<\EOF
2285#define ENABLE_NLS 1
2286EOF
2287
2288 echo $ac_n "checking whether included gettext is requested""... $ac_c" 1>&6
72cfdc76 2289echo "configure:2290: checking whether included gettext is requested" >&5
c906108c
SS
2290 # Check whether --with-included-gettext or --without-included-gettext was given.
2291if test "${with_included_gettext+set}" = set; then
2292 withval="$with_included_gettext"
2293 nls_cv_force_use_gnu_gettext=$withval
2294else
2295 nls_cv_force_use_gnu_gettext=no
2296fi
2297
2298 echo "$ac_t""$nls_cv_force_use_gnu_gettext" 1>&6
2299
2300 nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext"
2301 if test "$nls_cv_force_use_gnu_gettext" != "yes"; then
2302 nls_cv_header_intl=
2303 nls_cv_header_libgt=
2304 CATOBJEXT=NONE
2305
2306 ac_safe=`echo "libintl.h" | sed 'y%./+-%__p_%'`
2307echo $ac_n "checking for libintl.h""... $ac_c" 1>&6
72cfdc76 2308echo "configure:2309: checking for libintl.h" >&5
c906108c
SS
2309if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2310 echo $ac_n "(cached) $ac_c" 1>&6
2311else
2312 cat > conftest.$ac_ext <<EOF
72cfdc76 2313#line 2314 "configure"
c906108c
SS
2314#include "confdefs.h"
2315#include <libintl.h>
2316EOF
2317ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
72cfdc76 2318{ (eval echo configure:2319: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
c906108c
SS
2319ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2320if test -z "$ac_err"; then
2321 rm -rf conftest*
2322 eval "ac_cv_header_$ac_safe=yes"
2323else
2324 echo "$ac_err" >&5
2325 echo "configure: failed program was:" >&5
2326 cat conftest.$ac_ext >&5
2327 rm -rf conftest*
2328 eval "ac_cv_header_$ac_safe=no"
2329fi
2330rm -f conftest*
2331fi
2332if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2333 echo "$ac_t""yes" 1>&6
2334 echo $ac_n "checking for gettext in libc""... $ac_c" 1>&6
72cfdc76 2335echo "configure:2336: checking for gettext in libc" >&5
c906108c
SS
2336if eval "test \"`echo '$''{'gt_cv_func_gettext_libc'+set}'`\" = set"; then
2337 echo $ac_n "(cached) $ac_c" 1>&6
2338else
2339 cat > conftest.$ac_ext <<EOF
72cfdc76 2340#line 2341 "configure"
c906108c
SS
2341#include "confdefs.h"
2342#include <libintl.h>
2343int main() {
2344return (int) gettext ("")
2345; return 0; }
2346EOF
72cfdc76 2347if { (eval echo configure:2348: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c
SS
2348 rm -rf conftest*
2349 gt_cv_func_gettext_libc=yes
2350else
2351 echo "configure: failed program was:" >&5
2352 cat conftest.$ac_ext >&5
2353 rm -rf conftest*
2354 gt_cv_func_gettext_libc=no
2355fi
2356rm -f conftest*
2357fi
2358
2359echo "$ac_t""$gt_cv_func_gettext_libc" 1>&6
2360
2361 if test "$gt_cv_func_gettext_libc" != "yes"; then
2362 echo $ac_n "checking for bindtextdomain in -lintl""... $ac_c" 1>&6
72cfdc76 2363echo "configure:2364: checking for bindtextdomain in -lintl" >&5
c906108c
SS
2364ac_lib_var=`echo intl'_'bindtextdomain | sed 'y%./+-%__p_%'`
2365if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2366 echo $ac_n "(cached) $ac_c" 1>&6
2367else
2368 ac_save_LIBS="$LIBS"
2369LIBS="-lintl $LIBS"
2370cat > conftest.$ac_ext <<EOF
72cfdc76 2371#line 2372 "configure"
c906108c
SS
2372#include "confdefs.h"
2373/* Override any gcc2 internal prototype to avoid an error. */
2374/* We use char because int might match the return type of a gcc2
2375 builtin and then its argument prototype would still apply. */
2376char bindtextdomain();
2377
2378int main() {
2379bindtextdomain()
2380; return 0; }
2381EOF
72cfdc76 2382if { (eval echo configure:2383: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c
SS
2383 rm -rf conftest*
2384 eval "ac_cv_lib_$ac_lib_var=yes"
2385else
2386 echo "configure: failed program was:" >&5
2387 cat conftest.$ac_ext >&5
2388 rm -rf conftest*
2389 eval "ac_cv_lib_$ac_lib_var=no"
2390fi
2391rm -f conftest*
2392LIBS="$ac_save_LIBS"
2393
2394fi
2395if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2396 echo "$ac_t""yes" 1>&6
2397 echo $ac_n "checking for gettext in libintl""... $ac_c" 1>&6
72cfdc76 2398echo "configure:2399: checking for gettext in libintl" >&5
c906108c
SS
2399if eval "test \"`echo '$''{'gt_cv_func_gettext_libintl'+set}'`\" = set"; then
2400 echo $ac_n "(cached) $ac_c" 1>&6
2401else
2402 cat > conftest.$ac_ext <<EOF
72cfdc76 2403#line 2404 "configure"
c906108c
SS
2404#include "confdefs.h"
2405
2406int main() {
2407return (int) gettext ("")
2408; return 0; }
2409EOF
72cfdc76 2410if { (eval echo configure:2411: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c
SS
2411 rm -rf conftest*
2412 gt_cv_func_gettext_libintl=yes
2413else
2414 echo "configure: failed program was:" >&5
2415 cat conftest.$ac_ext >&5
2416 rm -rf conftest*
2417 gt_cv_func_gettext_libintl=no
2418fi
2419rm -f conftest*
2420fi
2421
2422echo "$ac_t""$gt_cv_func_gettext_libintl" 1>&6
2423else
2424 echo "$ac_t""no" 1>&6
2425fi
2426
2427 fi
2428
2429 if test "$gt_cv_func_gettext_libc" = "yes" \
2430 || test "$gt_cv_func_gettext_libintl" = "yes"; then
2431 cat >> confdefs.h <<\EOF
2432#define HAVE_GETTEXT 1
2433EOF
2434
2435 # Extract the first word of "msgfmt", so it can be a program name with args.
2436set dummy msgfmt; ac_word=$2
2437echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
72cfdc76 2438echo "configure:2439: checking for $ac_word" >&5
c906108c
SS
2439if eval "test \"`echo '$''{'ac_cv_path_MSGFMT'+set}'`\" = set"; then
2440 echo $ac_n "(cached) $ac_c" 1>&6
2441else
2442 case "$MSGFMT" in
2443 /*)
2444 ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path.
2445 ;;
2446 *)
2447 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
2448 for ac_dir in $PATH; do
2449 test -z "$ac_dir" && ac_dir=.
2450 if test -f $ac_dir/$ac_word; then
2451 if test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"; then
2452 ac_cv_path_MSGFMT="$ac_dir/$ac_word"
2453 break
2454 fi
2455 fi
2456 done
2457 IFS="$ac_save_ifs"
2458 test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT="no"
2459 ;;
2460esac
2461fi
2462MSGFMT="$ac_cv_path_MSGFMT"
2463if test -n "$MSGFMT"; then
2464 echo "$ac_t""$MSGFMT" 1>&6
2465else
2466 echo "$ac_t""no" 1>&6
2467fi
2468 if test "$MSGFMT" != "no"; then
2469 for ac_func in dcgettext
2470do
2471echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
72cfdc76 2472echo "configure:2473: checking for $ac_func" >&5
c906108c
SS
2473if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2474 echo $ac_n "(cached) $ac_c" 1>&6
2475else
2476 cat > conftest.$ac_ext <<EOF
72cfdc76 2477#line 2478 "configure"
c906108c
SS
2478#include "confdefs.h"
2479/* System header to define __stub macros and hopefully few prototypes,
2480 which can conflict with char $ac_func(); below. */
2481#include <assert.h>
2482/* Override any gcc2 internal prototype to avoid an error. */
2483/* We use char because int might match the return type of a gcc2
2484 builtin and then its argument prototype would still apply. */
2485char $ac_func();
2486
2487int main() {
2488
2489/* The GNU C library defines this for functions which it implements
2490 to always fail with ENOSYS. Some functions are actually named
2491 something starting with __ and the normal name is an alias. */
2492#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
2493choke me
2494#else
2495$ac_func();
2496#endif
2497
2498; return 0; }
2499EOF
72cfdc76 2500if { (eval echo configure:2501: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c
SS
2501 rm -rf conftest*
2502 eval "ac_cv_func_$ac_func=yes"
2503else
2504 echo "configure: failed program was:" >&5
2505 cat conftest.$ac_ext >&5
2506 rm -rf conftest*
2507 eval "ac_cv_func_$ac_func=no"
2508fi
2509rm -f conftest*
2510fi
2511
2512if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
2513 echo "$ac_t""yes" 1>&6
2514 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2515 cat >> confdefs.h <<EOF
2516#define $ac_tr_func 1
2517EOF
2518
2519else
2520 echo "$ac_t""no" 1>&6
2521fi
2522done
2523
2524 # Extract the first word of "gmsgfmt", so it can be a program name with args.
2525set dummy gmsgfmt; ac_word=$2
2526echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
72cfdc76 2527echo "configure:2528: checking for $ac_word" >&5
c906108c
SS
2528if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then
2529 echo $ac_n "(cached) $ac_c" 1>&6
2530else
2531 case "$GMSGFMT" in
2532 /*)
2533 ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path.
2534 ;;
2535 ?:/*)
2536 ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a dos path.
2537 ;;
2538 *)
2539 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2540 ac_dummy="$PATH"
2541 for ac_dir in $ac_dummy; do
2542 test -z "$ac_dir" && ac_dir=.
2543 if test -f $ac_dir/$ac_word; then
2544 ac_cv_path_GMSGFMT="$ac_dir/$ac_word"
2545 break
2546 fi
2547 done
2548 IFS="$ac_save_ifs"
2549 test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT"
2550 ;;
2551esac
2552fi
2553GMSGFMT="$ac_cv_path_GMSGFMT"
2554if test -n "$GMSGFMT"; then
2555 echo "$ac_t""$GMSGFMT" 1>&6
2556else
2557 echo "$ac_t""no" 1>&6
2558fi
2559
2560 # Extract the first word of "xgettext", so it can be a program name with args.
2561set dummy xgettext; ac_word=$2
2562echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
72cfdc76 2563echo "configure:2564: checking for $ac_word" >&5
c906108c
SS
2564if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then
2565 echo $ac_n "(cached) $ac_c" 1>&6
2566else
2567 case "$XGETTEXT" in
2568 /*)
2569 ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path.
2570 ;;
2571 *)
2572 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
2573 for ac_dir in $PATH; do
2574 test -z "$ac_dir" && ac_dir=.
2575 if test -f $ac_dir/$ac_word; then
2576 if test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"; then
2577 ac_cv_path_XGETTEXT="$ac_dir/$ac_word"
2578 break
2579 fi
2580 fi
2581 done
2582 IFS="$ac_save_ifs"
2583 test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":"
2584 ;;
2585esac
2586fi
2587XGETTEXT="$ac_cv_path_XGETTEXT"
2588if test -n "$XGETTEXT"; then
2589 echo "$ac_t""$XGETTEXT" 1>&6
2590else
2591 echo "$ac_t""no" 1>&6
2592fi
2593
2594 cat > conftest.$ac_ext <<EOF
72cfdc76 2595#line 2596 "configure"
c906108c
SS
2596#include "confdefs.h"
2597
2598int main() {
2599extern int _nl_msg_cat_cntr;
2600 return _nl_msg_cat_cntr
2601; return 0; }
2602EOF
72cfdc76 2603if { (eval echo configure:2604: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c
SS
2604 rm -rf conftest*
2605 CATOBJEXT=.gmo
2606 DATADIRNAME=share
2607else
2608 echo "configure: failed program was:" >&5
2609 cat conftest.$ac_ext >&5
2610 rm -rf conftest*
2611 CATOBJEXT=.mo
2612 DATADIRNAME=lib
2613fi
2614rm -f conftest*
2615 INSTOBJEXT=.mo
2616 fi
2617 fi
2618
2619else
2620 echo "$ac_t""no" 1>&6
2621fi
2622
2623
2624
2625 if test "$CATOBJEXT" = "NONE"; then
2626 nls_cv_use_gnu_gettext=yes
2627 fi
2628 fi
2629
2630 if test "$nls_cv_use_gnu_gettext" = "yes"; then
2631 INTLOBJS="\$(GETTOBJS)"
2632 # Extract the first word of "msgfmt", so it can be a program name with args.
2633set dummy msgfmt; ac_word=$2
2634echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
72cfdc76 2635echo "configure:2636: checking for $ac_word" >&5
c906108c
SS
2636if eval "test \"`echo '$''{'ac_cv_path_MSGFMT'+set}'`\" = set"; then
2637 echo $ac_n "(cached) $ac_c" 1>&6
2638else
2639 case "$MSGFMT" in
2640 /*)
2641 ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path.
2642 ;;
2643 *)
2644 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
2645 for ac_dir in $PATH; do
2646 test -z "$ac_dir" && ac_dir=.
2647 if test -f $ac_dir/$ac_word; then
2648 if test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"; then
2649 ac_cv_path_MSGFMT="$ac_dir/$ac_word"
2650 break
2651 fi
2652 fi
2653 done
2654 IFS="$ac_save_ifs"
2655 test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT="msgfmt"
2656 ;;
2657esac
2658fi
2659MSGFMT="$ac_cv_path_MSGFMT"
2660if test -n "$MSGFMT"; then
2661 echo "$ac_t""$MSGFMT" 1>&6
2662else
2663 echo "$ac_t""no" 1>&6
2664fi
2665
2666 # Extract the first word of "gmsgfmt", so it can be a program name with args.
2667set dummy gmsgfmt; ac_word=$2
2668echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
72cfdc76 2669echo "configure:2670: checking for $ac_word" >&5
c906108c
SS
2670if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then
2671 echo $ac_n "(cached) $ac_c" 1>&6
2672else
2673 case "$GMSGFMT" in
2674 /*)
2675 ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path.
2676 ;;
2677 ?:/*)
2678 ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a dos path.
2679 ;;
2680 *)
2681 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2682 ac_dummy="$PATH"
2683 for ac_dir in $ac_dummy; do
2684 test -z "$ac_dir" && ac_dir=.
2685 if test -f $ac_dir/$ac_word; then
2686 ac_cv_path_GMSGFMT="$ac_dir/$ac_word"
2687 break
2688 fi
2689 done
2690 IFS="$ac_save_ifs"
2691 test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT"
2692 ;;
2693esac
2694fi
2695GMSGFMT="$ac_cv_path_GMSGFMT"
2696if test -n "$GMSGFMT"; then
2697 echo "$ac_t""$GMSGFMT" 1>&6
2698else
2699 echo "$ac_t""no" 1>&6
2700fi
2701
2702 # Extract the first word of "xgettext", so it can be a program name with args.
2703set dummy xgettext; ac_word=$2
2704echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
72cfdc76 2705echo "configure:2706: checking for $ac_word" >&5
c906108c
SS
2706if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then
2707 echo $ac_n "(cached) $ac_c" 1>&6
2708else
2709 case "$XGETTEXT" in
2710 /*)
2711 ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path.
2712 ;;
2713 *)
2714 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
2715 for ac_dir in $PATH; do
2716 test -z "$ac_dir" && ac_dir=.
2717 if test -f $ac_dir/$ac_word; then
2718 if test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"; then
2719 ac_cv_path_XGETTEXT="$ac_dir/$ac_word"
2720 break
2721 fi
2722 fi
2723 done
2724 IFS="$ac_save_ifs"
2725 test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":"
2726 ;;
2727esac
2728fi
2729XGETTEXT="$ac_cv_path_XGETTEXT"
2730if test -n "$XGETTEXT"; then
2731 echo "$ac_t""$XGETTEXT" 1>&6
2732else
2733 echo "$ac_t""no" 1>&6
2734fi
2735
2736
2737 USE_INCLUDED_LIBINTL=yes
2738 CATOBJEXT=.gmo
2739 INSTOBJEXT=.mo
2740 DATADIRNAME=share
2741 INTLDEPS='$(top_builddir)/../intl/libintl.a'
2742 INTLLIBS=$INTLDEPS
2743 LIBS=`echo $LIBS | sed -e 's/-lintl//'`
2744 nls_cv_header_intl=libintl.h
2745 nls_cv_header_libgt=libgettext.h
2746 fi
2747
2748 if test "$XGETTEXT" != ":"; then
2749 if $XGETTEXT --omit-header /dev/null 2> /dev/null; then
2750 : ;
2751 else
2752 echo "$ac_t""found xgettext programs is not GNU xgettext; ignore it" 1>&6
2753 XGETTEXT=":"
2754 fi
2755 fi
2756
2757 # We need to process the po/ directory.
2758 POSUB=po
2759 else
2760 DATADIRNAME=share
2761 nls_cv_header_intl=libintl.h
2762 nls_cv_header_libgt=libgettext.h
2763 fi
2764
2765 # If this is used in GNU gettext we have to set USE_NLS to `yes'
2766 # because some of the sources are only built for this goal.
2767 if test "$PACKAGE" = gettext; then
2768 USE_NLS=yes
2769 USE_INCLUDED_LIBINTL=yes
2770 fi
2771
2772 for lang in $ALL_LINGUAS; do
2773 GMOFILES="$GMOFILES $lang.gmo"
2774 POFILES="$POFILES $lang.po"
2775 done
2776
2777
2778
2779
2780
2781
2782
2783
2784
2785
2786
2787
2788
2789
2790 if test "x$CATOBJEXT" != "x"; then
2791 if test "x$ALL_LINGUAS" = "x"; then
2792 LINGUAS=
2793 else
2794 echo $ac_n "checking for catalogs to be installed""... $ac_c" 1>&6
72cfdc76 2795echo "configure:2796: checking for catalogs to be installed" >&5
c906108c
SS
2796 NEW_LINGUAS=
2797 for lang in ${LINGUAS=$ALL_LINGUAS}; do
2798 case "$ALL_LINGUAS" in
2799 *$lang*) NEW_LINGUAS="$NEW_LINGUAS $lang" ;;
2800 esac
2801 done
2802 LINGUAS=$NEW_LINGUAS
2803 echo "$ac_t""$LINGUAS" 1>&6
2804 fi
2805
2806 if test -n "$LINGUAS"; then
2807 for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done
2808 fi
2809 fi
2810
2811 if test $ac_cv_header_locale_h = yes; then
2812 INCLUDE_LOCALE_H="#include <locale.h>"
2813 else
2814 INCLUDE_LOCALE_H="\
2815/* The system does not provide the header <locale.h>. Take care yourself. */"
2816 fi
2817
2818
2819 if test -f $srcdir/po2tbl.sed.in; then
2820 if test "$CATOBJEXT" = ".cat"; then
2821 ac_safe=`echo "linux/version.h" | sed 'y%./+-%__p_%'`
2822echo $ac_n "checking for linux/version.h""... $ac_c" 1>&6
72cfdc76 2823echo "configure:2824: checking for linux/version.h" >&5
c906108c
SS
2824if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2825 echo $ac_n "(cached) $ac_c" 1>&6
2826else
2827 cat > conftest.$ac_ext <<EOF
72cfdc76 2828#line 2829 "configure"
c906108c
SS
2829#include "confdefs.h"
2830#include <linux/version.h>
2831EOF
2832ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
72cfdc76 2833{ (eval echo configure:2834: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
c906108c
SS
2834ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2835if test -z "$ac_err"; then
2836 rm -rf conftest*
2837 eval "ac_cv_header_$ac_safe=yes"
2838else
2839 echo "$ac_err" >&5
2840 echo "configure: failed program was:" >&5
2841 cat conftest.$ac_ext >&5
2842 rm -rf conftest*
2843 eval "ac_cv_header_$ac_safe=no"
2844fi
2845rm -f conftest*
2846fi
2847if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2848 echo "$ac_t""yes" 1>&6
2849 msgformat=linux
2850else
2851 echo "$ac_t""no" 1>&6
2852msgformat=xopen
2853fi
2854
2855
2856 sed -e '/^#/d' $srcdir/$msgformat-msg.sed > po2msg.sed
2857 fi
2858 sed -e '/^#.*[^\\]$/d' -e '/^#$/d' \
2859 $srcdir/po2tbl.sed.in > po2tbl.sed
2860 fi
2861
2862 if test "$PACKAGE" = "gettext"; then
2863 GT_NO="#NO#"
2864 GT_YES=
2865 else
2866 GT_NO=
2867 GT_YES="#YES#"
2868 fi
2869
2870
2871
2872 MKINSTALLDIRS="\$(srcdir)/../../mkinstalldirs"
2873
2874
2875 l=
2876
2877
4536bbc6 2878 if test -f $srcdir/po/POTFILES.in; then
c906108c
SS
2879 test -d po || mkdir po
2880 if test "x$srcdir" != "x."; then
2881 if test "x`echo $srcdir | sed 's@/.*@@'`" = "x"; then
2882 posrcprefix="$srcdir/"
2883 else
2884 posrcprefix="../$srcdir/"
2885 fi
2886 else
2887 posrcprefix="../"
2888 fi
2889 rm -f po/POTFILES
2890 sed -e "/^#/d" -e "/^\$/d" -e "s,.*, $posrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \
2891 < $srcdir/po/POTFILES.in > po/POTFILES
2892 fi
2893
0fbb3da7
TT
2894cat >> confdefs.h <<\EOF
2895#define PACKAGE "gdb"
2896EOF
2897
2898
c906108c
SS
2899
2900
2901CONFIG_OBS=
66b965bb 2902CONFIG_LIB_OBS=
c906108c
SS
2903CONFIG_DEPS=
2904CONFIG_SRCS=
fb40c209
AC
2905CONFIG_INITS=
2906ENABLE_CFLAGS=
b3a90332
AC
2907CONFIG_ALL=
2908CONFIG_CLEAN=
e56ac5c3
AC
2909CONFIG_INSTALL=
2910CONFIG_UNINSTALL=
c906108c 2911
8dcde887 2912subdirs="doc testsuite"
96baa820 2913
8dcde887 2914configdirs=
96baa820 2915
27e9bf90 2916. $srcdir/configure.host
c906108c 2917
27e9bf90 2918. $srcdir/configure.tgt
c906108c 2919
27e9bf90
MK
2920# Fetch the default architecture and default target vector from BFD.
2921targ=$target; . $srcdir/../bfd/config.bfd
c906108c 2922
27e9bf90
MK
2923# We only want the first architecture, so strip off the others if
2924# there is more than one.
2925targ_archs=`echo $targ_archs | sed 's/ .*//'`
1ba607ad 2926
27e9bf90
MK
2927if test "x$targ_archs" != x; then
2928 cat >> confdefs.h <<EOF
2929#define DEFAULT_BFD_ARCH $targ_archs
1ba607ad
AC
2930EOF
2931
2932fi
27e9bf90
MK
2933if test "x$targ_defvec" != x; then
2934 cat >> confdefs.h <<EOF
2935#define DEFAULT_BFD_VEC $targ_defvec
1ba607ad
AC
2936EOF
2937
2938fi
c906108c 2939
8bb2c122
MK
2940if test "$program_transform_name" = s,x,x,; then
2941 program_transform_name=
2942else
2943 # Double any \ or $. echo might interpret backslashes.
2944 cat <<\EOF_SED > conftestsed
2945s,\\,\\\\,g; s,\$,$$,g
2946EOF_SED
2947 program_transform_name="`echo $program_transform_name|sed -f conftestsed`"
2948 rm -f conftestsed
2949fi
2950test "$program_prefix" != NONE &&
2951 program_transform_name="s,^,${program_prefix},; $program_transform_name"
2952# Use a double $ so make ignores it.
2953test "$program_suffix" != NONE &&
2954 program_transform_name="s,\$\$,${program_suffix},; $program_transform_name"
2955
2956# sed with no file args requires a program.
2957test "$program_transform_name" = "" && program_transform_name="s,x,x,"
2958
2959
627af7ea
MK
2960# The CLI cannot be disabled yet, but may be in the future.
2961
2962# Enable CLI.
2963# Check whether --enable-gdbcli or --disable-gdbcli was given.
2964if test "${enable_gdbcli+set}" = set; then
2965 enableval="$enable_gdbcli"
2966 case $enableval in
2967 yes)
2968 ;;
2969 no)
2970 { echo "configure: error: the command-line interface cannot be disabled yet" 1>&2; exit 1; } ;;
2971 *)
2972 { echo "configure: error: bad value $enableval for --enable-gdbcli" 1>&2; exit 1; } ;;
2973 esac
2974else
2975 enable_gdbcli=yes
2976fi
2977
2978if test x"$enable_gdbcli" = xyes; then
2979 if test -d $srcdir/cli; then
2980 CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_CLI_OBS)"
2981 CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_CLI_DEPS)"
2982 CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_CLI_SRCS)"
2983 CONFIG_INITS="$CONFIG_INITS \$(SUBDIR_CLI_INITS)"
2984 ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_CLI_CFLAGS)"
2985 CONFIG_ALL="$CONFIG_ALL \$(SUBDIR_CLI_ALL)"
2986 CONFIG_CLEAN="$CONFIG_CLEAN \$(SUBDIR_CLI_CLEAN)"
2987 CONFIG_INSTALL="$CONFIG_INSTALL \$(SUBDIR_CLI_INSTALL)"
2988 CONFIG_UNINSTALL="$CONFIG_UNINSTALL \$(SUBDIR_CLI_UNINSTALL)"
2989 fi
2990fi
2991
2992# Enable MI.
2993# Check whether --enable-gdbmi or --disable-gdbmi was given.
2994if test "${enable_gdbmi+set}" = set; then
2995 enableval="$enable_gdbmi"
2996 case $enableval in
2997 yes | no)
2998 ;;
2999 *)
3000 { echo "configure: error: bad value $enableval for --enable-gdbmi" 1>&2; exit 1; } ;;
3001 esac
3002else
3003 enable_gdbmi=yes
3004fi
3005
3006if test x"$enable_gdbmi" = xyes; then
3007 if test -d $srcdir/mi; then
3008 CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_MI_OBS)"
3009 CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_MI_DEPS)"
3010 CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_MI_SRCS)"
3011 CONFIG_INITS="$CONFIG_INITS \$(SUBDIR_MI_INITS)"
3012 ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_MI_CFLAGS)"
3013 CONFIG_ALL="$CONFIG_ALL \$(SUBDIR_MI_ALL)"
3014 CONFIG_CLEAN="$CONFIG_CLEAN \$(SUBDIR_MI_CLEAN)"
3015 CONFIG_INSTALL="$CONFIG_INSTALL \$(SUBDIR_MI_INSTALL)"
3016 CONFIG_UNINSTALL="$CONFIG_UNINSTALL \$(SUBDIR_MI_UNINSTALL)"
3017 fi
3018fi
3019
06825bd1
MK
3020# Enable TUI.
3021# Check whether --enable-tui or --disable-tui was given.
3022if test "${enable_tui+set}" = set; then
3023 enableval="$enable_tui"
3024 case $enableval in
3025 yes | no)
3026 ;;
3027 *)
3028 { echo "configure: error: bad value $enableval for --enable-tui" 1>&2; exit 1; } ;;
3029 esac
3030fi
3031
3032if test x"$enable_tui" = xyes; then
3033 if test -d $srcdir/tui; then
3034 CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_TUI_OBS)"
3035 CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_TUI_DEPS)"
3036 CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_TUI_SRCS)"
3037 CONFIG_INITS="$CONFIG_INITS \$(SUBDIR_TUI_INITS)"
3038 ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_TUI_CFLAGS)"
3039 CONFIG_ALL="$CONFIG_ALL \$(SUBDIR_TUI_ALL)"
3040 CONFIG_CLEAN="$CONFIG_CLEAN \$(SUBDIR_TUI_CLEAN)"
3041 CONFIG_INSTALL="$CONFIG_INSTALL \$(SUBDIR_TUI_INSTALL)"
3042 CONFIG_UNINSTALL="$CONFIG_UNINSTALL \$(SUBDIR_TUI_UNINSTALL)"
3043 need_curses=yes
3044 fi
3045fi
3046
8ee53726
MK
3047# Enable gdbtk.
3048# Check whether --enable-gdbtk or --disable-gdbtk was given.
3049if test "${enable_gdbtk+set}" = set; then
3050 enableval="$enable_gdbtk"
3051 case $enableval in
3052 yes | no)
3053 ;;
3054 *)
3055 { echo "configure: error: bad value $enableval for --enable-gdbtk" 1>&2; exit 1; } ;;
3056 esac
3057else
3058 if test -d $srcdir/gdbtk; then
3059 enable_gdbtk=yes
3060 else
3061 enable_gdbtk=no
3062 fi
3063fi
3064
3065# We unconditionally disable gdbtk tests on selected platforms.
3066case $host_os in
3067 go32* | windows*)
3068 echo "configure: warning: gdbtk isn't supported on $host; disabling" 1>&2
3069 enable_gdbtk=no ;;
3070esac
3071
8bb2c122
MK
3072# --------------------- #
3073# Checks for programs. #
3074# --------------------- #
3075
c41b7eb1 3076for ac_prog in mawk gawk nawk awk
7a292a7a
SS
3077do
3078# Extract the first word of "$ac_prog", so it can be a program name with args.
3079set dummy $ac_prog; ac_word=$2
3080echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
72cfdc76 3081echo "configure:3082: checking for $ac_word" >&5
7a292a7a
SS
3082if eval "test \"`echo '$''{'ac_cv_prog_AWK'+set}'`\" = set"; then
3083 echo $ac_n "(cached) $ac_c" 1>&6
3084else
3085 if test -n "$AWK"; then
3086 ac_cv_prog_AWK="$AWK" # Let the user override the test.
3087else
3088 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
3089 ac_dummy="$PATH"
3090 for ac_dir in $ac_dummy; do
3091 test -z "$ac_dir" && ac_dir=.
3092 if test -f $ac_dir/$ac_word; then
3093 ac_cv_prog_AWK="$ac_prog"
3094 break
3095 fi
3096 done
3097 IFS="$ac_save_ifs"
3098fi
3099fi
3100AWK="$ac_cv_prog_AWK"
3101if test -n "$AWK"; then
3102 echo "$ac_t""$AWK" 1>&6
3103else
3104 echo "$ac_t""no" 1>&6
3105fi
3106
3107test -n "$AWK" && break
3108done
3109
c906108c
SS
3110# Find a good install program. We prefer a C program (faster),
3111# so one script is as good as another. But avoid the broken or
3112# incompatible versions:
3113# SysV /etc/install, /usr/sbin/install
3114# SunOS /usr/etc/install
3115# IRIX /sbin/install
3116# AIX /bin/install
3117# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
3118# AFS /usr/afsws/bin/install, which mishandles nonexistent args
3119# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
3120# ./install, which can be erroneously created by make from ./install.sh.
3121echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
72cfdc76 3122echo "configure:3123: checking for a BSD compatible install" >&5
c906108c
SS
3123if test -z "$INSTALL"; then
3124if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
3125 echo $ac_n "(cached) $ac_c" 1>&6
3126else
3127 IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS=":"
3128 for ac_dir in $PATH; do
3129 # Account for people who put trailing slashes in PATH elements.
3130 case "$ac_dir/" in
3131 /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
3132 *)
3133 # OSF1 and SCO ODT 3.0 have their own names for install.
3134 # Don't use installbsd from OSF since it installs stuff as root
3135 # by default.
3136 for ac_prog in ginstall scoinst install; do
3137 if test -f $ac_dir/$ac_prog; then
3138 if test $ac_prog = install &&
3139 grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
3140 # AIX install. It has an incompatible calling convention.
3141 :
3142 else
3143 ac_cv_path_install="$ac_dir/$ac_prog -c"
3144 break 2
3145 fi
3146 fi
3147 done
3148 ;;
3149 esac
3150 done
3151 IFS="$ac_save_IFS"
3152
3153fi
3154 if test "${ac_cv_path_install+set}" = set; then
3155 INSTALL="$ac_cv_path_install"
3156 else
3157 # As a last resort, use the slow shell script. We don't cache a
3158 # path for INSTALL within a source directory, because that will
3159 # break other packages using the cache if that directory is
3160 # removed, or if the path is relative.
3161 INSTALL="$ac_install_sh"
3162 fi
3163fi
3164echo "$ac_t""$INSTALL" 1>&6
3165
3166# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
3167# It thinks the first close brace ends the variable substitution.
3168test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
3169
3170test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
3171
3172test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
3173
8bb2c122 3174echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
72cfdc76 3175echo "configure:3176: checking whether ln -s works" >&5
8bb2c122
MK
3176if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then
3177 echo $ac_n "(cached) $ac_c" 1>&6
c906108c 3178else
8bb2c122
MK
3179 rm -f conftestdata
3180if ln -s X conftestdata 2>/dev/null
3181then
3182 rm -f conftestdata
3183 ac_cv_prog_LN_S="ln -s"
3184else
3185 ac_cv_prog_LN_S=ln
3186fi
3187fi
3188LN_S="$ac_cv_prog_LN_S"
3189if test "$ac_cv_prog_LN_S" = "ln -s"; then
3190 echo "$ac_t""yes" 1>&6
3191else
3192 echo "$ac_t""no" 1>&6
c906108c
SS
3193fi
3194
8bb2c122
MK
3195# Extract the first word of "ranlib", so it can be a program name with args.
3196set dummy ranlib; ac_word=$2
c906108c 3197echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
72cfdc76 3198echo "configure:3199: checking for $ac_word" >&5
8bb2c122 3199if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
c906108c
SS
3200 echo $ac_n "(cached) $ac_c" 1>&6
3201else
8bb2c122
MK
3202 if test -n "$RANLIB"; then
3203 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
c906108c
SS
3204else
3205 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
3206 ac_dummy="$PATH"
3207 for ac_dir in $ac_dummy; do
3208 test -z "$ac_dir" && ac_dir=.
3209 if test -f $ac_dir/$ac_word; then
8bb2c122 3210 ac_cv_prog_RANLIB="ranlib"
c906108c
SS
3211 break
3212 fi
3213 done
3214 IFS="$ac_save_ifs"
8bb2c122 3215 test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
c906108c
SS
3216fi
3217fi
8bb2c122
MK
3218RANLIB="$ac_cv_prog_RANLIB"
3219if test -n "$RANLIB"; then
3220 echo "$ac_t""$RANLIB" 1>&6
c906108c
SS
3221else
3222 echo "$ac_t""no" 1>&6
3223fi
3224
8bb2c122
MK
3225for ac_prog in 'bison -y' byacc
3226do
3227# Extract the first word of "$ac_prog", so it can be a program name with args.
3228set dummy $ac_prog; ac_word=$2
c906108c 3229echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
72cfdc76 3230echo "configure:3231: checking for $ac_word" >&5
8bb2c122 3231if eval "test \"`echo '$''{'ac_cv_prog_YACC'+set}'`\" = set"; then
c906108c
SS
3232 echo $ac_n "(cached) $ac_c" 1>&6
3233else
8bb2c122
MK
3234 if test -n "$YACC"; then
3235 ac_cv_prog_YACC="$YACC" # Let the user override the test.
c906108c
SS
3236else
3237 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
3238 ac_dummy="$PATH"
3239 for ac_dir in $ac_dummy; do
3240 test -z "$ac_dir" && ac_dir=.
3241 if test -f $ac_dir/$ac_word; then
8bb2c122 3242 ac_cv_prog_YACC="$ac_prog"
c906108c
SS
3243 break
3244 fi
3245 done
3246 IFS="$ac_save_ifs"
3247fi
3248fi
8bb2c122
MK
3249YACC="$ac_cv_prog_YACC"
3250if test -n "$YACC"; then
3251 echo "$ac_t""$YACC" 1>&6
c906108c
SS
3252else
3253 echo "$ac_t""no" 1>&6
3254fi
3255
8bb2c122
MK
3256test -n "$YACC" && break
3257done
3258test -n "$YACC" || YACC="yacc"
c906108c 3259
8bb2c122
MK
3260
3261# Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
3262set dummy ${ac_tool_prefix}ar; ac_word=$2
c906108c 3263echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
72cfdc76 3264echo "configure:3265: checking for $ac_word" >&5
8bb2c122 3265if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then
c906108c
SS
3266 echo $ac_n "(cached) $ac_c" 1>&6
3267else
8bb2c122
MK
3268 if test -n "$AR"; then
3269 ac_cv_prog_AR="$AR" # Let the user override the test.
c906108c
SS
3270else
3271 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
3272 ac_dummy="$PATH"
3273 for ac_dir in $ac_dummy; do
3274 test -z "$ac_dir" && ac_dir=.
3275 if test -f $ac_dir/$ac_word; then
8bb2c122 3276 ac_cv_prog_AR="${ac_tool_prefix}ar"
c906108c
SS
3277 break
3278 fi
3279 done
3280 IFS="$ac_save_ifs"
8bb2c122 3281 test -z "$ac_cv_prog_AR" && ac_cv_prog_AR="ar"
c906108c
SS
3282fi
3283fi
8bb2c122
MK
3284AR="$ac_cv_prog_AR"
3285if test -n "$AR"; then
3286 echo "$ac_t""$AR" 1>&6
c906108c
SS
3287else
3288 echo "$ac_t""no" 1>&6
3289fi
3290
8bb2c122 3291
c906108c 3292
95ca63c4
CF
3293# Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
3294set dummy ${ac_tool_prefix}dlltool; ac_word=$2
3295echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
72cfdc76 3296echo "configure:3297: checking for $ac_word" >&5
95ca63c4
CF
3297if eval "test \"`echo '$''{'ac_cv_prog_DLLTOOL'+set}'`\" = set"; then
3298 echo $ac_n "(cached) $ac_c" 1>&6
3299else
3300 if test -n "$DLLTOOL"; then
3301 ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
3302else
3303 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
3304 ac_dummy="$PATH"
3305 for ac_dir in $ac_dummy; do
3306 test -z "$ac_dir" && ac_dir=.
3307 if test -f $ac_dir/$ac_word; then
3308 ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
3309 break
3310 fi
3311 done
3312 IFS="$ac_save_ifs"
3313 test -z "$ac_cv_prog_DLLTOOL" && ac_cv_prog_DLLTOOL="dlltool"
3314fi
3315fi
3316DLLTOOL="$ac_cv_prog_DLLTOOL"
3317if test -n "$DLLTOOL"; then
3318 echo "$ac_t""$DLLTOOL" 1>&6
3319else
3320 echo "$ac_t""no" 1>&6
3321fi
3322
3323
3324
3325# Extract the first word of "${ac_tool_prefix}windres", so it can be a program name with args.
3326set dummy ${ac_tool_prefix}windres; ac_word=$2
3327echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
72cfdc76 3328echo "configure:3329: checking for $ac_word" >&5
95ca63c4
CF
3329if eval "test \"`echo '$''{'ac_cv_prog_WINDRES'+set}'`\" = set"; then
3330 echo $ac_n "(cached) $ac_c" 1>&6
3331else
3332 if test -n "$WINDRES"; then
3333 ac_cv_prog_WINDRES="$WINDRES" # Let the user override the test.
3334else
3335 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
3336 ac_dummy="$PATH"
3337 for ac_dir in $ac_dummy; do
3338 test -z "$ac_dir" && ac_dir=.
3339 if test -f $ac_dir/$ac_word; then
3340 ac_cv_prog_WINDRES="${ac_tool_prefix}windres"
3341 break
3342 fi
3343 done
3344 IFS="$ac_save_ifs"
3345 test -z "$ac_cv_prog_WINDRES" && ac_cv_prog_WINDRES="windres"
3346fi
3347fi
3348WINDRES="$ac_cv_prog_WINDRES"
3349if test -n "$WINDRES"; then
3350 echo "$ac_t""$WINDRES" 1>&6
3351else
3352 echo "$ac_t""no" 1>&6
3353fi
3354
3355
3356
c906108c 3357
8bb2c122 3358# Needed for GNU/Hurd.
75c6e08a
MK
3359# Extract the first word of "${ac_tool_prefix}mig", so it can be a program name with args.
3360set dummy ${ac_tool_prefix}mig; ac_word=$2
3361echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
72cfdc76 3362echo "configure:3363: checking for $ac_word" >&5
75c6e08a
MK
3363if eval "test \"`echo '$''{'ac_cv_prog_MIG'+set}'`\" = set"; then
3364 echo $ac_n "(cached) $ac_c" 1>&6
3365else
3366 if test -n "$MIG"; then
3367 ac_cv_prog_MIG="$MIG" # Let the user override the test.
3368else
3369 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
3370 ac_dummy="$PATH"
3371 for ac_dir in $ac_dummy; do
3372 test -z "$ac_dir" && ac_dir=.
3373 if test -f $ac_dir/$ac_word; then
3374 ac_cv_prog_MIG="${ac_tool_prefix}mig"
3375 break
3376 fi
3377 done
3378 IFS="$ac_save_ifs"
3379 test -z "$ac_cv_prog_MIG" && ac_cv_prog_MIG="mig"
3380fi
3381fi
3382MIG="$ac_cv_prog_MIG"
3383if test -n "$MIG"; then
3384 echo "$ac_t""$MIG" 1>&6
3385else
3386 echo "$ac_t""no" 1>&6
3387fi
3388
3389
3390
3391
9a156167
MK
3392# ---------------------- #
3393# Checks for libraries. #
3394# ---------------------- #
3395
3396# We might need to link with -lm; most simulators need it.
3397echo $ac_n "checking for main in -lm""... $ac_c" 1>&6
72cfdc76 3398echo "configure:3399: checking for main in -lm" >&5
9a156167
MK
3399ac_lib_var=`echo m'_'main | sed 'y%./+-%__p_%'`
3400if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3401 echo $ac_n "(cached) $ac_c" 1>&6
3402else
3403 ac_save_LIBS="$LIBS"
3404LIBS="-lm $LIBS"
3405cat > conftest.$ac_ext <<EOF
72cfdc76 3406#line 3407 "configure"
9a156167
MK
3407#include "confdefs.h"
3408
3409int main() {
3410main()
3411; return 0; }
3412EOF
72cfdc76 3413if { (eval echo configure:3414: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9a156167
MK
3414 rm -rf conftest*
3415 eval "ac_cv_lib_$ac_lib_var=yes"
3416else
3417 echo "configure: failed program was:" >&5
3418 cat conftest.$ac_ext >&5
3419 rm -rf conftest*
3420 eval "ac_cv_lib_$ac_lib_var=no"
3421fi
3422rm -f conftest*
3423LIBS="$ac_save_LIBS"
3424
3425fi
3426if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3427 echo "$ac_t""yes" 1>&6
3428 ac_tr_lib=HAVE_LIB`echo m | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3429 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3430 cat >> confdefs.h <<EOF
3431#define $ac_tr_lib 1
3432EOF
3433
3434 LIBS="-lm $LIBS"
3435
3436else
3437 echo "$ac_t""no" 1>&6
3438fi
3439
3440
3441# We need to link with -lw to get `wctype' on Solaris before Solaris
3442# 2.6. Solaris 2.6 and beyond have this function in libc, and have a
3443# libw that some versions of the GNU linker cannot hanle (GNU ld 2.9.1
3444# is known to have this problem). Therefore we avoid libw if we can.
3445echo $ac_n "checking for wctype""... $ac_c" 1>&6
72cfdc76 3446echo "configure:3447: checking for wctype" >&5
9a156167
MK
3447if eval "test \"`echo '$''{'ac_cv_func_wctype'+set}'`\" = set"; then
3448 echo $ac_n "(cached) $ac_c" 1>&6
3449else
3450 cat > conftest.$ac_ext <<EOF
72cfdc76 3451#line 3452 "configure"
9a156167
MK
3452#include "confdefs.h"
3453/* System header to define __stub macros and hopefully few prototypes,
3454 which can conflict with char wctype(); below. */
3455#include <assert.h>
3456/* Override any gcc2 internal prototype to avoid an error. */
3457/* We use char because int might match the return type of a gcc2
3458 builtin and then its argument prototype would still apply. */
3459char wctype();
3460
3461int main() {
3462
3463/* The GNU C library defines this for functions which it implements
3464 to always fail with ENOSYS. Some functions are actually named
3465 something starting with __ and the normal name is an alias. */
3466#if defined (__stub_wctype) || defined (__stub___wctype)
3467choke me
3468#else
3469wctype();
3470#endif
3471
3472; return 0; }
3473EOF
72cfdc76 3474if { (eval echo configure:3475: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9a156167
MK
3475 rm -rf conftest*
3476 eval "ac_cv_func_wctype=yes"
3477else
3478 echo "configure: failed program was:" >&5
3479 cat conftest.$ac_ext >&5
3480 rm -rf conftest*
3481 eval "ac_cv_func_wctype=no"
3482fi
3483rm -f conftest*
3484fi
3485
3486if eval "test \"`echo '$ac_cv_func_'wctype`\" = yes"; then
3487 echo "$ac_t""yes" 1>&6
3488 :
3489else
3490 echo "$ac_t""no" 1>&6
3491echo $ac_n "checking for wctype in -lw""... $ac_c" 1>&6
72cfdc76 3492echo "configure:3493: checking for wctype in -lw" >&5
9a156167
MK
3493ac_lib_var=`echo w'_'wctype | sed 'y%./+-%__p_%'`
3494if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3495 echo $ac_n "(cached) $ac_c" 1>&6
3496else
3497 ac_save_LIBS="$LIBS"
3498LIBS="-lw $LIBS"
3499cat > conftest.$ac_ext <<EOF
72cfdc76 3500#line 3501 "configure"
9a156167
MK
3501#include "confdefs.h"
3502/* Override any gcc2 internal prototype to avoid an error. */
3503/* We use char because int might match the return type of a gcc2
3504 builtin and then its argument prototype would still apply. */
3505char wctype();
3506
3507int main() {
3508wctype()
3509; return 0; }
3510EOF
72cfdc76 3511if { (eval echo configure:3512: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9a156167
MK
3512 rm -rf conftest*
3513 eval "ac_cv_lib_$ac_lib_var=yes"
3514else
3515 echo "configure: failed program was:" >&5
3516 cat conftest.$ac_ext >&5
3517 rm -rf conftest*
3518 eval "ac_cv_lib_$ac_lib_var=no"
3519fi
3520rm -f conftest*
3521LIBS="$ac_save_LIBS"
3522
3523fi
3524if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3525 echo "$ac_t""yes" 1>&6
3526 ac_tr_lib=HAVE_LIB`echo w | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3527 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3528 cat >> confdefs.h <<EOF
3529#define $ac_tr_lib 1
3530EOF
3531
3532 LIBS="-lw $LIBS"
3533
3534else
3535 echo "$ac_t""no" 1>&6
3536fi
3537
3538fi
3539
3540
3541# Some systems (e.g. Solaris) have `socketpair' in libsocket.
3542
3543echo $ac_n "checking for library containing socketpair""... $ac_c" 1>&6
72cfdc76 3544echo "configure:3545: checking for library containing socketpair" >&5
9a156167
MK
3545if eval "test \"`echo '$''{'ac_cv_search_socketpair'+set}'`\" = set"; then
3546 echo $ac_n "(cached) $ac_c" 1>&6
3547else
3548 ac_func_search_save_LIBS="$LIBS"
3549ac_cv_search_socketpair="no"
3550cat > conftest.$ac_ext <<EOF
72cfdc76 3551#line 3552 "configure"
9a156167
MK
3552#include "confdefs.h"
3553/* Override any gcc2 internal prototype to avoid an error. */
3554/* We use char because int might match the return type of a gcc2
3555 builtin and then its argument prototype would still apply. */
3556char socketpair();
3557
3558int main() {
3559socketpair()
3560; return 0; }
3561EOF
72cfdc76 3562if { (eval echo configure:3563: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9a156167
MK
3563 rm -rf conftest*
3564 ac_cv_search_socketpair="none required"
3565else
3566 echo "configure: failed program was:" >&5
3567 cat conftest.$ac_ext >&5
3568fi
3569rm -f conftest*
3570test "$ac_cv_search_socketpair" = "no" && for i in socket; do
3571LIBS="-l$i $ac_func_search_save_LIBS"
3572cat > conftest.$ac_ext <<EOF
72cfdc76 3573#line 3574 "configure"
9a156167
MK
3574#include "confdefs.h"
3575/* Override any gcc2 internal prototype to avoid an error. */
3576/* We use char because int might match the return type of a gcc2
3577 builtin and then its argument prototype would still apply. */
3578char socketpair();
3579
3580int main() {
3581socketpair()
3582; return 0; }
3583EOF
72cfdc76 3584if { (eval echo configure:3585: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9a156167
MK
3585 rm -rf conftest*
3586 ac_cv_search_socketpair="-l$i"
3587break
3588else
3589 echo "configure: failed program was:" >&5
3590 cat conftest.$ac_ext >&5
3591fi
3592rm -f conftest*
3593done
3594LIBS="$ac_func_search_save_LIBS"
3595fi
3596
3597echo "$ac_t""$ac_cv_search_socketpair" 1>&6
3598if test "$ac_cv_search_socketpair" != "no"; then
3599 test "$ac_cv_search_socketpair" = "none required" || LIBS="$ac_cv_search_socketpair $LIBS"
3600
3601else :
3602
3603fi
3604
06825bd1
MK
3605# Since GDB uses Readline, we need termcap functionality, so we need
3606# to find a library that provides that. When GDB is configured with
3607# --enable-tui, we need full curses functionality.
3608#
3609# FIXME: kettenis/20030102: We seem to prefer HP curses (Hcurses) over
3610# Xcurses on HP-UX; see the `-D__HP_CURSES' in the relevant host
3611# Makefile fragments. That's why we need to have `Hcurses' before
3612# `curses'. I don't see why we should use HP curses if a more
3613# standard curses is available, except that according to HP's
3614# documentation one needs to compile `-D_XOPEN_SOURCE_EXTENDED' on
3615# HP-UX 10.10 and 10.20.
3616
3617if test "$need_curses" = yes; then
3618
3619echo $ac_n "checking for library containing initscr""... $ac_c" 1>&6
72cfdc76 3620echo "configure:3621: checking for library containing initscr" >&5
06825bd1
MK
3621if eval "test \"`echo '$''{'ac_cv_search_initscr'+set}'`\" = set"; then
3622 echo $ac_n "(cached) $ac_c" 1>&6
3623else
3624 ac_func_search_save_LIBS="$LIBS"
3625ac_cv_search_initscr="no"
3626cat > conftest.$ac_ext <<EOF
72cfdc76 3627#line 3628 "configure"
06825bd1
MK
3628#include "confdefs.h"
3629/* Override any gcc2 internal prototype to avoid an error. */
3630/* We use char because int might match the return type of a gcc2
3631 builtin and then its argument prototype would still apply. */
3632char initscr();
3633
3634int main() {
3635initscr()
3636; return 0; }
3637EOF
72cfdc76 3638if { (eval echo configure:3639: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
06825bd1
MK
3639 rm -rf conftest*
3640 ac_cv_search_initscr="none required"
3641else
3642 echo "configure: failed program was:" >&5
3643 cat conftest.$ac_ext >&5
3644fi
3645rm -f conftest*
3646test "$ac_cv_search_initscr" = "no" && for i in ncurses Hcurses curses; do
3647LIBS="-l$i $ac_func_search_save_LIBS"
3648cat > conftest.$ac_ext <<EOF
72cfdc76 3649#line 3650 "configure"
06825bd1
MK
3650#include "confdefs.h"
3651/* Override any gcc2 internal prototype to avoid an error. */
3652/* We use char because int might match the return type of a gcc2
3653 builtin and then its argument prototype would still apply. */
3654char initscr();
3655
3656int main() {
3657initscr()
3658; return 0; }
3659EOF
72cfdc76 3660if { (eval echo configure:3661: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
06825bd1
MK
3661 rm -rf conftest*
3662 ac_cv_search_initscr="-l$i"
3663break
3664else
3665 echo "configure: failed program was:" >&5
3666 cat conftest.$ac_ext >&5
3667fi
3668rm -f conftest*
3669done
3670LIBS="$ac_func_search_save_LIBS"
3671fi
3672
3673echo "$ac_t""$ac_cv_search_initscr" 1>&6
3674if test "$ac_cv_search_initscr" != "no"; then
3675 test "$ac_cv_search_initscr" = "none required" || LIBS="$ac_cv_search_initscr $LIBS"
3676
3677else :
3678 { echo "configure: error: no curses library found" 1>&2; exit 1; }
3679fi
3680fi
3681
3682case $host_os in
3683 cygwin*)
3684 if test -d $srcdir/libtermcap; then
3685 LIBS="../libtermcap/libtermcap.a $LIBS"
3686 ac_cv_search_tgetent="../libtermcap/libtermcap.a"
3687 fi ;;
3688 go32*)
3689 # ??? Is this really true?
3690 ac_cv_search_tgetent="none required"
3691 ;;
3692 aix*)
3693 # Readline prefers curses over termcap on AIX.
3694 # ??? Why?
3695
3696echo $ac_n "checking for library containing tgetent""... $ac_c" 1>&6
72cfdc76 3697echo "configure:3698: checking for library containing tgetent" >&5
06825bd1
MK
3698if eval "test \"`echo '$''{'ac_cv_search_tgetent'+set}'`\" = set"; then
3699 echo $ac_n "(cached) $ac_c" 1>&6
3700else
3701 ac_func_search_save_LIBS="$LIBS"
3702ac_cv_search_tgetent="no"
3703cat > conftest.$ac_ext <<EOF
72cfdc76 3704#line 3705 "configure"
06825bd1
MK
3705#include "confdefs.h"
3706/* Override any gcc2 internal prototype to avoid an error. */
3707/* We use char because int might match the return type of a gcc2
3708 builtin and then its argument prototype would still apply. */
3709char tgetent();
3710
3711int main() {
3712tgetent()
3713; return 0; }
3714EOF
72cfdc76 3715if { (eval echo configure:3716: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
06825bd1
MK
3716 rm -rf conftest*
3717 ac_cv_search_tgetent="none required"
3718else
3719 echo "configure: failed program was:" >&5
3720 cat conftest.$ac_ext >&5
3721fi
3722rm -f conftest*
3723test "$ac_cv_search_tgetent" = "no" && for i in tinfo ncurses curses termcap; do
3724LIBS="-l$i $ac_func_search_save_LIBS"
3725cat > conftest.$ac_ext <<EOF
72cfdc76 3726#line 3727 "configure"
06825bd1
MK
3727#include "confdefs.h"
3728/* Override any gcc2 internal prototype to avoid an error. */
3729/* We use char because int might match the return type of a gcc2
3730 builtin and then its argument prototype would still apply. */
3731char tgetent();
3732
3733int main() {
3734tgetent()
3735; return 0; }
3736EOF
72cfdc76 3737if { (eval echo configure:3738: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
06825bd1
MK
3738 rm -rf conftest*
3739 ac_cv_search_tgetent="-l$i"
3740break
3741else
3742 echo "configure: failed program was:" >&5
3743 cat conftest.$ac_ext >&5
3744fi
3745rm -f conftest*
3746done
3747LIBS="$ac_func_search_save_LIBS"
3748fi
3749
3750echo "$ac_t""$ac_cv_search_tgetent" 1>&6
3751if test "$ac_cv_search_tgetent" != "no"; then
3752 test "$ac_cv_search_tgetent" = "none required" || LIBS="$ac_cv_search_tgetent $LIBS"
3753
3754else :
3755
3756fi
3757 ;;
3758esac
3759
3760# Note: We used to check for libtermlib and libterminfo too, but
3761# Readline doesn't, so I think we're safe with leaving them out.
3762
3763echo $ac_n "checking for library containing tgetent""... $ac_c" 1>&6
72cfdc76 3764echo "configure:3765: checking for library containing tgetent" >&5
06825bd1
MK
3765if eval "test \"`echo '$''{'ac_cv_search_tgetent'+set}'`\" = set"; then
3766 echo $ac_n "(cached) $ac_c" 1>&6
3767else
3768 ac_func_search_save_LIBS="$LIBS"
3769ac_cv_search_tgetent="no"
3770cat > conftest.$ac_ext <<EOF
72cfdc76 3771#line 3772 "configure"
06825bd1
MK
3772#include "confdefs.h"
3773/* Override any gcc2 internal prototype to avoid an error. */
3774/* We use char because int might match the return type of a gcc2
3775 builtin and then its argument prototype would still apply. */
3776char tgetent();
3777
3778int main() {
3779tgetent()
3780; return 0; }
3781EOF
72cfdc76 3782if { (eval echo configure:3783: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
06825bd1
MK
3783 rm -rf conftest*
3784 ac_cv_search_tgetent="none required"
3785else
3786 echo "configure: failed program was:" >&5
3787 cat conftest.$ac_ext >&5
3788fi
3789rm -f conftest*
3790test "$ac_cv_search_tgetent" = "no" && for i in termcap tinfo ncurses Hcurses curses; do
3791LIBS="-l$i $ac_func_search_save_LIBS"
3792cat > conftest.$ac_ext <<EOF
72cfdc76 3793#line 3794 "configure"
06825bd1
MK
3794#include "confdefs.h"
3795/* Override any gcc2 internal prototype to avoid an error. */
3796/* We use char because int might match the return type of a gcc2
3797 builtin and then its argument prototype would still apply. */
3798char tgetent();
3799
3800int main() {
3801tgetent()
3802; return 0; }
3803EOF
72cfdc76 3804if { (eval echo configure:3805: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
06825bd1
MK
3805 rm -rf conftest*
3806 ac_cv_search_tgetent="-l$i"
3807break
3808else
3809 echo "configure: failed program was:" >&5
3810 cat conftest.$ac_ext >&5
3811fi
3812rm -f conftest*
3813done
3814LIBS="$ac_func_search_save_LIBS"
3815fi
3816
3817echo "$ac_t""$ac_cv_search_tgetent" 1>&6
3818if test "$ac_cv_search_tgetent" != "no"; then
3819 test "$ac_cv_search_tgetent" = "none required" || LIBS="$ac_cv_search_tgetent $LIBS"
3820
3821else :
3822
3823fi
3824
3825if test "$ac_cv_search_tgetent" = no; then
3826 { echo "configure: error: no termcap library found" 1>&2; exit 1; }
3827fi
3828
5ee754fc
MK
3829# ------------------------- #
3830# Checks for header files. #
3831# ------------------------- #
3832
3833ac_header_dirent=no
3834for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
3835do
3836ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
3837echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
72cfdc76 3838echo "configure:3839: checking for $ac_hdr that defines DIR" >&5
5ee754fc 3839if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then
c906108c
SS
3840 echo $ac_n "(cached) $ac_c" 1>&6
3841else
3842 cat > conftest.$ac_ext <<EOF
72cfdc76 3843#line 3844 "configure"
c906108c
SS
3844#include "confdefs.h"
3845#include <sys/types.h>
5ee754fc
MK
3846#include <$ac_hdr>
3847int main() {
3848DIR *dirp = 0;
3849; return 0; }
3850EOF
72cfdc76 3851if { (eval echo configure:3852: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5ee754fc
MK
3852 rm -rf conftest*
3853 eval "ac_cv_header_dirent_$ac_safe=yes"
3854else
3855 echo "configure: failed program was:" >&5
3856 cat conftest.$ac_ext >&5
3857 rm -rf conftest*
3858 eval "ac_cv_header_dirent_$ac_safe=no"
3859fi
3860rm -f conftest*
3861fi
3862if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then
3863 echo "$ac_t""yes" 1>&6
3864 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
3865 cat >> confdefs.h <<EOF
3866#define $ac_tr_hdr 1
3867EOF
3868 ac_header_dirent=$ac_hdr; break
3869else
3870 echo "$ac_t""no" 1>&6
3871fi
3872done
3873# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
3874if test $ac_header_dirent = dirent.h; then
3875echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
72cfdc76 3876echo "configure:3877: checking for opendir in -ldir" >&5
5ee754fc
MK
3877ac_lib_var=`echo dir'_'opendir | sed 'y%./+-%__p_%'`
3878if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3879 echo $ac_n "(cached) $ac_c" 1>&6
3880else
3881 ac_save_LIBS="$LIBS"
3882LIBS="-ldir $LIBS"
3883cat > conftest.$ac_ext <<EOF
72cfdc76 3884#line 3885 "configure"
5ee754fc
MK
3885#include "confdefs.h"
3886/* Override any gcc2 internal prototype to avoid an error. */
3887/* We use char because int might match the return type of a gcc2
3888 builtin and then its argument prototype would still apply. */
3889char opendir();
c906108c
SS
3890
3891int main() {
5ee754fc 3892opendir()
c906108c
SS
3893; return 0; }
3894EOF
72cfdc76 3895if { (eval echo configure:3896: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c 3896 rm -rf conftest*
5ee754fc 3897 eval "ac_cv_lib_$ac_lib_var=yes"
c906108c
SS
3898else
3899 echo "configure: failed program was:" >&5
3900 cat conftest.$ac_ext >&5
3901 rm -rf conftest*
5ee754fc 3902 eval "ac_cv_lib_$ac_lib_var=no"
c906108c
SS
3903fi
3904rm -f conftest*
5ee754fc
MK
3905LIBS="$ac_save_LIBS"
3906
3907fi
3908if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3909 echo "$ac_t""yes" 1>&6
3910 LIBS="$LIBS -ldir"
3911else
3912 echo "$ac_t""no" 1>&6
c906108c
SS
3913fi
3914
5ee754fc
MK
3915else
3916echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
72cfdc76 3917echo "configure:3918: checking for opendir in -lx" >&5
5ee754fc
MK
3918ac_lib_var=`echo x'_'opendir | sed 'y%./+-%__p_%'`
3919if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3920 echo $ac_n "(cached) $ac_c" 1>&6
3921else
3922 ac_save_LIBS="$LIBS"
3923LIBS="-lx $LIBS"
3924cat > conftest.$ac_ext <<EOF
72cfdc76 3925#line 3926 "configure"
5ee754fc
MK
3926#include "confdefs.h"
3927/* Override any gcc2 internal prototype to avoid an error. */
3928/* We use char because int might match the return type of a gcc2
3929 builtin and then its argument prototype would still apply. */
3930char opendir();
3931
3932int main() {
3933opendir()
3934; return 0; }
c906108c 3935EOF
72cfdc76 3936if { (eval echo configure:3937: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5ee754fc
MK
3937 rm -rf conftest*
3938 eval "ac_cv_lib_$ac_lib_var=yes"
3939else
3940 echo "configure: failed program was:" >&5
3941 cat conftest.$ac_ext >&5
3942 rm -rf conftest*
3943 eval "ac_cv_lib_$ac_lib_var=no"
3944fi
3945rm -f conftest*
3946LIBS="$ac_save_LIBS"
c906108c 3947
5ee754fc
MK
3948fi
3949if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3950 echo "$ac_t""yes" 1>&6
3951 LIBS="$LIBS -lx"
3952else
3953 echo "$ac_t""no" 1>&6
3954fi
c906108c 3955
5ee754fc 3956fi
c906108c 3957
5ee754fc 3958echo $ac_n "checking whether stat file-mode macros are broken""... $ac_c" 1>&6
72cfdc76 3959echo "configure:3960: checking whether stat file-mode macros are broken" >&5
5ee754fc 3960if eval "test \"`echo '$''{'ac_cv_header_stat_broken'+set}'`\" = set"; then
9608ab8b
MK
3961 echo $ac_n "(cached) $ac_c" 1>&6
3962else
3963 cat > conftest.$ac_ext <<EOF
72cfdc76 3964#line 3965 "configure"
9608ab8b
MK
3965#include "confdefs.h"
3966#include <sys/types.h>
5ee754fc
MK
3967#include <sys/stat.h>
3968
3969#if defined(S_ISBLK) && defined(S_IFDIR)
3970# if S_ISBLK (S_IFDIR)
3971You lose.
3972# endif
3973#endif
3974
3975#if defined(S_ISBLK) && defined(S_IFCHR)
3976# if S_ISBLK (S_IFCHR)
3977You lose.
3978# endif
3979#endif
3980
3981#if defined(S_ISLNK) && defined(S_IFREG)
3982# if S_ISLNK (S_IFREG)
3983You lose.
3984# endif
3985#endif
3986
3987#if defined(S_ISSOCK) && defined(S_IFREG)
3988# if S_ISSOCK (S_IFREG)
3989You lose.
3990# endif
3991#endif
3992
9608ab8b 3993EOF
5ee754fc
MK
3994if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3995 egrep "You lose" >/dev/null 2>&1; then
9608ab8b 3996 rm -rf conftest*
5ee754fc
MK
3997 ac_cv_header_stat_broken=yes
3998else
3999 rm -rf conftest*
4000 ac_cv_header_stat_broken=no
4001fi
4002rm -f conftest*
4003
4004fi
4005
4006echo "$ac_t""$ac_cv_header_stat_broken" 1>&6
4007if test $ac_cv_header_stat_broken = yes; then
4008 cat >> confdefs.h <<\EOF
4009#define STAT_MACROS_BROKEN 1
4010EOF
4011
4012fi
4013
4014echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
72cfdc76 4015echo "configure:4016: checking for ANSI C header files" >&5
5ee754fc
MK
4016if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
4017 echo $ac_n "(cached) $ac_c" 1>&6
4018else
4019 cat > conftest.$ac_ext <<EOF
72cfdc76 4020#line 4021 "configure"
5ee754fc
MK
4021#include "confdefs.h"
4022#include <stdlib.h>
4023#include <stdarg.h>
4024#include <string.h>
4025#include <float.h>
4026EOF
4027ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
72cfdc76 4028{ (eval echo configure:4029: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
4029ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4030if test -z "$ac_err"; then
4031 rm -rf conftest*
4032 ac_cv_header_stdc=yes
4033else
4034 echo "$ac_err" >&5
4035 echo "configure: failed program was:" >&5
4036 cat conftest.$ac_ext >&5
4037 rm -rf conftest*
4038 ac_cv_header_stdc=no
4039fi
4040rm -f conftest*
4041
4042if test $ac_cv_header_stdc = yes; then
4043 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
4044cat > conftest.$ac_ext <<EOF
72cfdc76 4045#line 4046 "configure"
5ee754fc
MK
4046#include "confdefs.h"
4047#include <string.h>
4048EOF
4049if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4050 egrep "memchr" >/dev/null 2>&1; then
4051 :
4052else
4053 rm -rf conftest*
4054 ac_cv_header_stdc=no
4055fi
4056rm -f conftest*
4057
4058fi
4059
4060if test $ac_cv_header_stdc = yes; then
4061 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
4062cat > conftest.$ac_ext <<EOF
72cfdc76 4063#line 4064 "configure"
5ee754fc
MK
4064#include "confdefs.h"
4065#include <stdlib.h>
4066EOF
4067if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4068 egrep "free" >/dev/null 2>&1; then
4069 :
4070else
4071 rm -rf conftest*
4072 ac_cv_header_stdc=no
4073fi
4074rm -f conftest*
4075
4076fi
4077
4078if test $ac_cv_header_stdc = yes; then
4079 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
4080if test "$cross_compiling" = yes; then
4081 :
4082else
4083 cat > conftest.$ac_ext <<EOF
72cfdc76 4084#line 4085 "configure"
5ee754fc
MK
4085#include "confdefs.h"
4086#include <ctype.h>
4087#define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
4088#define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
4089#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
4090int main () { int i; for (i = 0; i < 256; i++)
4091if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
4092exit (0); }
4093
4094EOF
72cfdc76 4095if { (eval echo configure:4096: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
5ee754fc
MK
4096then
4097 :
9608ab8b 4098else
5ee754fc
MK
4099 echo "configure: failed program was:" >&5
4100 cat conftest.$ac_ext >&5
4101 rm -fr conftest*
4102 ac_cv_header_stdc=no
4103fi
4104rm -fr conftest*
4105fi
4106
4107fi
4108fi
4109
4110echo "$ac_t""$ac_cv_header_stdc" 1>&6
4111if test $ac_cv_header_stdc = yes; then
4112 cat >> confdefs.h <<\EOF
4113#define STDC_HEADERS 1
4114EOF
4115
4116fi
4117
4118for ac_hdr in link.h
4119do
4120ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4121echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
72cfdc76 4122echo "configure:4123: checking for $ac_hdr" >&5
5ee754fc
MK
4123if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4124 echo $ac_n "(cached) $ac_c" 1>&6
4125else
4126 cat > conftest.$ac_ext <<EOF
72cfdc76 4127#line 4128 "configure"
5ee754fc
MK
4128#include "confdefs.h"
4129#include <$ac_hdr>
4130EOF
4131ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
72cfdc76 4132{ (eval echo configure:4133: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
4133ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4134if test -z "$ac_err"; then
4135 rm -rf conftest*
4136 eval "ac_cv_header_$ac_safe=yes"
4137else
4138 echo "$ac_err" >&5
4139 echo "configure: failed program was:" >&5
4140 cat conftest.$ac_ext >&5
4141 rm -rf conftest*
4142 eval "ac_cv_header_$ac_safe=no"
4143fi
4144rm -f conftest*
4145fi
4146if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4147 echo "$ac_t""yes" 1>&6
4148 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4149 cat >> confdefs.h <<EOF
4150#define $ac_tr_hdr 1
4151EOF
4152
4153else
4154 echo "$ac_t""no" 1>&6
4155fi
4156done
4157
4158for ac_hdr in nlist.h
4159do
4160ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4161echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
72cfdc76 4162echo "configure:4163: checking for $ac_hdr" >&5
5ee754fc
MK
4163if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4164 echo $ac_n "(cached) $ac_c" 1>&6
4165else
4166 cat > conftest.$ac_ext <<EOF
72cfdc76 4167#line 4168 "configure"
5ee754fc
MK
4168#include "confdefs.h"
4169#include <$ac_hdr>
4170EOF
4171ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
72cfdc76 4172{ (eval echo configure:4173: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
4173ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4174if test -z "$ac_err"; then
4175 rm -rf conftest*
4176 eval "ac_cv_header_$ac_safe=yes"
4177else
4178 echo "$ac_err" >&5
4179 echo "configure: failed program was:" >&5
4180 cat conftest.$ac_ext >&5
4181 rm -rf conftest*
4182 eval "ac_cv_header_$ac_safe=no"
4183fi
4184rm -f conftest*
4185fi
4186if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4187 echo "$ac_t""yes" 1>&6
4188 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4189 cat >> confdefs.h <<EOF
4190#define $ac_tr_hdr 1
4191EOF
4192
4193else
4194 echo "$ac_t""no" 1>&6
4195fi
4196done
4197
4198for ac_hdr in poll.h sys/poll.h
4199do
4200ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4201echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
72cfdc76 4202echo "configure:4203: checking for $ac_hdr" >&5
5ee754fc
MK
4203if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4204 echo $ac_n "(cached) $ac_c" 1>&6
4205else
4206 cat > conftest.$ac_ext <<EOF
72cfdc76 4207#line 4208 "configure"
5ee754fc
MK
4208#include "confdefs.h"
4209#include <$ac_hdr>
4210EOF
4211ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
72cfdc76 4212{ (eval echo configure:4213: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
4213ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4214if test -z "$ac_err"; then
4215 rm -rf conftest*
4216 eval "ac_cv_header_$ac_safe=yes"
4217else
4218 echo "$ac_err" >&5
4219 echo "configure: failed program was:" >&5
4220 cat conftest.$ac_ext >&5
4221 rm -rf conftest*
4222 eval "ac_cv_header_$ac_safe=no"
4223fi
4224rm -f conftest*
4225fi
4226if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4227 echo "$ac_t""yes" 1>&6
4228 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4229 cat >> confdefs.h <<EOF
4230#define $ac_tr_hdr 1
4231EOF
4232
4233else
4234 echo "$ac_t""no" 1>&6
4235fi
4236done
4237
4238for ac_hdr in proc_service.h thread_db.h
4239do
4240ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4241echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
72cfdc76 4242echo "configure:4243: checking for $ac_hdr" >&5
5ee754fc
MK
4243if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4244 echo $ac_n "(cached) $ac_c" 1>&6
4245else
4246 cat > conftest.$ac_ext <<EOF
72cfdc76 4247#line 4248 "configure"
5ee754fc
MK
4248#include "confdefs.h"
4249#include <$ac_hdr>
4250EOF
4251ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
72cfdc76 4252{ (eval echo configure:4253: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
4253ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4254if test -z "$ac_err"; then
4255 rm -rf conftest*
4256 eval "ac_cv_header_$ac_safe=yes"
4257else
4258 echo "$ac_err" >&5
4259 echo "configure: failed program was:" >&5
4260 cat conftest.$ac_ext >&5
4261 rm -rf conftest*
4262 eval "ac_cv_header_$ac_safe=no"
4263fi
4264rm -f conftest*
4265fi
4266if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4267 echo "$ac_t""yes" 1>&6
4268 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4269 cat >> confdefs.h <<EOF
4270#define $ac_tr_hdr 1
4271EOF
4272
4273else
4274 echo "$ac_t""no" 1>&6
4275fi
4276done
4277
4278for ac_hdr in stddef.h
4279do
4280ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4281echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
72cfdc76 4282echo "configure:4283: checking for $ac_hdr" >&5
5ee754fc
MK
4283if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4284 echo $ac_n "(cached) $ac_c" 1>&6
4285else
4286 cat > conftest.$ac_ext <<EOF
72cfdc76 4287#line 4288 "configure"
5ee754fc
MK
4288#include "confdefs.h"
4289#include <$ac_hdr>
4290EOF
4291ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
72cfdc76 4292{ (eval echo configure:4293: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
4293ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4294if test -z "$ac_err"; then
4295 rm -rf conftest*
4296 eval "ac_cv_header_$ac_safe=yes"
4297else
4298 echo "$ac_err" >&5
4299 echo "configure: failed program was:" >&5
4300 cat conftest.$ac_ext >&5
4301 rm -rf conftest*
4302 eval "ac_cv_header_$ac_safe=no"
4303fi
4304rm -f conftest*
4305fi
4306if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4307 echo "$ac_t""yes" 1>&6
4308 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4309 cat >> confdefs.h <<EOF
4310#define $ac_tr_hdr 1
4311EOF
4312
4313else
4314 echo "$ac_t""no" 1>&6
4315fi
4316done
4317
4318for ac_hdr in stdlib.h
4319do
4320ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4321echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
72cfdc76 4322echo "configure:4323: checking for $ac_hdr" >&5
5ee754fc
MK
4323if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4324 echo $ac_n "(cached) $ac_c" 1>&6
4325else
4326 cat > conftest.$ac_ext <<EOF
72cfdc76 4327#line 4328 "configure"
5ee754fc
MK
4328#include "confdefs.h"
4329#include <$ac_hdr>
4330EOF
4331ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
72cfdc76 4332{ (eval echo configure:4333: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
4333ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4334if test -z "$ac_err"; then
4335 rm -rf conftest*
4336 eval "ac_cv_header_$ac_safe=yes"
4337else
4338 echo "$ac_err" >&5
4339 echo "configure: failed program was:" >&5
4340 cat conftest.$ac_ext >&5
4341 rm -rf conftest*
4342 eval "ac_cv_header_$ac_safe=no"
4343fi
4344rm -f conftest*
4345fi
4346if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4347 echo "$ac_t""yes" 1>&6
4348 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4349 cat >> confdefs.h <<EOF
4350#define $ac_tr_hdr 1
4351EOF
4352
4353else
4354 echo "$ac_t""no" 1>&6
4355fi
4356done
4357
4358for ac_hdr in stdint.h
4359do
4360ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4361echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
72cfdc76 4362echo "configure:4363: checking for $ac_hdr" >&5
5ee754fc
MK
4363if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4364 echo $ac_n "(cached) $ac_c" 1>&6
4365else
4366 cat > conftest.$ac_ext <<EOF
72cfdc76 4367#line 4368 "configure"
5ee754fc
MK
4368#include "confdefs.h"
4369#include <$ac_hdr>
4370EOF
4371ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
72cfdc76 4372{ (eval echo configure:4373: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
4373ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4374if test -z "$ac_err"; then
4375 rm -rf conftest*
4376 eval "ac_cv_header_$ac_safe=yes"
4377else
4378 echo "$ac_err" >&5
4379 echo "configure: failed program was:" >&5
4380 cat conftest.$ac_ext >&5
4381 rm -rf conftest*
4382 eval "ac_cv_header_$ac_safe=no"
4383fi
4384rm -f conftest*
4385fi
4386if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4387 echo "$ac_t""yes" 1>&6
4388 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4389 cat >> confdefs.h <<EOF
4390#define $ac_tr_hdr 1
4391EOF
4392
4393else
4394 echo "$ac_t""no" 1>&6
4395fi
4396done
4397
4398for ac_hdr in string.h memory.h strings.h
4399do
4400ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4401echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
72cfdc76 4402echo "configure:4403: checking for $ac_hdr" >&5
5ee754fc
MK
4403if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4404 echo $ac_n "(cached) $ac_c" 1>&6
4405else
4406 cat > conftest.$ac_ext <<EOF
72cfdc76 4407#line 4408 "configure"
5ee754fc
MK
4408#include "confdefs.h"
4409#include <$ac_hdr>
4410EOF
4411ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
72cfdc76 4412{ (eval echo configure:4413: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
4413ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4414if test -z "$ac_err"; then
4415 rm -rf conftest*
4416 eval "ac_cv_header_$ac_safe=yes"
4417else
4418 echo "$ac_err" >&5
4419 echo "configure: failed program was:" >&5
4420 cat conftest.$ac_ext >&5
4421 rm -rf conftest*
4422 eval "ac_cv_header_$ac_safe=no"
4423fi
4424rm -f conftest*
4425fi
4426if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4427 echo "$ac_t""yes" 1>&6
4428 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4429 cat >> confdefs.h <<EOF
4430#define $ac_tr_hdr 1
4431EOF
4432
4433else
4434 echo "$ac_t""no" 1>&6
4435fi
4436done
4437
4438for ac_hdr in sys/fault.h
4439do
4440ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4441echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
72cfdc76 4442echo "configure:4443: checking for $ac_hdr" >&5
5ee754fc
MK
4443if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4444 echo $ac_n "(cached) $ac_c" 1>&6
4445else
4446 cat > conftest.$ac_ext <<EOF
72cfdc76 4447#line 4448 "configure"
5ee754fc
MK
4448#include "confdefs.h"
4449#include <$ac_hdr>
4450EOF
4451ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
72cfdc76 4452{ (eval echo configure:4453: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
4453ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4454if test -z "$ac_err"; then
4455 rm -rf conftest*
4456 eval "ac_cv_header_$ac_safe=yes"
4457else
4458 echo "$ac_err" >&5
4459 echo "configure: failed program was:" >&5
4460 cat conftest.$ac_ext >&5
4461 rm -rf conftest*
4462 eval "ac_cv_header_$ac_safe=no"
4463fi
4464rm -f conftest*
4465fi
4466if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4467 echo "$ac_t""yes" 1>&6
4468 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4469 cat >> confdefs.h <<EOF
4470#define $ac_tr_hdr 1
4471EOF
4472
4473else
4474 echo "$ac_t""no" 1>&6
4475fi
4476done
4477
4478for ac_hdr in sys/file.h
4479do
4480ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4481echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
72cfdc76 4482echo "configure:4483: checking for $ac_hdr" >&5
5ee754fc
MK
4483if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4484 echo $ac_n "(cached) $ac_c" 1>&6
4485else
4486 cat > conftest.$ac_ext <<EOF
72cfdc76 4487#line 4488 "configure"
5ee754fc
MK
4488#include "confdefs.h"
4489#include <$ac_hdr>
4490EOF
4491ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
72cfdc76 4492{ (eval echo configure:4493: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
4493ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4494if test -z "$ac_err"; then
4495 rm -rf conftest*
4496 eval "ac_cv_header_$ac_safe=yes"
4497else
4498 echo "$ac_err" >&5
4499 echo "configure: failed program was:" >&5
4500 cat conftest.$ac_ext >&5
4501 rm -rf conftest*
4502 eval "ac_cv_header_$ac_safe=no"
4503fi
4504rm -f conftest*
4505fi
4506if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4507 echo "$ac_t""yes" 1>&6
4508 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4509 cat >> confdefs.h <<EOF
4510#define $ac_tr_hdr 1
4511EOF
4512
4513else
4514 echo "$ac_t""no" 1>&6
4515fi
4516done
4517
4518for ac_hdr in sys/filio.h
4519do
4520ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4521echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
72cfdc76 4522echo "configure:4523: checking for $ac_hdr" >&5
5ee754fc
MK
4523if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4524 echo $ac_n "(cached) $ac_c" 1>&6
4525else
4526 cat > conftest.$ac_ext <<EOF
72cfdc76 4527#line 4528 "configure"
5ee754fc
MK
4528#include "confdefs.h"
4529#include <$ac_hdr>
4530EOF
4531ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
72cfdc76 4532{ (eval echo configure:4533: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
4533ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4534if test -z "$ac_err"; then
4535 rm -rf conftest*
4536 eval "ac_cv_header_$ac_safe=yes"
4537else
4538 echo "$ac_err" >&5
4539 echo "configure: failed program was:" >&5
4540 cat conftest.$ac_ext >&5
4541 rm -rf conftest*
4542 eval "ac_cv_header_$ac_safe=no"
4543fi
4544rm -f conftest*
4545fi
4546if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4547 echo "$ac_t""yes" 1>&6
4548 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4549 cat >> confdefs.h <<EOF
4550#define $ac_tr_hdr 1
4551EOF
4552
4553else
4554 echo "$ac_t""no" 1>&6
4555fi
4556done
4557
4558for ac_hdr in sys/ioctl.h
4559do
4560ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4561echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
72cfdc76 4562echo "configure:4563: checking for $ac_hdr" >&5
5ee754fc
MK
4563if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4564 echo $ac_n "(cached) $ac_c" 1>&6
4565else
4566 cat > conftest.$ac_ext <<EOF
72cfdc76 4567#line 4568 "configure"
5ee754fc
MK
4568#include "confdefs.h"
4569#include <$ac_hdr>
4570EOF
4571ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
72cfdc76 4572{ (eval echo configure:4573: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
4573ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4574if test -z "$ac_err"; then
4575 rm -rf conftest*
4576 eval "ac_cv_header_$ac_safe=yes"
4577else
4578 echo "$ac_err" >&5
4579 echo "configure: failed program was:" >&5
4580 cat conftest.$ac_ext >&5
4581 rm -rf conftest*
4582 eval "ac_cv_header_$ac_safe=no"
4583fi
4584rm -f conftest*
4585fi
4586if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4587 echo "$ac_t""yes" 1>&6
4588 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4589 cat >> confdefs.h <<EOF
4590#define $ac_tr_hdr 1
4591EOF
4592
4593else
4594 echo "$ac_t""no" 1>&6
4595fi
4596done
4597
4598for ac_hdr in sys/param.h
4599do
4600ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4601echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
72cfdc76 4602echo "configure:4603: checking for $ac_hdr" >&5
5ee754fc
MK
4603if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4604 echo $ac_n "(cached) $ac_c" 1>&6
4605else
4606 cat > conftest.$ac_ext <<EOF
72cfdc76 4607#line 4608 "configure"
5ee754fc
MK
4608#include "confdefs.h"
4609#include <$ac_hdr>
4610EOF
4611ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
72cfdc76 4612{ (eval echo configure:4613: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
4613ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4614if test -z "$ac_err"; then
4615 rm -rf conftest*
4616 eval "ac_cv_header_$ac_safe=yes"
4617else
4618 echo "$ac_err" >&5
4619 echo "configure: failed program was:" >&5
4620 cat conftest.$ac_ext >&5
4621 rm -rf conftest*
4622 eval "ac_cv_header_$ac_safe=no"
4623fi
4624rm -f conftest*
4625fi
4626if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4627 echo "$ac_t""yes" 1>&6
4628 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4629 cat >> confdefs.h <<EOF
4630#define $ac_tr_hdr 1
4631EOF
4632
4633else
4634 echo "$ac_t""no" 1>&6
4635fi
4636done
4637
4638for ac_hdr in sys/proc.h
4639do
4640ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4641echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
72cfdc76 4642echo "configure:4643: checking for $ac_hdr" >&5
5ee754fc
MK
4643if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4644 echo $ac_n "(cached) $ac_c" 1>&6
4645else
4646 cat > conftest.$ac_ext <<EOF
72cfdc76 4647#line 4648 "configure"
5ee754fc
MK
4648#include "confdefs.h"
4649#include <$ac_hdr>
4650EOF
4651ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
72cfdc76 4652{ (eval echo configure:4653: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
4653ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4654if test -z "$ac_err"; then
4655 rm -rf conftest*
4656 eval "ac_cv_header_$ac_safe=yes"
4657else
4658 echo "$ac_err" >&5
4659 echo "configure: failed program was:" >&5
4660 cat conftest.$ac_ext >&5
4661 rm -rf conftest*
4662 eval "ac_cv_header_$ac_safe=no"
4663fi
4664rm -f conftest*
4665fi
4666if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4667 echo "$ac_t""yes" 1>&6
4668 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4669 cat >> confdefs.h <<EOF
4670#define $ac_tr_hdr 1
4671EOF
4672
4673else
4674 echo "$ac_t""no" 1>&6
4675fi
4676done
4677
4678for ac_hdr in sys/procfs.h
4679do
4680ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4681echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
72cfdc76 4682echo "configure:4683: checking for $ac_hdr" >&5
5ee754fc
MK
4683if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4684 echo $ac_n "(cached) $ac_c" 1>&6
4685else
4686 cat > conftest.$ac_ext <<EOF
72cfdc76 4687#line 4688 "configure"
5ee754fc
MK
4688#include "confdefs.h"
4689#include <$ac_hdr>
4690EOF
4691ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
72cfdc76 4692{ (eval echo configure:4693: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
4693ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4694if test -z "$ac_err"; then
4695 rm -rf conftest*
4696 eval "ac_cv_header_$ac_safe=yes"
4697else
4698 echo "$ac_err" >&5
4699 echo "configure: failed program was:" >&5
4700 cat conftest.$ac_ext >&5
4701 rm -rf conftest*
4702 eval "ac_cv_header_$ac_safe=no"
4703fi
4704rm -f conftest*
4705fi
4706if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4707 echo "$ac_t""yes" 1>&6
4708 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4709 cat >> confdefs.h <<EOF
4710#define $ac_tr_hdr 1
4711EOF
4712
4713else
4714 echo "$ac_t""no" 1>&6
4715fi
4716done
4717
4718for ac_hdr in sys/ptrace.h ptrace.h
4719do
4720ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4721echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
72cfdc76 4722echo "configure:4723: checking for $ac_hdr" >&5
5ee754fc
MK
4723if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4724 echo $ac_n "(cached) $ac_c" 1>&6
4725else
4726 cat > conftest.$ac_ext <<EOF
72cfdc76 4727#line 4728 "configure"
5ee754fc
MK
4728#include "confdefs.h"
4729#include <$ac_hdr>
4730EOF
4731ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
72cfdc76 4732{ (eval echo configure:4733: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
4733ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4734if test -z "$ac_err"; then
4735 rm -rf conftest*
4736 eval "ac_cv_header_$ac_safe=yes"
4737else
4738 echo "$ac_err" >&5
4739 echo "configure: failed program was:" >&5
4740 cat conftest.$ac_ext >&5
4741 rm -rf conftest*
4742 eval "ac_cv_header_$ac_safe=no"
4743fi
4744rm -f conftest*
4745fi
4746if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4747 echo "$ac_t""yes" 1>&6
4748 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4749 cat >> confdefs.h <<EOF
4750#define $ac_tr_hdr 1
4751EOF
4752
4753else
4754 echo "$ac_t""no" 1>&6
4755fi
4756done
4757
4758for ac_hdr in sys/reg.h sys/debugreg.h
4759do
4760ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4761echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
72cfdc76 4762echo "configure:4763: checking for $ac_hdr" >&5
5ee754fc
MK
4763if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4764 echo $ac_n "(cached) $ac_c" 1>&6
4765else
4766 cat > conftest.$ac_ext <<EOF
72cfdc76 4767#line 4768 "configure"
5ee754fc
MK
4768#include "confdefs.h"
4769#include <$ac_hdr>
4770EOF
4771ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
72cfdc76 4772{ (eval echo configure:4773: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
4773ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4774if test -z "$ac_err"; then
4775 rm -rf conftest*
4776 eval "ac_cv_header_$ac_safe=yes"
4777else
4778 echo "$ac_err" >&5
4779 echo "configure: failed program was:" >&5
4780 cat conftest.$ac_ext >&5
4781 rm -rf conftest*
4782 eval "ac_cv_header_$ac_safe=no"
4783fi
4784rm -f conftest*
4785fi
4786if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4787 echo "$ac_t""yes" 1>&6
4788 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4789 cat >> confdefs.h <<EOF
4790#define $ac_tr_hdr 1
4791EOF
4792
4793else
4794 echo "$ac_t""no" 1>&6
4795fi
4796done
4797
4798for ac_hdr in sys/select.h
4799do
4800ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4801echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
72cfdc76 4802echo "configure:4803: checking for $ac_hdr" >&5
5ee754fc
MK
4803if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4804 echo $ac_n "(cached) $ac_c" 1>&6
4805else
4806 cat > conftest.$ac_ext <<EOF
72cfdc76 4807#line 4808 "configure"
5ee754fc
MK
4808#include "confdefs.h"
4809#include <$ac_hdr>
4810EOF
4811ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
72cfdc76 4812{ (eval echo configure:4813: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
4813ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4814if test -z "$ac_err"; then
4815 rm -rf conftest*
4816 eval "ac_cv_header_$ac_safe=yes"
4817else
4818 echo "$ac_err" >&5
4819 echo "configure: failed program was:" >&5
4820 cat conftest.$ac_ext >&5
4821 rm -rf conftest*
4822 eval "ac_cv_header_$ac_safe=no"
4823fi
4824rm -f conftest*
4825fi
4826if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4827 echo "$ac_t""yes" 1>&6
4828 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4829 cat >> confdefs.h <<EOF
4830#define $ac_tr_hdr 1
4831EOF
4832
4833else
4834 echo "$ac_t""no" 1>&6
4835fi
4836done
4837
4838for ac_hdr in sys/syscall.h
4839do
4840ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4841echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
72cfdc76 4842echo "configure:4843: checking for $ac_hdr" >&5
5ee754fc
MK
4843if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4844 echo $ac_n "(cached) $ac_c" 1>&6
4845else
4846 cat > conftest.$ac_ext <<EOF
72cfdc76 4847#line 4848 "configure"
5ee754fc
MK
4848#include "confdefs.h"
4849#include <$ac_hdr>
4850EOF
4851ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
72cfdc76 4852{ (eval echo configure:4853: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
4853ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4854if test -z "$ac_err"; then
4855 rm -rf conftest*
4856 eval "ac_cv_header_$ac_safe=yes"
4857else
4858 echo "$ac_err" >&5
4859 echo "configure: failed program was:" >&5
4860 cat conftest.$ac_ext >&5
4861 rm -rf conftest*
4862 eval "ac_cv_header_$ac_safe=no"
4863fi
4864rm -f conftest*
4865fi
4866if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4867 echo "$ac_t""yes" 1>&6
4868 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4869 cat >> confdefs.h <<EOF
4870#define $ac_tr_hdr 1
4871EOF
4872
4873else
4874 echo "$ac_t""no" 1>&6
4875fi
4876done
4877
4878for ac_hdr in sys/user.h
4879do
4880ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4881echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
72cfdc76 4882echo "configure:4883: checking for $ac_hdr" >&5
5ee754fc
MK
4883if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4884 echo $ac_n "(cached) $ac_c" 1>&6
4885else
4886 cat > conftest.$ac_ext <<EOF
72cfdc76 4887#line 4888 "configure"
5ee754fc
MK
4888#include "confdefs.h"
4889#include <$ac_hdr>
4890EOF
4891ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
72cfdc76 4892{ (eval echo configure:4893: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
4893ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4894if test -z "$ac_err"; then
4895 rm -rf conftest*
4896 eval "ac_cv_header_$ac_safe=yes"
4897else
4898 echo "$ac_err" >&5
4899 echo "configure: failed program was:" >&5
4900 cat conftest.$ac_ext >&5
4901 rm -rf conftest*
4902 eval "ac_cv_header_$ac_safe=no"
4903fi
4904rm -f conftest*
4905fi
4906if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4907 echo "$ac_t""yes" 1>&6
4908 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4909 cat >> confdefs.h <<EOF
4910#define $ac_tr_hdr 1
4911EOF
4912
4913else
4914 echo "$ac_t""no" 1>&6
4915fi
4916done
4917
4918for ac_hdr in sys/wait.h wait.h
4919do
4920ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4921echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
72cfdc76 4922echo "configure:4923: checking for $ac_hdr" >&5
5ee754fc
MK
4923if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4924 echo $ac_n "(cached) $ac_c" 1>&6
4925else
4926 cat > conftest.$ac_ext <<EOF
72cfdc76 4927#line 4928 "configure"
5ee754fc
MK
4928#include "confdefs.h"
4929#include <$ac_hdr>
4930EOF
4931ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
72cfdc76 4932{ (eval echo configure:4933: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
4933ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4934if test -z "$ac_err"; then
4935 rm -rf conftest*
4936 eval "ac_cv_header_$ac_safe=yes"
4937else
4938 echo "$ac_err" >&5
9608ab8b
MK
4939 echo "configure: failed program was:" >&5
4940 cat conftest.$ac_ext >&5
4941 rm -rf conftest*
5ee754fc 4942 eval "ac_cv_header_$ac_safe=no"
9608ab8b
MK
4943fi
4944rm -f conftest*
4945fi
5ee754fc 4946if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9608ab8b
MK
4947 echo "$ac_t""yes" 1>&6
4948 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4949 cat >> confdefs.h <<EOF
4950#define $ac_tr_hdr 1
4951EOF
5ee754fc 4952
9608ab8b
MK
4953else
4954 echo "$ac_t""no" 1>&6
4955fi
4956done
5ee754fc
MK
4957
4958for ac_hdr in termios.h termio.h sgtty.h
4959do
4960ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4961echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
72cfdc76 4962echo "configure:4963: checking for $ac_hdr" >&5
5ee754fc 4963if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
9608ab8b
MK
4964 echo $ac_n "(cached) $ac_c" 1>&6
4965else
5ee754fc 4966 cat > conftest.$ac_ext <<EOF
72cfdc76 4967#line 4968 "configure"
9608ab8b 4968#include "confdefs.h"
5ee754fc 4969#include <$ac_hdr>
9608ab8b 4970EOF
5ee754fc 4971ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
72cfdc76 4972{ (eval echo configure:4973: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
4973ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4974if test -z "$ac_err"; then
9608ab8b 4975 rm -rf conftest*
5ee754fc 4976 eval "ac_cv_header_$ac_safe=yes"
9608ab8b 4977else
5ee754fc 4978 echo "$ac_err" >&5
9608ab8b
MK
4979 echo "configure: failed program was:" >&5
4980 cat conftest.$ac_ext >&5
4981 rm -rf conftest*
5ee754fc 4982 eval "ac_cv_header_$ac_safe=no"
9608ab8b
MK
4983fi
4984rm -f conftest*
9608ab8b 4985fi
5ee754fc 4986if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9608ab8b 4987 echo "$ac_t""yes" 1>&6
5ee754fc
MK
4988 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4989 cat >> confdefs.h <<EOF
4990#define $ac_tr_hdr 1
4991EOF
4992
9608ab8b
MK
4993else
4994 echo "$ac_t""no" 1>&6
4995fi
5ee754fc 4996done
9608ab8b 4997
5ee754fc
MK
4998for ac_hdr in unistd.h
4999do
5000ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5001echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
72cfdc76 5002echo "configure:5003: checking for $ac_hdr" >&5
5ee754fc 5003if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
9608ab8b
MK
5004 echo $ac_n "(cached) $ac_c" 1>&6
5005else
5ee754fc 5006 cat > conftest.$ac_ext <<EOF
72cfdc76 5007#line 5008 "configure"
9608ab8b 5008#include "confdefs.h"
5ee754fc 5009#include <$ac_hdr>
9608ab8b 5010EOF
5ee754fc 5011ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
72cfdc76 5012{ (eval echo configure:5013: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
5013ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5014if test -z "$ac_err"; then
9608ab8b 5015 rm -rf conftest*
5ee754fc 5016 eval "ac_cv_header_$ac_safe=yes"
9608ab8b 5017else
5ee754fc 5018 echo "$ac_err" >&5
9608ab8b
MK
5019 echo "configure: failed program was:" >&5
5020 cat conftest.$ac_ext >&5
5021 rm -rf conftest*
5ee754fc 5022 eval "ac_cv_header_$ac_safe=no"
9608ab8b
MK
5023fi
5024rm -f conftest*
9608ab8b 5025fi
5ee754fc 5026if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9608ab8b 5027 echo "$ac_t""yes" 1>&6
5ee754fc
MK
5028 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5029 cat >> confdefs.h <<EOF
5030#define $ac_tr_hdr 1
5031EOF
5032
9608ab8b
MK
5033else
5034 echo "$ac_t""no" 1>&6
5035fi
5ee754fc 5036done
9608ab8b 5037
9608ab8b 5038
5ee754fc
MK
5039# On Solaris 2.[78], we need to define _MSE_INT_H to avoid a clash
5040# between <widec.h> and <wchar.h> that would cause AC_CHECK_HEADERS to
5041# think that we don't have <curses.h> if we're using GCC.
5042case $host_os in
5043 solaris2.[78])
5044 if test "$GCC" = yes; then
5045 cat >> confdefs.h <<\EOF
5046#define _MSE_INT_H 1
5047EOF
5048
5049 fi ;;
5050esac
5051for ac_hdr in curses.h ncurses.h term.h
5052do
5053ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5054echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
72cfdc76 5055echo "configure:5056: checking for $ac_hdr" >&5
5ee754fc 5056if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
c906108c
SS
5057 echo $ac_n "(cached) $ac_c" 1>&6
5058else
5059 cat > conftest.$ac_ext <<EOF
72cfdc76 5060#line 5061 "configure"
c906108c 5061#include "confdefs.h"
5ee754fc 5062#include <$ac_hdr>
c906108c
SS
5063EOF
5064ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
72cfdc76 5065{ (eval echo configure:5066: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
c906108c
SS
5066ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5067if test -z "$ac_err"; then
5068 rm -rf conftest*
5ee754fc 5069 eval "ac_cv_header_$ac_safe=yes"
c906108c
SS
5070else
5071 echo "$ac_err" >&5
5072 echo "configure: failed program was:" >&5
5073 cat conftest.$ac_ext >&5
5074 rm -rf conftest*
5ee754fc 5075 eval "ac_cv_header_$ac_safe=no"
c906108c
SS
5076fi
5077rm -f conftest*
c906108c 5078fi
5ee754fc
MK
5079if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5080 echo "$ac_t""yes" 1>&6
5081 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5082 cat >> confdefs.h <<EOF
5083#define $ac_tr_hdr 1
c906108c 5084EOF
5ee754fc 5085
c906108c 5086else
5ee754fc 5087 echo "$ac_t""no" 1>&6
c906108c 5088fi
5ee754fc 5089done
c906108c
SS
5090
5091
5ee754fc
MK
5092# FIXME: kettenis/20030102: In most cases we include these
5093# unconditionally, so what's the point in checking these?
5094for ac_hdr in ctype.h time.h
c906108c
SS
5095do
5096ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5097echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
72cfdc76 5098echo "configure:5099: checking for $ac_hdr" >&5
c906108c
SS
5099if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5100 echo $ac_n "(cached) $ac_c" 1>&6
5101else
5102 cat > conftest.$ac_ext <<EOF
72cfdc76 5103#line 5104 "configure"
c906108c
SS
5104#include "confdefs.h"
5105#include <$ac_hdr>
5106EOF
5107ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
72cfdc76 5108{ (eval echo configure:5109: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
c906108c
SS
5109ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5110if test -z "$ac_err"; then
5111 rm -rf conftest*
5112 eval "ac_cv_header_$ac_safe=yes"
5113else
5114 echo "$ac_err" >&5
5115 echo "configure: failed program was:" >&5
5116 cat conftest.$ac_ext >&5
5117 rm -rf conftest*
5118 eval "ac_cv_header_$ac_safe=no"
5119fi
5120rm -f conftest*
5121fi
5122if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5123 echo "$ac_t""yes" 1>&6
5124 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5125 cat >> confdefs.h <<EOF
5126#define $ac_tr_hdr 1
5127EOF
5128
5129else
5130 echo "$ac_t""no" 1>&6
5131fi
5132done
5133
5ee754fc
MK
5134
5135# ------------------ #
5136# Checks for types. #
5137# ------------------ #
5138
5139echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
72cfdc76 5140echo "configure:5141: checking return type of signal handlers" >&5
5ee754fc 5141if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
c906108c
SS
5142 echo $ac_n "(cached) $ac_c" 1>&6
5143else
5144 cat > conftest.$ac_ext <<EOF
72cfdc76 5145#line 5146 "configure"
c906108c
SS
5146#include "confdefs.h"
5147#include <sys/types.h>
5ee754fc
MK
5148#include <signal.h>
5149#ifdef signal
5150#undef signal
c906108c 5151#endif
5ee754fc
MK
5152#ifdef __cplusplus
5153extern "C" void (*signal (int, void (*)(int)))(int);
5154#else
5155void (*signal ()) ();
c906108c
SS
5156#endif
5157
5ee754fc
MK
5158int main() {
5159int i;
5160; return 0; }
c906108c 5161EOF
72cfdc76 5162if { (eval echo configure:5163: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c 5163 rm -rf conftest*
5ee754fc 5164 ac_cv_type_signal=void
c906108c 5165else
5ee754fc
MK
5166 echo "configure: failed program was:" >&5
5167 cat conftest.$ac_ext >&5
c906108c 5168 rm -rf conftest*
5ee754fc 5169 ac_cv_type_signal=int
c906108c
SS
5170fi
5171rm -f conftest*
c906108c
SS
5172fi
5173
5ee754fc
MK
5174echo "$ac_t""$ac_cv_type_signal" 1>&6
5175cat >> confdefs.h <<EOF
5176#define RETSIGTYPE $ac_cv_type_signal
c906108c
SS
5177EOF
5178
c906108c
SS
5179
5180
5ee754fc
MK
5181# ------------------------------------- #
5182# Checks for compiler characteristics. #
5183# ------------------------------------- #
5184
c906108c 5185echo $ac_n "checking for working const""... $ac_c" 1>&6
72cfdc76 5186echo "configure:5187: checking for working const" >&5
c906108c
SS
5187if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
5188 echo $ac_n "(cached) $ac_c" 1>&6
5189else
5190 cat > conftest.$ac_ext <<EOF
72cfdc76 5191#line 5192 "configure"
c906108c
SS
5192#include "confdefs.h"
5193
5194int main() {
5195
5196/* Ultrix mips cc rejects this. */
5197typedef int charset[2]; const charset x;
5198/* SunOS 4.1.1 cc rejects this. */
5199char const *const *ccp;
5200char **p;
5201/* NEC SVR4.0.2 mips cc rejects this. */
5202struct point {int x, y;};
5203static struct point const zero = {0,0};
5204/* AIX XL C 1.02.0.0 rejects this.
5205 It does not let you subtract one const X* pointer from another in an arm
5206 of an if-expression whose if-part is not a constant expression */
5207const char *g = "string";
5208ccp = &g + (g ? g-g : 0);
5209/* HPUX 7.0 cc rejects these. */
5210++ccp;
5211p = (char**) ccp;
5212ccp = (char const *const *) p;
5213{ /* SCO 3.2v4 cc rejects this. */
5214 char *t;
5215 char const *s = 0 ? (char *) 0 : (char const *) 0;
5216
5217 *t++ = 0;
5218}
5219{ /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
5220 int x[] = {25, 17};
5221 const int *foo = &x[0];
5222 ++foo;
5223}
5224{ /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
5225 typedef const int *iptr;
5226 iptr p = 0;
5227 ++p;
5228}
5229{ /* AIX XL C 1.02.0.0 rejects this saying
5230 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
5231 struct s { int j; const int *ap[3]; };
5232 struct s *b; b->j = 5;
5233}
5234{ /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
5235 const int foo = 10;
5236}
5237
5238; return 0; }
5239EOF
72cfdc76 5240if { (eval echo configure:5241: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c
SS
5241 rm -rf conftest*
5242 ac_cv_c_const=yes
5243else
5244 echo "configure: failed program was:" >&5
5245 cat conftest.$ac_ext >&5
5246 rm -rf conftest*
5247 ac_cv_c_const=no
5248fi
5249rm -f conftest*
5250fi
5251
5252echo "$ac_t""$ac_cv_c_const" 1>&6
5253if test $ac_cv_c_const = no; then
5254 cat >> confdefs.h <<\EOF
5255#define const
5256EOF
5257
5258fi
5259
bce58c09 5260echo $ac_n "checking for inline""... $ac_c" 1>&6
72cfdc76 5261echo "configure:5262: checking for inline" >&5
bce58c09
JB
5262if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then
5263 echo $ac_n "(cached) $ac_c" 1>&6
5264else
5265 ac_cv_c_inline=no
5266for ac_kw in inline __inline__ __inline; do
5267 cat > conftest.$ac_ext <<EOF
72cfdc76 5268#line 5269 "configure"
bce58c09
JB
5269#include "confdefs.h"
5270
5271int main() {
5272} $ac_kw foo() {
5273; return 0; }
5274EOF
72cfdc76 5275if { (eval echo configure:5276: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
bce58c09
JB
5276 rm -rf conftest*
5277 ac_cv_c_inline=$ac_kw; break
5278else
5279 echo "configure: failed program was:" >&5
5280 cat conftest.$ac_ext >&5
5281fi
5282rm -f conftest*
5283done
5284
5285fi
5286
5287echo "$ac_t""$ac_cv_c_inline" 1>&6
5288case "$ac_cv_c_inline" in
5289 inline | yes) ;;
5290 no) cat >> confdefs.h <<\EOF
5291#define inline
5292EOF
5293 ;;
5294 *) cat >> confdefs.h <<EOF
5295#define inline $ac_cv_c_inline
5296EOF
5297 ;;
5298esac
5299
c906108c 5300
5ee754fc
MK
5301# ------------------------------ #
5302# Checks for library functions. #
5303# ------------------------------ #
5304
46711df8
MK
5305# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
5306# for constant arguments. Useless!
5307echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6
72cfdc76 5308echo "configure:5309: checking for working alloca.h" >&5
46711df8
MK
5309if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then
5310 echo $ac_n "(cached) $ac_c" 1>&6
5311else
5312 cat > conftest.$ac_ext <<EOF
72cfdc76 5313#line 5314 "configure"
46711df8
MK
5314#include "confdefs.h"
5315#include <alloca.h>
5316int main() {
5317char *p = alloca(2 * sizeof(int));
5318; return 0; }
5319EOF
72cfdc76 5320if { (eval echo configure:5321: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
46711df8
MK
5321 rm -rf conftest*
5322 ac_cv_header_alloca_h=yes
5323else
5324 echo "configure: failed program was:" >&5
5325 cat conftest.$ac_ext >&5
5326 rm -rf conftest*
5327 ac_cv_header_alloca_h=no
5328fi
5329rm -f conftest*
5330fi
5331
5332echo "$ac_t""$ac_cv_header_alloca_h" 1>&6
5333if test $ac_cv_header_alloca_h = yes; then
5334 cat >> confdefs.h <<\EOF
5335#define HAVE_ALLOCA_H 1
5336EOF
5337
5338fi
5339
5340echo $ac_n "checking for alloca""... $ac_c" 1>&6
72cfdc76 5341echo "configure:5342: checking for alloca" >&5
46711df8
MK
5342if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then
5343 echo $ac_n "(cached) $ac_c" 1>&6
5344else
5345 cat > conftest.$ac_ext <<EOF
72cfdc76 5346#line 5347 "configure"
46711df8
MK
5347#include "confdefs.h"
5348
5349#ifdef __GNUC__
5350# define alloca __builtin_alloca
5351#else
5352# ifdef _MSC_VER
5353# include <malloc.h>
5354# define alloca _alloca
5355# else
5356# if HAVE_ALLOCA_H
5357# include <alloca.h>
5358# else
5359# ifdef _AIX
5360 #pragma alloca
5361# else
5362# ifndef alloca /* predefined by HP cc +Olibcalls */
5363char *alloca ();
5364# endif
5365# endif
5366# endif
5367# endif
5368#endif
5369
5370int main() {
5371char *p = (char *) alloca(1);
5372; return 0; }
5373EOF
72cfdc76 5374if { (eval echo configure:5375: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
46711df8
MK
5375 rm -rf conftest*
5376 ac_cv_func_alloca_works=yes
5377else
5378 echo "configure: failed program was:" >&5
5379 cat conftest.$ac_ext >&5
5380 rm -rf conftest*
5381 ac_cv_func_alloca_works=no
5382fi
5383rm -f conftest*
5384fi
5385
5386echo "$ac_t""$ac_cv_func_alloca_works" 1>&6
5387if test $ac_cv_func_alloca_works = yes; then
5388 cat >> confdefs.h <<\EOF
5389#define HAVE_ALLOCA 1
5390EOF
5391
5392fi
5393
5394if test $ac_cv_func_alloca_works = no; then
5395 # The SVR3 libPW and SVR4 libucb both contain incompatible functions
5396 # that cause trouble. Some versions do not even contain alloca or
5397 # contain a buggy version. If you still want to use their alloca,
5398 # use ar to extract alloca.o from them instead of compiling alloca.c.
5399 ALLOCA=alloca.${ac_objext}
5400 cat >> confdefs.h <<\EOF
5401#define C_ALLOCA 1
5402EOF
5403
5404
5405echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
72cfdc76 5406echo "configure:5407: checking whether alloca needs Cray hooks" >&5
46711df8
MK
5407if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then
5408 echo $ac_n "(cached) $ac_c" 1>&6
5409else
5410 cat > conftest.$ac_ext <<EOF
72cfdc76 5411#line 5412 "configure"
46711df8
MK
5412#include "confdefs.h"
5413#if defined(CRAY) && ! defined(CRAY2)
5414webecray
5415#else
5416wenotbecray
5417#endif
5418
5419EOF
5420if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5421 egrep "webecray" >/dev/null 2>&1; then
5422 rm -rf conftest*
5423 ac_cv_os_cray=yes
5424else
5425 rm -rf conftest*
5426 ac_cv_os_cray=no
5427fi
5428rm -f conftest*
5429
5430fi
5431
5432echo "$ac_t""$ac_cv_os_cray" 1>&6
5433if test $ac_cv_os_cray = yes; then
5434for ac_func in _getb67 GETB67 getb67; do
5435 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
72cfdc76 5436echo "configure:5437: checking for $ac_func" >&5
46711df8
MK
5437if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5438 echo $ac_n "(cached) $ac_c" 1>&6
5439else
5440 cat > conftest.$ac_ext <<EOF
72cfdc76 5441#line 5442 "configure"
46711df8
MK
5442#include "confdefs.h"
5443/* System header to define __stub macros and hopefully few prototypes,
5444 which can conflict with char $ac_func(); below. */
5445#include <assert.h>
5446/* Override any gcc2 internal prototype to avoid an error. */
5447/* We use char because int might match the return type of a gcc2
5448 builtin and then its argument prototype would still apply. */
5449char $ac_func();
5450
5451int main() {
5452
5453/* The GNU C library defines this for functions which it implements
5454 to always fail with ENOSYS. Some functions are actually named
5455 something starting with __ and the normal name is an alias. */
5456#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5457choke me
5458#else
5459$ac_func();
5460#endif
5461
5462; return 0; }
5463EOF
72cfdc76 5464if { (eval echo configure:5465: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
46711df8
MK
5465 rm -rf conftest*
5466 eval "ac_cv_func_$ac_func=yes"
5467else
5468 echo "configure: failed program was:" >&5
5469 cat conftest.$ac_ext >&5
5470 rm -rf conftest*
5471 eval "ac_cv_func_$ac_func=no"
5472fi
5473rm -f conftest*
5474fi
5475
5476if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5477 echo "$ac_t""yes" 1>&6
5478 cat >> confdefs.h <<EOF
5479#define CRAY_STACKSEG_END $ac_func
5480EOF
5481
5482 break
5483else
5484 echo "$ac_t""no" 1>&6
5485fi
5486
5487done
5488fi
5489
5490echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
72cfdc76 5491echo "configure:5492: checking stack direction for C alloca" >&5
46711df8
MK
5492if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then
5493 echo $ac_n "(cached) $ac_c" 1>&6
5494else
5495 if test "$cross_compiling" = yes; then
5496 ac_cv_c_stack_direction=0
5497else
5498 cat > conftest.$ac_ext <<EOF
72cfdc76 5499#line 5500 "configure"
46711df8
MK
5500#include "confdefs.h"
5501find_stack_direction ()
5502{
5503 static char *addr = 0;
5504 auto char dummy;
5505 if (addr == 0)
5506 {
5507 addr = &dummy;
5508 return find_stack_direction ();
5509 }
5510 else
5511 return (&dummy > addr) ? 1 : -1;
5512}
5513main ()
5514{
5515 exit (find_stack_direction() < 0);
5516}
5517EOF
72cfdc76 5518if { (eval echo configure:5519: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
46711df8
MK
5519then
5520 ac_cv_c_stack_direction=1
5521else
5522 echo "configure: failed program was:" >&5
5523 cat conftest.$ac_ext >&5
5524 rm -fr conftest*
5525 ac_cv_c_stack_direction=-1
5526fi
5527rm -fr conftest*
5528fi
5529
5530fi
5531
5532echo "$ac_t""$ac_cv_c_stack_direction" 1>&6
5533cat >> confdefs.h <<EOF
5534#define STACK_DIRECTION $ac_cv_c_stack_direction
5535EOF
5536
5537fi
5538
97bf5e38
MK
5539for ac_hdr in unistd.h
5540do
5541ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5542echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
72cfdc76 5543echo "configure:5544: checking for $ac_hdr" >&5
74c1b268
AC
5544if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5545 echo $ac_n "(cached) $ac_c" 1>&6
5546else
5547 cat > conftest.$ac_ext <<EOF
72cfdc76 5548#line 5549 "configure"
74c1b268 5549#include "confdefs.h"
97bf5e38 5550#include <$ac_hdr>
74c1b268
AC
5551EOF
5552ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
72cfdc76 5553{ (eval echo configure:5554: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
74c1b268
AC
5554ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5555if test -z "$ac_err"; then
5556 rm -rf conftest*
5557 eval "ac_cv_header_$ac_safe=yes"
5558else
5559 echo "$ac_err" >&5
5560 echo "configure: failed program was:" >&5
5561 cat conftest.$ac_ext >&5
5562 rm -rf conftest*
5563 eval "ac_cv_header_$ac_safe=no"
5564fi
5565rm -f conftest*
5566fi
5567if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5568 echo "$ac_t""yes" 1>&6
97bf5e38
MK
5569 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5570 cat >> confdefs.h <<EOF
5571#define $ac_tr_hdr 1
74c1b268 5572EOF
97bf5e38 5573
74c1b268
AC
5574else
5575 echo "$ac_t""no" 1>&6
5576fi
97bf5e38 5577done
74c1b268 5578
97bf5e38
MK
5579for ac_func in getpagesize
5580do
5581echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
72cfdc76 5582echo "configure:5583: checking for $ac_func" >&5
97bf5e38 5583if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
74c1b268
AC
5584 echo $ac_n "(cached) $ac_c" 1>&6
5585else
5586 cat > conftest.$ac_ext <<EOF
72cfdc76 5587#line 5588 "configure"
74c1b268
AC
5588#include "confdefs.h"
5589/* System header to define __stub macros and hopefully few prototypes,
97bf5e38 5590 which can conflict with char $ac_func(); below. */
74c1b268
AC
5591#include <assert.h>
5592/* Override any gcc2 internal prototype to avoid an error. */
5593/* We use char because int might match the return type of a gcc2
5594 builtin and then its argument prototype would still apply. */
97bf5e38 5595char $ac_func();
74c1b268
AC
5596
5597int main() {
5598
5599/* The GNU C library defines this for functions which it implements
5600 to always fail with ENOSYS. Some functions are actually named
5601 something starting with __ and the normal name is an alias. */
97bf5e38 5602#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
74c1b268
AC
5603choke me
5604#else
97bf5e38 5605$ac_func();
74c1b268
AC
5606#endif
5607
5608; return 0; }
5609EOF
72cfdc76 5610if { (eval echo configure:5611: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
74c1b268 5611 rm -rf conftest*
97bf5e38 5612 eval "ac_cv_func_$ac_func=yes"
74c1b268
AC
5613else
5614 echo "configure: failed program was:" >&5
5615 cat conftest.$ac_ext >&5
5616 rm -rf conftest*
97bf5e38 5617 eval "ac_cv_func_$ac_func=no"
74c1b268
AC
5618fi
5619rm -f conftest*
5620fi
5621
97bf5e38 5622if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
74c1b268 5623 echo "$ac_t""yes" 1>&6
97bf5e38
MK
5624 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5625 cat >> confdefs.h <<EOF
5626#define $ac_tr_func 1
5627EOF
5628
74c1b268
AC
5629else
5630 echo "$ac_t""no" 1>&6
5631fi
97bf5e38 5632done
74c1b268 5633
97bf5e38 5634echo $ac_n "checking for working mmap""... $ac_c" 1>&6
72cfdc76 5635echo "configure:5636: checking for working mmap" >&5
97bf5e38
MK
5636if eval "test \"`echo '$''{'ac_cv_func_mmap_fixed_mapped'+set}'`\" = set"; then
5637 echo $ac_n "(cached) $ac_c" 1>&6
5638else
5639 if test "$cross_compiling" = yes; then
5640 ac_cv_func_mmap_fixed_mapped=no
74c1b268
AC
5641else
5642 cat > conftest.$ac_ext <<EOF
72cfdc76 5643#line 5644 "configure"
74c1b268 5644#include "confdefs.h"
97bf5e38
MK
5645
5646/* Thanks to Mike Haertel and Jim Avera for this test.
5647 Here is a matrix of mmap possibilities:
5648 mmap private not fixed
5649 mmap private fixed at somewhere currently unmapped
5650 mmap private fixed at somewhere already mapped
5651 mmap shared not fixed
5652 mmap shared fixed at somewhere currently unmapped
5653 mmap shared fixed at somewhere already mapped
5654 For private mappings, we should verify that changes cannot be read()
5655 back from the file, nor mmap's back from the file at a different
5656 address. (There have been systems where private was not correctly
5657 implemented like the infamous i386 svr4.0, and systems where the
5658 VM page cache was not coherent with the filesystem buffer cache
5659 like early versions of FreeBSD and possibly contemporary NetBSD.)
5660 For shared mappings, we should conversely verify that changes get
5661 propogated back to all the places they're supposed to be.
5662
5663 Grep wants private fixed already mapped.
5664 The main things grep needs to know about mmap are:
5665 * does it exist and is it safe to write into the mmap'd area
5666 * how to use it (BSD variants) */
74c1b268 5667#include <sys/types.h>
97bf5e38
MK
5668#include <fcntl.h>
5669#include <sys/mman.h>
5670
5671/* This mess was copied from the GNU getpagesize.h. */
5672#ifndef HAVE_GETPAGESIZE
5673# ifdef HAVE_UNISTD_H
5674# include <unistd.h>
5675# endif
5676
5677/* Assume that all systems that can run configure have sys/param.h. */
5678# ifndef HAVE_SYS_PARAM_H
5679# define HAVE_SYS_PARAM_H 1
5680# endif
5681
5682# ifdef _SC_PAGESIZE
5683# define getpagesize() sysconf(_SC_PAGESIZE)
5684# else /* no _SC_PAGESIZE */
5685# ifdef HAVE_SYS_PARAM_H
5686# include <sys/param.h>
5687# ifdef EXEC_PAGESIZE
5688# define getpagesize() EXEC_PAGESIZE
5689# else /* no EXEC_PAGESIZE */
5690# ifdef NBPG
5691# define getpagesize() NBPG * CLSIZE
5692# ifndef CLSIZE
5693# define CLSIZE 1
5694# endif /* no CLSIZE */
5695# else /* no NBPG */
5696# ifdef NBPC
5697# define getpagesize() NBPC
5698# else /* no NBPC */
5699# ifdef PAGESIZE
5700# define getpagesize() PAGESIZE
5701# endif /* PAGESIZE */
5702# endif /* no NBPC */
5703# endif /* no NBPG */
5704# endif /* no EXEC_PAGESIZE */
5705# else /* no HAVE_SYS_PARAM_H */
5706# define getpagesize() 8192 /* punt totally */
5707# endif /* no HAVE_SYS_PARAM_H */
5708# endif /* no _SC_PAGESIZE */
5709
5710#endif /* no HAVE_GETPAGESIZE */
5711
74c1b268 5712#ifdef __cplusplus
97bf5e38 5713extern "C" { void *malloc(unsigned); }
74c1b268 5714#else
97bf5e38 5715char *malloc();
74c1b268 5716#endif
74c1b268 5717
97bf5e38
MK
5718int
5719main()
5720{
5721 char *data, *data2, *data3;
5722 int i, pagesize;
5723 int fd;
74c1b268 5724
97bf5e38 5725 pagesize = getpagesize();
74c1b268 5726
97bf5e38
MK
5727 /*
5728 * First, make a file with some known garbage in it.
5729 */
5730 data = malloc(pagesize);
5731 if (!data)
5732 exit(1);
5733 for (i = 0; i < pagesize; ++i)
5734 *(data + i) = rand();
5735 umask(0);
5736 fd = creat("conftestmmap", 0600);
5737 if (fd < 0)
5738 exit(1);
5739 if (write(fd, data, pagesize) != pagesize)
5740 exit(1);
5741 close(fd);
74c1b268 5742
97bf5e38
MK
5743 /*
5744 * Next, try to mmap the file at a fixed address which
5745 * already has something else allocated at it. If we can,
5746 * also make sure that we see the same garbage.
5747 */
5748 fd = open("conftestmmap", O_RDWR);
5749 if (fd < 0)
5750 exit(1);
5751 data2 = malloc(2 * pagesize);
5752 if (!data2)
5753 exit(1);
5754 data2 += (pagesize - ((int) data2 & (pagesize - 1))) & (pagesize - 1);
5755 if (data2 != mmap(data2, pagesize, PROT_READ | PROT_WRITE,
5756 MAP_PRIVATE | MAP_FIXED, fd, 0L))
5757 exit(1);
5758 for (i = 0; i < pagesize; ++i)
5759 if (*(data + i) != *(data2 + i))
5760 exit(1);
74c1b268 5761
97bf5e38
MK
5762 /*
5763 * Finally, make sure that changes to the mapped area
5764 * do not percolate back to the file as seen by read().
5765 * (This is a bug on some variants of i386 svr4.0.)
5766 */
5767 for (i = 0; i < pagesize; ++i)
5768 *(data2 + i) = *(data2 + i) + 1;
5769 data3 = malloc(pagesize);
5770 if (!data3)
5771 exit(1);
5772 if (read(fd, data3, pagesize) != pagesize)
5773 exit(1);
5774 for (i = 0; i < pagesize; ++i)
5775 if (*(data + i) != *(data3 + i))
5776 exit(1);
5777 close(fd);
5778 unlink("conftestmmap");
5779 exit(0);
74c1b268 5780}
97bf5e38 5781
74c1b268 5782EOF
72cfdc76 5783if { (eval echo configure:5784: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
74c1b268 5784then
97bf5e38 5785 ac_cv_func_mmap_fixed_mapped=yes
74c1b268
AC
5786else
5787 echo "configure: failed program was:" >&5
5788 cat conftest.$ac_ext >&5
5789 rm -fr conftest*
97bf5e38 5790 ac_cv_func_mmap_fixed_mapped=no
74c1b268
AC
5791fi
5792rm -fr conftest*
5793fi
5794
5795fi
5796
97bf5e38
MK
5797echo "$ac_t""$ac_cv_func_mmap_fixed_mapped" 1>&6
5798if test $ac_cv_func_mmap_fixed_mapped = yes; then
74c1b268 5799 cat >> confdefs.h <<\EOF
97bf5e38 5800#define HAVE_MMAP 1
74c1b268
AC
5801EOF
5802
5803fi
5804
97bf5e38 5805echo $ac_n "checking for pid_t""... $ac_c" 1>&6
72cfdc76 5806echo "configure:5807: checking for pid_t" >&5
97bf5e38 5807if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then
0200359f 5808 echo $ac_n "(cached) $ac_c" 1>&6
0200359f
MK
5809else
5810 cat > conftest.$ac_ext <<EOF
72cfdc76 5811#line 5812 "configure"
0200359f 5812#include "confdefs.h"
97bf5e38
MK
5813#include <sys/types.h>
5814#if STDC_HEADERS
5815#include <stdlib.h>
5816#include <stddef.h>
0200359f 5817#endif
0200359f 5818EOF
97bf5e38
MK
5819if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5820 egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
5821 rm -rf conftest*
5822 ac_cv_type_pid_t=yes
0200359f 5823else
97bf5e38
MK
5824 rm -rf conftest*
5825 ac_cv_type_pid_t=no
0200359f 5826fi
97bf5e38 5827rm -f conftest*
0200359f
MK
5828
5829fi
97bf5e38
MK
5830echo "$ac_t""$ac_cv_type_pid_t" 1>&6
5831if test $ac_cv_type_pid_t = no; then
0200359f 5832 cat >> confdefs.h <<\EOF
97bf5e38 5833#define pid_t int
0200359f
MK
5834EOF
5835
5836fi
5837
97bf5e38
MK
5838ac_safe=`echo "vfork.h" | sed 'y%./+-%__p_%'`
5839echo $ac_n "checking for vfork.h""... $ac_c" 1>&6
72cfdc76 5840echo "configure:5841: checking for vfork.h" >&5
97bf5e38 5841if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
72473524
DJ
5842 echo $ac_n "(cached) $ac_c" 1>&6
5843else
5844 cat > conftest.$ac_ext <<EOF
72cfdc76 5845#line 5846 "configure"
72473524 5846#include "confdefs.h"
97bf5e38 5847#include <vfork.h>
72473524 5848EOF
97bf5e38 5849ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
72cfdc76 5850{ (eval echo configure:5851: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
97bf5e38
MK
5851ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5852if test -z "$ac_err"; then
72473524 5853 rm -rf conftest*
97bf5e38 5854 eval "ac_cv_header_$ac_safe=yes"
72473524 5855else
97bf5e38 5856 echo "$ac_err" >&5
72473524
DJ
5857 echo "configure: failed program was:" >&5
5858 cat conftest.$ac_ext >&5
5859 rm -rf conftest*
97bf5e38 5860 eval "ac_cv_header_$ac_safe=no"
72473524
DJ
5861fi
5862rm -f conftest*
5863fi
97bf5e38
MK
5864if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5865 echo "$ac_t""yes" 1>&6
72473524 5866 cat >> confdefs.h <<\EOF
97bf5e38 5867#define HAVE_VFORK_H 1
72473524
DJ
5868EOF
5869
97bf5e38
MK
5870else
5871 echo "$ac_t""no" 1>&6
72473524 5872fi
c906108c 5873
97bf5e38 5874echo $ac_n "checking for working vfork""... $ac_c" 1>&6
72cfdc76 5875echo "configure:5876: checking for working vfork" >&5
97bf5e38
MK
5876if eval "test \"`echo '$''{'ac_cv_func_vfork_works'+set}'`\" = set"; then
5877 echo $ac_n "(cached) $ac_c" 1>&6
5878else
5879 if test "$cross_compiling" = yes; then
5880 echo $ac_n "checking for vfork""... $ac_c" 1>&6
72cfdc76 5881echo "configure:5882: checking for vfork" >&5
97bf5e38 5882if eval "test \"`echo '$''{'ac_cv_func_vfork'+set}'`\" = set"; then
2b2d558c
MK
5883 echo $ac_n "(cached) $ac_c" 1>&6
5884else
5885 cat > conftest.$ac_ext <<EOF
72cfdc76 5886#line 5887 "configure"
2b2d558c 5887#include "confdefs.h"
97bf5e38
MK
5888/* System header to define __stub macros and hopefully few prototypes,
5889 which can conflict with char vfork(); below. */
5890#include <assert.h>
5891/* Override any gcc2 internal prototype to avoid an error. */
5892/* We use char because int might match the return type of a gcc2
5893 builtin and then its argument prototype would still apply. */
5894char vfork();
2b2d558c
MK
5895
5896int main() {
97bf5e38
MK
5897
5898/* The GNU C library defines this for functions which it implements
5899 to always fail with ENOSYS. Some functions are actually named
5900 something starting with __ and the normal name is an alias. */
5901#if defined (__stub_vfork) || defined (__stub___vfork)
5902choke me
5903#else
5904vfork();
5905#endif
5906
2b2d558c
MK
5907; return 0; }
5908EOF
72cfdc76 5909if { (eval echo configure:5910: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2b2d558c 5910 rm -rf conftest*
97bf5e38 5911 eval "ac_cv_func_vfork=yes"
2b2d558c
MK
5912else
5913 echo "configure: failed program was:" >&5
5914 cat conftest.$ac_ext >&5
5915 rm -rf conftest*
97bf5e38 5916 eval "ac_cv_func_vfork=no"
2b2d558c
MK
5917fi
5918rm -f conftest*
5919fi
5920
97bf5e38
MK
5921if eval "test \"`echo '$ac_cv_func_'vfork`\" = yes"; then
5922 echo "$ac_t""yes" 1>&6
5923 :
5924else
5925 echo "$ac_t""no" 1>&6
2b2d558c
MK
5926fi
5927
97bf5e38 5928ac_cv_func_vfork_works=$ac_cv_func_vfork
7dfa765c
MK
5929else
5930 cat > conftest.$ac_ext <<EOF
72cfdc76 5931#line 5932 "configure"
7dfa765c 5932#include "confdefs.h"
97bf5e38
MK
5933/* Thanks to Paul Eggert for this test. */
5934#include <stdio.h>
5935#include <sys/types.h>
5936#include <sys/stat.h>
5937#ifdef HAVE_UNISTD_H
5938#include <unistd.h>
5939#endif
5940#ifdef HAVE_VFORK_H
5941#include <vfork.h>
5942#endif
5943/* On some sparc systems, changes by the child to local and incoming
5944 argument registers are propagated back to the parent.
5945 The compiler is told about this with #include <vfork.h>,
5946 but some compilers (e.g. gcc -O) don't grok <vfork.h>.
5947 Test for this by using a static variable whose address
5948 is put into a register that is clobbered by the vfork. */
5949static
5950#ifdef __cplusplus
5951sparc_address_test (int arg)
5952#else
5953sparc_address_test (arg) int arg;
5954#endif
5955{
5956 static pid_t child;
5957 if (!child) {
5958 child = vfork ();
5959 if (child < 0) {
5960 perror ("vfork");
5961 _exit(2);
5962 }
5963 if (!child) {
5964 arg = getpid();
5965 write(-1, "", 0);
5966 _exit (arg);
5967 }
5968 }
5969}
5970main() {
5971 pid_t parent = getpid ();
5972 pid_t child;
7dfa765c 5973
97bf5e38 5974 sparc_address_test ();
7dfa765c 5975
97bf5e38 5976 child = vfork ();
7dfa765c 5977
97bf5e38
MK
5978 if (child == 0) {
5979 /* Here is another test for sparc vfork register problems.
5980 This test uses lots of local variables, at least
5981 as many local variables as main has allocated so far
5982 including compiler temporaries. 4 locals are enough for
5983 gcc 1.40.3 on a Solaris 4.1.3 sparc, but we use 8 to be safe.
5984 A buggy compiler should reuse the register of parent
5985 for one of the local variables, since it will think that
5986 parent can't possibly be used any more in this routine.
5987 Assigning to the local variable will thus munge parent
5988 in the parent process. */
5989 pid_t
5990 p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
5991 p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
5992 /* Convince the compiler that p..p7 are live; otherwise, it might
5993 use the same hardware register for all 8 local variables. */
5994 if (p != p1 || p != p2 || p != p3 || p != p4
5995 || p != p5 || p != p6 || p != p7)
5996 _exit(1);
7dfa765c 5997
97bf5e38
MK
5998 /* On some systems (e.g. IRIX 3.3),
5999 vfork doesn't separate parent from child file descriptors.
6000 If the child closes a descriptor before it execs or exits,
6001 this munges the parent's descriptor as well.
6002 Test for this by closing stdout in the child. */
6003 _exit(close(fileno(stdout)) != 0);
6004 } else {
6005 int status;
6006 struct stat st;
64bb1671 6007
97bf5e38
MK
6008 while (wait(&status) != child)
6009 ;
6010 exit(
6011 /* Was there some problem with vforking? */
6012 child < 0
64bb1671 6013
97bf5e38
MK
6014 /* Did the child fail? (This shouldn't happen.) */
6015 || status
64bb1671 6016
97bf5e38
MK
6017 /* Did the vfork/compiler bug occur? */
6018 || parent != getpid()
6019
6020 /* Did the file descriptor bug occur? */
6021 || fstat(fileno(stdout), &st) != 0
6022 );
6023 }
6024}
5c44784c 6025EOF
72cfdc76 6026if { (eval echo configure:6027: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
97bf5e38
MK
6027then
6028 ac_cv_func_vfork_works=yes
5c44784c
JM
6029else
6030 echo "configure: failed program was:" >&5
6031 cat conftest.$ac_ext >&5
97bf5e38
MK
6032 rm -fr conftest*
6033 ac_cv_func_vfork_works=no
5c44784c 6034fi
97bf5e38 6035rm -fr conftest*
5c44784c
JM
6036fi
6037
0afdd437
MK
6038fi
6039
97bf5e38
MK
6040echo "$ac_t""$ac_cv_func_vfork_works" 1>&6
6041if test $ac_cv_func_vfork_works = no; then
0afdd437 6042 cat >> confdefs.h <<\EOF
97bf5e38 6043#define vfork fork
0afdd437
MK
6044EOF
6045
6046fi
6047
97bf5e38
MK
6048for ac_func in canonicalize_file_name realpath
6049do
6050echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
72cfdc76 6051echo "configure:6052: checking for $ac_func" >&5
97bf5e38 6052if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7e89e357
JT
6053 echo $ac_n "(cached) $ac_c" 1>&6
6054else
6055 cat > conftest.$ac_ext <<EOF
72cfdc76 6056#line 6057 "configure"
7e89e357 6057#include "confdefs.h"
97bf5e38
MK
6058/* System header to define __stub macros and hopefully few prototypes,
6059 which can conflict with char $ac_func(); below. */
6060#include <assert.h>
6061/* Override any gcc2 internal prototype to avoid an error. */
6062/* We use char because int might match the return type of a gcc2
6063 builtin and then its argument prototype would still apply. */
6064char $ac_func();
6065
7e89e357 6066int main() {
97bf5e38
MK
6067
6068/* The GNU C library defines this for functions which it implements
6069 to always fail with ENOSYS. Some functions are actually named
6070 something starting with __ and the normal name is an alias. */
6071#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6072choke me
6073#else
6074$ac_func();
6075#endif
6076
7e89e357
JT
6077; return 0; }
6078EOF
72cfdc76 6079if { (eval echo configure:6080: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7e89e357 6080 rm -rf conftest*
97bf5e38 6081 eval "ac_cv_func_$ac_func=yes"
7e89e357
JT
6082else
6083 echo "configure: failed program was:" >&5
6084 cat conftest.$ac_ext >&5
6085 rm -rf conftest*
97bf5e38 6086 eval "ac_cv_func_$ac_func=no"
7e89e357
JT
6087fi
6088rm -f conftest*
6089fi
6090
97bf5e38
MK
6091if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6092 echo "$ac_t""yes" 1>&6
6093 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6094 cat >> confdefs.h <<EOF
6095#define $ac_tr_func 1
7e89e357 6096EOF
97bf5e38
MK
6097
6098else
6099 echo "$ac_t""no" 1>&6
7e89e357 6100fi
97bf5e38 6101done
7e89e357 6102
97bf5e38 6103for ac_func in poll
7be570e7
JM
6104do
6105echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
72cfdc76 6106echo "configure:6107: checking for $ac_func" >&5
7be570e7
JM
6107if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6108 echo $ac_n "(cached) $ac_c" 1>&6
6109else
6110 cat > conftest.$ac_ext <<EOF
72cfdc76 6111#line 6112 "configure"
7be570e7
JM
6112#include "confdefs.h"
6113/* System header to define __stub macros and hopefully few prototypes,
6114 which can conflict with char $ac_func(); below. */
6115#include <assert.h>
6116/* Override any gcc2 internal prototype to avoid an error. */
6117/* We use char because int might match the return type of a gcc2
6118 builtin and then its argument prototype would still apply. */
6119char $ac_func();
6120
6121int main() {
6122
6123/* The GNU C library defines this for functions which it implements
6124 to always fail with ENOSYS. Some functions are actually named
6125 something starting with __ and the normal name is an alias. */
6126#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6127choke me
6128#else
6129$ac_func();
6130#endif
6131
6132; return 0; }
6133EOF
72cfdc76 6134if { (eval echo configure:6135: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14abd0fb
MK
6135 rm -rf conftest*
6136 eval "ac_cv_func_$ac_func=yes"
6137else
6138 echo "configure: failed program was:" >&5
6139 cat conftest.$ac_ext >&5
6140 rm -rf conftest*
6141 eval "ac_cv_func_$ac_func=no"
6142fi
6143rm -f conftest*
6144fi
6145
6146if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6147 echo "$ac_t""yes" 1>&6
6148 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6149 cat >> confdefs.h <<EOF
6150#define $ac_tr_func 1
6151EOF
6152
6153else
6154 echo "$ac_t""no" 1>&6
6155fi
6156done
6157
6158for ac_func in pread64
6159do
6160echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
72cfdc76 6161echo "configure:6162: checking for $ac_func" >&5
14abd0fb
MK
6162if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6163 echo $ac_n "(cached) $ac_c" 1>&6
6164else
6165 cat > conftest.$ac_ext <<EOF
72cfdc76 6166#line 6167 "configure"
14abd0fb
MK
6167#include "confdefs.h"
6168/* System header to define __stub macros and hopefully few prototypes,
6169 which can conflict with char $ac_func(); below. */
6170#include <assert.h>
6171/* Override any gcc2 internal prototype to avoid an error. */
6172/* We use char because int might match the return type of a gcc2
6173 builtin and then its argument prototype would still apply. */
6174char $ac_func();
6175
6176int main() {
6177
6178/* The GNU C library defines this for functions which it implements
6179 to always fail with ENOSYS. Some functions are actually named
6180 something starting with __ and the normal name is an alias. */
6181#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6182choke me
6183#else
6184$ac_func();
6185#endif
6186
6187; return 0; }
6188EOF
72cfdc76 6189if { (eval echo configure:6190: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7be570e7
JM
6190 rm -rf conftest*
6191 eval "ac_cv_func_$ac_func=yes"
6192else
6193 echo "configure: failed program was:" >&5
6194 cat conftest.$ac_ext >&5
6195 rm -rf conftest*
6196 eval "ac_cv_func_$ac_func=no"
6197fi
6198rm -f conftest*
6199fi
6200
6201if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6202 echo "$ac_t""yes" 1>&6
6203 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6204 cat >> confdefs.h <<EOF
6205#define $ac_tr_func 1
6206EOF
6207
6208else
6209 echo "$ac_t""no" 1>&6
6210fi
6211done
6212
97bf5e38
MK
6213for ac_func in sbrk
6214do
6215echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
72cfdc76 6216echo "configure:6217: checking for $ac_func" >&5
97bf5e38 6217if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
c906108c
SS
6218 echo $ac_n "(cached) $ac_c" 1>&6
6219else
6220 cat > conftest.$ac_ext <<EOF
72cfdc76 6221#line 6222 "configure"
c906108c 6222#include "confdefs.h"
97bf5e38
MK
6223/* System header to define __stub macros and hopefully few prototypes,
6224 which can conflict with char $ac_func(); below. */
6225#include <assert.h>
6226/* Override any gcc2 internal prototype to avoid an error. */
6227/* We use char because int might match the return type of a gcc2
6228 builtin and then its argument prototype would still apply. */
6229char $ac_func();
c906108c 6230
97bf5e38
MK
6231int main() {
6232
6233/* The GNU C library defines this for functions which it implements
6234 to always fail with ENOSYS. Some functions are actually named
6235 something starting with __ and the normal name is an alias. */
6236#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6237choke me
c906108c 6238#else
97bf5e38 6239$ac_func();
c906108c 6240#endif
97bf5e38 6241
c906108c
SS
6242; return 0; }
6243EOF
72cfdc76 6244if { (eval echo configure:6245: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c 6245 rm -rf conftest*
97bf5e38 6246 eval "ac_cv_func_$ac_func=yes"
c906108c
SS
6247else
6248 echo "configure: failed program was:" >&5
6249 cat conftest.$ac_ext >&5
6250 rm -rf conftest*
97bf5e38 6251 eval "ac_cv_func_$ac_func=no"
c906108c
SS
6252fi
6253rm -f conftest*
6254fi
6255
97bf5e38
MK
6256if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6257 echo "$ac_t""yes" 1>&6
6258 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6259 cat >> confdefs.h <<EOF
6260#define $ac_tr_func 1
c906108c 6261EOF
97bf5e38
MK
6262
6263else
6264 echo "$ac_t""no" 1>&6
c906108c 6265fi
97bf5e38 6266done
c906108c 6267
97bf5e38
MK
6268for ac_func in setpgid setpgrp
6269do
6270echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
72cfdc76 6271echo "configure:6272: checking for $ac_func" >&5
97bf5e38 6272if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
c906108c
SS
6273 echo $ac_n "(cached) $ac_c" 1>&6
6274else
6275 cat > conftest.$ac_ext <<EOF
72cfdc76 6276#line 6277 "configure"
c906108c 6277#include "confdefs.h"
97bf5e38
MK
6278/* System header to define __stub macros and hopefully few prototypes,
6279 which can conflict with char $ac_func(); below. */
6280#include <assert.h>
6281/* Override any gcc2 internal prototype to avoid an error. */
6282/* We use char because int might match the return type of a gcc2
6283 builtin and then its argument prototype would still apply. */
6284char $ac_func();
c906108c 6285
97bf5e38
MK
6286int main() {
6287
6288/* The GNU C library defines this for functions which it implements
6289 to always fail with ENOSYS. Some functions are actually named
6290 something starting with __ and the normal name is an alias. */
6291#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6292choke me
c906108c 6293#else
97bf5e38 6294$ac_func();
c906108c 6295#endif
97bf5e38 6296
c906108c
SS
6297; return 0; }
6298EOF
72cfdc76 6299if { (eval echo configure:6300: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c 6300 rm -rf conftest*
97bf5e38 6301 eval "ac_cv_func_$ac_func=yes"
c906108c
SS
6302else
6303 echo "configure: failed program was:" >&5
6304 cat conftest.$ac_ext >&5
6305 rm -rf conftest*
97bf5e38 6306 eval "ac_cv_func_$ac_func=no"
c906108c
SS
6307fi
6308rm -f conftest*
6309fi
6310
97bf5e38
MK
6311if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6312 echo "$ac_t""yes" 1>&6
6313 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6314 cat >> confdefs.h <<EOF
6315#define $ac_tr_func 1
c906108c 6316EOF
97bf5e38
MK
6317
6318else
6319 echo "$ac_t""no" 1>&6
c906108c 6320fi
97bf5e38 6321done
c906108c 6322
e1ea1d75 6323for ac_func in sigaction sigprocmask sigsetmask
97bf5e38
MK
6324do
6325echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
72cfdc76 6326echo "configure:6327: checking for $ac_func" >&5
97bf5e38 6327if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
c906108c
SS
6328 echo $ac_n "(cached) $ac_c" 1>&6
6329else
6330 cat > conftest.$ac_ext <<EOF
72cfdc76 6331#line 6332 "configure"
c906108c 6332#include "confdefs.h"
97bf5e38
MK
6333/* System header to define __stub macros and hopefully few prototypes,
6334 which can conflict with char $ac_func(); below. */
6335#include <assert.h>
6336/* Override any gcc2 internal prototype to avoid an error. */
6337/* We use char because int might match the return type of a gcc2
6338 builtin and then its argument prototype would still apply. */
6339char $ac_func();
c906108c 6340
97bf5e38
MK
6341int main() {
6342
6343/* The GNU C library defines this for functions which it implements
6344 to always fail with ENOSYS. Some functions are actually named
6345 something starting with __ and the normal name is an alias. */
6346#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6347choke me
c906108c 6348#else
97bf5e38 6349$ac_func();
c906108c 6350#endif
97bf5e38 6351
c906108c
SS
6352; return 0; }
6353EOF
72cfdc76 6354if { (eval echo configure:6355: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c 6355 rm -rf conftest*
97bf5e38 6356 eval "ac_cv_func_$ac_func=yes"
c906108c
SS
6357else
6358 echo "configure: failed program was:" >&5
6359 cat conftest.$ac_ext >&5
6360 rm -rf conftest*
97bf5e38 6361 eval "ac_cv_func_$ac_func=no"
c906108c
SS
6362fi
6363rm -f conftest*
6364fi
6365
97bf5e38
MK
6366if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6367 echo "$ac_t""yes" 1>&6
6368 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6369 cat >> confdefs.h <<EOF
6370#define $ac_tr_func 1
c906108c 6371EOF
e1ea1d75 6372
97bf5e38
MK
6373else
6374 echo "$ac_t""no" 1>&6
c906108c 6375fi
97bf5e38 6376done
c906108c 6377
97bf5e38
MK
6378for ac_func in socketpair
6379do
6380echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
72cfdc76 6381echo "configure:6382: checking for $ac_func" >&5
97bf5e38 6382if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
c906108c
SS
6383 echo $ac_n "(cached) $ac_c" 1>&6
6384else
6385 cat > conftest.$ac_ext <<EOF
72cfdc76 6386#line 6387 "configure"
c906108c 6387#include "confdefs.h"
97bf5e38
MK
6388/* System header to define __stub macros and hopefully few prototypes,
6389 which can conflict with char $ac_func(); below. */
6390#include <assert.h>
6391/* Override any gcc2 internal prototype to avoid an error. */
6392/* We use char because int might match the return type of a gcc2
6393 builtin and then its argument prototype would still apply. */
6394char $ac_func();
c906108c 6395
97bf5e38
MK
6396int main() {
6397
6398/* The GNU C library defines this for functions which it implements
6399 to always fail with ENOSYS. Some functions are actually named
6400 something starting with __ and the normal name is an alias. */
6401#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6402choke me
c906108c 6403#else
97bf5e38 6404$ac_func();
c906108c 6405#endif
97bf5e38 6406
c906108c
SS
6407; return 0; }
6408EOF
72cfdc76 6409if { (eval echo configure:6410: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c 6410 rm -rf conftest*
97bf5e38 6411 eval "ac_cv_func_$ac_func=yes"
c906108c
SS
6412else
6413 echo "configure: failed program was:" >&5
6414 cat conftest.$ac_ext >&5
6415 rm -rf conftest*
97bf5e38 6416 eval "ac_cv_func_$ac_func=no"
c906108c
SS
6417fi
6418rm -f conftest*
6419fi
6420
97bf5e38
MK
6421if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6422 echo "$ac_t""yes" 1>&6
6423 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6424 cat >> confdefs.h <<EOF
6425#define $ac_tr_func 1
c906108c 6426EOF
97bf5e38
MK
6427
6428else
6429 echo "$ac_t""no" 1>&6
c906108c 6430fi
97bf5e38 6431done
c906108c 6432
97bf5e38
MK
6433
6434if test "$cross_compiling" = no; then
6435 echo $ac_n "checking whether setpgrp takes no argument""... $ac_c" 1>&6
72cfdc76 6436echo "configure:6437: checking whether setpgrp takes no argument" >&5
97bf5e38 6437if eval "test \"`echo '$''{'ac_cv_func_setpgrp_void'+set}'`\" = set"; then
c906108c 6438 echo $ac_n "(cached) $ac_c" 1>&6
97bf5e38
MK
6439else
6440 if test "$cross_compiling" = yes; then
6441 { echo "configure: error: cannot check setpgrp if cross compiling" 1>&2; exit 1; }
c906108c
SS
6442else
6443 cat > conftest.$ac_ext <<EOF
72cfdc76 6444#line 6445 "configure"
c906108c
SS
6445#include "confdefs.h"
6446
c906108c
SS
6447#ifdef HAVE_UNISTD_H
6448#include <unistd.h>
6449#endif
97bf5e38
MK
6450
6451/*
6452 * If this system has a BSD-style setpgrp, which takes arguments, exit
6453 * successfully.
6454 */
6455main()
6456{
6457 if (setpgrp(1,1) == -1)
6458 exit(0);
6459 else
6460 exit(1);
6461}
6462
c906108c 6463EOF
72cfdc76 6464if { (eval echo configure:6465: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
97bf5e38
MK
6465then
6466 ac_cv_func_setpgrp_void=no
c906108c
SS
6467else
6468 echo "configure: failed program was:" >&5
6469 cat conftest.$ac_ext >&5
97bf5e38
MK
6470 rm -fr conftest*
6471 ac_cv_func_setpgrp_void=yes
c906108c 6472fi
97bf5e38 6473rm -fr conftest*
c906108c
SS
6474fi
6475
97bf5e38
MK
6476
6477fi
6478
6479echo "$ac_t""$ac_cv_func_setpgrp_void" 1>&6
6480if test $ac_cv_func_setpgrp_void = yes; then
6481 cat >> confdefs.h <<\EOF
6482#define SETPGRP_VOID 1
c906108c
SS
6483EOF
6484
6485fi
6486
97bf5e38
MK
6487else
6488 echo $ac_n "checking whether setpgrp takes no argument""... $ac_c" 1>&6
72cfdc76 6489echo "configure:6490: checking whether setpgrp takes no argument" >&5
97bf5e38 6490if eval "test \"`echo '$''{'ac_cv_func_setpgrp_void'+set}'`\" = set"; then
b83266a0
SS
6491 echo $ac_n "(cached) $ac_c" 1>&6
6492else
6493 cat > conftest.$ac_ext <<EOF
72cfdc76 6494#line 6495 "configure"
b83266a0
SS
6495#include "confdefs.h"
6496
b83266a0 6497#include <unistd.h>
97bf5e38 6498
b83266a0 6499int main() {
97bf5e38
MK
6500
6501 if (setpgrp(1,1) == -1)
6502 exit (0);
6503 else
6504 exit (1);
6505
b83266a0
SS
6506; return 0; }
6507EOF
72cfdc76 6508if { (eval echo configure:6509: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
b83266a0 6509 rm -rf conftest*
97bf5e38 6510 ac_cv_func_setpgrp_void=no
b83266a0
SS
6511else
6512 echo "configure: failed program was:" >&5
6513 cat conftest.$ac_ext >&5
6514 rm -rf conftest*
97bf5e38 6515 ac_cv_func_setpgrp_void=yes
b83266a0
SS
6516fi
6517rm -f conftest*
6518fi
6519
97bf5e38
MK
6520echo "$ac_t""$ac_cv_func_setpgrp_void" 1>&6
6521if test $ac_cv_func_setpgrp_void = yes; then
b83266a0 6522 cat >> confdefs.h <<\EOF
97bf5e38 6523#define SETPGRP_VOID 1
b83266a0
SS
6524EOF
6525
97bf5e38 6526fi
b83266a0
SS
6527fi
6528
97bf5e38
MK
6529# Check if sigsetjmp is available. Using AC_CHECK_FUNCS won't do
6530# since sigsetjmp might only be defined as a macro.
6531echo $ac_n "checking for sigsetjmp""... $ac_c" 1>&6
72cfdc76 6532echo "configure:6533: checking for sigsetjmp" >&5
97bf5e38 6533if eval "test \"`echo '$''{'gdb_cv_func_sigsetjmp'+set}'`\" = set"; then
a4db0f07
RH
6534 echo $ac_n "(cached) $ac_c" 1>&6
6535else
6536 cat > conftest.$ac_ext <<EOF
72cfdc76 6537#line 6538 "configure"
a4db0f07
RH
6538#include "confdefs.h"
6539
97bf5e38
MK
6540#include <setjmp.h>
6541
a4db0f07 6542int main() {
97bf5e38 6543sigjmp_buf env; while (! sigsetjmp (env, 1)) siglongjmp (env, 1);
a4db0f07
RH
6544; return 0; }
6545EOF
72cfdc76 6546if { (eval echo configure:6547: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
a4db0f07 6547 rm -rf conftest*
97bf5e38 6548 gdb_cv_func_sigsetjmp=yes
a4db0f07
RH
6549else
6550 echo "configure: failed program was:" >&5
6551 cat conftest.$ac_ext >&5
6552 rm -rf conftest*
97bf5e38 6553 gdb_cv_func_sigsetjmp=no
a4db0f07
RH
6554fi
6555rm -f conftest*
6556fi
6557
97bf5e38
MK
6558echo "$ac_t""$gdb_cv_func_sigsetjmp" 1>&6
6559if test $gdb_cv_func_sigsetjmp = yes; then
a4db0f07 6560 cat >> confdefs.h <<\EOF
97bf5e38 6561#define HAVE_SIGSETJMP 1
a4db0f07
RH
6562EOF
6563
6564fi
c906108c 6565
06825bd1
MK
6566# Assume we'll default to using the included libiberty regex.
6567gdb_use_included_regex=yes
6568
6569# However, if the system regex is GNU regex, then default to *not*
6570# using the included regex.
6571echo $ac_n "checking for GNU regex""... $ac_c" 1>&6
72cfdc76 6572echo "configure:6573: checking for GNU regex" >&5
06825bd1
MK
6573if eval "test \"`echo '$''{'gdb_cv_have_gnu_regex'+set}'`\" = set"; then
6574 echo $ac_n "(cached) $ac_c" 1>&6
6575else
6576 cat > conftest.$ac_ext <<EOF
72cfdc76 6577#line 6578 "configure"
06825bd1
MK
6578#include "confdefs.h"
6579#include <gnu-versions.h>
6580int main() {
6581#define REGEX_INTERFACE_VERSION 1
6582#if _GNU_REGEX_INTERFACE_VERSION != REGEX_INTERFACE_VERSION
6583# error "Version mismatch"
6584#endif
6585; return 0; }
6586EOF
72cfdc76 6587if { (eval echo configure:6588: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
06825bd1
MK
6588 rm -rf conftest*
6589 gdb_cv_have_gnu_regex=yes
6590else
6591 echo "configure: failed program was:" >&5
6592 cat conftest.$ac_ext >&5
6593 rm -rf conftest*
6594 gdb_cv_have_gnu_regex=no
6595fi
6596rm -f conftest*
6597fi
6598
6599echo "$ac_t""$gdb_cv_have_gnu_regex" 1>&6
6600if test $gdb_cv_have_gnu_regex = yes; then
6601 gdb_use_included_regex=no
6602fi
6603
6604# Check whether --with-included-regex or --without-included-regex was given.
6605if test "${with_included_regex+set}" = set; then
6606 withval="$with_included_regex"
6607 gdb_with_regex=$withval
6608else
6609 gdb_with_regex=$gdb_use_included_regex
6610fi
6611
6612if test "$gdb_with_regex" = yes; then
6613 cat >> confdefs.h <<\EOF
6614#define USE_INCLUDED_REGEX 1
6615EOF
6616
6617fi
6618
97bf5e38
MK
6619# See if <machine/reg.h> supports the %fs and %gs i386 segment registers.
6620# Older i386 BSD's don't have the r_fs and r_gs members of `struct reg'.
6621echo $ac_n "checking for r_fs in struct reg""... $ac_c" 1>&6
72cfdc76 6622echo "configure:6623: checking for r_fs in struct reg" >&5
97bf5e38
MK
6623if eval "test \"`echo '$''{'gdb_cv_struct_reg_r_fs'+set}'`\" = set"; then
6624 echo $ac_n "(cached) $ac_c" 1>&6
6625else
6626 cat > conftest.$ac_ext <<EOF
72cfdc76 6627#line 6628 "configure"
c906108c 6628#include "confdefs.h"
97bf5e38
MK
6629#include <machine/reg.h>
6630int main() {
6631struct reg r; r.r_fs;
6632; return 0; }
c906108c 6633EOF
72cfdc76 6634if { (eval echo configure:6635: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c 6635 rm -rf conftest*
97bf5e38 6636 gdb_cv_struct_reg_r_fs=yes
c906108c 6637else
97bf5e38
MK
6638 echo "configure: failed program was:" >&5
6639 cat conftest.$ac_ext >&5
c906108c 6640 rm -rf conftest*
97bf5e38 6641 gdb_cv_struct_reg_r_fs=no
c906108c
SS
6642fi
6643rm -f conftest*
97bf5e38 6644fi
c906108c 6645
97bf5e38
MK
6646echo "$ac_t""$gdb_cv_struct_reg_r_fs" 1>&6
6647if test $gdb_cv_struct_reg_r_fs = yes; then
6648 cat >> confdefs.h <<\EOF
6649#define HAVE_STRUCT_REG_R_FS 1
6650EOF
6651
6652fi
6653echo $ac_n "checking for r_gs in struct reg""... $ac_c" 1>&6
72cfdc76 6654echo "configure:6655: checking for r_gs in struct reg" >&5
97bf5e38
MK
6655if eval "test \"`echo '$''{'gdb_cv_struct_reg_r_gs'+set}'`\" = set"; then
6656 echo $ac_n "(cached) $ac_c" 1>&6
6657else
6658 cat > conftest.$ac_ext <<EOF
72cfdc76 6659#line 6660 "configure"
c906108c 6660#include "confdefs.h"
97bf5e38
MK
6661#include <machine/reg.h>
6662int main() {
6663struct reg r; r.r_gs;
6664; return 0; }
c906108c 6665EOF
72cfdc76 6666if { (eval echo configure:6667: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c 6667 rm -rf conftest*
97bf5e38 6668 gdb_cv_struct_reg_r_gs=yes
c906108c 6669else
97bf5e38
MK
6670 echo "configure: failed program was:" >&5
6671 cat conftest.$ac_ext >&5
c906108c 6672 rm -rf conftest*
97bf5e38 6673 gdb_cv_struct_reg_r_gs=no
c906108c
SS
6674fi
6675rm -f conftest*
c906108c 6676fi
c906108c 6677
97bf5e38
MK
6678echo "$ac_t""$gdb_cv_struct_reg_r_gs" 1>&6
6679if test $gdb_cv_struct_reg_r_gs = yes; then
6680 cat >> confdefs.h <<\EOF
6681#define HAVE_STRUCT_REG_R_GS 1
c3f6f71d
JM
6682EOF
6683
c906108c
SS
6684fi
6685
97bf5e38
MK
6686# See if <sys/ptrace.h> provides the PTRACE_GETREGS request.
6687echo $ac_n "checking for PTRACE_GETREGS""... $ac_c" 1>&6
72cfdc76 6688echo "configure:6689: checking for PTRACE_GETREGS" >&5
97bf5e38 6689if eval "test \"`echo '$''{'gdb_cv_have_ptrace_getregs'+set}'`\" = set"; then
c906108c
SS
6690 echo $ac_n "(cached) $ac_c" 1>&6
6691else
6692 cat > conftest.$ac_ext <<EOF
72cfdc76 6693#line 6694 "configure"
c906108c 6694#include "confdefs.h"
97bf5e38 6695#include <sys/ptrace.h>
c906108c 6696int main() {
97bf5e38 6697PTRACE_GETREGS;
c906108c
SS
6698; return 0; }
6699EOF
72cfdc76 6700if { (eval echo configure:6701: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c 6701 rm -rf conftest*
97bf5e38 6702 gdb_cv_have_ptrace_getregs=yes
c906108c
SS
6703else
6704 echo "configure: failed program was:" >&5
6705 cat conftest.$ac_ext >&5
6706 rm -rf conftest*
97bf5e38 6707 gdb_cv_have_ptrace_getregs=no
c906108c
SS
6708fi
6709rm -f conftest*
6710fi
6711
97bf5e38
MK
6712echo "$ac_t""$gdb_cv_have_ptrace_getregs" 1>&6
6713if test $gdb_cv_have_ptrace_getregs = yes; then
6714 cat >> confdefs.h <<\EOF
6715#define HAVE_PTRACE_GETREGS 1
c906108c
SS
6716EOF
6717
97bf5e38 6718fi
c906108c 6719
97bf5e38
MK
6720# See if <sys/ptrace.h> provides the PTRACE_GETFPXREGS request.
6721echo $ac_n "checking for PTRACE_GETFPXREGS""... $ac_c" 1>&6
72cfdc76 6722echo "configure:6723: checking for PTRACE_GETFPXREGS" >&5
97bf5e38 6723if eval "test \"`echo '$''{'gdb_cv_have_ptrace_getfpxregs'+set}'`\" = set"; then
c906108c
SS
6724 echo $ac_n "(cached) $ac_c" 1>&6
6725else
6726 cat > conftest.$ac_ext <<EOF
72cfdc76 6727#line 6728 "configure"
c906108c 6728#include "confdefs.h"
97bf5e38 6729#include <sys/ptrace.h>
c906108c 6730int main() {
97bf5e38 6731PTRACE_GETFPXREGS;
c906108c
SS
6732; return 0; }
6733EOF
72cfdc76 6734if { (eval echo configure:6735: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c 6735 rm -rf conftest*
97bf5e38 6736 gdb_cv_have_ptrace_getfpxregs=yes
c906108c
SS
6737else
6738 echo "configure: failed program was:" >&5
6739 cat conftest.$ac_ext >&5
6740 rm -rf conftest*
97bf5e38 6741 gdb_cv_have_ptrace_getfpxregs=no
c906108c
SS
6742fi
6743rm -f conftest*
6744fi
6745
97bf5e38
MK
6746echo "$ac_t""$gdb_cv_have_ptrace_getfpxregs" 1>&6
6747if test $gdb_cv_have_ptrace_getfpxregs = yes; then
6748 cat >> confdefs.h <<\EOF
6749#define HAVE_PTRACE_GETFPXREGS 1
c906108c
SS
6750EOF
6751
97bf5e38 6752fi
c906108c 6753
97bf5e38
MK
6754# See if <sys/ptrace.h> provides the PT_GETDBREGS request.
6755echo $ac_n "checking for PT_GETDBREGS""... $ac_c" 1>&6
72cfdc76 6756echo "configure:6757: checking for PT_GETDBREGS" >&5
97bf5e38 6757if eval "test \"`echo '$''{'gdb_cv_have_pt_getdbregs'+set}'`\" = set"; then
c906108c
SS
6758 echo $ac_n "(cached) $ac_c" 1>&6
6759else
6760 cat > conftest.$ac_ext <<EOF
72cfdc76 6761#line 6762 "configure"
c906108c 6762#include "confdefs.h"
97bf5e38
MK
6763#include <sys/types.h>
6764#include <sys/ptrace.h>
c906108c 6765int main() {
97bf5e38 6766PT_GETDBREGS;
c906108c
SS
6767; return 0; }
6768EOF
72cfdc76 6769if { (eval echo configure:6770: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c 6770 rm -rf conftest*
97bf5e38 6771 gdb_cv_have_pt_getdbregs=yes
c906108c
SS
6772else
6773 echo "configure: failed program was:" >&5
6774 cat conftest.$ac_ext >&5
6775 rm -rf conftest*
97bf5e38 6776 gdb_cv_have_pt_getdbregs=no
c906108c
SS
6777fi
6778rm -f conftest*
6779fi
6780
97bf5e38
MK
6781echo "$ac_t""$gdb_cv_have_pt_getdbregs" 1>&6
6782if test $gdb_cv_have_pt_getdbregs = yes; then
6783 cat >> confdefs.h <<\EOF
6784#define HAVE_PT_GETDBREGS 1
c906108c
SS
6785EOF
6786
97bf5e38 6787fi
c906108c 6788
97bf5e38
MK
6789# See if <sys/ptrace.h> provides the PT_GETXMMREGS request.
6790echo $ac_n "checking for PT_GETXMMREGS""... $ac_c" 1>&6
72cfdc76 6791echo "configure:6792: checking for PT_GETXMMREGS" >&5
97bf5e38 6792if eval "test \"`echo '$''{'gdb_cv_have_pt_getxmmregs'+set}'`\" = set"; then
c906108c
SS
6793 echo $ac_n "(cached) $ac_c" 1>&6
6794else
6795 cat > conftest.$ac_ext <<EOF
72cfdc76 6796#line 6797 "configure"
c906108c 6797#include "confdefs.h"
97bf5e38
MK
6798#include <sys/types.h>
6799#include <sys/ptrace.h>
c906108c 6800int main() {
97bf5e38 6801PT_GETXMMREGS;
c906108c
SS
6802; return 0; }
6803EOF
72cfdc76 6804if { (eval echo configure:6805: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c 6805 rm -rf conftest*
97bf5e38 6806 gdb_cv_have_pt_getxmmregs=yes
c906108c
SS
6807else
6808 echo "configure: failed program was:" >&5
6809 cat conftest.$ac_ext >&5
6810 rm -rf conftest*
97bf5e38 6811 gdb_cv_have_pt_getxmmregs=no
c906108c
SS
6812fi
6813rm -f conftest*
6814fi
6815
97bf5e38
MK
6816echo "$ac_t""$gdb_cv_have_pt_getxmmregs" 1>&6
6817if test $gdb_cv_have_pt_getxmmregs = yes; then
6818 cat >> confdefs.h <<\EOF
6819#define HAVE_PT_GETXMMREGS 1
c906108c
SS
6820EOF
6821
97bf5e38 6822fi
c906108c 6823
97bf5e38
MK
6824
6825echo $ac_n "checking whether malloc must be declared""... $ac_c" 1>&6
72cfdc76 6826echo "configure:6827: checking whether malloc must be declared" >&5
97bf5e38 6827if eval "test \"`echo '$''{'bfd_cv_decl_needed_malloc'+set}'`\" = set"; then
3862412b
MK
6828 echo $ac_n "(cached) $ac_c" 1>&6
6829else
6830 cat > conftest.$ac_ext <<EOF
72cfdc76 6831#line 6832 "configure"
3862412b 6832#include "confdefs.h"
e17bf198 6833
97bf5e38
MK
6834#include <stdio.h>
6835#ifdef HAVE_STRING_H
6836#include <string.h>
6837#else
6838#ifdef HAVE_STRINGS_H
6839#include <strings.h>
6840#endif
6841#endif
6842#ifdef HAVE_STDLIB_H
6843#include <stdlib.h>
6844#endif
6845#ifdef HAVE_UNISTD_H
6846#include <unistd.h>
6847#endif
3862412b 6848int main() {
97bf5e38 6849char *(*pfn) = (char *(*)) malloc
3862412b
MK
6850; return 0; }
6851EOF
72cfdc76 6852if { (eval echo configure:6853: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3862412b 6853 rm -rf conftest*
97bf5e38 6854 bfd_cv_decl_needed_malloc=no
3862412b
MK
6855else
6856 echo "configure: failed program was:" >&5
6857 cat conftest.$ac_ext >&5
6858 rm -rf conftest*
97bf5e38 6859 bfd_cv_decl_needed_malloc=yes
3862412b
MK
6860fi
6861rm -f conftest*
6862fi
6863
97bf5e38
MK
6864echo "$ac_t""$bfd_cv_decl_needed_malloc" 1>&6
6865if test $bfd_cv_decl_needed_malloc = yes; then
6866 cat >> confdefs.h <<\EOF
6867#define NEED_DECLARATION_MALLOC 1
3862412b
MK
6868EOF
6869
97bf5e38 6870fi
3862412b 6871
97bf5e38 6872echo $ac_n "checking whether realloc must be declared""... $ac_c" 1>&6
72cfdc76 6873echo "configure:6874: checking whether realloc must be declared" >&5
97bf5e38 6874if eval "test \"`echo '$''{'bfd_cv_decl_needed_realloc'+set}'`\" = set"; then
3862412b
MK
6875 echo $ac_n "(cached) $ac_c" 1>&6
6876else
6877 cat > conftest.$ac_ext <<EOF
72cfdc76 6878#line 6879 "configure"
3862412b 6879#include "confdefs.h"
e17bf198 6880
97bf5e38
MK
6881#include <stdio.h>
6882#ifdef HAVE_STRING_H
6883#include <string.h>
6884#else
6885#ifdef HAVE_STRINGS_H
6886#include <strings.h>
6887#endif
6888#endif
6889#ifdef HAVE_STDLIB_H
6890#include <stdlib.h>
6891#endif
6892#ifdef HAVE_UNISTD_H
6893#include <unistd.h>
6894#endif
3862412b 6895int main() {
97bf5e38 6896char *(*pfn) = (char *(*)) realloc
3862412b
MK
6897; return 0; }
6898EOF
72cfdc76 6899if { (eval echo configure:6900: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3862412b 6900 rm -rf conftest*
97bf5e38 6901 bfd_cv_decl_needed_realloc=no
3862412b
MK
6902else
6903 echo "configure: failed program was:" >&5
6904 cat conftest.$ac_ext >&5
6905 rm -rf conftest*
97bf5e38 6906 bfd_cv_decl_needed_realloc=yes
3862412b
MK
6907fi
6908rm -f conftest*
6909fi
6910
97bf5e38
MK
6911echo "$ac_t""$bfd_cv_decl_needed_realloc" 1>&6
6912if test $bfd_cv_decl_needed_realloc = yes; then
6913 cat >> confdefs.h <<\EOF
6914#define NEED_DECLARATION_REALLOC 1
3862412b
MK
6915EOF
6916
97bf5e38 6917fi
3862412b 6918
97bf5e38 6919echo $ac_n "checking whether free must be declared""... $ac_c" 1>&6
72cfdc76 6920echo "configure:6921: checking whether free must be declared" >&5
97bf5e38 6921if eval "test \"`echo '$''{'bfd_cv_decl_needed_free'+set}'`\" = set"; then
451928c5
AC
6922 echo $ac_n "(cached) $ac_c" 1>&6
6923else
6924 cat > conftest.$ac_ext <<EOF
72cfdc76 6925#line 6926 "configure"
451928c5 6926#include "confdefs.h"
e17bf198 6927
97bf5e38
MK
6928#include <stdio.h>
6929#ifdef HAVE_STRING_H
6930#include <string.h>
6931#else
6932#ifdef HAVE_STRINGS_H
6933#include <strings.h>
6934#endif
6935#endif
6936#ifdef HAVE_STDLIB_H
6937#include <stdlib.h>
6938#endif
6939#ifdef HAVE_UNISTD_H
6940#include <unistd.h>
6941#endif
451928c5 6942int main() {
97bf5e38 6943char *(*pfn) = (char *(*)) free
451928c5
AC
6944; return 0; }
6945EOF
72cfdc76 6946if { (eval echo configure:6947: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
451928c5 6947 rm -rf conftest*
97bf5e38 6948 bfd_cv_decl_needed_free=no
451928c5
AC
6949else
6950 echo "configure: failed program was:" >&5
6951 cat conftest.$ac_ext >&5
6952 rm -rf conftest*
97bf5e38 6953 bfd_cv_decl_needed_free=yes
451928c5
AC
6954fi
6955rm -f conftest*
6956fi
6957
97bf5e38
MK
6958echo "$ac_t""$bfd_cv_decl_needed_free" 1>&6
6959if test $bfd_cv_decl_needed_free = yes; then
6960 cat >> confdefs.h <<\EOF
6961#define NEED_DECLARATION_FREE 1
451928c5
AC
6962EOF
6963
97bf5e38 6964fi
451928c5 6965
97bf5e38 6966echo $ac_n "checking whether strerror must be declared""... $ac_c" 1>&6
72cfdc76 6967echo "configure:6968: checking whether strerror must be declared" >&5
97bf5e38 6968if eval "test \"`echo '$''{'bfd_cv_decl_needed_strerror'+set}'`\" = set"; then
451928c5
AC
6969 echo $ac_n "(cached) $ac_c" 1>&6
6970else
6971 cat > conftest.$ac_ext <<EOF
72cfdc76 6972#line 6973 "configure"
451928c5 6973#include "confdefs.h"
e17bf198 6974
97bf5e38
MK
6975#include <stdio.h>
6976#ifdef HAVE_STRING_H
6977#include <string.h>
6978#else
6979#ifdef HAVE_STRINGS_H
6980#include <strings.h>
6981#endif
6982#endif
6983#ifdef HAVE_STDLIB_H
6984#include <stdlib.h>
6985#endif
6986#ifdef HAVE_UNISTD_H
6987#include <unistd.h>
6988#endif
451928c5 6989int main() {
97bf5e38 6990char *(*pfn) = (char *(*)) strerror
451928c5
AC
6991; return 0; }
6992EOF
72cfdc76 6993if { (eval echo configure:6994: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
451928c5 6994 rm -rf conftest*
97bf5e38 6995 bfd_cv_decl_needed_strerror=no
451928c5
AC
6996else
6997 echo "configure: failed program was:" >&5
6998 cat conftest.$ac_ext >&5
6999 rm -rf conftest*
97bf5e38 7000 bfd_cv_decl_needed_strerror=yes
451928c5
AC
7001fi
7002rm -f conftest*
7003fi
7004
97bf5e38
MK
7005echo "$ac_t""$bfd_cv_decl_needed_strerror" 1>&6
7006if test $bfd_cv_decl_needed_strerror = yes; then
7007 cat >> confdefs.h <<\EOF
7008#define NEED_DECLARATION_STRERROR 1
451928c5
AC
7009EOF
7010
97bf5e38 7011fi
451928c5 7012
97bf5e38 7013echo $ac_n "checking whether strdup must be declared""... $ac_c" 1>&6
72cfdc76 7014echo "configure:7015: checking whether strdup must be declared" >&5
97bf5e38 7015if eval "test \"`echo '$''{'bfd_cv_decl_needed_strdup'+set}'`\" = set"; then
3862412b
MK
7016 echo $ac_n "(cached) $ac_c" 1>&6
7017else
7018 cat > conftest.$ac_ext <<EOF
72cfdc76 7019#line 7020 "configure"
3862412b 7020#include "confdefs.h"
e17bf198 7021
97bf5e38
MK
7022#include <stdio.h>
7023#ifdef HAVE_STRING_H
7024#include <string.h>
7025#else
7026#ifdef HAVE_STRINGS_H
7027#include <strings.h>
7028#endif
7029#endif
7030#ifdef HAVE_STDLIB_H
7031#include <stdlib.h>
7032#endif
7033#ifdef HAVE_UNISTD_H
7034#include <unistd.h>
7035#endif
3862412b 7036int main() {
97bf5e38 7037char *(*pfn) = (char *(*)) strdup
3862412b
MK
7038; return 0; }
7039EOF
72cfdc76 7040if { (eval echo configure:7041: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3862412b 7041 rm -rf conftest*
97bf5e38 7042 bfd_cv_decl_needed_strdup=no
3862412b
MK
7043else
7044 echo "configure: failed program was:" >&5
7045 cat conftest.$ac_ext >&5
7046 rm -rf conftest*
97bf5e38 7047 bfd_cv_decl_needed_strdup=yes
3862412b
MK
7048fi
7049rm -f conftest*
7050fi
7051
97bf5e38
MK
7052echo "$ac_t""$bfd_cv_decl_needed_strdup" 1>&6
7053if test $bfd_cv_decl_needed_strdup = yes; then
7054 cat >> confdefs.h <<\EOF
7055#define NEED_DECLARATION_STRDUP 1
3862412b
MK
7056EOF
7057
97bf5e38 7058fi
3862412b 7059
97bf5e38 7060echo $ac_n "checking whether strstr must be declared""... $ac_c" 1>&6
72cfdc76 7061echo "configure:7062: checking whether strstr must be declared" >&5
97bf5e38 7062if eval "test \"`echo '$''{'bfd_cv_decl_needed_strstr'+set}'`\" = set"; then
3862412b
MK
7063 echo $ac_n "(cached) $ac_c" 1>&6
7064else
7065 cat > conftest.$ac_ext <<EOF
72cfdc76 7066#line 7067 "configure"
3862412b 7067#include "confdefs.h"
e17bf198 7068
97bf5e38
MK
7069#include <stdio.h>
7070#ifdef HAVE_STRING_H
7071#include <string.h>
7072#else
7073#ifdef HAVE_STRINGS_H
7074#include <strings.h>
7075#endif
7076#endif
7077#ifdef HAVE_STDLIB_H
7078#include <stdlib.h>
7079#endif
7080#ifdef HAVE_UNISTD_H
7081#include <unistd.h>
7082#endif
3862412b 7083int main() {
97bf5e38 7084char *(*pfn) = (char *(*)) strstr
3862412b
MK
7085; return 0; }
7086EOF
72cfdc76 7087if { (eval echo configure:7088: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3862412b 7088 rm -rf conftest*
97bf5e38 7089 bfd_cv_decl_needed_strstr=no
3862412b
MK
7090else
7091 echo "configure: failed program was:" >&5
7092 cat conftest.$ac_ext >&5
7093 rm -rf conftest*
97bf5e38 7094 bfd_cv_decl_needed_strstr=yes
3862412b
MK
7095fi
7096rm -f conftest*
7097fi
7098
97bf5e38
MK
7099echo "$ac_t""$bfd_cv_decl_needed_strstr" 1>&6
7100if test $bfd_cv_decl_needed_strstr = yes; then
7101 cat >> confdefs.h <<\EOF
7102#define NEED_DECLARATION_STRSTR 1
3862412b
MK
7103EOF
7104
97bf5e38 7105fi
3862412b 7106
97bf5e38 7107echo $ac_n "checking whether canonicalize_file_name must be declared""... $ac_c" 1>&6
72cfdc76 7108echo "configure:7109: checking whether canonicalize_file_name must be declared" >&5
97bf5e38 7109if eval "test \"`echo '$''{'bfd_cv_decl_needed_canonicalize_file_name'+set}'`\" = set"; then
596c9d4b
KB
7110 echo $ac_n "(cached) $ac_c" 1>&6
7111else
7112 cat > conftest.$ac_ext <<EOF
72cfdc76 7113#line 7114 "configure"
596c9d4b
KB
7114#include "confdefs.h"
7115
97bf5e38
MK
7116#include <stdio.h>
7117#ifdef HAVE_STRING_H
7118#include <string.h>
7119#else
7120#ifdef HAVE_STRINGS_H
7121#include <strings.h>
7122#endif
7123#endif
7124#ifdef HAVE_STDLIB_H
7125#include <stdlib.h>
7126#endif
7127#ifdef HAVE_UNISTD_H
7128#include <unistd.h>
7129#endif
596c9d4b 7130int main() {
97bf5e38 7131char *(*pfn) = (char *(*)) canonicalize_file_name
596c9d4b
KB
7132; return 0; }
7133EOF
72cfdc76 7134if { (eval echo configure:7135: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
596c9d4b 7135 rm -rf conftest*
97bf5e38 7136 bfd_cv_decl_needed_canonicalize_file_name=no
596c9d4b
KB
7137else
7138 echo "configure: failed program was:" >&5
7139 cat conftest.$ac_ext >&5
7140 rm -rf conftest*
97bf5e38 7141 bfd_cv_decl_needed_canonicalize_file_name=yes
596c9d4b
KB
7142fi
7143rm -f conftest*
7144fi
7145
97bf5e38
MK
7146echo "$ac_t""$bfd_cv_decl_needed_canonicalize_file_name" 1>&6
7147if test $bfd_cv_decl_needed_canonicalize_file_name = yes; then
7148 cat >> confdefs.h <<\EOF
7149#define NEED_DECLARATION_CANONICALIZE_FILE_NAME 1
596c9d4b
KB
7150EOF
7151
97bf5e38 7152fi
596c9d4b 7153
97bf5e38
MK
7154
7155# The following save_state_t checkery is only necessary for HPUX
7156# versions earlier than 10.20. When those fade from memory, this
7157# could be expunged. --jsm 1999-03-22
7158
7159echo $ac_n "checking for HPUX save_state structure""... $ac_c" 1>&6
72cfdc76 7160echo "configure:7161: checking for HPUX save_state structure" >&5
97bf5e38 7161cat > conftest.$ac_ext <<EOF
72cfdc76 7162#line 7163 "configure"
97bf5e38
MK
7163#include "confdefs.h"
7164#include <machine/save_state.h>
7165EOF
7166if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7167 egrep "save_state_t" >/dev/null 2>&1; then
7168 rm -rf conftest*
7169 gdb_cv_hpux_savestate=yes
7170else
7171 rm -rf conftest*
7172 gdb_cv_hpux_savestate=no
7173fi
7174rm -f conftest*
7175
7176cat > conftest.$ac_ext <<EOF
72cfdc76 7177#line 7178 "configure"
97bf5e38
MK
7178#include "confdefs.h"
7179#include <machine/save_state.h>
7180EOF
7181if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7182 egrep "ss_wide" >/dev/null 2>&1; then
7183 rm -rf conftest*
7184 gdb_cv_hpux_sswide=yes
7185else
7186 rm -rf conftest*
7187 gdb_cv_hpux_sswide=no
7188fi
7189rm -f conftest*
7190
7191if test $gdb_cv_hpux_savestate = yes
7192then
7193 cat >> confdefs.h <<\EOF
7194#define HAVE_STRUCT_SAVE_STATE_T 1
7195EOF
7196
7197fi
7198if test $gdb_cv_hpux_sswide = yes
7199then
7200 cat >> confdefs.h <<\EOF
7201#define HAVE_STRUCT_MEMBER_SS_WIDE 1
7202EOF
7203
7204fi
7205echo "$ac_t""$gdb_cv_hpux_sswide" 1>&6
7206
7207
7208# If we are configured native on GNU/Linux, work around problems with
7209# sys/procfs.h
7210# Also detect which type of /proc is in use, such as for Unixware or Solaris.
7211
7212if test "${target}" = "${host}"; then
7213 case "${host}" in
7214 i[3456]86-*-linux*)
7215 cat >> confdefs.h <<\EOF
7216#define START_INFERIOR_TRAPS_EXPECTED 2
7217EOF
7218
7219 cat >> confdefs.h <<\EOF
7220#define sys_quotactl 1
7221EOF
7222
7223 ;;
7224 ia64-*-aix*)
7225 cat >> confdefs.h <<\EOF
7226#define NEW_PROC_API 1
7227EOF
7228
7229 ;;
7230 *-*-unixware* | *-*-sysv4.2* | *-*-sysv5* | *-*-interix* )
7231 cat >> confdefs.h <<\EOF
7232#define NEW_PROC_API 1
7233EOF
7234
7235 ;;
7236 *-*-solaris2.[678])
7237 cat >> confdefs.h <<\EOF
7238#define NEW_PROC_API 1
7239EOF
7240
7241 ;;
7242 esac
7243fi
7244
7245if test "$ac_cv_header_sys_procfs_h" = yes; then
7246 echo $ac_n "checking for pstatus_t in sys/procfs.h""... $ac_c" 1>&6
72cfdc76 7247echo "configure:7248: checking for pstatus_t in sys/procfs.h" >&5
97bf5e38 7248 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_pstatus_t'+set}'`\" = set"; then
596c9d4b
KB
7249 echo $ac_n "(cached) $ac_c" 1>&6
7250else
7251 cat > conftest.$ac_ext <<EOF
72cfdc76 7252#line 7253 "configure"
596c9d4b
KB
7253#include "confdefs.h"
7254
7255#define _SYSCALL32
7256#include <sys/procfs.h>
7257int main() {
97bf5e38 7258pstatus_t avar
596c9d4b
KB
7259; return 0; }
7260EOF
72cfdc76 7261if { (eval echo configure:7262: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
596c9d4b 7262 rm -rf conftest*
97bf5e38 7263 bfd_cv_have_sys_procfs_type_pstatus_t=yes
596c9d4b
KB
7264else
7265 echo "configure: failed program was:" >&5
7266 cat conftest.$ac_ext >&5
7267 rm -rf conftest*
97bf5e38 7268 bfd_cv_have_sys_procfs_type_pstatus_t=no
596c9d4b
KB
7269
7270fi
7271rm -f conftest*
7272fi
7273
97bf5e38 7274 if test $bfd_cv_have_sys_procfs_type_pstatus_t = yes; then
596c9d4b 7275 cat >> confdefs.h <<\EOF
97bf5e38 7276#define HAVE_PSTATUS_T 1
596c9d4b
KB
7277EOF
7278
7279 fi
97bf5e38 7280 echo "$ac_t""$bfd_cv_have_sys_procfs_type_pstatus_t" 1>&6
596c9d4b 7281
97bf5e38 7282 echo $ac_n "checking for prrun_t in sys/procfs.h""... $ac_c" 1>&6
72cfdc76 7283echo "configure:7284: checking for prrun_t in sys/procfs.h" >&5
97bf5e38 7284 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prrun_t'+set}'`\" = set"; then
596c9d4b
KB
7285 echo $ac_n "(cached) $ac_c" 1>&6
7286else
7287 cat > conftest.$ac_ext <<EOF
72cfdc76 7288#line 7289 "configure"
596c9d4b
KB
7289#include "confdefs.h"
7290
7291#define _SYSCALL32
7292#include <sys/procfs.h>
7293int main() {
97bf5e38 7294prrun_t avar
596c9d4b
KB
7295; return 0; }
7296EOF
72cfdc76 7297if { (eval echo configure:7298: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
596c9d4b 7298 rm -rf conftest*
97bf5e38 7299 bfd_cv_have_sys_procfs_type_prrun_t=yes
596c9d4b
KB
7300else
7301 echo "configure: failed program was:" >&5
7302 cat conftest.$ac_ext >&5
7303 rm -rf conftest*
97bf5e38 7304 bfd_cv_have_sys_procfs_type_prrun_t=no
596c9d4b
KB
7305
7306fi
7307rm -f conftest*
7308fi
7309
97bf5e38 7310 if test $bfd_cv_have_sys_procfs_type_prrun_t = yes; then
596c9d4b 7311 cat >> confdefs.h <<\EOF
97bf5e38 7312#define HAVE_PRRUN_T 1
596c9d4b
KB
7313EOF
7314
7315 fi
97bf5e38 7316 echo "$ac_t""$bfd_cv_have_sys_procfs_type_prrun_t" 1>&6
596c9d4b 7317
97bf5e38 7318 echo $ac_n "checking for gregset_t in sys/procfs.h""... $ac_c" 1>&6
72cfdc76 7319echo "configure:7320: checking for gregset_t in sys/procfs.h" >&5
97bf5e38 7320 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_gregset_t'+set}'`\" = set"; then
596c9d4b
KB
7321 echo $ac_n "(cached) $ac_c" 1>&6
7322else
7323 cat > conftest.$ac_ext <<EOF
72cfdc76 7324#line 7325 "configure"
596c9d4b
KB
7325#include "confdefs.h"
7326
7327#define _SYSCALL32
7328#include <sys/procfs.h>
7329int main() {
97bf5e38 7330gregset_t avar
596c9d4b
KB
7331; return 0; }
7332EOF
72cfdc76 7333if { (eval echo configure:7334: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
596c9d4b 7334 rm -rf conftest*
97bf5e38 7335 bfd_cv_have_sys_procfs_type_gregset_t=yes
596c9d4b
KB
7336else
7337 echo "configure: failed program was:" >&5
7338 cat conftest.$ac_ext >&5
7339 rm -rf conftest*
97bf5e38 7340 bfd_cv_have_sys_procfs_type_gregset_t=no
596c9d4b
KB
7341
7342fi
7343rm -f conftest*
7344fi
7345
97bf5e38 7346 if test $bfd_cv_have_sys_procfs_type_gregset_t = yes; then
596c9d4b 7347 cat >> confdefs.h <<\EOF
97bf5e38 7348#define HAVE_GREGSET_T 1
596c9d4b
KB
7349EOF
7350
7351 fi
97bf5e38 7352 echo "$ac_t""$bfd_cv_have_sys_procfs_type_gregset_t" 1>&6
451928c5 7353
97bf5e38 7354 echo $ac_n "checking for fpregset_t in sys/procfs.h""... $ac_c" 1>&6
72cfdc76 7355echo "configure:7356: checking for fpregset_t in sys/procfs.h" >&5
97bf5e38 7356 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_fpregset_t'+set}'`\" = set"; then
d84dd0c5 7357 echo $ac_n "(cached) $ac_c" 1>&6
d84dd0c5
MK
7358else
7359 cat > conftest.$ac_ext <<EOF
72cfdc76 7360#line 7361 "configure"
d84dd0c5 7361#include "confdefs.h"
97bf5e38
MK
7362
7363#define _SYSCALL32
d84dd0c5 7364#include <sys/procfs.h>
97bf5e38
MK
7365int main() {
7366fpregset_t avar
7367; return 0; }
d84dd0c5 7368EOF
72cfdc76 7369if { (eval echo configure:7370: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
97bf5e38
MK
7370 rm -rf conftest*
7371 bfd_cv_have_sys_procfs_type_fpregset_t=yes
d84dd0c5
MK
7372else
7373 echo "configure: failed program was:" >&5
7374 cat conftest.$ac_ext >&5
97bf5e38
MK
7375 rm -rf conftest*
7376 bfd_cv_have_sys_procfs_type_fpregset_t=no
7377
d84dd0c5 7378fi
97bf5e38 7379rm -f conftest*
d84dd0c5
MK
7380fi
7381
97bf5e38
MK
7382 if test $bfd_cv_have_sys_procfs_type_fpregset_t = yes; then
7383 cat >> confdefs.h <<\EOF
7384#define HAVE_FPREGSET_T 1
d84dd0c5
MK
7385EOF
7386
97bf5e38
MK
7387 fi
7388 echo "$ac_t""$bfd_cv_have_sys_procfs_type_fpregset_t" 1>&6
d84dd0c5 7389
97bf5e38 7390 echo $ac_n "checking for prgregset_t in sys/procfs.h""... $ac_c" 1>&6
72cfdc76 7391echo "configure:7392: checking for prgregset_t in sys/procfs.h" >&5
97bf5e38 7392 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prgregset_t'+set}'`\" = set"; then
c906108c
SS
7393 echo $ac_n "(cached) $ac_c" 1>&6
7394else
7395 cat > conftest.$ac_ext <<EOF
72cfdc76 7396#line 7397 "configure"
c906108c 7397#include "confdefs.h"
c906108c 7398
97bf5e38
MK
7399#define _SYSCALL32
7400#include <sys/procfs.h>
c906108c 7401int main() {
97bf5e38 7402prgregset_t avar
c906108c
SS
7403; return 0; }
7404EOF
72cfdc76 7405if { (eval echo configure:7406: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c 7406 rm -rf conftest*
97bf5e38 7407 bfd_cv_have_sys_procfs_type_prgregset_t=yes
c906108c
SS
7408else
7409 echo "configure: failed program was:" >&5
7410 cat conftest.$ac_ext >&5
7411 rm -rf conftest*
97bf5e38
MK
7412 bfd_cv_have_sys_procfs_type_prgregset_t=no
7413
c906108c
SS
7414fi
7415rm -f conftest*
7416fi
7417
97bf5e38
MK
7418 if test $bfd_cv_have_sys_procfs_type_prgregset_t = yes; then
7419 cat >> confdefs.h <<\EOF
7420#define HAVE_PRGREGSET_T 1
c906108c
SS
7421EOF
7422
97bf5e38
MK
7423 fi
7424 echo "$ac_t""$bfd_cv_have_sys_procfs_type_prgregset_t" 1>&6
c906108c 7425
97bf5e38 7426 echo $ac_n "checking for prfpregset_t in sys/procfs.h""... $ac_c" 1>&6
72cfdc76 7427echo "configure:7428: checking for prfpregset_t in sys/procfs.h" >&5
97bf5e38 7428 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prfpregset_t'+set}'`\" = set"; then
d45fe813
KB
7429 echo $ac_n "(cached) $ac_c" 1>&6
7430else
7431 cat > conftest.$ac_ext <<EOF
72cfdc76 7432#line 7433 "configure"
d45fe813 7433#include "confdefs.h"
97bf5e38
MK
7434
7435#define _SYSCALL32
7436#include <sys/procfs.h>
d45fe813 7437int main() {
97bf5e38 7438prfpregset_t avar
d45fe813
KB
7439; return 0; }
7440EOF
72cfdc76 7441if { (eval echo configure:7442: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
d45fe813 7442 rm -rf conftest*
97bf5e38 7443 bfd_cv_have_sys_procfs_type_prfpregset_t=yes
d45fe813
KB
7444else
7445 echo "configure: failed program was:" >&5
7446 cat conftest.$ac_ext >&5
7447 rm -rf conftest*
97bf5e38
MK
7448 bfd_cv_have_sys_procfs_type_prfpregset_t=no
7449
d45fe813
KB
7450fi
7451rm -f conftest*
7452fi
7453
97bf5e38
MK
7454 if test $bfd_cv_have_sys_procfs_type_prfpregset_t = yes; then
7455 cat >> confdefs.h <<\EOF
7456#define HAVE_PRFPREGSET_T 1
d45fe813
KB
7457EOF
7458
97bf5e38
MK
7459 fi
7460 echo "$ac_t""$bfd_cv_have_sys_procfs_type_prfpregset_t" 1>&6
d45fe813 7461
97bf5e38 7462 echo $ac_n "checking for prgregset32_t in sys/procfs.h""... $ac_c" 1>&6
72cfdc76 7463echo "configure:7464: checking for prgregset32_t in sys/procfs.h" >&5
97bf5e38 7464 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prgregset32_t'+set}'`\" = set"; then
d45fe813
KB
7465 echo $ac_n "(cached) $ac_c" 1>&6
7466else
7467 cat > conftest.$ac_ext <<EOF
72cfdc76 7468#line 7469 "configure"
d45fe813 7469#include "confdefs.h"
97bf5e38
MK
7470
7471#define _SYSCALL32
7472#include <sys/procfs.h>
d45fe813 7473int main() {
97bf5e38 7474prgregset32_t avar
d45fe813
KB
7475; return 0; }
7476EOF
72cfdc76 7477if { (eval echo configure:7478: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
d45fe813 7478 rm -rf conftest*
97bf5e38 7479 bfd_cv_have_sys_procfs_type_prgregset32_t=yes
d45fe813
KB
7480else
7481 echo "configure: failed program was:" >&5
7482 cat conftest.$ac_ext >&5
7483 rm -rf conftest*
97bf5e38
MK
7484 bfd_cv_have_sys_procfs_type_prgregset32_t=no
7485
d45fe813
KB
7486fi
7487rm -f conftest*
7488fi
7489
97bf5e38
MK
7490 if test $bfd_cv_have_sys_procfs_type_prgregset32_t = yes; then
7491 cat >> confdefs.h <<\EOF
7492#define HAVE_PRGREGSET32_T 1
d45fe813
KB
7493EOF
7494
97bf5e38
MK
7495 fi
7496 echo "$ac_t""$bfd_cv_have_sys_procfs_type_prgregset32_t" 1>&6
d45fe813 7497
97bf5e38 7498 echo $ac_n "checking for prfpregset32_t in sys/procfs.h""... $ac_c" 1>&6
72cfdc76 7499echo "configure:7500: checking for prfpregset32_t in sys/procfs.h" >&5
97bf5e38 7500 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prfpregset32_t'+set}'`\" = set"; then
d45fe813
KB
7501 echo $ac_n "(cached) $ac_c" 1>&6
7502else
7503 cat > conftest.$ac_ext <<EOF
72cfdc76 7504#line 7505 "configure"
d45fe813 7505#include "confdefs.h"
97bf5e38
MK
7506
7507#define _SYSCALL32
7508#include <sys/procfs.h>
d45fe813 7509int main() {
97bf5e38 7510prfpregset32_t avar
d45fe813
KB
7511; return 0; }
7512EOF
72cfdc76 7513if { (eval echo configure:7514: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
d45fe813 7514 rm -rf conftest*
97bf5e38 7515 bfd_cv_have_sys_procfs_type_prfpregset32_t=yes
d45fe813
KB
7516else
7517 echo "configure: failed program was:" >&5
7518 cat conftest.$ac_ext >&5
7519 rm -rf conftest*
97bf5e38
MK
7520 bfd_cv_have_sys_procfs_type_prfpregset32_t=no
7521
d45fe813
KB
7522fi
7523rm -f conftest*
7524fi
7525
97bf5e38
MK
7526 if test $bfd_cv_have_sys_procfs_type_prfpregset32_t = yes; then
7527 cat >> confdefs.h <<\EOF
7528#define HAVE_PRFPREGSET32_T 1
d45fe813
KB
7529EOF
7530
97bf5e38
MK
7531 fi
7532 echo "$ac_t""$bfd_cv_have_sys_procfs_type_prfpregset32_t" 1>&6
d45fe813 7533
97bf5e38 7534 echo $ac_n "checking for lwpid_t in sys/procfs.h""... $ac_c" 1>&6
72cfdc76 7535echo "configure:7536: checking for lwpid_t in sys/procfs.h" >&5
97bf5e38 7536 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_lwpid_t'+set}'`\" = set"; then
d45fe813
KB
7537 echo $ac_n "(cached) $ac_c" 1>&6
7538else
7539 cat > conftest.$ac_ext <<EOF
72cfdc76 7540#line 7541 "configure"
d45fe813 7541#include "confdefs.h"
97bf5e38 7542
d45fe813 7543#define _SYSCALL32
97bf5e38 7544#include <sys/procfs.h>
d45fe813 7545int main() {
97bf5e38 7546lwpid_t avar
d45fe813
KB
7547; return 0; }
7548EOF
72cfdc76 7549if { (eval echo configure:7550: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
d45fe813 7550 rm -rf conftest*
97bf5e38 7551 bfd_cv_have_sys_procfs_type_lwpid_t=yes
d45fe813
KB
7552else
7553 echo "configure: failed program was:" >&5
7554 cat conftest.$ac_ext >&5
7555 rm -rf conftest*
97bf5e38
MK
7556 bfd_cv_have_sys_procfs_type_lwpid_t=no
7557
d45fe813
KB
7558fi
7559rm -f conftest*
7560fi
7561
97bf5e38
MK
7562 if test $bfd_cv_have_sys_procfs_type_lwpid_t = yes; then
7563 cat >> confdefs.h <<\EOF
7564#define HAVE_LWPID_T 1
d45fe813
KB
7565EOF
7566
97bf5e38
MK
7567 fi
7568 echo "$ac_t""$bfd_cv_have_sys_procfs_type_lwpid_t" 1>&6
c906108c 7569
97bf5e38 7570 echo $ac_n "checking for psaddr_t in sys/procfs.h""... $ac_c" 1>&6
72cfdc76 7571echo "configure:7572: checking for psaddr_t in sys/procfs.h" >&5
97bf5e38 7572 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_psaddr_t'+set}'`\" = set"; then
c906108c
SS
7573 echo $ac_n "(cached) $ac_c" 1>&6
7574else
7575 cat > conftest.$ac_ext <<EOF
72cfdc76 7576#line 7577 "configure"
c906108c
SS
7577#include "confdefs.h"
7578
97bf5e38
MK
7579#define _SYSCALL32
7580#include <sys/procfs.h>
c906108c 7581int main() {
97bf5e38 7582psaddr_t avar
c906108c
SS
7583; return 0; }
7584EOF
72cfdc76 7585if { (eval echo configure:7586: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c 7586 rm -rf conftest*
97bf5e38 7587 bfd_cv_have_sys_procfs_type_psaddr_t=yes
c906108c
SS
7588else
7589 echo "configure: failed program was:" >&5
7590 cat conftest.$ac_ext >&5
7591 rm -rf conftest*
97bf5e38
MK
7592 bfd_cv_have_sys_procfs_type_psaddr_t=no
7593
c906108c
SS
7594fi
7595rm -f conftest*
7596fi
7597
97bf5e38
MK
7598 if test $bfd_cv_have_sys_procfs_type_psaddr_t = yes; then
7599 cat >> confdefs.h <<\EOF
7600#define HAVE_PSADDR_T 1
c906108c
SS
7601EOF
7602
97bf5e38
MK
7603 fi
7604 echo "$ac_t""$bfd_cv_have_sys_procfs_type_psaddr_t" 1>&6
c906108c 7605
97bf5e38 7606 echo $ac_n "checking for prsysent_t in sys/procfs.h""... $ac_c" 1>&6
72cfdc76 7607echo "configure:7608: checking for prsysent_t in sys/procfs.h" >&5
97bf5e38 7608 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prsysent_t'+set}'`\" = set"; then
c906108c 7609 echo $ac_n "(cached) $ac_c" 1>&6
c906108c
SS
7610else
7611 cat > conftest.$ac_ext <<EOF
72cfdc76 7612#line 7613 "configure"
c906108c
SS
7613#include "confdefs.h"
7614
97bf5e38
MK
7615#define _SYSCALL32
7616#include <sys/procfs.h>
7617int main() {
7618prsysent_t avar
7619; return 0; }
c906108c 7620EOF
72cfdc76 7621if { (eval echo configure:7622: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
97bf5e38
MK
7622 rm -rf conftest*
7623 bfd_cv_have_sys_procfs_type_prsysent_t=yes
c906108c
SS
7624else
7625 echo "configure: failed program was:" >&5
7626 cat conftest.$ac_ext >&5
97bf5e38
MK
7627 rm -rf conftest*
7628 bfd_cv_have_sys_procfs_type_prsysent_t=no
7629
c906108c 7630fi
97bf5e38 7631rm -f conftest*
c906108c
SS
7632fi
7633
97bf5e38
MK
7634 if test $bfd_cv_have_sys_procfs_type_prsysent_t = yes; then
7635 cat >> confdefs.h <<\EOF
7636#define HAVE_PRSYSENT_T 1
c906108c
SS
7637EOF
7638
97bf5e38
MK
7639 fi
7640 echo "$ac_t""$bfd_cv_have_sys_procfs_type_prsysent_t" 1>&6
c906108c 7641
97bf5e38 7642 echo $ac_n "checking for pr_sigset_t in sys/procfs.h""... $ac_c" 1>&6
72cfdc76 7643echo "configure:7644: checking for pr_sigset_t in sys/procfs.h" >&5
97bf5e38 7644 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_pr_sigset_t'+set}'`\" = set"; then
c906108c
SS
7645 echo $ac_n "(cached) $ac_c" 1>&6
7646else
7647 cat > conftest.$ac_ext <<EOF
72cfdc76 7648#line 7649 "configure"
c906108c
SS
7649#include "confdefs.h"
7650
97bf5e38
MK
7651#define _SYSCALL32
7652#include <sys/procfs.h>
c906108c 7653int main() {
97bf5e38 7654pr_sigset_t avar
c906108c
SS
7655; return 0; }
7656EOF
72cfdc76 7657if { (eval echo configure:7658: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c 7658 rm -rf conftest*
97bf5e38 7659 bfd_cv_have_sys_procfs_type_pr_sigset_t=yes
c906108c
SS
7660else
7661 echo "configure: failed program was:" >&5
7662 cat conftest.$ac_ext >&5
7663 rm -rf conftest*
97bf5e38
MK
7664 bfd_cv_have_sys_procfs_type_pr_sigset_t=no
7665
c906108c
SS
7666fi
7667rm -f conftest*
7668fi
7669
97bf5e38
MK
7670 if test $bfd_cv_have_sys_procfs_type_pr_sigset_t = yes; then
7671 cat >> confdefs.h <<\EOF
7672#define HAVE_PR_SIGSET_T 1
c906108c
SS
7673EOF
7674
97bf5e38
MK
7675 fi
7676 echo "$ac_t""$bfd_cv_have_sys_procfs_type_pr_sigset_t" 1>&6
c906108c 7677
97bf5e38 7678 echo $ac_n "checking for pr_sigaction64_t in sys/procfs.h""... $ac_c" 1>&6
72cfdc76 7679echo "configure:7680: checking for pr_sigaction64_t in sys/procfs.h" >&5
97bf5e38 7680 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_pr_sigaction64_t'+set}'`\" = set"; then
c906108c 7681 echo $ac_n "(cached) $ac_c" 1>&6
c906108c
SS
7682else
7683 cat > conftest.$ac_ext <<EOF
72cfdc76 7684#line 7685 "configure"
c906108c
SS
7685#include "confdefs.h"
7686
97bf5e38
MK
7687#define _SYSCALL32
7688#include <sys/procfs.h>
7689int main() {
7690pr_sigaction64_t avar
7691; return 0; }
c906108c 7692EOF
72cfdc76 7693if { (eval echo configure:7694: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
97bf5e38
MK
7694 rm -rf conftest*
7695 bfd_cv_have_sys_procfs_type_pr_sigaction64_t=yes
c906108c
SS
7696else
7697 echo "configure: failed program was:" >&5
7698 cat conftest.$ac_ext >&5
97bf5e38
MK
7699 rm -rf conftest*
7700 bfd_cv_have_sys_procfs_type_pr_sigaction64_t=no
7701
c906108c 7702fi
97bf5e38 7703rm -f conftest*
c906108c
SS
7704fi
7705
97bf5e38
MK
7706 if test $bfd_cv_have_sys_procfs_type_pr_sigaction64_t = yes; then
7707 cat >> confdefs.h <<\EOF
7708#define HAVE_PR_SIGACTION64_T 1
c906108c
SS
7709EOF
7710
97bf5e38
MK
7711 fi
7712 echo "$ac_t""$bfd_cv_have_sys_procfs_type_pr_sigaction64_t" 1>&6
7713
7714 echo $ac_n "checking for pr_siginfo64_t in sys/procfs.h""... $ac_c" 1>&6
72cfdc76 7715echo "configure:7716: checking for pr_siginfo64_t in sys/procfs.h" >&5
97bf5e38
MK
7716 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_pr_siginfo64_t'+set}'`\" = set"; then
7717 echo $ac_n "(cached) $ac_c" 1>&6
7718else
7719 cat > conftest.$ac_ext <<EOF
72cfdc76 7720#line 7721 "configure"
97bf5e38
MK
7721#include "confdefs.h"
7722
7723#define _SYSCALL32
7724#include <sys/procfs.h>
7725int main() {
7726pr_siginfo64_t avar
7727; return 0; }
7728EOF
72cfdc76 7729if { (eval echo configure:7730: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
97bf5e38
MK
7730 rm -rf conftest*
7731 bfd_cv_have_sys_procfs_type_pr_siginfo64_t=yes
7732else
7733 echo "configure: failed program was:" >&5
7734 cat conftest.$ac_ext >&5
7735 rm -rf conftest*
7736 bfd_cv_have_sys_procfs_type_pr_siginfo64_t=no
7737
7738fi
7739rm -f conftest*
c906108c 7740fi
c906108c 7741
97bf5e38
MK
7742 if test $bfd_cv_have_sys_procfs_type_pr_siginfo64_t = yes; then
7743 cat >> confdefs.h <<\EOF
7744#define HAVE_PR_SIGINFO64_T 1
7745EOF
c906108c 7746
97bf5e38
MK
7747 fi
7748 echo "$ac_t""$bfd_cv_have_sys_procfs_type_pr_siginfo64_t" 1>&6
7749
7750
7751
7752
7753
7754 if test $bfd_cv_have_sys_procfs_type_prfpregset_t = yes; then
7755 echo $ac_n "checking whether prfpregset_t type is broken""... $ac_c" 1>&6
72cfdc76 7756echo "configure:7757: checking whether prfpregset_t type is broken" >&5
97bf5e38 7757 if eval "test \"`echo '$''{'gdb_cv_prfpregset_t_broken'+set}'`\" = set"; then
c906108c
SS
7758 echo $ac_n "(cached) $ac_c" 1>&6
7759else
7760 if test "$cross_compiling" = yes; then
97bf5e38 7761 gdb_cv_prfpregset_t_broken=yes
c906108c
SS
7762else
7763 cat > conftest.$ac_ext <<EOF
72cfdc76 7764#line 7765 "configure"
c906108c 7765#include "confdefs.h"
97bf5e38
MK
7766#include <sys/procfs.h>
7767 int main ()
7768 {
7769 if (sizeof (prfpregset_t) == sizeof (void *))
7770 return 1;
7771 return 0;
7772 }
c906108c 7773EOF
72cfdc76 7774if { (eval echo configure:7775: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
c906108c 7775then
97bf5e38 7776 gdb_cv_prfpregset_t_broken=no
c906108c
SS
7777else
7778 echo "configure: failed program was:" >&5
7779 cat conftest.$ac_ext >&5
7780 rm -fr conftest*
97bf5e38 7781 gdb_cv_prfpregset_t_broken=yes
c906108c
SS
7782fi
7783rm -fr conftest*
7784fi
7785
7786fi
7787
97bf5e38
MK
7788 echo "$ac_t""$gdb_cv_prfpregset_t_broken" 1>&6
7789 if test $gdb_cv_prfpregset_t_broken = yes; then
7790 cat >> confdefs.h <<\EOF
7791#define PRFPREGSET_T_BROKEN 1
c906108c
SS
7792EOF
7793
97bf5e38
MK
7794 fi
7795 fi
c906108c 7796
97bf5e38
MK
7797
7798 echo $ac_n "checking for PIOCSET ioctl entry in sys/procfs.h""... $ac_c" 1>&6
72cfdc76 7799echo "configure:7800: checking for PIOCSET ioctl entry in sys/procfs.h" >&5
97bf5e38 7800 if eval "test \"`echo '$''{'gdb_cv_have_procfs_piocset'+set}'`\" = set"; then
c906108c
SS
7801 echo $ac_n "(cached) $ac_c" 1>&6
7802else
7803 cat > conftest.$ac_ext <<EOF
72cfdc76 7804#line 7805 "configure"
c906108c 7805#include "confdefs.h"
97bf5e38
MK
7806#include <unistd.h>
7807#include <sys/types.h>
7808#include <sys/procfs.h>
7809
7810int main() {
7811
7812 int dummy;;
7813 dummy = ioctl(0, PIOCSET, &dummy);
7814
7815; return 0; }
c906108c 7816EOF
72cfdc76 7817if { (eval echo configure:7818: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c 7818 rm -rf conftest*
97bf5e38 7819 gdb_cv_have_procfs_piocset=yes
c906108c 7820else
c906108c
SS
7821 echo "configure: failed program was:" >&5
7822 cat conftest.$ac_ext >&5
7823 rm -rf conftest*
97bf5e38 7824 gdb_cv_have_procfs_piocset=no
c906108c
SS
7825fi
7826rm -f conftest*
7827fi
97bf5e38
MK
7828
7829 echo "$ac_t""$gdb_cv_have_procfs_piocset" 1>&6
7830 if test $gdb_cv_have_procfs_piocset = yes; then
7831 cat >> confdefs.h <<\EOF
7832#define HAVE_PROCFS_PIOCSET 1
c906108c 7833EOF
97bf5e38
MK
7834
7835 fi
c906108c 7836fi
c906108c 7837
97bf5e38
MK
7838if test ${host} = ${target} ; then
7839
7840 echo $ac_n "checking for member l_addr in struct link_map""... $ac_c" 1>&6
72cfdc76 7841echo "configure:7842: checking for member l_addr in struct link_map" >&5
97bf5e38 7842 if eval "test \"`echo '$''{'gdb_cv_have_struct_link_map_with_l_members'+set}'`\" = set"; then
c906108c
SS
7843 echo $ac_n "(cached) $ac_c" 1>&6
7844else
7845 cat > conftest.$ac_ext <<EOF
72cfdc76 7846#line 7847 "configure"
c906108c 7847#include "confdefs.h"
97bf5e38 7848#include <link.h>
c906108c 7849int main() {
97bf5e38 7850struct link_map lm; (void) lm.l_addr;
c906108c
SS
7851; return 0; }
7852EOF
72cfdc76 7853if { (eval echo configure:7854: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c 7854 rm -rf conftest*
97bf5e38 7855 gdb_cv_have_struct_link_map_with_l_members=yes
c906108c
SS
7856else
7857 echo "configure: failed program was:" >&5
7858 cat conftest.$ac_ext >&5
7859 rm -rf conftest*
97bf5e38 7860 gdb_cv_have_struct_link_map_with_l_members=no
c906108c
SS
7861fi
7862rm -f conftest*
7863fi
7864
97bf5e38
MK
7865 echo "$ac_t""$gdb_cv_have_struct_link_map_with_l_members" 1>&6
7866 if test $gdb_cv_have_struct_link_map_with_l_members = yes; then
7867 cat >> confdefs.h <<\EOF
7868#define HAVE_STRUCT_LINK_MAP_WITH_L_MEMBERS 1
c906108c 7869EOF
97bf5e38
MK
7870
7871 fi
7872
7873
7874 echo $ac_n "checking for member lm_addr in struct link_map""... $ac_c" 1>&6
72cfdc76 7875echo "configure:7876: checking for member lm_addr in struct link_map" >&5
97bf5e38
MK
7876 if eval "test \"`echo '$''{'gdb_cv_have_struct_link_map_with_lm_members'+set}'`\" = set"; then
7877 echo $ac_n "(cached) $ac_c" 1>&6
c906108c 7878else
97bf5e38 7879 cat > conftest.$ac_ext <<EOF
72cfdc76 7880#line 7881 "configure"
97bf5e38
MK
7881#include "confdefs.h"
7882#include <sys/types.h>
7883#include <link.h>
7884int main() {
7885struct link_map lm; (void) lm.lm_addr;
7886; return 0; }
7887EOF
72cfdc76 7888if { (eval echo configure:7889: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
97bf5e38
MK
7889 rm -rf conftest*
7890 gdb_cv_have_struct_link_map_with_lm_members=yes
7891else
7892 echo "configure: failed program was:" >&5
7893 cat conftest.$ac_ext >&5
7894 rm -rf conftest*
7895 gdb_cv_have_struct_link_map_with_lm_members=no
7896fi
7897rm -f conftest*
c906108c 7898fi
c906108c 7899
97bf5e38
MK
7900 echo "$ac_t""$gdb_cv_have_struct_link_map_with_lm_members" 1>&6
7901 if test $gdb_cv_have_struct_link_map_with_lm_members = yes; then
7902 cat >> confdefs.h <<\EOF
7903#define HAVE_STRUCT_LINK_MAP_WITH_LM_MEMBERS 1
7904EOF
7905
7906 fi
7907
7908
7909 echo $ac_n "checking for member som_addr in struct so_map""... $ac_c" 1>&6
72cfdc76 7910echo "configure:7911: checking for member som_addr in struct so_map" >&5
97bf5e38 7911 if eval "test \"`echo '$''{'gdb_cv_have_struct_so_map_with_som_members'+set}'`\" = set"; then
c906108c 7912 echo $ac_n "(cached) $ac_c" 1>&6
c906108c
SS
7913else
7914 cat > conftest.$ac_ext <<EOF
72cfdc76 7915#line 7916 "configure"
c906108c 7916#include "confdefs.h"
97bf5e38
MK
7917#include <sys/types.h>
7918#ifdef HAVE_NLIST_H
7919#include <nlist.h>
7920#endif
7921#include <link.h>
7922int main() {
7923struct so_map lm; (void) lm.som_addr;
7924; return 0; }
7925EOF
72cfdc76 7926if { (eval echo configure:7927: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
97bf5e38
MK
7927 rm -rf conftest*
7928 gdb_cv_have_struct_so_map_with_som_members=yes
7929else
7930 echo "configure: failed program was:" >&5
7931 cat conftest.$ac_ext >&5
7932 rm -rf conftest*
7933 gdb_cv_have_struct_so_map_with_som_members=no
7934fi
7935rm -f conftest*
7936fi
c906108c 7937
97bf5e38
MK
7938 echo "$ac_t""$gdb_cv_have_struct_so_map_with_som_members" 1>&6
7939 if test $gdb_cv_have_struct_so_map_with_som_members = yes; then
7940 cat >> confdefs.h <<\EOF
7941#define HAVE_STRUCT_SO_MAP_WITH_SOM_MEMBERS 1
7942EOF
c906108c 7943
97bf5e38 7944 fi
c906108c 7945
97bf5e38
MK
7946
7947 echo $ac_n "checking for struct link_map32 in sys/link.h""... $ac_c" 1>&6
72cfdc76 7948echo "configure:7949: checking for struct link_map32 in sys/link.h" >&5
97bf5e38
MK
7949 if eval "test \"`echo '$''{'gdb_cv_have_struct_link_map32'+set}'`\" = set"; then
7950 echo $ac_n "(cached) $ac_c" 1>&6
7951else
7952 cat > conftest.$ac_ext <<EOF
72cfdc76 7953#line 7954 "configure"
97bf5e38
MK
7954#include "confdefs.h"
7955#define _SYSCALL32
7956#include <sys/link.h>
7957int main() {
7958struct link_map32 l;
7959; return 0; }
7960EOF
72cfdc76 7961if { (eval echo configure:7962: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
97bf5e38
MK
7962 rm -rf conftest*
7963 gdb_cv_have_struct_link_map32=yes
7964else
7965 echo "configure: failed program was:" >&5
7966 cat conftest.$ac_ext >&5
7967 rm -rf conftest*
7968 gdb_cv_have_struct_link_map32=no
7969fi
7970rm -f conftest*
7971fi
c906108c 7972
97bf5e38
MK
7973 echo "$ac_t""$gdb_cv_have_struct_link_map32" 1>&6
7974 if test $gdb_cv_have_struct_link_map32 = yes; then
7975 cat >> confdefs.h <<\EOF
7976#define HAVE_STRUCT_LINK_MAP32 1
7977EOF
c906108c 7978
97bf5e38
MK
7979 cat >> confdefs.h <<\EOF
7980#define _SYSCALL32 1
7981EOF
c906108c 7982
97bf5e38
MK
7983 fi
7984fi
c906108c 7985
c906108c 7986
97bf5e38 7987echo $ac_n "checking for long long support in compiler""... $ac_c" 1>&6
72cfdc76 7988echo "configure:7989: checking for long long support in compiler" >&5
97bf5e38
MK
7989if eval "test \"`echo '$''{'gdb_cv_c_long_long'+set}'`\" = set"; then
7990 echo $ac_n "(cached) $ac_c" 1>&6
7991else
7992 cat > conftest.$ac_ext <<EOF
72cfdc76 7993#line 7994 "configure"
97bf5e38 7994#include "confdefs.h"
c906108c 7995
97bf5e38 7996int main() {
c906108c 7997
97bf5e38
MK
7998 extern long long foo;
7999 switch (foo & 2) { case 0: return 1; }
c906108c 8000
97bf5e38
MK
8001; return 0; }
8002EOF
72cfdc76 8003if { (eval echo configure:8004: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
97bf5e38
MK
8004 rm -rf conftest*
8005 gdb_cv_c_long_long=yes
8006else
8007 echo "configure: failed program was:" >&5
8008 cat conftest.$ac_ext >&5
8009 rm -rf conftest*
8010 gdb_cv_c_long_long=no
8011fi
8012rm -f conftest*
8013fi
c906108c 8014
97bf5e38
MK
8015echo "$ac_t""$gdb_cv_c_long_long" 1>&6
8016if test $gdb_cv_c_long_long = yes; then
8017 cat >> confdefs.h <<\EOF
8018#define CC_HAS_LONG_LONG 1
8019EOF
8020
8021fi
8022
8023
8024echo $ac_n "checking for long long support in printf""... $ac_c" 1>&6
72cfdc76 8025echo "configure:8026: checking for long long support in printf" >&5
97bf5e38
MK
8026if eval "test \"`echo '$''{'gdb_cv_printf_has_long_long'+set}'`\" = set"; then
8027 echo $ac_n "(cached) $ac_c" 1>&6
8028else
8029 if test "$cross_compiling" = yes; then
8030 gdb_cv_printf_has_long_long=no
8031else
8032 cat > conftest.$ac_ext <<EOF
72cfdc76 8033#line 8034 "configure"
97bf5e38
MK
8034#include "confdefs.h"
8035
8036int main () {
8037 char buf[32];
8038 long long l = 0;
8039 l = (l << 16) + 0x0123;
8040 l = (l << 16) + 0x4567;
8041 l = (l << 16) + 0x89ab;
8042 l = (l << 16) + 0xcdef;
8043 sprintf (buf, "0x%016llx", l);
8044 return (strcmp ("0x0123456789abcdef", buf));
c906108c 8045}
97bf5e38 8046EOF
72cfdc76 8047if { (eval echo configure:8048: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
97bf5e38
MK
8048then
8049 gdb_cv_printf_has_long_long=yes
8050else
8051 echo "configure: failed program was:" >&5
8052 cat conftest.$ac_ext >&5
8053 rm -fr conftest*
8054 gdb_cv_printf_has_long_long=no
8055fi
8056rm -fr conftest*
8057fi
8058
8059fi
8060
8061if test $gdb_cv_printf_has_long_long = yes; then
8062 cat >> confdefs.h <<\EOF
8063#define PRINTF_HAS_LONG_LONG 1
8064EOF
8065
8066fi
8067echo "$ac_t""$gdb_cv_printf_has_long_long" 1>&6
8068
8069
8070echo $ac_n "checking for long double support in compiler""... $ac_c" 1>&6
72cfdc76 8071echo "configure:8072: checking for long double support in compiler" >&5
97bf5e38
MK
8072if eval "test \"`echo '$''{'ac_cv_c_long_double'+set}'`\" = set"; then
8073 echo $ac_n "(cached) $ac_c" 1>&6
8074else
8075 cat > conftest.$ac_ext <<EOF
72cfdc76 8076#line 8077 "configure"
97bf5e38
MK
8077#include "confdefs.h"
8078
8079int main() {
8080long double foo;
8081; return 0; }
8082EOF
72cfdc76 8083if { (eval echo configure:8084: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
97bf5e38
MK
8084 rm -rf conftest*
8085 ac_cv_c_long_double=yes
8086else
8087 echo "configure: failed program was:" >&5
8088 cat conftest.$ac_ext >&5
8089 rm -rf conftest*
8090 ac_cv_c_long_double=no
8091fi
8092rm -f conftest*
8093fi
c906108c 8094
97bf5e38
MK
8095echo "$ac_t""$ac_cv_c_long_double" 1>&6
8096if test $ac_cv_c_long_double = yes; then
8097 cat >> confdefs.h <<\EOF
8098#define HAVE_LONG_DOUBLE 1
c906108c 8099EOF
97bf5e38
MK
8100
8101fi
8102
8103
8104echo $ac_n "checking for long double support in printf""... $ac_c" 1>&6
72cfdc76 8105echo "configure:8106: checking for long double support in printf" >&5
97bf5e38
MK
8106if eval "test \"`echo '$''{'gdb_cv_printf_has_long_double'+set}'`\" = set"; then
8107 echo $ac_n "(cached) $ac_c" 1>&6
8108else
8109 if test "$cross_compiling" = yes; then
8110 gdb_cv_printf_has_long_double=no
8111else
8112 cat > conftest.$ac_ext <<EOF
72cfdc76 8113#line 8114 "configure"
97bf5e38
MK
8114#include "confdefs.h"
8115
8116int main () {
8117 char buf[16];
8118 long double f = 3.141592653;
8119 sprintf (buf, "%Lg", f);
8120 return (strncmp ("3.14159", buf, 7));
8121}
8122EOF
72cfdc76 8123if { (eval echo configure:8124: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
c906108c 8124then
97bf5e38 8125 gdb_cv_printf_has_long_double=yes
c906108c
SS
8126else
8127 echo "configure: failed program was:" >&5
8128 cat conftest.$ac_ext >&5
8129 rm -fr conftest*
97bf5e38 8130 gdb_cv_printf_has_long_double=no
c906108c
SS
8131fi
8132rm -fr conftest*
8133fi
8134
8135fi
8136
97bf5e38 8137if test $gdb_cv_printf_has_long_double = yes; then
c906108c 8138 cat >> confdefs.h <<\EOF
97bf5e38
MK
8139#define PRINTF_HAS_LONG_DOUBLE 1
8140EOF
8141
8142fi
8143echo "$ac_t""$gdb_cv_printf_has_long_double" 1>&6
8144
8145
8146echo $ac_n "checking for long double support in scanf""... $ac_c" 1>&6
72cfdc76 8147echo "configure:8148: checking for long double support in scanf" >&5
97bf5e38
MK
8148if eval "test \"`echo '$''{'gdb_cv_scanf_has_long_double'+set}'`\" = set"; then
8149 echo $ac_n "(cached) $ac_c" 1>&6
8150else
8151 if test "$cross_compiling" = yes; then
8152 gdb_cv_scanf_has_long_double=no
8153else
8154 cat > conftest.$ac_ext <<EOF
72cfdc76 8155#line 8156 "configure"
97bf5e38
MK
8156#include "confdefs.h"
8157
8158int main () {
8159 char *buf = "3.141592653";
8160 long double f = 0;
8161 sscanf (buf, "%Lg", &f);
8162 return !(f > 3.14159 && f < 3.14160);
8163}
c906108c 8164EOF
72cfdc76 8165if { (eval echo configure:8166: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
97bf5e38
MK
8166then
8167 gdb_cv_scanf_has_long_double=yes
8168else
8169 echo "configure: failed program was:" >&5
8170 cat conftest.$ac_ext >&5
8171 rm -fr conftest*
8172 gdb_cv_scanf_has_long_double=no
8173fi
8174rm -fr conftest*
8175fi
c906108c
SS
8176
8177fi
8178
97bf5e38
MK
8179if test $gdb_cv_scanf_has_long_double = yes; then
8180 cat >> confdefs.h <<\EOF
8181#define SCANF_HAS_LONG_DOUBLE 1
8182EOF
8183
8184fi
8185echo "$ac_t""$gdb_cv_scanf_has_long_double" 1>&6
c906108c 8186
438013df
AO
8187case ${host_os} in
8188aix*)
8189 echo $ac_n "checking for -bbigtoc option""... $ac_c" 1>&6
72cfdc76 8190echo "configure:8191: checking for -bbigtoc option" >&5
438013df
AO
8191if eval "test \"`echo '$''{'gdb_cv_bigtoc'+set}'`\" = set"; then
8192 echo $ac_n "(cached) $ac_c" 1>&6
8193else
8194
8195 SAVE_LDFLAGS=$LDFLAGS
8196
8197 case $GCC in
8198 yes) gdb_cv_bigtoc=-Wl,-bbigtoc ;;
8199 *) gdb_cv_bigtoc=-bbigtoc ;;
8200 esac
8201
8202 LDFLAGS=$LDFLAGS\ $gdb_cv_bigtoc
8203 cat > conftest.$ac_ext <<EOF
72cfdc76 8204#line 8205 "configure"
438013df
AO
8205#include "confdefs.h"
8206
8207int main() {
8208int i;
8209; return 0; }
8210EOF
72cfdc76 8211if { (eval echo configure:8212: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
438013df
AO
8212 :
8213else
8214 echo "configure: failed program was:" >&5
8215 cat conftest.$ac_ext >&5
8216 rm -rf conftest*
8217 gdb_cv_bigtoc=
8218fi
8219rm -f conftest*
8220
8221fi
8222
8223echo "$ac_t""$gdb_cv_bigtoc" 1>&6
8224 CONFIG_LDFLAGS="${CONFIG_LDFLAGS} ${gdb_cv_bigtoc}"
8225 ;;
8226esac
8227
c906108c
SS
8228
8229
8230if test ${build} = ${host} -a ${host} = ${target} ; then
8231 case ${host_os} in
8232 hpux*)
8233 echo $ac_n "checking for HPUX/OSF thread support""... $ac_c" 1>&6
72cfdc76 8234echo "configure:8235: checking for HPUX/OSF thread support" >&5
c906108c
SS
8235 if test -f /usr/include/dce/cma_config.h ; then
8236 if test "$GCC" = "yes" ; then
8237 echo "$ac_t""yes" 1>&6
8238 cat >> confdefs.h <<\EOF
8239#define HAVE_HPUX_THREAD_SUPPORT 1
8240EOF
8241
66b965bb 8242 CONFIG_LIB_OBS="${CONFIG_LIB_OBS} hpux-thread.o"
c906108c
SS
8243 CONFIG_SRCS="${CONFIG_SRCS} hpux-thread.c"
8244 else
8245 echo "$ac_t""no (suppressed because you are not using GCC)" 1>&6
8246 fi
8247 else
8248 echo "$ac_t""no" 1>&6
8249 fi
8250 ;;
8251 solaris*)
d92419e5
JB
8252 # See if thread_db library is around for Solaris thread debugging.
8253 # Note that we must explicitly test for version 1 of the library
8254 # because version 0 (present on Solaris 2.4 or earlier) doesn't have
8255 # the same API.
c906108c 8256 echo $ac_n "checking for Solaris thread debugging library""... $ac_c" 1>&6
72cfdc76 8257echo "configure:8258: checking for Solaris thread debugging library" >&5
c906108c
SS
8258 if test -f /usr/lib/libthread_db.so.1 ; then
8259 echo "$ac_t""yes" 1>&6
8260 cat >> confdefs.h <<\EOF
8261#define HAVE_THREAD_DB_LIB 1
8262EOF
8263
66b965bb 8264 CONFIG_LIB_OBS="${CONFIG_LIB_OBS} sol-thread.o"
c906108c
SS
8265 CONFIG_SRCS="${CONFIG_SRCS} sol-thread.c"
8266 echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
72cfdc76 8267echo "configure:8268: checking for dlopen in -ldl" >&5
c906108c
SS
8268ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'`
8269if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
8270 echo $ac_n "(cached) $ac_c" 1>&6
8271else
8272 ac_save_LIBS="$LIBS"
8273LIBS="-ldl $LIBS"
8274cat > conftest.$ac_ext <<EOF
72cfdc76 8275#line 8276 "configure"
c906108c
SS
8276#include "confdefs.h"
8277/* Override any gcc2 internal prototype to avoid an error. */
8278/* We use char because int might match the return type of a gcc2
8279 builtin and then its argument prototype would still apply. */
8280char dlopen();
8281
8282int main() {
8283dlopen()
8284; return 0; }
8285EOF
72cfdc76 8286if { (eval echo configure:8287: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c
SS
8287 rm -rf conftest*
8288 eval "ac_cv_lib_$ac_lib_var=yes"
8289else
8290 echo "configure: failed program was:" >&5
8291 cat conftest.$ac_ext >&5
8292 rm -rf conftest*
8293 eval "ac_cv_lib_$ac_lib_var=no"
8294fi
8295rm -f conftest*
8296LIBS="$ac_save_LIBS"
8297
8298fi
8299if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8300 echo "$ac_t""yes" 1>&6
8301 ac_tr_lib=HAVE_LIB`echo dl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
8302 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
8303 cat >> confdefs.h <<EOF
8304#define $ac_tr_lib 1
8305EOF
8306
8307 LIBS="-ldl $LIBS"
8308
8309else
8310 echo "$ac_t""no" 1>&6
8311fi
8312
8313 if test "$GCC" = "yes" ; then
8314 # The GNU linker requires the -export-dynamic option to make
8315 # all symbols visible in the dynamic symbol table.
8316 hold_ldflags=$LDFLAGS
8317 echo $ac_n "checking for the ld -export-dynamic flag""... $ac_c" 1>&6
72cfdc76 8318echo "configure:8319: checking for the ld -export-dynamic flag" >&5
c906108c
SS
8319 LDFLAGS="${LDFLAGS} -Wl,-export-dynamic"
8320 cat > conftest.$ac_ext <<EOF
72cfdc76 8321#line 8322 "configure"
c906108c
SS
8322#include "confdefs.h"
8323
8324int main() {
8325int i;
8326; return 0; }
8327EOF
72cfdc76 8328if { (eval echo configure:8329: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c
SS
8329 rm -rf conftest*
8330 found=yes
8331else
8332 echo "configure: failed program was:" >&5
8333 cat conftest.$ac_ext >&5
8334 rm -rf conftest*
8335 found=no
8336fi
8337rm -f conftest*
8338 LDFLAGS=$hold_ldflags
8339 echo "$ac_t""$found" 1>&6
8340 if test $found = yes; then
8341 CONFIG_LDFLAGS="${CONFIG_LDFLAGS} -Wl,-export-dynamic"
8342 fi
8343 fi
8344 # Sun randomly tweaked the prototypes in <proc_service.h>
8345 # at one point.
8346 echo $ac_n "checking if <proc_service.h> is old""... $ac_c" 1>&6
72cfdc76 8347echo "configure:8348: checking if <proc_service.h> is old" >&5
c906108c
SS
8348 if eval "test \"`echo '$''{'gdb_cv_proc_service_is_old'+set}'`\" = set"; then
8349 echo $ac_n "(cached) $ac_c" 1>&6
8350else
8351
8352 cat > conftest.$ac_ext <<EOF
72cfdc76 8353#line 8354 "configure"
c906108c
SS
8354#include "confdefs.h"
8355
8356 #include <proc_service.h>
8357 ps_err_e ps_pdwrite
8358 (struct ps_prochandle*, psaddr_t, const void*, size_t);
8359
8360int main() {
8361
8362; return 0; }
8363EOF
72cfdc76 8364if { (eval echo configure:8365: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c
SS
8365 rm -rf conftest*
8366 gdb_cv_proc_service_is_old=no
8367else
8368 echo "configure: failed program was:" >&5
8369 cat conftest.$ac_ext >&5
8370 rm -rf conftest*
8371 gdb_cv_proc_service_is_old=yes
8372fi
8373rm -f conftest*
8374
8375fi
8376
8377 echo "$ac_t""$gdb_cv_proc_service_is_old" 1>&6
8378 if test $gdb_cv_proc_service_is_old = yes; then
8379 cat >> confdefs.h <<\EOF
8380#define PROC_SERVICE_IS_OLD 1
8381EOF
8382
8383 fi
8384 else
8385 echo "$ac_t""no" 1>&6
8386 fi
8387 ;;
d92419e5
JB
8388 aix*)
8389 echo $ac_n "checking for AiX thread debugging library""... $ac_c" 1>&6
72cfdc76 8390echo "configure:8391: checking for AiX thread debugging library" >&5
d92419e5
JB
8391 if eval "test \"`echo '$''{'gdb_cv_have_aix_thread_debug'+set}'`\" = set"; then
8392 echo $ac_n "(cached) $ac_c" 1>&6
8393else
8394 cat > conftest.$ac_ext <<EOF
72cfdc76 8395#line 8396 "configure"
d92419e5
JB
8396#include "confdefs.h"
8397#include <sys/pthdebug.h>
8398int main() {
8399#ifndef PTHDB_VERSION_3
8400 #error
8401 #endif
8402; return 0; }
8403EOF
72cfdc76 8404if { (eval echo configure:8405: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
d92419e5
JB
8405 rm -rf conftest*
8406 gdb_cv_have_aix_thread_debug=yes
8407else
8408 echo "configure: failed program was:" >&5
8409 cat conftest.$ac_ext >&5
8410 rm -rf conftest*
8411 gdb_cv_have_aix_thread_debug=no
8412fi
8413rm -f conftest*
8414fi
8415
8416 echo "$ac_t""$gdb_cv_have_aix_thread_debug" 1>&6
8417 if test $gdb_cv_have_aix_thread_debug = yes; then
8418 CONFIG_SRCS="${CONFIG_SRCS} aix-thread.c"
8419 CONFIG_LIB_OBS="${CONFIG_LIB_OBS} aix-thread.o"
8420 CONFIG_LDFLAGS="${CONFIG_LDFLAGS} -lpthdebug"
8421 fi
8422 ;;
c906108c
SS
8423 esac
8424
8425fi
8426
3f47be5c
EZ
8427if test "x$ac_cv_header_thread_db_h" = "xyes"; then
8428 echo $ac_n "checking whether <thread_db.h> has TD_NOTALLOC""... $ac_c" 1>&6
72cfdc76 8429echo "configure:8430: checking whether <thread_db.h> has TD_NOTALLOC" >&5
3f47be5c
EZ
8430if eval "test \"`echo '$''{'gdb_cv_thread_db_h_has_td_notalloc'+set}'`\" = set"; then
8431 echo $ac_n "(cached) $ac_c" 1>&6
8432else
8433 cat > conftest.$ac_ext <<EOF
72cfdc76 8434#line 8435 "configure"
3f47be5c
EZ
8435#include "confdefs.h"
8436#include <thread_db.h>
8437int main() {
8438int i = TD_NOTALLOC;
8439; return 0; }
8440EOF
72cfdc76 8441if { (eval echo configure:8442: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3f47be5c
EZ
8442 rm -rf conftest*
8443 gdb_cv_thread_db_h_has_td_notalloc=yes
8444else
8445 echo "configure: failed program was:" >&5
8446 cat conftest.$ac_ext >&5
8447 rm -rf conftest*
8448 gdb_cv_thread_db_h_has_td_notalloc=no
8449
8450fi
8451rm -f conftest*
8452
8453fi
8454
8455echo "$ac_t""$gdb_cv_thread_db_h_has_td_notalloc" 1>&6
8456fi
8457if test "x$gdb_cv_thread_db_h_has_td_notalloc" = "xyes"; then
8458 cat >> confdefs.h <<\EOF
8459#define THREAD_DB_HAS_TD_NOTALLOC 1
8460EOF
8461
8462fi
8463
fb40c209 8464
3b851bce
AC
8465# NOTE: Don't add -Wall or -Wunused, they both include
8466# -Wunused-parameter which reports bogus warnings.
8467# NOTE: If you add to this list, remember to update
8468# gdb/doc/gdbint.texinfo.
1decb323 8469build_warnings="-Wimplicit -Wreturn-type -Wcomment -Wtrigraphs \
93d56215 8470-Wformat -Wparentheses -Wpointer-arith -Wuninitialized"
d8038014
AC
8471# Up for debate: -Wswitch -Wcomment -trigraphs -Wtrigraphs
8472# -Wunused-function -Wunused-label -Wunused-variable -Wunused-value
93d56215 8473# -Wchar-subscripts -Wtraditional -Wshadow -Wcast-qual
d8038014
AC
8474# -Wcast-align -Wwrite-strings -Wconversion -Wstrict-prototypes
8475# -Wmissing-prototypes -Wmissing-declarations -Wredundant-decls
8476# -Woverloaded-virtual -Winline -Werror"
c906108c
SS
8477# Check whether --enable-build-warnings or --disable-build-warnings was given.
8478if test "${enable_build_warnings+set}" = set; then
8479 enableval="$enable_build_warnings"
1decb323 8480 case "${enableval}" in
c906108c
SS
8481 yes) ;;
8482 no) build_warnings="-w";;
8483 ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"`
8484 build_warnings="${build_warnings} ${t}";;
8485 *,) t=`echo "${enableval}" | sed -e "s/,/ /g"`
8486 build_warnings="${t} ${build_warnings}";;
8487 *) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;;
8488esac
d4f3574e 8489if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then
746a987d 8490 echo "Setting compiler warning flags = $build_warnings" 6>&1
c906108c 8491fi
1decb323 8492fi
3b851bce
AC
8493# Check whether --enable-gdb-build-warnings or --disable-gdb-build-warnings was given.
8494if test "${enable_gdb_build_warnings+set}" = set; then
8495 enableval="$enable_gdb_build_warnings"
8496 case "${enableval}" in
8497 yes) ;;
8498 no) build_warnings="-w";;
8499 ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"`
8500 build_warnings="${build_warnings} ${t}";;
8501 *,) t=`echo "${enableval}" | sed -e "s/,/ /g"`
8502 build_warnings="${t} ${build_warnings}";;
8503 *) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;;
8504esac
8505if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then
8506 echo "Setting GDB specific compiler warning flags = $build_warnings" 6>&1
8507fi
8508fi
104c1213
JM
8509WARN_CFLAGS=""
8510WERROR_CFLAGS=""
c906108c
SS
8511if test "x${build_warnings}" != x -a "x$GCC" = xyes
8512then
746a987d 8513 echo $ac_n "checking compiler warning flags""... $ac_c" 1>&6
72cfdc76 8514echo "configure:8515: checking compiler warning flags" >&5
746a987d
AC
8515 # Separate out the -Werror flag as some files just cannot be
8516 # compiled with it enabled.
8517 for w in ${build_warnings}; do
8518 case $w in
8519 -Werr*) WERROR_CFLAGS=-Werror ;;
8520 *) # Check that GCC accepts it
4536bbc6
AC
8521 saved_CFLAGS="$CFLAGS"
8522 CFLAGS="$CFLAGS $w"
8523 cat > conftest.$ac_ext <<EOF
72cfdc76 8524#line 8525 "configure"
4536bbc6
AC
8525#include "confdefs.h"
8526
8527int main() {
8528
8529; return 0; }
8530EOF
72cfdc76 8531if { (eval echo configure:8532: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4536bbc6
AC
8532 rm -rf conftest*
8533 WARN_CFLAGS="${WARN_CFLAGS} $w"
8534else
8535 echo "configure: failed program was:" >&5
8536 cat conftest.$ac_ext >&5
8537fi
8538rm -f conftest*
8539 CFLAGS="$saved_CFLAGS"
746a987d
AC
8540 esac
8541 done
8542 echo "$ac_t""${WARN_CFLAGS}${WERROR_CFLAGS}" 1>&6
c906108c
SS
8543fi
8544
8545
104c1213 8546
c906108c
SS
8547MMALLOC_CFLAGS=
8548MMALLOC=
8549
8550
8551
8552# Check whether --with-mmalloc or --without-mmalloc was given.
8553if test "${with_mmalloc+set}" = set; then
8554 withval="$with_mmalloc"
8555 case "${withval}" in
8556 yes) want_mmalloc=true ;;
8557 no) want_mmalloc=false;;
8558 *) { echo "configure: error: bad value ${withval} for GDB with-mmalloc option" 1>&2; exit 1; } ;;
8559esac
8560else
8561 want_mmalloc=false
8562fi
8563
8564if test x$want_mmalloc = xtrue; then
8565 cat >> confdefs.h <<\EOF
8566#define USE_MMALLOC 1
8567EOF
8568
8569 cat >> confdefs.h <<\EOF
8570#define MMCHECK_FORCE 1
8571EOF
8572
8573 MMALLOC_CFLAGS="-I$srcdir/../mmalloc"
8574 MMALLOC='../mmalloc/libmmalloc.a'
8575fi
8576
7a292a7a
SS
8577# In the Cygwin environment, we need some additional flags.
8578echo $ac_n "checking for cygwin""... $ac_c" 1>&6
72cfdc76 8579echo "configure:8580: checking for cygwin" >&5
7a292a7a
SS
8580if eval "test \"`echo '$''{'gdb_cv_os_cygwin'+set}'`\" = set"; then
8581 echo $ac_n "(cached) $ac_c" 1>&6
8582else
8583 cat > conftest.$ac_ext <<EOF
72cfdc76 8584#line 8585 "configure"
7a292a7a
SS
8585#include "confdefs.h"
8586
8587#if defined (__CYGWIN__) || defined (__CYGWIN32__)
8588lose
8589#endif
8590EOF
8591if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8592 egrep "lose" >/dev/null 2>&1; then
8593 rm -rf conftest*
8594 gdb_cv_os_cygwin=yes
8595else
8596 rm -rf conftest*
8597 gdb_cv_os_cygwin=no
8598fi
8599rm -f conftest*
8600
8601fi
8602
8603echo "$ac_t""$gdb_cv_os_cygwin" 1>&6
8604
aff38e61
AC
8605
8606SER_HARDWIRE="ser-unix.o ser-pipe.o ser-tcp.o"
8607case ${host} in
95cbc983
AC
8608 *go32* ) SER_HARDWIRE=ser-go32.o ;;
8609 *djgpp* ) SER_HARDWIRE=ser-go32.o ;;
aff38e61
AC
8610esac
8611
8612
cd0fc7c3
SS
8613# libreadline needs libuser32.a in a cygwin environment
8614WIN32LIBS=
8615if test x$gdb_cv_os_cygwin = xyes; then
c5394b80
JM
8616 WIN32LIBS="-luser32"
8617 case "${target}" in
8618 *cygwin*) WIN32LIBS="$WIN32LIBS -limagehlp"
8619 ;;
8620 esac
cd0fc7c3 8621fi
c906108c 8622
7a292a7a 8623
3fc11d3e
JM
8624LIBGUI="../libgui/src/libgui.a"
8625GUI_CFLAGS_X="-I${srcdir}/../libgui/src"
8626
8627
7a292a7a 8628
3fc11d3e
JM
8629WIN32LDAPP=
8630
8631
8632
8633configdir="unix"
8634
8635GDBTKLIBS=
8636if test "${enable_gdbtk}" = "yes"; then
8637
d1c3b63a
KS
8638 # Gdbtk must have an absolute path to srcdir in order to run
8639 # properly when not installed.
8640 here=`pwd`
8641 cd ${srcdir}
8642 GDBTK_SRC_DIR=`pwd`
8643 cd $here
8644
3fc11d3e
JM
8645
8646#
8647# Ok, lets find the tcl configuration
8648# First, look for one uninstalled.
8649# the alternative search directory is invoked by --with-tclconfig
8650#
8651
8652if test x"${no_tcl}" = x ; then
8653 # we reset no_tcl in case something fails here
8654 no_tcl=true
8655 # Check whether --with-tclconfig or --without-tclconfig was given.
8656if test "${with_tclconfig+set}" = set; then
8657 withval="$with_tclconfig"
8658 with_tclconfig=${withval}
8659fi
8660
8661 echo $ac_n "checking for Tcl configuration""... $ac_c" 1>&6
72cfdc76 8662echo "configure:8663: checking for Tcl configuration" >&5
3fc11d3e
JM
8663 if eval "test \"`echo '$''{'ac_cv_c_tclconfig'+set}'`\" = set"; then
8664 echo $ac_n "(cached) $ac_c" 1>&6
8665else
8666
8667
8668 # First check to see if --with-tclconfig was specified.
8669 if test x"${with_tclconfig}" != x ; then
8670 if test -f "${with_tclconfig}/tclConfig.sh" ; then
8671 ac_cv_c_tclconfig=`(cd ${with_tclconfig}; pwd)`
8672 else
8673 { echo "configure: error: ${with_tclconfig} directory doesn't contain tclConfig.sh" 1>&2; exit 1; }
8674 fi
8675 fi
8676
8677 # then check for a private Tcl installation
8678 if test x"${ac_cv_c_tclconfig}" = x ; then
8679 for i in \
8680 ../tcl \
8681 `ls -dr ../tcl[7-9]* 2>/dev/null` \
8682 ../../tcl \
8683 `ls -dr ../../tcl[7-9]* 2>/dev/null` \
8684 ../../../tcl \
8685 `ls -dr ../../../tcl[7-9]* 2>/dev/null` ; do
8686 if test -f "$i/${configdir}/tclConfig.sh" ; then
8687 ac_cv_c_tclconfig=`(cd $i/${configdir}; pwd)`
8688 break
8689 fi
8690 done
8691 fi
8692 # check in a few common install locations
8693 if test x"${ac_cv_c_tclconfig}" = x ; then
8694 for i in `ls -d ${prefix}/lib /usr/local/lib 2>/dev/null` ; do
8695 if test -f "$i/tclConfig.sh" ; then
8696 ac_cv_c_tclconfig=`(cd $i; pwd)`
8697 break
8698 fi
8699 done
8700 fi
8701 # check in a few other private locations
8702 if test x"${ac_cv_c_tclconfig}" = x ; then
8703 for i in \
8704 ${srcdir}/../tcl \
8705 `ls -dr ${srcdir}/../tcl[7-9]* 2>/dev/null` ; do
8706 if test -f "$i/${configdir}/tclConfig.sh" ; then
8707 ac_cv_c_tclconfig=`(cd $i/${configdir}; pwd)`
8708 break
8709 fi
8710 done
8711 fi
8712
8713fi
8714
8715 if test x"${ac_cv_c_tclconfig}" = x ; then
8716 TCLCONFIG="# no Tcl configs found"
8717 echo "configure: warning: Can't find Tcl configuration definitions" 1>&2
8718 else
8719 no_tcl=
8720 TCLCONFIG=${ac_cv_c_tclconfig}/tclConfig.sh
8721 echo "$ac_t""found $TCLCONFIG" 1>&6
8722 fi
8723fi
8724
8725 if test -z "${no_tcl}"; then
8726
8727 . $TCLCONFIG
8728
8729
8730
8731
8732
8733
8734
8735
8736
8737
8738
8739
8740
8741
8742
8743
8744
8745
8746
8747
8748
8749
8750
8751
8752
8753
8754#
8755# Ok, lets find the tk configuration
8756# First, look for one uninstalled.
8757# the alternative search directory is invoked by --with-tkconfig
8758#
8759
8760if test x"${no_tk}" = x ; then
8761 # we reset no_tk in case something fails here
8762 no_tk=true
8763 # Check whether --with-tkconfig or --without-tkconfig was given.
8764if test "${with_tkconfig+set}" = set; then
8765 withval="$with_tkconfig"
8766 with_tkconfig=${withval}
8767fi
8768
8769 echo $ac_n "checking for Tk configuration""... $ac_c" 1>&6
72cfdc76 8770echo "configure:8771: checking for Tk configuration" >&5
3fc11d3e
JM
8771 if eval "test \"`echo '$''{'ac_cv_c_tkconfig'+set}'`\" = set"; then
8772 echo $ac_n "(cached) $ac_c" 1>&6
8773else
8774
8775
8776 # First check to see if --with-tkconfig was specified.
8777 if test x"${with_tkconfig}" != x ; then
8778 if test -f "${with_tkconfig}/tkConfig.sh" ; then
8779 ac_cv_c_tkconfig=`(cd ${with_tkconfig}; pwd)`
8780 else
8781 { echo "configure: error: ${with_tkconfig} directory doesn't contain tkConfig.sh" 1>&2; exit 1; }
8782 fi
8783 fi
8784
8785 # then check for a private Tk library
8786 if test x"${ac_cv_c_tkconfig}" = x ; then
8787 for i in \
8788 ../tk \
8789 `ls -dr ../tk[4-9]* 2>/dev/null` \
8790 ../../tk \
8791 `ls -dr ../../tk[4-9]* 2>/dev/null` \
8792 ../../../tk \
8793 `ls -dr ../../../tk[4-9]* 2>/dev/null` ; do
8794 if test -f "$i/${configdir}/tkConfig.sh" ; then
8795 ac_cv_c_tkconfig=`(cd $i/${configdir}; pwd)`
8796 break
8797 fi
8798 done
8799 fi
8800 # check in a few common install locations
8801 if test x"${ac_cv_c_tkconfig}" = x ; then
8802 for i in `ls -d ${prefix}/lib /usr/local/lib 2>/dev/null` ; do
8803 if test -f "$i/tkConfig.sh" ; then
8804 ac_cv_c_tkconfig=`(cd $i; pwd)`
8805 break
8806 fi
8807 done
8808 fi
8809 # check in a few other private locations
8810 if test x"${ac_cv_c_tkconfig}" = x ; then
8811 for i in \
8812 ${srcdir}/../tk \
8813 `ls -dr ${srcdir}/../tk[4-9]* 2>/dev/null` ; do
8814 if test -f "$i/${configdir}/tkConfig.sh" ; then
8815 ac_cv_c_tkconfig=`(cd $i/${configdir}; pwd)`
8816 break
8817 fi
8818 done
8819 fi
8820
8821fi
8822
8823 if test x"${ac_cv_c_tkconfig}" = x ; then
8824 TKCONFIG="# no Tk configs found"
8825 echo "configure: warning: Can't find Tk configuration definitions" 1>&2
8826 else
8827 no_tk=
8828 TKCONFIG=${ac_cv_c_tkconfig}/tkConfig.sh
8829 echo "$ac_t""found $TKCONFIG" 1>&6
8830 fi
8831fi
8832
8833
8834
dd2504ab
JM
8835 # now look for Tcl library stuff
8836
8837 case "${host}" in
8838 *-*-cygwin*)
8839 tcldir=../tcl/win/
8840 ;;
8841 *)
8842 tcldir=../tcl/unix/
8843 ;;
8844 esac
8845
8846 TCL_DEPS="${tcldir}${TCL_LIB_FILE}"
8847
3fc11d3e
JM
8848 # If $no_tk is nonempty, then we can't do Tk, and there is no
8849 # point to doing Tcl.
8850 if test -z "${no_tk}"; then
8851
8852 if test -f "$TKCONFIG" ; then
8853 . $TKCONFIG
8854 fi
8855
8856
8857
8858
8859
8860
8861
8862
8863
8864
8865
8866
8867
8868
8869#
8870# Ok, lets find the tcl source trees so we can use the headers
8871# Warning: transition of version 9 to 10 will break this algorithm
8872# because 10 sorts before 9. We also look for just tcl. We have to
8873# be careful that we don't match stuff like tclX by accident.
8874# the alternative search directory is involked by --with-tclinclude
8875#
8876
8877no_tcl=true
8878echo $ac_n "checking for Tcl private headers. dir=${configdir}""... $ac_c" 1>&6
72cfdc76 8879echo "configure:8880: checking for Tcl private headers. dir=${configdir}" >&5
3fc11d3e
JM
8880# Check whether --with-tclinclude or --without-tclinclude was given.
8881if test "${with_tclinclude+set}" = set; then
8882 withval="$with_tclinclude"
8883 with_tclinclude=${withval}
8884fi
8885
8886if eval "test \"`echo '$''{'ac_cv_c_tclh'+set}'`\" = set"; then
8887 echo $ac_n "(cached) $ac_c" 1>&6
8888else
8889
8890# first check to see if --with-tclinclude was specified
8891if test x"${with_tclinclude}" != x ; then
8892 if test -f ${with_tclinclude}/tclInt.h ; then
8893 ac_cv_c_tclh=`(cd ${with_tclinclude}; pwd)`
8894 elif test -f ${with_tclinclude}/generic/tclInt.h ; then
8895 ac_cv_c_tclh=`(cd ${with_tclinclude}/generic; pwd)`
8896 else
8897 { echo "configure: error: ${with_tclinclude} directory doesn't contain private headers" 1>&2; exit 1; }
8898 fi
8899fi
8900
8901# next check if it came with Tcl configuration file
8902if test x"${ac_cv_c_tclconfig}" = x ; then
8903 if test -f $ac_cv_c_tclconfig/../generic/tclInt.h ; then
8904 ac_cv_c_tclh=`(cd $ac_cv_c_tclconfig/..; pwd)`
8905 fi
8906fi
8907
8908# next check in private source directory
8909#
8910# since ls returns lowest version numbers first, reverse its output
8911if test x"${ac_cv_c_tclh}" = x ; then
8912 for i in \
8913 ${srcdir}/../tcl \
8914 `ls -dr ${srcdir}/../tcl[7-9]* 2>/dev/null` \
8915 ${srcdir}/../../tcl \
8916 `ls -dr ${srcdir}/../../tcl[7-9]* 2>/dev/null` \
8917 ${srcdir}/../../../tcl \
8918 `ls -dr ${srcdir}/../../../tcl[7-9]* 2>/dev/null ` ; do
8919 if test -f $i/generic/tclInt.h ; then
8920 ac_cv_c_tclh=`(cd $i/generic; pwd)`
8921 break
8922 fi
8923 done
8924fi
8925# finally check in a few common install locations
8926#
8927# since ls returns lowest version numbers first, reverse its output
8928if test x"${ac_cv_c_tclh}" = x ; then
8929 for i in \
8930 `ls -dr /usr/local/src/tcl[7-9]* 2>/dev/null` \
8931 `ls -dr /usr/local/lib/tcl[7-9]* 2>/dev/null` \
8932 /usr/local/src/tcl \
8933 /usr/local/lib/tcl \
8934 ${prefix}/include ; do
8935 if test -f $i/generic/tclInt.h ; then
8936 ac_cv_c_tclh=`(cd $i/generic; pwd)`
8937 break
8938 fi
8939 done
8940fi
8941# see if one is installed
8942if test x"${ac_cv_c_tclh}" = x ; then
8943 ac_safe=`echo "tclInt.h" | sed 'y%./+-%__p_%'`
8944echo $ac_n "checking for tclInt.h""... $ac_c" 1>&6
72cfdc76 8945echo "configure:8946: checking for tclInt.h" >&5
3fc11d3e
JM
8946if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
8947 echo $ac_n "(cached) $ac_c" 1>&6
8948else
8949 cat > conftest.$ac_ext <<EOF
72cfdc76 8950#line 8951 "configure"
3fc11d3e
JM
8951#include "confdefs.h"
8952#include <tclInt.h>
8953EOF
8954ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
72cfdc76 8955{ (eval echo configure:8956: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3fc11d3e
JM
8956ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8957if test -z "$ac_err"; then
8958 rm -rf conftest*
8959 eval "ac_cv_header_$ac_safe=yes"
8960else
8961 echo "$ac_err" >&5
8962 echo "configure: failed program was:" >&5
8963 cat conftest.$ac_ext >&5
8964 rm -rf conftest*
8965 eval "ac_cv_header_$ac_safe=no"
8966fi
8967rm -f conftest*
8968fi
8969if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8970 echo "$ac_t""yes" 1>&6
8971 ac_cv_c_tclh=installed
8972else
8973 echo "$ac_t""no" 1>&6
8974ac_cv_c_tclh=""
8975fi
8976
8977fi
8978
8979fi
8980
8981if test x"${ac_cv_c_tclh}" = x ; then
8982 TCLHDIR="# no Tcl private headers found"
8983 { echo "configure: error: Can't find Tcl private headers" 1>&2; exit 1; }
8984fi
8985if test x"${ac_cv_c_tclh}" != x ; then
8986 no_tcl=""
8987 if test x"${ac_cv_c_tclh}" = x"installed" ; then
8988 echo "$ac_t""is installed" 1>&6
8989 TCLHDIR=""
8990 else
8991 echo "$ac_t""found in ${ac_cv_c_tclh}" 1>&6
8992 # this hack is cause the TCLHDIR won't print if there is a "-I" in it.
8993 TCLHDIR="-I${ac_cv_c_tclh}"
8994 fi
8995fi
8996
8997
8998
8999
9000#
9001# Ok, lets find the tk source trees so we can use the headers
9002# If the directory (presumably symlink) named "tk" exists, use that one
9003# in preference to any others. Same logic is used when choosing library
9004# and again with Tcl. The search order is the best place to look first, then in
9005# decreasing significance. The loop breaks if the trigger file is found.
9006# Note the gross little conversion here of srcdir by cd'ing to the found
9007# directory. This converts the path from a relative to an absolute, so
9008# recursive cache variables for the path will work right. We check all
9009# the possible paths in one loop rather than many seperate loops to speed
9010# things up.
9011# the alternative search directory is involked by --with-tkinclude
9012#
9013no_tk=true
9014echo $ac_n "checking for Tk private headers""... $ac_c" 1>&6
72cfdc76 9015echo "configure:9016: checking for Tk private headers" >&5
3fc11d3e
JM
9016# Check whether --with-tkinclude or --without-tkinclude was given.
9017if test "${with_tkinclude+set}" = set; then
9018 withval="$with_tkinclude"
9019 with_tkinclude=${withval}
9020fi
9021
9022if eval "test \"`echo '$''{'ac_cv_c_tkh'+set}'`\" = set"; then
9023 echo $ac_n "(cached) $ac_c" 1>&6
9024else
9025
9026# first check to see if --with-tkinclude was specified
9027if test x"${with_tkinclude}" != x ; then
9028 if test -f ${with_tkinclude}/tk.h ; then
9029 ac_cv_c_tkh=`(cd ${with_tkinclude}; pwd)`
9030 elif test -f ${with_tkinclude}/generic/tk.h ; then
9031 ac_cv_c_tkh=`(cd ${with_tkinclude}/generic; pwd)`
9032 else
9033 { echo "configure: error: ${with_tkinclude} directory doesn't contain private headers" 1>&2; exit 1; }
9034 fi
9035fi
9036
9037# next check if it came with Tk configuration file
9038if test x"${ac_cv_c_tkconfig}" = x ; then
9039 if test -f $ac_cv_c_tkconfig/../generic/tk.h ; then
9040 ac_cv_c_tkh=`(cd $ac_cv_c_tkconfig/..; pwd)`
9041 fi
9042fi
9043
9044# next check in private source directory
9045#
9046# since ls returns lowest version numbers first, reverse its output
9047if test x"${ac_cv_c_tkh}" = x ; then
9048 for i in \
9049 ${srcdir}/../tk \
9050 `ls -dr ${srcdir}/../tk[4-9]* 2>/dev/null` \
9051 ${srcdir}/../../tk \
9052 `ls -dr ${srcdir}/../../tk[4-9]* 2>/dev/null` \
9053 ${srcdir}/../../../tk \
9054 `ls -dr ${srcdir}/../../../tk[4-9]* 2>/dev/null ` ; do
9055 if test -f $i/generic/tk.h ; then
9056 ac_cv_c_tkh=`(cd $i/generic; pwd)`
9057 break
9058 fi
9059 done
9060fi
9061# finally check in a few common install locations
9062#
9063# since ls returns lowest version numbers first, reverse its output
9064if test x"${ac_cv_c_tkh}" = x ; then
9065 for i in \
9066 `ls -dr /usr/local/src/tk[4-9]* 2>/dev/null` \
9067 `ls -dr /usr/local/lib/tk[4-9]* 2>/dev/null` \
9068 /usr/local/src/tk \
9069 /usr/local/lib/tk \
9070 ${prefix}/include ; do
9071 if test -f $i/generic/tk.h ; then
9072 ac_cv_c_tkh=`(cd $i/generic; pwd)`
9073 break
9074 fi
9075 done
9076fi
9077# see if one is installed
9078if test x"${ac_cv_c_tkh}" = x ; then
9079 ac_safe=`echo "tk.h" | sed 'y%./+-%__p_%'`
9080echo $ac_n "checking for tk.h""... $ac_c" 1>&6
72cfdc76 9081echo "configure:9082: checking for tk.h" >&5
3fc11d3e
JM
9082if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
9083 echo $ac_n "(cached) $ac_c" 1>&6
9084else
9085 cat > conftest.$ac_ext <<EOF
72cfdc76 9086#line 9087 "configure"
3fc11d3e
JM
9087#include "confdefs.h"
9088#include <tk.h>
9089EOF
9090ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
72cfdc76 9091{ (eval echo configure:9092: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3fc11d3e
JM
9092ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9093if test -z "$ac_err"; then
9094 rm -rf conftest*
9095 eval "ac_cv_header_$ac_safe=yes"
9096else
9097 echo "$ac_err" >&5
9098 echo "configure: failed program was:" >&5
9099 cat conftest.$ac_ext >&5
9100 rm -rf conftest*
9101 eval "ac_cv_header_$ac_safe=no"
9102fi
9103rm -f conftest*
9104fi
9105if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9106 echo "$ac_t""yes" 1>&6
9107 ac_cv_c_tkh=installed
9108else
9109 echo "$ac_t""no" 1>&6
9110ac_cv_c_tkh=""
9111fi
9112
9113fi
9114
9115fi
9116
9117if test x"${ac_cv_c_tkh}" != x ; then
9118 no_tk=""
9119 if test x"${ac_cv_c_tkh}" = x"installed" ; then
9120 echo "$ac_t""is installed" 1>&6
9121 TKHDIR=""
9122 else
9123 echo "$ac_t""found in ${ac_cv_c_tkh}" 1>&6
9124 # this hack is cause the TKHDIR won't print if there is a "-I" in it.
9125 TKHDIR="-I${ac_cv_c_tkh}"
9126 fi
9127else
9128 TKHDIR="# no Tk directory found"
9129 echo "configure: warning: Can't find Tk private headers" 1>&2
9130 no_tk=true
9131fi
9132
9133
9134
9135
9136echo $ac_n "checking for Itcl private headers. srcdir=${srcdir}""... $ac_c" 1>&6
72cfdc76 9137echo "configure:9138: checking for Itcl private headers. srcdir=${srcdir}" >&5
3fc11d3e
JM
9138if test x"${ac_cv_c_itclh}" = x ; then
9139 for i in ${srcdir}/../itcl ${srcdir}/../../itcl ${srcdir}/../../../itcl ${srcdir}/../itcl/itcl; do
9140 if test -f $i/generic/itcl.h ; then
9141 ac_cv_c_itclh=`(cd $i/generic; pwd)`
9142 break
9143 fi
9144 done
9145fi
9146if test x"${ac_cv_c_itclh}" = x ; then
9147 ITCLHDIR="# no Itcl private headers found"
9148 { echo "configure: error: Can't find Itcl private headers" 1>&2; exit 1; }
9149fi
9150if test x"${ac_cv_c_itclh}" != x ; then
9151 ITCLHDIR="-I${ac_cv_c_itclh}"
9152fi
9153# should always be here
9154# ITCLLIB="../itcl/itcl/unix/libitcl.a"
9155
9156#AC_SUBST(ITCLLIB)
9157
9158
9159echo $ac_n "checking for Itk private headers. srcdir=${srcdir}""... $ac_c" 1>&6
72cfdc76 9160echo "configure:9161: checking for Itk private headers. srcdir=${srcdir}" >&5
3fc11d3e
JM
9161if test x"${ac_cv_c_itkh}" = x ; then
9162 for i in ${srcdir}/../itcl ${srcdir}/../../itcl ${srcdir}/../../../itcl ${srcdir}/../itcl/itk; do
9163 if test -f $i/generic/itk.h ; then
9164 ac_cv_c_itkh=`(cd $i/generic; pwd)`
9165 break
9166 fi
9167 done
9168fi
9169if test x"${ac_cv_c_itkh}" = x ; then
9170 ITKHDIR="# no Itk private headers found"
9171 { echo "configure: error: Can't find Itk private headers" 1>&2; exit 1; }
9172fi
9173if test x"${ac_cv_c_itkh}" != x ; then
9174 ITKHDIR="-I${ac_cv_c_itkh}"
9175fi
9176# should always be here
9177# ITKLIB="../itcl/itk/unix/libitk.a"
9178
9179#AC_SUBST(ITKLIB)
9180
3fc11d3e 9181
dd2504ab
JM
9182
9183 # now look for Tk library stuff
9184
9185 case "${host}" in
9186 *-*-cygwin*)
9187 tkdir=../tk/win/
9188 ;;
9189 *)
9190 tkdir=../tk/unix/
9191 ;;
9192 esac
9193
9194 TK_DEPS="${tkdir}${TK_LIB_FILE}"
9195
3fc11d3e
JM
9196 # now look for Itcl library stuff
9197
9198
9199#
9200# Ok, lets find the itcl configuration
9201# First, look for one uninstalled.
9202# the alternative search directory is invoked by --with-itclconfig
9203#
9204
9205if test x"${no_itcl}" = x ; then
9206 # we reset no_itcl in case something fails here
9207 no_itcl=true
9208 # Check whether --with-itclconfig or --without-itclconfig was given.
9209if test "${with_itclconfig+set}" = set; then
9210 withval="$with_itclconfig"
9211 with_itclconfig=${withval}
9212fi
9213
9214 echo $ac_n "checking for Itcl configuration""... $ac_c" 1>&6
72cfdc76 9215echo "configure:9216: checking for Itcl configuration" >&5
3fc11d3e
JM
9216 if eval "test \"`echo '$''{'ac_cv_c_itclconfig'+set}'`\" = set"; then
9217 echo $ac_n "(cached) $ac_c" 1>&6
9218else
9219
9220
9221 # First check to see if --with-itclconfig was specified.
9222 if test x"${with_itclconfig}" != x ; then
9223 if test -f "${with_itclconfig}/itclConfig.sh" ; then
9224 ac_cv_c_itclconfig=`(cd ${with_itclconfig}; pwd)`
9225 else
9226 { echo "configure: error: ${with_itclconfig} directory doesn't contain itclConfig.sh" 1>&2; exit 1; }
9227 fi
9228 fi
9229
9230 # then check for a private Itcl library
9231 if test x"${ac_cv_c_itclconfig}" = x ; then
9232 for i in \
9233 ../itcl/itcl \
9234 `ls -dr ../itcl[4-9]*/itcl 2>/dev/null` \
9235 ../../itcl \
9236 `ls -dr ../../itcl[4-9]*/itcl 2>/dev/null` \
9237 ../../../itcl \
9238 `ls -dr ../../../itcl[4-9]*/itcl 2>/dev/null` ; do
9239 if test -f "$i/itclConfig.sh" ; then
9240 ac_cv_c_itclconfig=`(cd $i; pwd)`
9241 break
9242 fi
9243 done
9244 fi
9245 # check in a few common install locations
9246 if test x"${ac_cv_c_itclconfig}" = x ; then
9247 for i in `ls -d ${prefix}/lib /usr/local/lib 2>/dev/null` ; do
9248 if test -f "$i/itclConfig.sh" ; then
9249 ac_cv_c_itclconfig=`(cd $i; pwd)`
9250 break
9251 fi
9252 done
9253 fi
9254 # check in a few other private locations
9255 if test x"${ac_cv_c_itclconfig}" = x ; then
9256 for i in \
9257 ${srcdir}/../itcl/itcl \
9258 `ls -dr ${srcdir}/../itcl[4-9]*/itcl 2>/dev/null` ; do
9259 if test -f "$i/itclConfig.sh" ; then
9260 ac_cv_c_itclconfig=`(cd $i; pwd)`
9261 break
9262 fi
9263 done
9264 fi
9265
9266fi
9267
9268 if test x"${ac_cv_c_itclconfig}" = x ; then
9269 ITCLCONFIG="# no Itcl configs found"
9270 echo "configure: warning: Can't find Itcl configuration definitions" 1>&2
9271 else
9272 no_itcl=
9273 ITCLCONFIG=${ac_cv_c_itclconfig}/itclConfig.sh
9274 echo "$ac_t""found $ITCLCONFIG" 1>&6
9275 fi
9276fi
9277
9278 if test -z "${no_itcl}"; then
9279
9280 if test -f "$ITCLCONFIG" ; then
9281 . $ITCLCONFIG
9282 fi
9283
9284
9285
9286
9287
9288
9289
9290
9291
9292
3fc11d3e
JM
9293
9294
9295 ITCLLIB="${ITCL_BUILD_LIB_SPEC}"
b381d62d 9296 ITCL_DEPS="${ITCL_LIB_FULL_PATH}"
3fc11d3e
JM
9297 fi
9298
9299
9300 # now look for Itk library stuff
9301
9302#
9303# Ok, lets find the itk configuration
9304# First, look for one uninstalled.
9305# the alternative search directory is invoked by --with-itkconfig
9306#
9307
9308if test x"${no_itk}" = x ; then
9309 # we reset no_itk in case something fails here
9310 no_itk=true
9311 # Check whether --with-itkconfig or --without-itkconfig was given.
9312if test "${with_itkconfig+set}" = set; then
9313 withval="$with_itkconfig"
9314 with_itkconfig=${withval}
9315fi
9316
9317 echo $ac_n "checking for Itk configuration""... $ac_c" 1>&6
72cfdc76 9318echo "configure:9319: checking for Itk configuration" >&5
3fc11d3e
JM
9319 if eval "test \"`echo '$''{'ac_cv_c_itkconfig'+set}'`\" = set"; then
9320 echo $ac_n "(cached) $ac_c" 1>&6
9321else
9322
9323
9324 # First check to see if --with-itkconfig was specified.
9325 if test x"${with_itkconfig}" != x ; then
9326 if test -f "${with_itkconfig}/itkConfig.sh" ; then
9327 ac_cv_c_itkconfig=`(cd ${with_itkconfig}; pwd)`
9328 else
9329 { echo "configure: error: ${with_itkconfig} directory doesn't contain itkConfig.sh" 1>&2; exit 1; }
9330 fi
9331 fi
9332
9333 # then check for a private Itk library
9334 if test x"${ac_cv_c_itkconfig}" = x ; then
9335 for i in \
9336 ../itcl/itk \
9337 `ls -dr ../itcl[4-9]*/itk 2>/dev/null` \
9338 ../../itk \
9339 `ls -dr ../../itcl[4-9]*/itk 2>/dev/null` \
9340 ../../../itk \
9341 `ls -dr ../../../itcl[4-9]*/itk 2>/dev/null` ; do
9342 if test -f "$i/itkConfig.sh" ; then
9343 ac_cv_c_itkconfig=`(cd $i; pwd)`
9344 break
9345 fi
9346 done
9347 fi
9348 # check in a few common install locations
9349 if test x"${ac_cv_c_itkconfig}" = x ; then
9350 for i in `ls -d ${prefix}/lib /usr/local/lib 2>/dev/null` ; do
9351 if test -f "$i/itkConfig.sh" ; then
9352 ac_cv_c_itkconfig=`(cd $i; pwd)`
9353 break
9354 fi
9355 done
9356 fi
9357 # check in a few other private locations
9358 if test x"${ac_cv_c_itkconfig}" = x ; then
9359 for i in \
9360 ${srcdir}/../itcl/itk \
9361 `ls -dr ${srcdir}/../itcl[4-9]*/itk 2>/dev/null` ; do
9362 if test -f "$i/itkConfig.sh" ; then
9363 ac_cv_c_itkconfig=`(cd $i; pwd)`
9364 break
9365 fi
9366 done
9367 fi
9368
9369fi
9370
9371 if test x"${ac_cv_c_itkconfig}" = x ; then
9372 ITKCONFIG="# no Itk configs found"
9373 echo "configure: warning: Can't find Itk configuration definitions" 1>&2
9374 else
9375 no_itk=
9376 ITKCONFIG=${ac_cv_c_itkconfig}/itkConfig.sh
9377 echo "$ac_t""found $ITKCONFIG" 1>&6
9378 fi
9379fi
9380
9381
9382 if test -z "${no_itcl}"; then
9383
9384 if test -f "$ITKCONFIG" ; then
9385 . $ITKCONFIG
9386 fi
9387
9388
9389
9390
9391
9392
9393
9394
9395
9396
9397
9398
3fc11d3e 9399 ITKLIB="${ITK_BUILD_LIB_SPEC}"
b381d62d 9400 ITK_DEPS="${ITK_LIB_FULL_PATH}"
3fc11d3e
JM
9401 fi
9402
4226a5a5 9403 ENABLE_CFLAGS="${ENABLE_CFLAGS} \$(SUBDIR_GDBTK_CFLAGS)"
3fc11d3e
JM
9404 # Tcl/Tk 8.1 require -fwritable strings. I don't
9405 # know whether 8.2 will or not, but I bet it will.
9406 # I don't have to worry about 7.x since we don't support it.
9407 GDBTK_CFLAGS=""
9408 if test "$GCC" = "yes"; then
9409 if test "$TCL_VERSION" != "8.0" ; then
9410 GDBTK_CFLAGS="-fwritable-strings"
9411 fi
9412 fi
9413
9414 # Include some libraries that Tcl and Tk want.
b2a1bd4f 9415 TCL_LIBS='$(LIBGUI) $(ITCL) $(ITK) $(TK) $(TCL) $(X11_LDFLAGS) $(X11_LIBS)'
3fc11d3e
JM
9416 # Yes, the ordering seems wrong here. But it isn't.
9417 # TK_LIBS is the list of libraries that need to be linked
9418 # after Tcl/Tk. Note that this isn't put into LIBS. If it
9419 # were in LIBS then any link tests after this point would
9420 # try to include things like `$(LIBGUI)', which wouldn't work.
9421 GDBTKLIBS="${TCL_LIBS} ${TK_LIBS}"
4226a5a5
FN
9422
9423 CONFIG_OBS="${CONFIG_OBS} \$(SUBDIR_GDBTK_OBS)"
9424 CONFIG_DEPS="${CONFIG_DEPS} \$(SUBDIR_GDBTK_DEPS)"
9425 CONFIG_SRCS="${CONFIG_SRCS} \$(SUBDIR_GDBTK_SRCS)"
9426 CONFIG_INITS="${CONFIG_INITS} \$(SUBDIR_GDBTK_INITS)"
b3a90332 9427 CONFIG_ALL="${CONFIG_ALL} \$(SUBDIR_GDBTK_ALL)"
ce844ae2 9428 CONFIG_CLEAN="${CONFIG_CLEAN} \$(SUBDIR_GDBTK_CLEAN)"
e56ac5c3
AC
9429 CONFIG_INSTALL="${CONFIG_INSTALL} \$(SUBDIR_GDBTK_INSTALL)"
9430 CONFIG_UNINSTALL="${CONFIG_UNINSTALL} \$(SUBDIR_GDBTK_UNINSTALL)"
3fc11d3e
JM
9431
9432 if test x$gdb_cv_os_cygwin = xyes; then
9433 WIN32LIBS="${WIN32LIBS} -lshell32 -lgdi32 -lcomdlg32 -ladvapi32"
9434 WIN32LDAPP="-Wl,--subsystem,console"
9435 CONFIG_OBS="${CONFIG_OBS} gdbres.o"
9436 fi
9437 fi
9438 fi
ffc6a242 9439
ffc6a242 9440 configdirs="${configdirs} gdbtk"
3fc11d3e
JM
9441fi
9442
9443
9444
9445
9446
9447
9448
9449
9450
9451
9452
9453
9454
dd2504ab 9455
c906108c
SS
9456# If we find X, set shell vars x_includes and x_libraries to the
9457# paths, otherwise set no_x=yes.
9458# Uses ac_ vars as temps to allow command line to override cache and checks.
9459# --without-x overrides everything else, but does not touch the cache.
9460echo $ac_n "checking for X""... $ac_c" 1>&6
72cfdc76 9461echo "configure:9462: checking for X" >&5
c906108c
SS
9462
9463# Check whether --with-x or --without-x was given.
9464if test "${with_x+set}" = set; then
9465 withval="$with_x"
9466 :
9467fi
9468
9469# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
9470if test "x$with_x" = xno; then
9471 # The user explicitly disabled X.
9472 have_x=disabled
9473else
9474 if test "x$x_includes" != xNONE && test "x$x_libraries" != xNONE; then
9475 # Both variables are already set.
9476 have_x=yes
9477 else
9478if eval "test \"`echo '$''{'ac_cv_have_x'+set}'`\" = set"; then
9479 echo $ac_n "(cached) $ac_c" 1>&6
9480else
9481 # One or both of the vars are not set, and there is no cached value.
9482ac_x_includes=NO ac_x_libraries=NO
9483rm -fr conftestdir
9484if mkdir conftestdir; then
9485 cd conftestdir
9486 # Make sure to not put "make" in the Imakefile rules, since we grep it out.
9487 cat > Imakefile <<'EOF'
9488acfindx:
9489 @echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"'
9490EOF
9491 if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
9492 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
9493 eval `${MAKE-make} acfindx 2>/dev/null | grep -v make`
9494 # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
9495 for ac_extension in a so sl; do
9496 if test ! -f $ac_im_usrlibdir/libX11.$ac_extension &&
9497 test -f $ac_im_libdir/libX11.$ac_extension; then
9498 ac_im_usrlibdir=$ac_im_libdir; break
9499 fi
9500 done
9501 # Screen out bogus values from the imake configuration. They are
9502 # bogus both because they are the default anyway, and because
9503 # using them would break gcc on systems where it needs fixed includes.
9504 case "$ac_im_incroot" in
9505 /usr/include) ;;
9506 *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes="$ac_im_incroot" ;;
9507 esac
9508 case "$ac_im_usrlibdir" in
9509 /usr/lib | /lib) ;;
9510 *) test -d "$ac_im_usrlibdir" && ac_x_libraries="$ac_im_usrlibdir" ;;
9511 esac
9512 fi
9513 cd ..
9514 rm -fr conftestdir
9515fi
9516
9517if test "$ac_x_includes" = NO; then
9518 # Guess where to find include files, by looking for this one X11 .h file.
9519 test -z "$x_direct_test_include" && x_direct_test_include=X11/Intrinsic.h
9520
9521 # First, try using that file with no special directory specified.
9522cat > conftest.$ac_ext <<EOF
72cfdc76 9523#line 9524 "configure"
c906108c
SS
9524#include "confdefs.h"
9525#include <$x_direct_test_include>
9526EOF
9527ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
72cfdc76 9528{ (eval echo configure:9529: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
c906108c
SS
9529ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9530if test -z "$ac_err"; then
9531 rm -rf conftest*
9532 # We can compile using X headers with no special include directory.
9533ac_x_includes=
9534else
9535 echo "$ac_err" >&5
9536 echo "configure: failed program was:" >&5
9537 cat conftest.$ac_ext >&5
9538 rm -rf conftest*
9539 # Look for the header file in a standard set of common directories.
9540# Check X11 before X11Rn because it is often a symlink to the current release.
9541 for ac_dir in \
9542 /usr/X11/include \
9543 /usr/X11R6/include \
9544 /usr/X11R5/include \
9545 /usr/X11R4/include \
9546 \
9547 /usr/include/X11 \
9548 /usr/include/X11R6 \
9549 /usr/include/X11R5 \
9550 /usr/include/X11R4 \
9551 \
9552 /usr/local/X11/include \
9553 /usr/local/X11R6/include \
9554 /usr/local/X11R5/include \
9555 /usr/local/X11R4/include \
9556 \
9557 /usr/local/include/X11 \
9558 /usr/local/include/X11R6 \
9559 /usr/local/include/X11R5 \
9560 /usr/local/include/X11R4 \
9561 \
9562 /usr/X386/include \
9563 /usr/x386/include \
9564 /usr/XFree86/include/X11 \
9565 \
9566 /usr/include \
9567 /usr/local/include \
9568 /usr/unsupported/include \
9569 /usr/athena/include \
9570 /usr/local/x11r5/include \
9571 /usr/lpp/Xamples/include \
9572 \
9573 /usr/openwin/include \
9574 /usr/openwin/share/include \
9575 ; \
9576 do
9577 if test -r "$ac_dir/$x_direct_test_include"; then
9578 ac_x_includes=$ac_dir
9579 break
9580 fi
9581 done
9582fi
9583rm -f conftest*
9584fi # $ac_x_includes = NO
9585
9586if test "$ac_x_libraries" = NO; then
9587 # Check for the libraries.
9588
9589 test -z "$x_direct_test_library" && x_direct_test_library=Xt
9590 test -z "$x_direct_test_function" && x_direct_test_function=XtMalloc
9591
9592 # See if we find them without any special options.
9593 # Don't add to $LIBS permanently.
9594 ac_save_LIBS="$LIBS"
9595 LIBS="-l$x_direct_test_library $LIBS"
9596cat > conftest.$ac_ext <<EOF
72cfdc76 9597#line 9598 "configure"
c906108c
SS
9598#include "confdefs.h"
9599
9600int main() {
9601${x_direct_test_function}()
9602; return 0; }
9603EOF
72cfdc76 9604if { (eval echo configure:9605: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c
SS
9605 rm -rf conftest*
9606 LIBS="$ac_save_LIBS"
9607# We can link X programs with no special library path.
9608ac_x_libraries=
9609else
9610 echo "configure: failed program was:" >&5
9611 cat conftest.$ac_ext >&5
9612 rm -rf conftest*
9613 LIBS="$ac_save_LIBS"
9614# First see if replacing the include by lib works.
9615# Check X11 before X11Rn because it is often a symlink to the current release.
9616for ac_dir in `echo "$ac_x_includes" | sed s/include/lib/` \
9617 /usr/X11/lib \
9618 /usr/X11R6/lib \
9619 /usr/X11R5/lib \
9620 /usr/X11R4/lib \
9621 \
9622 /usr/lib/X11 \
9623 /usr/lib/X11R6 \
9624 /usr/lib/X11R5 \
9625 /usr/lib/X11R4 \
9626 \
9627 /usr/local/X11/lib \
9628 /usr/local/X11R6/lib \
9629 /usr/local/X11R5/lib \
9630 /usr/local/X11R4/lib \
9631 \
9632 /usr/local/lib/X11 \
9633 /usr/local/lib/X11R6 \
9634 /usr/local/lib/X11R5 \
9635 /usr/local/lib/X11R4 \
9636 \
9637 /usr/X386/lib \
9638 /usr/x386/lib \
9639 /usr/XFree86/lib/X11 \
9640 \
9641 /usr/lib \
9642 /usr/local/lib \
9643 /usr/unsupported/lib \
9644 /usr/athena/lib \
9645 /usr/local/x11r5/lib \
9646 /usr/lpp/Xamples/lib \
9647 /lib/usr/lib/X11 \
9648 \
9649 /usr/openwin/lib \
9650 /usr/openwin/share/lib \
9651 ; \
9652do
9653 for ac_extension in a so sl; do
9654 if test -r $ac_dir/lib${x_direct_test_library}.$ac_extension; then
9655 ac_x_libraries=$ac_dir
9656 break 2
9657 fi
9658 done
9659done
9660fi
9661rm -f conftest*
9662fi # $ac_x_libraries = NO
9663
9664if test "$ac_x_includes" = NO || test "$ac_x_libraries" = NO; then
9665 # Didn't find X anywhere. Cache the known absence of X.
9666 ac_cv_have_x="have_x=no"
9667else
9668 # Record where we found X for the cache.
9669 ac_cv_have_x="have_x=yes \
9670 ac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries"
9671fi
9672fi
9673 fi
9674 eval "$ac_cv_have_x"
9675fi # $with_x != no
9676
9677if test "$have_x" != yes; then
9678 echo "$ac_t""$have_x" 1>&6
9679 no_x=yes
9680else
9681 # If each of the values was on the command line, it overrides each guess.
9682 test "x$x_includes" = xNONE && x_includes=$ac_x_includes
9683 test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
9684 # Update the cache value to reflect the command line values.
9685 ac_cv_have_x="have_x=yes \
9686 ac_x_includes=$x_includes ac_x_libraries=$x_libraries"
9687 echo "$ac_t""libraries $x_libraries, headers $x_includes" 1>&6
9688fi
9689
9690
7a292a7a
SS
9691
9692# Unlike the sim directory, whether a simulator is linked is controlled by
9693# presence of a SIM= and a SIM_OBS= definition in the target '.mt' file.
9694# This code just checks for a few cases where we'd like to ignore those
9695# definitions, even when they're present in the '.mt' file. These cases
9696# are when --disable-sim is specified, or if the simulator directory is
6c5cfe5b 9697# not part of the source tree.
7a292a7a
SS
9698#
9699# Check whether --enable-sim or --disable-sim was given.
9700if test "${enable_sim+set}" = set; then
9701 enableval="$enable_sim"
9702 echo "enable_sim = $enable_sim";
9703 echo "enableval = ${enableval}";
9704 case "${enableval}" in
9705 yes) ignore_sim=false ;;
9706 no) ignore_sim=true ;;
9707 *) ignore_sim=false ;;
9708 esac
9709else
9710 ignore_sim=false
9711fi
9712
9713
9714if test ! -d "${srcdir}/../sim"; then
9715 ignore_sim=true
9716fi
9717
9718if test "${ignore_sim}" = "true"; then
9719 IGNORE_SIM="SIM="
9720 IGNORE_SIM_OBS="SIM_OBS="
9721else
9722 IGNORE_SIM=""
9723 IGNORE_SIM_OBS=""
9724 cat >> confdefs.h <<\EOF
9725#define WITH_SIM 1
9726EOF
9727
9728fi
9729
9730
9731
c906108c
SS
9732
9733
9734
9735
9736
9737
dfcd3bfb 9738
e56ac5c3
AC
9739
9740
b3a90332
AC
9741
9742
b46cd165 9743
c906108c
SS
9744# target_subdir is used by the testsuite to find the target libraries.
9745target_subdir=
9746if test "${host}" != "${target}"; then
9747 target_subdir="${target_alias}/"
9748fi
9749
9750
9751frags=
9752host_makefile_frag=${srcdir}/config/${gdb_host_cpu}/${gdb_host}.mh
9753if test ! -f ${host_makefile_frag}; then
7fd60527
AC
9754 # When building a native debuger the .mh file containing things
9755 # like NATDEPFILES is needed. Cross debuggers don't need .mh
9756 # since it no longer contains anything useful.
9757 if test "${target}" = "${host}"; then
9758 { echo "configure: error: "*** Gdb does not support native target ${host}"" 1>&2; exit 1; }
9759 else
9760 host_makefile_frag=/dev/null
9761 fi
c906108c
SS
9762fi
9763frags="$frags $host_makefile_frag"
9764
9765target_makefile_frag=${srcdir}/config/${gdb_target_cpu}/${gdb_target}.mt
9766if test ! -f ${target_makefile_frag}; then
9767{ echo "configure: error: "*** Gdb does not support target ${target}"" 1>&2; exit 1; }
9768fi
9769frags="$frags $target_makefile_frag"
9770
9771
9772
9773
9774
9775hostfile=`sed -n '
9776s/XM_FILE[ ]*=[ ]*\([^ ]*\)/\1/p
9777' ${host_makefile_frag}`
9778
9779targetfile=`sed -n '
9780s/TM_FILE[ ]*=[ ]*\([^ ]*\)/\1/p
9781' ${target_makefile_frag}`
9782
6166d547
AC
9783GDB_MULTI_ARCH=`sed -n '
9784s/GDB_MULTI_ARCH[ ]*=[ ]*\([^ ]*\)[ ]*/\1/p
9785' ${target_makefile_frag}`
9786
c906108c 9787if test "${target}" = "${host}"; then
a85f51e7
DJ
9788# We pick this up from the host configuration file (.mh) because we
9789# do not have a native configuration Makefile fragment.
c906108c
SS
9790nativefile=`sed -n '
9791s/NAT_FILE[ ]*=[ ]*\([^ ]*\)/\1/p
9792' ${host_makefile_frag}`
c906108c
SS
9793fi
9794
9795
6166d547
AC
9796# New targets should just set gdb_multi_arch=yes in configure.tgt.
9797# Old targets being converted can either do that or set GDB_MULTI_ARCH
9798# in the target specific makefile frag. Eventually gdb_multi_arch=yes
9799# will be the default.
9800if test x"${GDB_MULTI_ARCH}" = x ; then
9801 case "${gdb_multi_arch}" in
9802 yes ) GDB_MULTI_ARCH=GDB_MULTI_ARCH_PURE ;;
9803 no ) GDB_MULTI_ARCH=0 ;;
9804 0|1|2 ) GDB_MULTI_ARCH=${gdb_multi_arch} ;;
9805 esac
9806fi
9807if test x"${GDB_MULTI_ARCH}" != x ; then
9808 cat >> confdefs.h <<EOF
9809#define GDB_MULTI_ARCH ${GDB_MULTI_ARCH}
9810EOF
9811
9812fi
6c5cfe5b 9813# Warn the user when they use an old practice
6166d547
AC
9814case "${GDB_MULTI_ARCH}" in
9815 "" ) ;;
9816 0 | GDB_MULTI_ARCH_PARTIAL | 1 | GDB_MULTI_ARCH_TM | 2 )
9817 echo "configure: warning: "GDB: Target is not pure multi-arch"" 1>&2 ;;
9818 GDB_MULTI_ARCH_PURE )
9819 if test x"${targetfile}" != x ; then
6c5cfe5b 9820 echo "configure: warning: "GDB: Ignoring TM_FILE in ${target_makefile_frag}"" 1>&2
5a2402b8 9821 targetfile=""
6166d547
AC
9822 fi ;;
9823 *) { echo "configure: error: "GDB: Unknown GDB_MULTI_ARCH value ${GDB_MULTI_ARCH}"" 1>&2; exit 1; };;
9824esac
9825
b00a8037
DJ
9826if test x"${gdb_osabi}" != x ; then
9827 cat >> confdefs.h <<EOF
9828#define GDB_OSABI_DEFAULT $gdb_osabi
9829EOF
9830
9831fi
9832
8dcde887
MK
9833# Enable multi-ice-gdb-server.
9834# Check whether --enable-multi-ice or --disable-multi-ice was given.
9835if test "${enable_multi_ice+set}" = set; then
9836 enableval="$enable_multi_ice"
9837 case $enableval in
9838 yes | no)
9839 ;;
9840 *) { echo "configure: error: bad value $enableval for --enable-multi-ice" 1>&2; exit 1; } ;;
9841 esac
96baa820
JM
9842fi
9843
8dcde887
MK
9844if test "x$enable_multi_ice" = xyes; then
9845 configdirs="$configdirs multi-ice"
a85f51e7
DJ
9846fi
9847
8dcde887
MK
9848# We only build gdbserver automatically if host and target are the same.
9849if test "x$target" = "x$host"; then
9850 echo $ac_n "checking whether gdbserver is supported on this host""... $ac_c" 1>&6
b00a8037 9851echo "configure:9852: checking whether gdbserver is supported on this host" >&5
8dcde887
MK
9852 if test "x$build_gdbserver" = xyes; then
9853 configdirs="$configdirs gdbserver"
9854 echo "$ac_t""yes" 1>&6
9855 else
9856 echo "$ac_t""no" 1>&6
9857 fi
9858fi
9859
9860subdirs="doc testsuite $configdirs"
9861
96baa820 9862
c906108c 9863# If hostfile (XM_FILE) and/or targetfile (TM_FILE) and/or nativefile
5a2402b8
AC
9864# (NAT_FILE) is not set in config/*/*.m[ht] files, we link to an empty
9865# version.
c906108c
SS
9866
9867files=
9868links=
5a2402b8 9869
c906108c 9870rm -f xm.h
5a2402b8 9871xm_h=""
c906108c 9872if test "${hostfile}" != ""; then
5a2402b8
AC
9873 xm_h=xm.h
9874 GDB_XM_FILE="config/${gdb_host_cpu}/${hostfile}"
9875 files="${files} ${GDB_XM_FILE}"
9876 links="${links} xm.h"
9877 cat >> confdefs.h <<EOF
9878#define GDB_XM_FILE ${GDB_XM_FILE}
9879EOF
9880
c906108c 9881fi
5a2402b8
AC
9882
9883
c906108c 9884rm -f tm.h
5a2402b8 9885tm_h=""
c906108c 9886if test "${targetfile}" != ""; then
5a2402b8
AC
9887 tm_h=tm.h
9888 GDB_TM_FILE="config/${gdb_target_cpu}/${targetfile}"
9889 files="${files} ${GDB_TM_FILE}"
9890 links="${links} tm.h"
9891 cat >> confdefs.h <<EOF
9892#define GDB_TM_FILE ${GDB_TM_FILE}
9893EOF
9894
c906108c 9895fi
5a2402b8
AC
9896
9897
c906108c 9898rm -f nm.h
5a2402b8 9899nm_h=""
c906108c 9900if test "${nativefile}" != ""; then
5a2402b8
AC
9901 nm_h=nm.h
9902 GDB_NM_FILE="config/${gdb_host_cpu}/${nativefile}"
9903 files="${files} ${GDB_NM_FILE}"
9904 links="${links} nm.h"
9905 cat >> confdefs.h <<EOF
9906#define GDB_NM_FILE ${GDB_NM_FILE}
9907EOF
9908
c906108c 9909fi
5a2402b8
AC
9910
9911
c906108c
SS
9912
9913
9914echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
b00a8037 9915echo "configure:9916: checking for Cygwin environment" >&5
c906108c
SS
9916if eval "test \"`echo '$''{'ac_cv_cygwin'+set}'`\" = set"; then
9917 echo $ac_n "(cached) $ac_c" 1>&6
9918else
9919 cat > conftest.$ac_ext <<EOF
b00a8037 9920#line 9921 "configure"
c906108c
SS
9921#include "confdefs.h"
9922
9923int main() {
9924
9925#ifndef __CYGWIN__
9926#define __CYGWIN__ __CYGWIN32__
9927#endif
9928return __CYGWIN__;
9929; return 0; }
9930EOF
b00a8037 9931if { (eval echo configure:9932: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c
SS
9932 rm -rf conftest*
9933 ac_cv_cygwin=yes
9934else
9935 echo "configure: failed program was:" >&5
9936 cat conftest.$ac_ext >&5
9937 rm -rf conftest*
9938 ac_cv_cygwin=no
9939fi
9940rm -f conftest*
9941rm -f conftest*
9942fi
9943
9944echo "$ac_t""$ac_cv_cygwin" 1>&6
9945CYGWIN=
9946test "$ac_cv_cygwin" = yes && CYGWIN=yes
9947echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
b00a8037 9948echo "configure:9949: checking for mingw32 environment" >&5
c906108c
SS
9949if eval "test \"`echo '$''{'ac_cv_mingw32'+set}'`\" = set"; then
9950 echo $ac_n "(cached) $ac_c" 1>&6
9951else
9952 cat > conftest.$ac_ext <<EOF
b00a8037 9953#line 9954 "configure"
c906108c
SS
9954#include "confdefs.h"
9955
9956int main() {
9957return __MINGW32__;
9958; return 0; }
9959EOF
b00a8037 9960if { (eval echo configure:9961: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c
SS
9961 rm -rf conftest*
9962 ac_cv_mingw32=yes
9963else
9964 echo "configure: failed program was:" >&5
9965 cat conftest.$ac_ext >&5
9966 rm -rf conftest*
9967 ac_cv_mingw32=no
9968fi
9969rm -f conftest*
9970rm -f conftest*
9971fi
9972
9973echo "$ac_t""$ac_cv_mingw32" 1>&6
9974MINGW32=
9975test "$ac_cv_mingw32" = yes && MINGW32=yes
9976
9977
9978echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
b00a8037 9979echo "configure:9980: checking for executable suffix" >&5
c906108c
SS
9980if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then
9981 echo $ac_n "(cached) $ac_c" 1>&6
9982else
9983 if test "$CYGWIN" = yes || test "$MINGW32" = yes; then
9984 ac_cv_exeext=.exe
9985else
9986 rm -f conftest*
9987 echo 'int main () { return 0; }' > conftest.$ac_ext
9988 ac_cv_exeext=
b00a8037 9989 if { (eval echo configure:9990: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
c906108c
SS
9990 for file in conftest.*; do
9991 case $file in
b00a8037 9992 *.c | *.o | *.obj | *.ilk | *.pdb) ;;
c906108c
SS
9993 *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
9994 esac
9995 done
9996 else
9997 { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
9998 fi
9999 rm -f conftest*
10000 test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
10001fi
10002fi
10003
10004EXEEXT=""
10005test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
10006echo "$ac_t""${ac_cv_exeext}" 1>&6
10007ac_exeext=$EXEEXT
10008
10009
234b45d4
KB
10010
10011cat >> confdefs.h <<\EOF
10012#define GDB_DEFAULT_HOST_CHARSET "ISO-8859-1"
10013EOF
10014
10015
10016
10017
10018 # Check whether --with-libiconv-prefix or --without-libiconv-prefix was given.
10019if test "${with_libiconv_prefix+set}" = set; then
10020 withval="$with_libiconv_prefix"
10021
10022 for dir in `echo "$withval" | tr : ' '`; do
10023 if test -d $dir/include; then CPPFLAGS="$CPPFLAGS -I$dir/include"; fi
10024 if test -d $dir/lib; then LDFLAGS="$LDFLAGS -L$dir/lib"; fi
10025 done
10026
10027fi
10028
10029
10030 echo $ac_n "checking for iconv""... $ac_c" 1>&6
b00a8037 10031echo "configure:10032: checking for iconv" >&5
234b45d4
KB
10032if eval "test \"`echo '$''{'am_cv_func_iconv'+set}'`\" = set"; then
10033 echo $ac_n "(cached) $ac_c" 1>&6
10034else
10035
10036 am_cv_func_iconv="no, consider installing GNU libiconv"
10037 am_cv_lib_iconv=no
10038 cat > conftest.$ac_ext <<EOF
b00a8037 10039#line 10040 "configure"
234b45d4
KB
10040#include "confdefs.h"
10041#include <stdlib.h>
10042#include <iconv.h>
10043int main() {
10044iconv_t cd = iconv_open("","");
10045 iconv(cd,NULL,NULL,NULL,NULL);
10046 iconv_close(cd);
10047; return 0; }
10048EOF
b00a8037 10049if { (eval echo configure:10050: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
234b45d4
KB
10050 rm -rf conftest*
10051 am_cv_func_iconv=yes
10052else
10053 echo "configure: failed program was:" >&5
10054 cat conftest.$ac_ext >&5
10055fi
10056rm -f conftest*
10057 if test "$am_cv_func_iconv" != yes; then
10058 am_save_LIBS="$LIBS"
10059 LIBS="$LIBS -liconv"
10060 cat > conftest.$ac_ext <<EOF
b00a8037 10061#line 10062 "configure"
234b45d4
KB
10062#include "confdefs.h"
10063#include <stdlib.h>
10064#include <iconv.h>
10065int main() {
10066iconv_t cd = iconv_open("","");
10067 iconv(cd,NULL,NULL,NULL,NULL);
10068 iconv_close(cd);
10069; return 0; }
10070EOF
b00a8037 10071if { (eval echo configure:10072: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
234b45d4
KB
10072 rm -rf conftest*
10073 am_cv_lib_iconv=yes
10074 am_cv_func_iconv=yes
10075else
10076 echo "configure: failed program was:" >&5
10077 cat conftest.$ac_ext >&5
10078fi
10079rm -f conftest*
10080 LIBS="$am_save_LIBS"
10081 fi
10082
10083fi
10084
10085echo "$ac_t""$am_cv_func_iconv" 1>&6
10086 if test "$am_cv_func_iconv" = yes; then
10087 cat >> confdefs.h <<\EOF
10088#define HAVE_ICONV 1
10089EOF
10090
10091 echo $ac_n "checking for iconv declaration""... $ac_c" 1>&6
b00a8037 10092echo "configure:10093: checking for iconv declaration" >&5
234b45d4
KB
10093 if eval "test \"`echo '$''{'am_cv_proto_iconv'+set}'`\" = set"; then
10094 echo $ac_n "(cached) $ac_c" 1>&6
10095else
10096
10097 cat > conftest.$ac_ext <<EOF
b00a8037 10098#line 10099 "configure"
234b45d4
KB
10099#include "confdefs.h"
10100
10101#include <stdlib.h>
10102#include <iconv.h>
10103extern
10104#ifdef __cplusplus
10105"C"
10106#endif
10107#if defined(__STDC__) || defined(__cplusplus)
10108size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
10109#else
10110size_t iconv();
10111#endif
10112
10113int main() {
10114
10115; return 0; }
10116EOF
b00a8037 10117if { (eval echo configure:10118: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
234b45d4
KB
10118 rm -rf conftest*
10119 am_cv_proto_iconv_arg1=""
10120else
10121 echo "configure: failed program was:" >&5
10122 cat conftest.$ac_ext >&5
10123 rm -rf conftest*
10124 am_cv_proto_iconv_arg1="const"
10125fi
10126rm -f conftest*
10127 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);"
10128fi
10129
10130 am_cv_proto_iconv=`echo "$am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'`
10131 echo "$ac_t""${ac_t:-
10132 }$am_cv_proto_iconv" 1>&6
10133 cat >> confdefs.h <<EOF
10134#define ICONV_CONST $am_cv_proto_iconv_arg1
10135EOF
10136
10137 fi
10138 LIBICONV=
10139 if test "$am_cv_lib_iconv" = yes; then
10140 LIBICONV="-liconv"
10141 fi
10142
10143
10144
c906108c
SS
10145trap '' 1 2 15
10146cat > confcache <<\EOF
10147# This file is a shell script that caches the results of configure
10148# tests run on this system so they can be shared between configure
10149# scripts and configure runs. It is not useful on other systems.
10150# If it contains results you don't want to keep, you may remove or edit it.
10151#
10152# By default, configure uses ./config.cache as the cache file,
10153# creating it if it does not exist already. You can give configure
10154# the --cache-file=FILE option to use a different cache file; that is
10155# what configure does when it calls configure scripts in
10156# subdirectories, so they share the cache.
10157# Giving --cache-file=/dev/null disables caching, for debugging configure.
10158# config.status only pays attention to the cache file if you give it the
10159# --recheck option to rerun configure.
10160#
10161EOF
10162# The following way of writing the cache mishandles newlines in values,
10163# but we know of no workaround that is simple, portable, and efficient.
10164# So, don't put newlines in cache variables' values.
10165# Ultrix sh set writes to stderr and can't be redirected directly,
10166# and sets the high bit in the cache file unless we assign to the vars.
10167(set) 2>&1 |
10168 case `(ac_space=' '; set | grep ac_space) 2>&1` in
10169 *ac_space=\ *)
10170 # `set' does not quote correctly, so add quotes (double-quote substitution
10171 # turns \\\\ into \\, and sed turns \\ into \).
10172 sed -n \
10173 -e "s/'/'\\\\''/g" \
10174 -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
10175 ;;
10176 *)
10177 # `set' quotes correctly as required by POSIX, so do not add quotes.
10178 sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
10179 ;;
10180 esac >> confcache
10181if cmp -s $cache_file confcache; then
10182 :
10183else
10184 if test -w $cache_file; then
10185 echo "updating cache $cache_file"
10186 cat confcache > $cache_file
10187 else
10188 echo "not updating unwritable cache $cache_file"
10189 fi
10190fi
10191rm -f confcache
10192
10193trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
10194
10195test "x$prefix" = xNONE && prefix=$ac_default_prefix
10196# Let make expand exec_prefix.
10197test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
10198
10199# Any assignment to VPATH causes Sun make to only execute
10200# the first set of double-colon rules, so remove it if not needed.
10201# If there is a colon in the path, we need to keep it.
10202if test "x$srcdir" = x.; then
10203 ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d'
10204fi
10205
10206trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
10207
10208DEFS=-DHAVE_CONFIG_H
10209
10210# Without the "./", some shells look in PATH for config.status.
10211: ${CONFIG_STATUS=./config.status}
10212
10213echo creating $CONFIG_STATUS
10214rm -f $CONFIG_STATUS
10215cat > $CONFIG_STATUS <<EOF
10216#! /bin/sh
10217# Generated automatically by configure.
10218# Run this file to recreate the current configuration.
10219# This directory was configured as follows,
10220# on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
10221#
10222# $0 $ac_configure_args
10223#
10224# Compiler output produced by configure, useful for debugging
10225# configure, is in ./config.log if it exists.
10226
10227ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
10228for ac_option
10229do
10230 case "\$ac_option" in
10231 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
10232 echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
10233 exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
10234 -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
10235 echo "$CONFIG_STATUS generated by autoconf version 2.13"
10236 exit 0 ;;
10237 -help | --help | --hel | --he | --h)
10238 echo "\$ac_cs_usage"; exit 0 ;;
10239 *) echo "\$ac_cs_usage"; exit 1 ;;
10240 esac
10241done
10242
10243ac_given_srcdir=$srcdir
10244ac_given_INSTALL="$INSTALL"
10245
ed952ac5 10246trap 'rm -fr `echo "Makefile .gdbinit:gdbinit.in config.h:config.in" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
c906108c
SS
10247EOF
10248cat >> $CONFIG_STATUS <<EOF
10249
10250# Protect against being on the right side of a sed subst in config.status.
10251sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
10252 s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
10253$ac_vpsub
10254$extrasub
10255s%@SHELL@%$SHELL%g
10256s%@CFLAGS@%$CFLAGS%g
10257s%@CPPFLAGS@%$CPPFLAGS%g
10258s%@CXXFLAGS@%$CXXFLAGS%g
10259s%@FFLAGS@%$FFLAGS%g
10260s%@DEFS@%$DEFS%g
10261s%@LDFLAGS@%$LDFLAGS%g
10262s%@LIBS@%$LIBS%g
10263s%@exec_prefix@%$exec_prefix%g
10264s%@prefix@%$prefix%g
10265s%@program_transform_name@%$program_transform_name%g
10266s%@bindir@%$bindir%g
10267s%@sbindir@%$sbindir%g
10268s%@libexecdir@%$libexecdir%g
10269s%@datadir@%$datadir%g
10270s%@sysconfdir@%$sysconfdir%g
10271s%@sharedstatedir@%$sharedstatedir%g
10272s%@localstatedir@%$localstatedir%g
10273s%@libdir@%$libdir%g
10274s%@includedir@%$includedir%g
10275s%@oldincludedir@%$oldincludedir%g
10276s%@infodir@%$infodir%g
10277s%@mandir@%$mandir%g
413ccac7
AC
10278s%@MAINTAINER_MODE_TRUE@%$MAINTAINER_MODE_TRUE%g
10279s%@MAINTAINER_MODE_FALSE@%$MAINTAINER_MODE_FALSE%g
10280s%@MAINT@%$MAINT%g
c906108c
SS
10281s%@CC@%$CC%g
10282s%@CPP@%$CPP%g
10283s%@host@%$host%g
10284s%@host_alias@%$host_alias%g
10285s%@host_cpu@%$host_cpu%g
10286s%@host_vendor@%$host_vendor%g
10287s%@host_os@%$host_os%g
10288s%@target@%$target%g
10289s%@target_alias@%$target_alias%g
10290s%@target_cpu@%$target_cpu%g
10291s%@target_vendor@%$target_vendor%g
10292s%@target_os@%$target_os%g
10293s%@build@%$build%g
10294s%@build_alias@%$build_alias%g
10295s%@build_cpu@%$build_cpu%g
10296s%@build_vendor@%$build_vendor%g
10297s%@build_os@%$build_os%g
c906108c 10298s%@RANLIB@%$RANLIB%g
8bb2c122 10299s%@SET_MAKE@%$SET_MAKE%g
c906108c
SS
10300s%@ALLOCA@%$ALLOCA%g
10301s%@USE_NLS@%$USE_NLS%g
10302s%@MSGFMT@%$MSGFMT%g
10303s%@GMSGFMT@%$GMSGFMT%g
10304s%@XGETTEXT@%$XGETTEXT%g
10305s%@USE_INCLUDED_LIBINTL@%$USE_INCLUDED_LIBINTL%g
10306s%@CATALOGS@%$CATALOGS%g
10307s%@CATOBJEXT@%$CATOBJEXT%g
10308s%@DATADIRNAME@%$DATADIRNAME%g
10309s%@GMOFILES@%$GMOFILES%g
10310s%@INSTOBJEXT@%$INSTOBJEXT%g
10311s%@INTLDEPS@%$INTLDEPS%g
10312s%@INTLLIBS@%$INTLLIBS%g
10313s%@INTLOBJS@%$INTLOBJS%g
10314s%@POFILES@%$POFILES%g
10315s%@POSUB@%$POSUB%g
10316s%@INCLUDE_LOCALE_H@%$INCLUDE_LOCALE_H%g
10317s%@GT_NO@%$GT_NO%g
10318s%@GT_YES@%$GT_YES%g
10319s%@MKINSTALLDIRS@%$MKINSTALLDIRS%g
10320s%@l@%$l%g
8dcde887 10321s%@subdirs@%$subdirs%g
7a292a7a 10322s%@AWK@%$AWK%g
c906108c
SS
10323s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
10324s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
10325s%@INSTALL_DATA@%$INSTALL_DATA%g
8bb2c122
MK
10326s%@LN_S@%$LN_S%g
10327s%@YACC@%$YACC%g
c906108c 10328s%@AR@%$AR%g
95ca63c4
CF
10329s%@DLLTOOL@%$DLLTOOL%g
10330s%@WINDRES@%$WINDRES%g
75c6e08a 10331s%@MIG@%$MIG%g
c906108c 10332s%@CONFIG_LDFLAGS@%$CONFIG_LDFLAGS%g
c906108c 10333s%@WARN_CFLAGS@%$WARN_CFLAGS%g
104c1213 10334s%@WERROR_CFLAGS@%$WERROR_CFLAGS%g
c906108c
SS
10335s%@MMALLOC_CFLAGS@%$MMALLOC_CFLAGS%g
10336s%@MMALLOC@%$MMALLOC%g
aff38e61 10337s%@SER_HARDWIRE@%$SER_HARDWIRE%g
cd0fc7c3 10338s%@WIN32LIBS@%$WIN32LIBS%g
7a292a7a
SS
10339s%@LIBGUI@%$LIBGUI%g
10340s%@GUI_CFLAGS_X@%$GUI_CFLAGS_X%g
7a292a7a
SS
10341s%@WIN32LDAPP@%$WIN32LDAPP%g
10342s%@TCL_VERSION@%$TCL_VERSION%g
10343s%@TCL_MAJOR_VERSION@%$TCL_MAJOR_VERSION%g
10344s%@TCL_MINOR_VERSION@%$TCL_MINOR_VERSION%g
10345s%@TCL_CC@%$TCL_CC%g
10346s%@TCL_DEFS@%$TCL_DEFS%g
10347s%@TCL_SHLIB_CFLAGS@%$TCL_SHLIB_CFLAGS%g
10348s%@TCL_SHLIB_LD@%$TCL_SHLIB_LD%g
10349s%@TCL_SHLIB_LD_LIBS@%$TCL_SHLIB_LD_LIBS%g
10350s%@TCL_SHLIB_SUFFIX@%$TCL_SHLIB_SUFFIX%g
10351s%@TCL_DL_LIBS@%$TCL_DL_LIBS%g
10352s%@TCL_LD_FLAGS@%$TCL_LD_FLAGS%g
10353s%@TCL_LD_SEARCH_FLAGS@%$TCL_LD_SEARCH_FLAGS%g
10354s%@TCL_COMPAT_OBJS@%$TCL_COMPAT_OBJS%g
10355s%@TCL_RANLIB@%$TCL_RANLIB%g
10356s%@TCL_BUILD_LIB_SPEC@%$TCL_BUILD_LIB_SPEC%g
10357s%@TCL_LIB_SPEC@%$TCL_LIB_SPEC%g
10358s%@TCL_LIB_VERSIONS_OK@%$TCL_LIB_VERSIONS_OK%g
10359s%@TK_VERSION@%$TK_VERSION%g
10360s%@TK_DEFS@%$TK_DEFS%g
10361s%@TK_BUILD_INCLUDES@%$TK_BUILD_INCLUDES%g
10362s%@TK_XINCLUDES@%$TK_XINCLUDES%g
10363s%@TK_XLIBSW@%$TK_XLIBSW%g
10364s%@TK_BUILD_LIB_SPEC@%$TK_BUILD_LIB_SPEC%g
10365s%@TK_LIB_SPEC@%$TK_LIB_SPEC%g
10366s%@TCLHDIR@%$TCLHDIR%g
10367s%@TKHDIR@%$TKHDIR%g
10368s%@ITCLHDIR@%$ITCLHDIR%g
10369s%@ITKHDIR@%$ITKHDIR%g
7a292a7a
SS
10370s%@ITCL_VERSION@%$ITCL_VERSION%g
10371s%@ITCL_DEFS@%$ITCL_DEFS%g
10372s%@ITCL_BUILD_INCLUDES@%$ITCL_BUILD_INCLUDES%g
10373s%@ITCL_BUILD_LIB_SPEC@%$ITCL_BUILD_LIB_SPEC%g
10374s%@ITCL_LIB_SPEC@%$ITCL_LIB_SPEC%g
10375s%@ITK_VERSION@%$ITK_VERSION%g
10376s%@ITK_DEFS@%$ITK_DEFS%g
10377s%@ITK_BUILD_INCLUDES@%$ITK_BUILD_INCLUDES%g
10378s%@ITK_BUILD_LIB_SPEC@%$ITK_BUILD_LIB_SPEC%g
10379s%@ITK_LIB_SPEC@%$ITK_LIB_SPEC%g
7a292a7a
SS
10380s%@X_CFLAGS@%$X_CFLAGS%g
10381s%@X_LDFLAGS@%$X_LDFLAGS%g
10382s%@X_LIBS@%$X_LIBS%g
dd2504ab
JM
10383s%@TCL_DEPS@%$TCL_DEPS%g
10384s%@TK_DEPS@%$TK_DEPS%g
7a292a7a
SS
10385s%@ITCLLIB@%$ITCLLIB%g
10386s%@ITCL_DEPS@%$ITCL_DEPS%g
10387s%@ITKLIB@%$ITKLIB%g
10388s%@ITK_DEPS@%$ITK_DEPS%g
7a292a7a
SS
10389s%@GDBTKLIBS@%$GDBTKLIBS%g
10390s%@GDBTK_CFLAGS@%$GDBTK_CFLAGS%g
d1c3b63a 10391s%@GDBTK_SRC_DIR@%$GDBTK_SRC_DIR%g
7a292a7a
SS
10392s%@IGNORE_SIM@%$IGNORE_SIM%g
10393s%@IGNORE_SIM_OBS@%$IGNORE_SIM_OBS%g
c906108c
SS
10394s%@ENABLE_CFLAGS@%$ENABLE_CFLAGS%g
10395s%@CONFIG_OBS@%$CONFIG_OBS%g
66b965bb 10396s%@CONFIG_LIB_OBS@%$CONFIG_LIB_OBS%g
c906108c
SS
10397s%@CONFIG_DEPS@%$CONFIG_DEPS%g
10398s%@CONFIG_SRCS@%$CONFIG_SRCS%g
dfcd3bfb 10399s%@CONFIG_INITS@%$CONFIG_INITS%g
b3a90332
AC
10400s%@CONFIG_ALL@%$CONFIG_ALL%g
10401s%@CONFIG_CLEAN@%$CONFIG_CLEAN%g
e56ac5c3
AC
10402s%@CONFIG_INSTALL@%$CONFIG_INSTALL%g
10403s%@CONFIG_UNINSTALL@%$CONFIG_UNINSTALL%g
c906108c
SS
10404s%@target_subdir@%$target_subdir%g
10405/@host_makefile_frag@/r $host_makefile_frag
10406s%@host_makefile_frag@%%g
10407/@target_makefile_frag@/r $target_makefile_frag
10408s%@target_makefile_frag@%%g
10409s%@frags@%$frags%g
5a2402b8
AC
10410s%@xm_h@%$xm_h%g
10411s%@tm_h@%$tm_h%g
10412s%@nm_h@%$nm_h%g
c906108c 10413s%@EXEEXT@%$EXEEXT%g
234b45d4 10414s%@LIBICONV@%$LIBICONV%g
c906108c
SS
10415
10416CEOF
10417EOF
10418
10419cat >> $CONFIG_STATUS <<\EOF
10420
10421# Split the substitutions into bite-sized pieces for seds with
10422# small command number limits, like on Digital OSF/1 and HP-UX.
234b45d4 10423ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
c906108c
SS
10424ac_file=1 # Number of current file.
10425ac_beg=1 # First line for current file.
10426ac_end=$ac_max_sed_cmds # Line after last line for current file.
10427ac_more_lines=:
10428ac_sed_cmds=""
10429while $ac_more_lines; do
10430 if test $ac_beg -gt 1; then
10431 sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
10432 else
10433 sed "${ac_end}q" conftest.subs > conftest.s$ac_file
10434 fi
10435 if test ! -s conftest.s$ac_file; then
10436 ac_more_lines=false
10437 rm -f conftest.s$ac_file
10438 else
10439 if test -z "$ac_sed_cmds"; then
10440 ac_sed_cmds="sed -f conftest.s$ac_file"
10441 else
10442 ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
10443 fi
10444 ac_file=`expr $ac_file + 1`
10445 ac_beg=$ac_end
10446 ac_end=`expr $ac_end + $ac_max_sed_cmds`
10447 fi
10448done
10449if test -z "$ac_sed_cmds"; then
10450 ac_sed_cmds=cat
10451fi
10452EOF
10453
10454cat >> $CONFIG_STATUS <<EOF
10455
ed952ac5 10456CONFIG_FILES=\${CONFIG_FILES-"Makefile .gdbinit:gdbinit.in"}
c906108c
SS
10457EOF
10458cat >> $CONFIG_STATUS <<\EOF
10459for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
10460 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
10461 case "$ac_file" in
10462 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
10463 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
10464 *) ac_file_in="${ac_file}.in" ;;
10465 esac
10466
10467 # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
10468
10469 # Remove last slash and all that follows it. Not all systems have dirname.
10470 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
10471 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
10472 # The file is in a subdirectory.
10473 test ! -d "$ac_dir" && mkdir "$ac_dir"
10474 ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
10475 # A "../" for each directory in $ac_dir_suffix.
10476 ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
10477 else
10478 ac_dir_suffix= ac_dots=
10479 fi
10480
10481 case "$ac_given_srcdir" in
10482 .) srcdir=.
10483 if test -z "$ac_dots"; then top_srcdir=.
10484 else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
10485 /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
10486 *) # Relative path.
10487 srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
10488 top_srcdir="$ac_dots$ac_given_srcdir" ;;
10489 esac
10490
10491 case "$ac_given_INSTALL" in
10492 [/$]*) INSTALL="$ac_given_INSTALL" ;;
10493 *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
10494 esac
10495
10496 echo creating "$ac_file"
10497 rm -f "$ac_file"
10498 configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
10499 case "$ac_file" in
10500 *Makefile*) ac_comsub="1i\\
10501# $configure_input" ;;
10502 *) ac_comsub= ;;
10503 esac
10504
10505 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
10506 sed -e "$ac_comsub
10507s%@configure_input@%$configure_input%g
10508s%@srcdir@%$srcdir%g
10509s%@top_srcdir@%$top_srcdir%g
10510s%@INSTALL@%$INSTALL%g
10511" $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
10512fi; done
10513rm -f conftest.s*
10514
10515# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
10516# NAME is the cpp macro being defined and VALUE is the value it is being given.
10517#
10518# ac_d sets the value in "#define NAME VALUE" lines.
10519ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)'
10520ac_dB='\([ ][ ]*\)[^ ]*%\1#\2'
10521ac_dC='\3'
10522ac_dD='%g'
10523# ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
10524ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
10525ac_uB='\([ ]\)%\1#\2define\3'
10526ac_uC=' '
10527ac_uD='\4%g'
10528# ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
10529ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
10530ac_eB='$%\1#\2define\3'
10531ac_eC=' '
10532ac_eD='%g'
10533
10534if test "${CONFIG_HEADERS+set}" != set; then
10535EOF
10536cat >> $CONFIG_STATUS <<EOF
10537 CONFIG_HEADERS="config.h:config.in"
10538EOF
10539cat >> $CONFIG_STATUS <<\EOF
10540fi
10541for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
10542 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
10543 case "$ac_file" in
10544 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
10545 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
10546 *) ac_file_in="${ac_file}.in" ;;
10547 esac
10548
10549 echo creating $ac_file
10550
10551 rm -f conftest.frag conftest.in conftest.out
10552 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
10553 cat $ac_file_inputs > conftest.in
10554
10555EOF
10556
10557# Transform confdefs.h into a sed script conftest.vals that substitutes
10558# the proper values into config.h.in to produce config.h. And first:
10559# Protect against being on the right side of a sed subst in config.status.
10560# Protect against being in an unquoted here document in config.status.
10561rm -f conftest.vals
10562cat > conftest.hdr <<\EOF
10563s/[\\&%]/\\&/g
10564s%[\\$`]%\\&%g
10565s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
10566s%ac_d%ac_u%gp
10567s%ac_u%ac_e%gp
10568EOF
10569sed -n -f conftest.hdr confdefs.h > conftest.vals
10570rm -f conftest.hdr
10571
10572# This sed command replaces #undef with comments. This is necessary, for
10573# example, in the case of _POSIX_SOURCE, which is predefined and required
10574# on some systems where configure will not decide to define it.
10575cat >> conftest.vals <<\EOF
10576s%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
10577EOF
10578
10579# Break up conftest.vals because some shells have a limit on
10580# the size of here documents, and old seds have small limits too.
10581
10582rm -f conftest.tail
10583while :
10584do
10585 ac_lines=`grep -c . conftest.vals`
10586 # grep -c gives empty output for an empty file on some AIX systems.
10587 if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
10588 # Write a limited-size here document to conftest.frag.
10589 echo ' cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
10590 sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
10591 echo 'CEOF
10592 sed -f conftest.frag conftest.in > conftest.out
10593 rm -f conftest.in
10594 mv conftest.out conftest.in
10595' >> $CONFIG_STATUS
10596 sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
10597 rm -f conftest.vals
10598 mv conftest.tail conftest.vals
10599done
10600rm -f conftest.vals
10601
10602cat >> $CONFIG_STATUS <<\EOF
10603 rm -f conftest.frag conftest.h
10604 echo "/* $ac_file. Generated automatically by configure. */" > conftest.h
10605 cat conftest.in >> conftest.h
10606 rm -f conftest.in
10607 if cmp -s $ac_file conftest.h 2>/dev/null; then
10608 echo "$ac_file is unchanged"
10609 rm -f conftest.h
10610 else
10611 # Remove last slash and all that follows it. Not all systems have dirname.
10612 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
10613 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
10614 # The file is in a subdirectory.
10615 test ! -d "$ac_dir" && mkdir "$ac_dir"
10616 fi
10617 rm -f $ac_file
10618 mv conftest.h $ac_file
10619 fi
10620fi; done
10621
10622EOF
10623
10624cat >> $CONFIG_STATUS <<EOF
10625ac_sources="$files"
10626ac_dests="$links"
10627EOF
10628
10629cat >> $CONFIG_STATUS <<\EOF
10630srcdir=$ac_given_srcdir
10631while test -n "$ac_sources"; do
10632 set $ac_dests; ac_dest=$1; shift; ac_dests=$*
10633 set $ac_sources; ac_source=$1; shift; ac_sources=$*
10634
10635 echo "linking $srcdir/$ac_source to $ac_dest"
10636
10637 if test ! -r $srcdir/$ac_source; then
10638 { echo "configure: error: $srcdir/$ac_source: File not found" 1>&2; exit 1; }
10639 fi
10640 rm -f $ac_dest
10641
10642 # Make relative symlinks.
10643 # Remove last slash and all that follows it. Not all systems have dirname.
10644 ac_dest_dir=`echo $ac_dest|sed 's%/[^/][^/]*$%%'`
10645 if test "$ac_dest_dir" != "$ac_dest" && test "$ac_dest_dir" != .; then
10646 # The dest file is in a subdirectory.
10647 test ! -d "$ac_dest_dir" && mkdir "$ac_dest_dir"
10648 ac_dest_dir_suffix="/`echo $ac_dest_dir|sed 's%^\./%%'`"
10649 # A "../" for each directory in $ac_dest_dir_suffix.
10650 ac_dots=`echo $ac_dest_dir_suffix|sed 's%/[^/]*%../%g'`
10651 else
10652 ac_dest_dir_suffix= ac_dots=
10653 fi
10654
10655 case "$srcdir" in
10656 [/$]*) ac_rel_source="$srcdir/$ac_source" ;;
10657 *) ac_rel_source="$ac_dots$srcdir/$ac_source" ;;
10658 esac
10659
10660 # Make a symlink if possible; otherwise try a hard link.
10661 if ln -s $ac_rel_source $ac_dest 2>/dev/null ||
10662 ln $srcdir/$ac_source $ac_dest; then :
10663 else
10664 { echo "configure: error: can not link $ac_dest to $srcdir/$ac_source" 1>&2; exit 1; }
10665 fi
10666done
10667EOF
10668cat >> $CONFIG_STATUS <<EOF
10669
10670gdb_host_cpu=$gdb_host_cpu
10671gdb_target_cpu=$gdb_target_cpu
10672nativefile=$nativefile
10673
10674EOF
10675cat >> $CONFIG_STATUS <<\EOF
10676
10677if test "${nativefile}" = ""; then
c4620205 10678 < Makefile \
e27da16d
JT
10679 sed -e '/^NATDEPFILES[ ]*=.*\\$/,/[^\\]$/s/^/# /' \
10680 -e '/^NATDEPFILES[ ]*=/s/^/# /' \
c4620205
JB
10681 | sed -e '/^\(NATDEPFILES[ ]*[+]=[ ]*\)/s//# \1/' \
10682 > Makefile.tem
c906108c
SS
10683mv -f Makefile.tem Makefile
10684fi
10685
10686sed -e '/^TM_FILE[ ]*=/s,^TM_FILE[ ]*=[ ]*,&config/'"${gdb_target_cpu}"'/,
10687/^XM_FILE[ ]*=/s,^XM_FILE[ ]*=[ ]*,&config/'"${gdb_host_cpu}"'/,
10688/^NAT_FILE[ ]*=/s,^NAT_FILE[ ]*=[ ]*,&config/'"${gdb_host_cpu}"'/,' <Makefile >Makefile.tmp
10689mv -f Makefile.tmp Makefile
10690
2acceee2 10691
c906108c
SS
10692case x$CONFIG_HEADERS in
10693xconfig.h:config.in)
10694echo > stamp-h ;;
10695esac
10696
10697exit 0
10698EOF
10699chmod +x $CONFIG_STATUS
10700rm -fr confdefs* $ac_clean_files
10701test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
10702
10703if test "$no_recursion" != yes; then
10704
10705 # Remove --cache-file and --srcdir arguments so they do not pile up.
10706 ac_sub_configure_args=
10707 ac_prev=
10708 for ac_arg in $ac_configure_args; do
10709 if test -n "$ac_prev"; then
10710 ac_prev=
10711 continue
10712 fi
10713 case "$ac_arg" in
10714 -cache-file | --cache-file | --cache-fil | --cache-fi \
10715 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
10716 ac_prev=cache_file ;;
10717 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
10718 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
10719 ;;
10720 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
10721 ac_prev=srcdir ;;
10722 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
10723 ;;
10724 *) ac_sub_configure_args="$ac_sub_configure_args $ac_arg" ;;
10725 esac
10726 done
10727
8dcde887 10728 for ac_config_dir in doc testsuite $configdirs; do
c906108c
SS
10729
10730 # Do not complain, so a configure script can configure whichever
10731 # parts of a large source tree are present.
10732 if test ! -d $srcdir/$ac_config_dir; then
10733 continue
10734 fi
10735
10736 echo configuring in $ac_config_dir
10737
10738 case "$srcdir" in
10739 .) ;;
10740 *)
10741 if test -d ./$ac_config_dir || mkdir ./$ac_config_dir; then :;
10742 else
10743 { echo "configure: error: can not create `pwd`/$ac_config_dir" 1>&2; exit 1; }
10744 fi
10745 ;;
10746 esac
10747
10748 ac_popdir=`pwd`
10749 cd $ac_config_dir
10750
10751 # A "../" for each directory in /$ac_config_dir.
10752 ac_dots=`echo $ac_config_dir|sed -e 's%^\./%%' -e 's%[^/]$%&/%' -e 's%[^/]*/%../%g'`
10753
10754 case "$srcdir" in
10755 .) # No --srcdir option. We are building in place.
10756 ac_sub_srcdir=$srcdir ;;
10757 /*) # Absolute path.
10758 ac_sub_srcdir=$srcdir/$ac_config_dir ;;
10759 *) # Relative path.
10760 ac_sub_srcdir=$ac_dots$srcdir/$ac_config_dir ;;
10761 esac
10762
10763 # Check for guested configure; otherwise get Cygnus style configure.
10764 if test -f $ac_sub_srcdir/configure; then
10765 ac_sub_configure=$ac_sub_srcdir/configure
10766 elif test -f $ac_sub_srcdir/configure.in; then
10767 ac_sub_configure=$ac_configure
10768 else
10769 echo "configure: warning: no configuration information is in $ac_config_dir" 1>&2
10770 ac_sub_configure=
10771 fi
10772
10773 # The recursion is here.
10774 if test -n "$ac_sub_configure"; then
10775
10776 # Make the cache file name correct relative to the subdirectory.
10777 case "$cache_file" in
10778 /*) ac_sub_cache_file=$cache_file ;;
10779 *) # Relative path.
10780 ac_sub_cache_file="$ac_dots$cache_file" ;;
10781 esac
10782 case "$ac_given_INSTALL" in
10783 [/$]*) INSTALL="$ac_given_INSTALL" ;;
10784 *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
10785 esac
10786
10787 echo "running ${CONFIG_SHELL-/bin/sh} $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_sub_srcdir"
10788 # The eval makes quoting arguments work.
10789 if eval ${CONFIG_SHELL-/bin/sh} $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_sub_srcdir
10790 then :
10791 else
10792 { echo "configure: error: $ac_sub_configure failed for $ac_config_dir" 1>&2; exit 1; }
10793 fi
10794 fi
10795
10796 cd $ac_popdir
10797 done
10798fi
10799
10800
10801exit 0
This page took 0.872218 seconds and 4 git commands to generate.