]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blame - gdb/configure
1998-08-18 Jason Molenda (jsm@bugshack.cygnus.com)
[thirdparty/binutils-gdb.git] / gdb / configure
CommitLineData
5436fc65
C
1#! /bin/sh
2
3# Guess values for system-dependent variables and create Makefiles.
4ff3dfab 4# Generated automatically using autoconf version 2.12
bc859e63 5# Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
5436fc65
C
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:
fcfc3c0c
TT
14ac_help="$ac_help
15 --disable-nls do not use Native Language Support"
16ac_help="$ac_help
17 --with-included-gettext use the GNU gettext library included here"
5436fc65
C
18ac_help="$ac_help
19 --enable-netrom "
0728afad
FF
20ac_help="$ac_help
21 --with-mmalloc use memory mapped malloc package"
2476848a
MH
22ac_help="$ac_help
23 --enable-ide Enable IDE support"
c076f1ed
DM
24ac_help="$ac_help
25 --with-foundry-libs=directory use the Foundry SDK in directory"
5436fc65
C
26ac_help="$ac_help
27 --enable-gdbtk "
28ac_help="$ac_help
047465fd 29 --with-tclconfig directory containing tcl configuration (tclConfig.sh)"
4e327047 30ac_help="$ac_help
047465fd 31 --with-tkconfig directory containing tk configuration (tkConfig.sh)"
4e327047 32ac_help="$ac_help
047465fd 33 --with-tclinclude directory where tcl private headers are"
4e327047 34ac_help="$ac_help
047465fd 35 --with-tkinclude directory where tk private headers are"
b236defa
FCE
36ac_help="$ac_help
37 --with-x use the X Window System"
38ac_help="$ac_help
39 --with-sim-gpu2=path Use GPU2 library under given directory"
75a55dc3
JM
40ac_help="$ac_help
41 --with-sim-funit=path Use target FP lib under given directory"
1d5eb137
FF
42ac_help="$ac_help
43 --enable-shared use shared libraries"
5436fc65
C
44
45# Initialize some variables set by options.
46# The variables have the same names as the options, with
47# dashes changed to underlines.
48build=NONE
49cache_file=./config.cache
50exec_prefix=NONE
51host=NONE
52no_create=
53nonopt=NONE
54no_recursion=
55prefix=NONE
56program_prefix=NONE
57program_suffix=NONE
58program_transform_name=s,x,x,
59silent=
60site=
61srcdir=
62target=NONE
63verbose=
64x_includes=NONE
65x_libraries=NONE
1a7b4b7c
DE
66bindir='${exec_prefix}/bin'
67sbindir='${exec_prefix}/sbin'
68libexecdir='${exec_prefix}/libexec'
69datadir='${prefix}/share'
70sysconfdir='${prefix}/etc'
71sharedstatedir='${prefix}/com'
72localstatedir='${prefix}/var'
73libdir='${exec_prefix}/lib'
74includedir='${prefix}/include'
75oldincludedir='/usr/include'
76infodir='${prefix}/info'
77mandir='${prefix}/man'
5436fc65
C
78
79# Initialize some other variables.
80subdirs=
1a7b4b7c 81MFLAGS= MAKEFLAGS=
bfde4a67
SG
82# Maximum number of lines to put in a shell here document.
83ac_max_here_lines=12
5436fc65
C
84
85ac_prev=
86for ac_option
87do
88
89 # If the previous option needs an argument, assign it.
90 if test -n "$ac_prev"; then
91 eval "$ac_prev=\$ac_option"
92 ac_prev=
93 continue
94 fi
95
96 case "$ac_option" in
97 -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
98 *) ac_optarg= ;;
99 esac
100
101 # Accept the important Cygnus configure options, so we can diagnose typos.
102
103 case "$ac_option" in
104
1a7b4b7c
DE
105 -bindir | --bindir | --bindi | --bind | --bin | --bi)
106 ac_prev=bindir ;;
107 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
108 bindir="$ac_optarg" ;;
109
110 -build | --build | --buil | --bui | --bu)
5436fc65 111 ac_prev=build ;;
1a7b4b7c 112 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
5436fc65
C
113 build="$ac_optarg" ;;
114
115 -cache-file | --cache-file | --cache-fil | --cache-fi \
116 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
117 ac_prev=cache_file ;;
118 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
119 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
120 cache_file="$ac_optarg" ;;
121
1a7b4b7c
DE
122 -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
123 ac_prev=datadir ;;
124 -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
125 | --da=*)
126 datadir="$ac_optarg" ;;
127
5436fc65
C
128 -disable-* | --disable-*)
129 ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
130 # Reject names that are not valid shell variable names.
131 if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
132 { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
133 fi
134 ac_feature=`echo $ac_feature| sed 's/-/_/g'`
135 eval "enable_${ac_feature}=no" ;;
136
137 -enable-* | --enable-*)
138 ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
139 # Reject names that are not valid shell variable names.
140 if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
141 { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
142 fi
143 ac_feature=`echo $ac_feature| sed 's/-/_/g'`
144 case "$ac_option" in
145 *=*) ;;
146 *) ac_optarg=yes ;;
147 esac
148 eval "enable_${ac_feature}='$ac_optarg'" ;;
149
150 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
151 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
152 | --exec | --exe | --ex)
153 ac_prev=exec_prefix ;;
154 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
155 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
156 | --exec=* | --exe=* | --ex=*)
157 exec_prefix="$ac_optarg" ;;
158
159 -gas | --gas | --ga | --g)
160 # Obsolete; use --with-gas.
161 with_gas=yes ;;
162
163 -help | --help | --hel | --he)
164 # Omit some internal or obsolete options to make the list less imposing.
165 # This message is too long to be a string in the A/UX 3.1 sh.
166 cat << EOF
167Usage: configure [options] [host]
168Options: [defaults in brackets after descriptions]
169Configuration:
170 --cache-file=FILE cache test results in FILE
171 --help print this message
172 --no-create do not create output files
173 --quiet, --silent do not print \`checking...' messages
174 --version print the version of autoconf that created configure
175Directory and file names:
176 --prefix=PREFIX install architecture-independent files in PREFIX
177 [$ac_default_prefix]
1a7b4b7c 178 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
5436fc65 179 [same as prefix]
1a7b4b7c
DE
180 --bindir=DIR user executables in DIR [EPREFIX/bin]
181 --sbindir=DIR system admin executables in DIR [EPREFIX/sbin]
182 --libexecdir=DIR program executables in DIR [EPREFIX/libexec]
183 --datadir=DIR read-only architecture-independent data in DIR
184 [PREFIX/share]
185 --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc]
186 --sharedstatedir=DIR modifiable architecture-independent data in DIR
187 [PREFIX/com]
188 --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var]
189 --libdir=DIR object code libraries in DIR [EPREFIX/lib]
190 --includedir=DIR C header files in DIR [PREFIX/include]
191 --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include]
192 --infodir=DIR info documentation in DIR [PREFIX/info]
193 --mandir=DIR man documentation in DIR [PREFIX/man]
5436fc65
C
194 --srcdir=DIR find the sources in DIR [configure dir or ..]
195 --program-prefix=PREFIX prepend PREFIX to installed program names
196 --program-suffix=SUFFIX append SUFFIX to installed program names
1a7b4b7c
DE
197 --program-transform-name=PROGRAM
198 run sed PROGRAM on installed program names
199EOF
200 cat << EOF
5436fc65
C
201Host type:
202 --build=BUILD configure for building on BUILD [BUILD=HOST]
203 --host=HOST configure for HOST [guessed]
204 --target=TARGET configure for TARGET [TARGET=HOST]
205Features and packages:
206 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
207 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
208 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
209 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
210 --x-includes=DIR X include files are in DIR
211 --x-libraries=DIR X library files are in DIR
5436fc65 212EOF
1a7b4b7c
DE
213 if test -n "$ac_help"; then
214 echo "--enable and --with options recognized:$ac_help"
215 fi
5436fc65
C
216 exit 0 ;;
217
218 -host | --host | --hos | --ho)
219 ac_prev=host ;;
220 -host=* | --host=* | --hos=* | --ho=*)
221 host="$ac_optarg" ;;
222
1a7b4b7c
DE
223 -includedir | --includedir | --includedi | --included | --include \
224 | --includ | --inclu | --incl | --inc)
225 ac_prev=includedir ;;
226 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
227 | --includ=* | --inclu=* | --incl=* | --inc=*)
228 includedir="$ac_optarg" ;;
229
230 -infodir | --infodir | --infodi | --infod | --info | --inf)
231 ac_prev=infodir ;;
232 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
233 infodir="$ac_optarg" ;;
234
235 -libdir | --libdir | --libdi | --libd)
236 ac_prev=libdir ;;
237 -libdir=* | --libdir=* | --libdi=* | --libd=*)
238 libdir="$ac_optarg" ;;
239
240 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
241 | --libexe | --libex | --libe)
242 ac_prev=libexecdir ;;
243 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
244 | --libexe=* | --libex=* | --libe=*)
245 libexecdir="$ac_optarg" ;;
246
247 -localstatedir | --localstatedir | --localstatedi | --localstated \
248 | --localstate | --localstat | --localsta | --localst \
249 | --locals | --local | --loca | --loc | --lo)
250 ac_prev=localstatedir ;;
251 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
252 | --localstate=* | --localstat=* | --localsta=* | --localst=* \
253 | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
254 localstatedir="$ac_optarg" ;;
255
256 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
257 ac_prev=mandir ;;
258 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
259 mandir="$ac_optarg" ;;
260
5436fc65
C
261 -nfp | --nfp | --nf)
262 # Obsolete; use --without-fp.
263 with_fp=no ;;
264
265 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
266 | --no-cr | --no-c)
267 no_create=yes ;;
268
269 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
270 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
271 no_recursion=yes ;;
272
1a7b4b7c
DE
273 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
274 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
275 | --oldin | --oldi | --old | --ol | --o)
276 ac_prev=oldincludedir ;;
277 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
278 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
279 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
280 oldincludedir="$ac_optarg" ;;
281
5436fc65
C
282 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
283 ac_prev=prefix ;;
284 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
285 prefix="$ac_optarg" ;;
286
287 -program-prefix | --program-prefix | --program-prefi | --program-pref \
288 | --program-pre | --program-pr | --program-p)
289 ac_prev=program_prefix ;;
290 -program-prefix=* | --program-prefix=* | --program-prefi=* \
291 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
292 program_prefix="$ac_optarg" ;;
293
294 -program-suffix | --program-suffix | --program-suffi | --program-suff \
295 | --program-suf | --program-su | --program-s)
296 ac_prev=program_suffix ;;
297 -program-suffix=* | --program-suffix=* | --program-suffi=* \
298 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
299 program_suffix="$ac_optarg" ;;
300
301 -program-transform-name | --program-transform-name \
302 | --program-transform-nam | --program-transform-na \
303 | --program-transform-n | --program-transform- \
304 | --program-transform | --program-transfor \
305 | --program-transfo | --program-transf \
306 | --program-trans | --program-tran \
307 | --progr-tra | --program-tr | --program-t)
308 ac_prev=program_transform_name ;;
309 -program-transform-name=* | --program-transform-name=* \
310 | --program-transform-nam=* | --program-transform-na=* \
311 | --program-transform-n=* | --program-transform-=* \
312 | --program-transform=* | --program-transfor=* \
313 | --program-transfo=* | --program-transf=* \
314 | --program-trans=* | --program-tran=* \
315 | --progr-tra=* | --program-tr=* | --program-t=*)
316 program_transform_name="$ac_optarg" ;;
317
318 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
319 | -silent | --silent | --silen | --sile | --sil)
320 silent=yes ;;
321
1a7b4b7c
DE
322 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
323 ac_prev=sbindir ;;
324 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
325 | --sbi=* | --sb=*)
326 sbindir="$ac_optarg" ;;
327
328 -sharedstatedir | --sharedstatedir | --sharedstatedi \
329 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
330 | --sharedst | --shareds | --shared | --share | --shar \
331 | --sha | --sh)
332 ac_prev=sharedstatedir ;;
333 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
334 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
335 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
336 | --sha=* | --sh=*)
337 sharedstatedir="$ac_optarg" ;;
338
5436fc65
C
339 -site | --site | --sit)
340 ac_prev=site ;;
341 -site=* | --site=* | --sit=*)
342 site="$ac_optarg" ;;
343
344 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
345 ac_prev=srcdir ;;
346 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
347 srcdir="$ac_optarg" ;;
348
1a7b4b7c
DE
349 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
350 | --syscon | --sysco | --sysc | --sys | --sy)
351 ac_prev=sysconfdir ;;
352 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
353 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
354 sysconfdir="$ac_optarg" ;;
355
5436fc65
C
356 -target | --target | --targe | --targ | --tar | --ta | --t)
357 ac_prev=target ;;
358 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
359 target="$ac_optarg" ;;
360
361 -v | -verbose | --verbose | --verbos | --verbo | --verb)
362 verbose=yes ;;
363
364 -version | --version | --versio | --versi | --vers)
4ff3dfab 365 echo "configure generated by autoconf version 2.12"
5436fc65
C
366 exit 0 ;;
367
368 -with-* | --with-*)
369 ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
370 # Reject names that are not valid shell variable names.
371 if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
372 { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
373 fi
374 ac_package=`echo $ac_package| sed 's/-/_/g'`
375 case "$ac_option" in
376 *=*) ;;
377 *) ac_optarg=yes ;;
378 esac
379 eval "with_${ac_package}='$ac_optarg'" ;;
380
381 -without-* | --without-*)
382 ac_package=`echo $ac_option|sed -e 's/-*without-//'`
383 # Reject names that are not valid shell variable names.
384 if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
385 { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
386 fi
387 ac_package=`echo $ac_package| sed 's/-/_/g'`
388 eval "with_${ac_package}=no" ;;
389
390 --x)
391 # Obsolete; use --with-x.
392 with_x=yes ;;
393
394 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
395 | --x-incl | --x-inc | --x-in | --x-i)
396 ac_prev=x_includes ;;
397 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
398 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
399 x_includes="$ac_optarg" ;;
400
401 -x-libraries | --x-libraries | --x-librarie | --x-librari \
402 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
403 ac_prev=x_libraries ;;
404 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
405 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
406 x_libraries="$ac_optarg" ;;
407
408 -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
409 ;;
410
1a7b4b7c 411 *)
5436fc65
C
412 if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
413 echo "configure: warning: $ac_option: invalid host type" 1>&2
414 fi
415 if test "x$nonopt" != xNONE; then
416 { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
417 fi
418 nonopt="$ac_option"
419 ;;
420
421 esac
422done
423
424if test -n "$ac_prev"; then
425 { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
426fi
427
428trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
429
430# File descriptor usage:
431# 0 standard input
432# 1 file creation
433# 2 errors and warnings
434# 3 some systems may open it to /dev/tty
435# 4 used on the Kubota Titan
436# 6 checking for... messages and results
437# 5 compiler messages saved in config.log
438if test "$silent" = yes; then
439 exec 6>/dev/null
440else
441 exec 6>&1
442fi
443exec 5>./config.log
444
445echo "\
446This file contains any messages produced by compilers while
447running configure, to aid debugging if configure makes a mistake.
448" 1>&5
449
450# Strip out --no-create and --no-recursion so they do not pile up.
451# Also quote any args containing shell metacharacters.
452ac_configure_args=
453for ac_arg
454do
455 case "$ac_arg" in
456 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
457 | --no-cr | --no-c) ;;
458 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
459 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
460 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
461 ac_configure_args="$ac_configure_args '$ac_arg'" ;;
462 *) ac_configure_args="$ac_configure_args $ac_arg" ;;
463 esac
464done
465
466# NLS nuisances.
bfde4a67
SG
467# Only set these to C if already set. These must not be set unconditionally
468# because not all systems understand e.g. LANG=C (notably SCO).
469# Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
470# Non-C LC_CTYPE values break the ctype check.
ef6c51d1 471if test "${LANG+set}" = set; then LANG=C; export LANG; fi
bfde4a67
SG
472if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
473if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
474if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi
5436fc65
C
475
476# confdefs.h avoids OS command line length limits that DEFS can exceed.
477rm -rf conftest* confdefs.h
478# AIX cpp loses on an empty file, so make sure it contains at least a newline.
479echo > confdefs.h
480
481# A filename unique to this package, relative to the directory that
482# configure is in, which we can look for to find out if srcdir is correct.
483ac_unique_file=main.c
484
485# Find the source files, if location was not specified.
486if test -z "$srcdir"; then
487 ac_srcdir_defaulted=yes
488 # Try the directory containing this script, then its parent.
489 ac_prog=$0
490 ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
491 test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
492 srcdir=$ac_confdir
493 if test ! -r $srcdir/$ac_unique_file; then
494 srcdir=..
495 fi
496else
497 ac_srcdir_defaulted=no
498fi
499if test ! -r $srcdir/$ac_unique_file; then
500 if test "$ac_srcdir_defaulted" = yes; then
501 { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
502 else
503 { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
504 fi
505fi
506srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
507
508# Prefer explicitly selected file to automatically selected ones.
509if test -z "$CONFIG_SITE"; then
510 if test "x$prefix" != xNONE; then
511 CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
512 else
513 CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
514 fi
515fi
516for ac_site_file in $CONFIG_SITE; do
517 if test -r "$ac_site_file"; then
518 echo "loading site script $ac_site_file"
519 . "$ac_site_file"
520 fi
521done
522
523if test -r "$cache_file"; then
524 echo "loading cache $cache_file"
525 . $cache_file
526else
527 echo "creating cache $cache_file"
528 > $cache_file
529fi
530
531ac_ext=c
532# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
3dedc867 533ac_cpp='$CPP $CPPFLAGS'
1a7b4b7c 534ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
4ff3dfab 535ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
bfde4a67 536cross_compiling=$ac_cv_prog_cc_cross
5436fc65
C
537
538if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
539 # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
540 if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
541 ac_n= ac_c='
542' ac_t=' '
543 else
544 ac_n=-n ac_c= ac_t=
545 fi
546else
547 ac_n= ac_c='\c' ac_t=
548fi
549
550
551
db210d08 552
5436fc65
C
553# Extract the first word of "gcc", so it can be a program name with args.
554set dummy gcc; ac_word=$2
555echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4ff3dfab 556echo "configure:557: checking for $ac_word" >&5
5436fc65
C
557if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
558 echo $ac_n "(cached) $ac_c" 1>&6
559else
560 if test -n "$CC"; then
561 ac_cv_prog_CC="$CC" # Let the user override the test.
562else
4ff3dfab 563 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
da3d57e3 564 for ac_dir in $PATH; do
5436fc65
C
565 test -z "$ac_dir" && ac_dir=.
566 if test -f $ac_dir/$ac_word; then
567 ac_cv_prog_CC="gcc"
568 break
569 fi
570 done
571 IFS="$ac_save_ifs"
5436fc65
C
572fi
573fi
574CC="$ac_cv_prog_CC"
575if test -n "$CC"; then
576 echo "$ac_t""$CC" 1>&6
577else
578 echo "$ac_t""no" 1>&6
579fi
580
1a7b4b7c
DE
581if test -z "$CC"; then
582 # Extract the first word of "cc", so it can be a program name with args.
583set dummy cc; ac_word=$2
584echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4ff3dfab 585echo "configure:586: checking for $ac_word" >&5
1a7b4b7c
DE
586if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
587 echo $ac_n "(cached) $ac_c" 1>&6
588else
589 if test -n "$CC"; then
590 ac_cv_prog_CC="$CC" # Let the user override the test.
591else
4ff3dfab 592 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
1a7b4b7c
DE
593 ac_prog_rejected=no
594 for ac_dir in $PATH; do
595 test -z "$ac_dir" && ac_dir=.
596 if test -f $ac_dir/$ac_word; then
597 if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
598 ac_prog_rejected=yes
599 continue
600 fi
601 ac_cv_prog_CC="cc"
602 break
603 fi
604 done
605 IFS="$ac_save_ifs"
606if test $ac_prog_rejected = yes; then
607 # We found a bogon in the path, so make sure we never use it.
608 set dummy $ac_cv_prog_CC
609 shift
610 if test $# -gt 0; then
611 # We chose a different compiler from the bogus one.
612 # However, it has the same basename, so the bogon will be chosen
613 # first if we set CC to just the basename; use the full file name.
614 shift
615 set dummy "$ac_dir/$ac_word" "$@"
616 shift
617 ac_cv_prog_CC="$@"
618 fi
619fi
620fi
621fi
622CC="$ac_cv_prog_CC"
623if test -n "$CC"; then
624 echo "$ac_t""$CC" 1>&6
625else
626 echo "$ac_t""no" 1>&6
627fi
628
629 test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
630fi
5436fc65 631
bfde4a67 632echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
4ff3dfab 633echo "configure:634: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
bfde4a67
SG
634
635ac_ext=c
636# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
637ac_cpp='$CPP $CPPFLAGS'
638ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
4ff3dfab 639ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
bfde4a67
SG
640cross_compiling=$ac_cv_prog_cc_cross
641
642cat > conftest.$ac_ext <<EOF
4ff3dfab 643#line 644 "configure"
bfde4a67
SG
644#include "confdefs.h"
645main(){return(0);}
646EOF
4ff3dfab 647if { (eval echo configure:648: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
bfde4a67
SG
648 ac_cv_prog_cc_works=yes
649 # If we can't run a trivial program, we are probably using a cross compiler.
650 if (./conftest; exit) 2>/dev/null; then
651 ac_cv_prog_cc_cross=no
652 else
653 ac_cv_prog_cc_cross=yes
654 fi
655else
656 echo "configure: failed program was:" >&5
657 cat conftest.$ac_ext >&5
658 ac_cv_prog_cc_works=no
659fi
660rm -fr conftest*
661
662echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
663if test $ac_cv_prog_cc_works = no; then
664 { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
665fi
666echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
4ff3dfab 667echo "configure:668: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
bfde4a67
SG
668echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
669cross_compiling=$ac_cv_prog_cc_cross
670
5436fc65 671echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
4ff3dfab 672echo "configure:673: checking whether we are using GNU C" >&5
5436fc65
C
673if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
674 echo $ac_n "(cached) $ac_c" 1>&6
675else
676 cat > conftest.c <<EOF
677#ifdef __GNUC__
678 yes;
679#endif
680EOF
4ff3dfab 681if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:682: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
5436fc65
C
682 ac_cv_prog_gcc=yes
683else
684 ac_cv_prog_gcc=no
685fi
686fi
1a7b4b7c 687
5436fc65 688echo "$ac_t""$ac_cv_prog_gcc" 1>&6
bfde4a67 689
5436fc65
C
690if test $ac_cv_prog_gcc = yes; then
691 GCC=yes
4ff3dfab
JM
692 ac_test_CFLAGS="${CFLAGS+set}"
693 ac_save_CFLAGS="$CFLAGS"
694 CFLAGS=
695 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
696echo "configure:697: checking whether ${CC-cc} accepts -g" >&5
bfde4a67 697if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
5436fc65
C
698 echo $ac_n "(cached) $ac_c" 1>&6
699else
700 echo 'void f(){}' > conftest.c
701if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
bfde4a67 702 ac_cv_prog_cc_g=yes
5436fc65 703else
bfde4a67 704 ac_cv_prog_cc_g=no
5436fc65
C
705fi
706rm -f conftest*
707
708fi
1a7b4b7c 709
bfde4a67 710echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
4ff3dfab
JM
711 if test "$ac_test_CFLAGS" = set; then
712 CFLAGS="$ac_save_CFLAGS"
713 elif test $ac_cv_prog_cc_g = yes; then
bfde4a67
SG
714 CFLAGS="-g -O2"
715 else
eac4afd1 716 CFLAGS="-O2"
eac4afd1 717 fi
4ff3dfab
JM
718else
719 GCC=
720 test "${CFLAGS+set}" = set || CFLAGS="-g"
5436fc65
C
721fi
722
723echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
4ff3dfab 724echo "configure:725: checking how to run the C preprocessor" >&5
5436fc65
C
725# On Suns, sometimes $CPP names a directory.
726if test -n "$CPP" && test -d "$CPP"; then
727 CPP=
728fi
729if test -z "$CPP"; then
730if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
731 echo $ac_n "(cached) $ac_c" 1>&6
732else
733 # This must be in double quotes, not single quotes, because CPP may get
734 # substituted into the Makefile and "${CC-cc}" will confuse make.
735 CPP="${CC-cc} -E"
736 # On the NeXT, cc -E runs the code through the compiler's parser,
737 # not just through cpp.
738 cat > conftest.$ac_ext <<EOF
4ff3dfab 739#line 740 "configure"
5436fc65
C
740#include "confdefs.h"
741#include <assert.h>
742Syntax Error
743EOF
1a7b4b7c 744ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4ff3dfab
JM
745{ (eval echo configure:746: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
746ac_err=`grep -v '^ *+' conftest.out`
5436fc65
C
747if test -z "$ac_err"; then
748 :
749else
750 echo "$ac_err" >&5
bfde4a67
SG
751 echo "configure: failed program was:" >&5
752 cat conftest.$ac_ext >&5
5436fc65
C
753 rm -rf conftest*
754 CPP="${CC-cc} -E -traditional-cpp"
755 cat > conftest.$ac_ext <<EOF
4ff3dfab 756#line 757 "configure"
eac4afd1
JM
757#include "confdefs.h"
758#include <assert.h>
759Syntax Error
760EOF
761ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4ff3dfab
JM
762{ (eval echo configure:763: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
763ac_err=`grep -v '^ *+' conftest.out`
5436fc65
C
764if test -z "$ac_err"; then
765 :
766else
767 echo "$ac_err" >&5
bfde4a67
SG
768 echo "configure: failed program was:" >&5
769 cat conftest.$ac_ext >&5
5436fc65 770 rm -rf conftest*
fcfc3c0c
TT
771 CPP=/lib/cpp
772fi
773rm -f conftest*
774fi
775rm -f conftest*
776 ac_cv_prog_CPP="$CPP"
777fi
778 CPP="$ac_cv_prog_CPP"
779else
780 ac_cv_prog_CPP="$CPP"
781fi
782echo "$ac_t""$CPP" 1>&6
783
784echo $ac_n "checking for AIX""... $ac_c" 1>&6
4ff3dfab 785echo "configure:786: checking for AIX" >&5
fcfc3c0c 786cat > conftest.$ac_ext <<EOF
4ff3dfab 787#line 788 "configure"
fcfc3c0c
TT
788#include "confdefs.h"
789#ifdef _AIX
790 yes
791#endif
792
793EOF
794if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
795 egrep "yes" >/dev/null 2>&1; then
796 rm -rf conftest*
797 echo "$ac_t""yes" 1>&6; cat >> confdefs.h <<\EOF
798#define _ALL_SOURCE 1
799EOF
800
801else
802 rm -rf conftest*
803 echo "$ac_t""no" 1>&6
804fi
805rm -f conftest*
806
807
808ac_safe=`echo "minix/config.h" | sed 'y%./+-%__p_%'`
809echo $ac_n "checking for minix/config.h""... $ac_c" 1>&6
4ff3dfab 810echo "configure:811: checking for minix/config.h" >&5
fcfc3c0c
TT
811if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
812 echo $ac_n "(cached) $ac_c" 1>&6
813else
814 cat > conftest.$ac_ext <<EOF
4ff3dfab 815#line 816 "configure"
fcfc3c0c
TT
816#include "confdefs.h"
817#include <minix/config.h>
818EOF
819ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4ff3dfab
JM
820{ (eval echo configure:821: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
821ac_err=`grep -v '^ *+' conftest.out`
fcfc3c0c
TT
822if test -z "$ac_err"; then
823 rm -rf conftest*
824 eval "ac_cv_header_$ac_safe=yes"
825else
826 echo "$ac_err" >&5
827 echo "configure: failed program was:" >&5
828 cat conftest.$ac_ext >&5
829 rm -rf conftest*
830 eval "ac_cv_header_$ac_safe=no"
831fi
832rm -f conftest*
833fi
834if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
835 echo "$ac_t""yes" 1>&6
836 MINIX=yes
837else
838 echo "$ac_t""no" 1>&6
839MINIX=
840fi
841
842if test "$MINIX" = yes; then
843 cat >> confdefs.h <<\EOF
844#define _POSIX_SOURCE 1
845EOF
846
847 cat >> confdefs.h <<\EOF
848#define _POSIX_1_SOURCE 2
849EOF
850
851 cat >> confdefs.h <<\EOF
852#define _MINIX 1
853EOF
854
855fi
856
857echo $ac_n "checking for POSIXized ISC""... $ac_c" 1>&6
4ff3dfab 858echo "configure:859: checking for POSIXized ISC" >&5
fcfc3c0c
TT
859if test -d /etc/conf/kconfig.d &&
860 grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1
861then
862 echo "$ac_t""yes" 1>&6
863 ISC=yes # If later tests want to check for ISC.
864 cat >> confdefs.h <<\EOF
865#define _POSIX_SOURCE 1
866EOF
867
868 if test "$GCC" = yes; then
869 CC="$CC -posix"
870 else
871 CC="$CC -Xp"
872 fi
873else
874 echo "$ac_t""no" 1>&6
875 ISC=
876fi
877
878
879DLLTOOL=${DLLTOOL-dlltool}
880
881
882ac_aux_dir=
883for ac_dir in `cd $srcdir;pwd`/.. $srcdir/`cd $srcdir;pwd`/..; do
884 if test -f $ac_dir/install-sh; then
885 ac_aux_dir=$ac_dir
886 ac_install_sh="$ac_aux_dir/install-sh -c"
887 break
888 elif test -f $ac_dir/install.sh; then
889 ac_aux_dir=$ac_dir
890 ac_install_sh="$ac_aux_dir/install.sh -c"
891 break
892 fi
893done
894if test -z "$ac_aux_dir"; then
895 { echo "configure: error: can not find install-sh or install.sh in `cd $srcdir;pwd`/.. $srcdir/`cd $srcdir;pwd`/.." 1>&2; exit 1; }
896fi
897ac_config_guess=$ac_aux_dir/config.guess
898ac_config_sub=$ac_aux_dir/config.sub
899ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
900
901
902# Do some error checking and defaulting for the host and target type.
903# The inputs are:
904# configure --host=HOST --target=TARGET --build=BUILD NONOPT
905#
906# The rules are:
907# 1. You are not allowed to specify --host, --target, and nonopt at the
908# same time.
909# 2. Host defaults to nonopt.
910# 3. If nonopt is not specified, then host defaults to the current host,
911# as determined by config.guess.
912# 4. Target and build default to nonopt.
913# 5. If nonopt is not specified, then target and build default to host.
914
915# The aliases save the names the user supplied, while $host etc.
916# will get canonicalized.
917case $host---$target---$nonopt in
918NONE---*---* | *---NONE---* | *---*---NONE) ;;
919*) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;;
920esac
921
922
923# Make sure we can run config.sub.
4ff3dfab 924if $ac_config_sub sun4 >/dev/null 2>&1; then :
fcfc3c0c
TT
925else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
926fi
927
928echo $ac_n "checking host system type""... $ac_c" 1>&6
4ff3dfab 929echo "configure:930: checking host system type" >&5
fcfc3c0c
TT
930
931host_alias=$host
932case "$host_alias" in
933NONE)
934 case $nonopt in
935 NONE)
4ff3dfab 936 if host_alias=`$ac_config_guess`; then :
fcfc3c0c
TT
937 else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
938 fi ;;
939 *) host_alias=$nonopt ;;
940 esac ;;
941esac
942
4ff3dfab 943host=`$ac_config_sub $host_alias`
fcfc3c0c
TT
944host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
945host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
946host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
947echo "$ac_t""$host" 1>&6
948
949echo $ac_n "checking target system type""... $ac_c" 1>&6
4ff3dfab 950echo "configure:951: checking target system type" >&5
fcfc3c0c
TT
951
952target_alias=$target
953case "$target_alias" in
954NONE)
955 case $nonopt in
956 NONE) target_alias=$host_alias ;;
957 *) target_alias=$nonopt ;;
958 esac ;;
959esac
960
4ff3dfab 961target=`$ac_config_sub $target_alias`
fcfc3c0c
TT
962target_cpu=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
963target_vendor=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
964target_os=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
965echo "$ac_t""$target" 1>&6
966
967echo $ac_n "checking build system type""... $ac_c" 1>&6
4ff3dfab 968echo "configure:969: checking build system type" >&5
fcfc3c0c
TT
969
970build_alias=$build
971case "$build_alias" in
972NONE)
973 case $nonopt in
974 NONE) build_alias=$host_alias ;;
975 *) build_alias=$nonopt ;;
976 esac ;;
977esac
978
4ff3dfab 979build=`$ac_config_sub $build_alias`
fcfc3c0c
TT
980build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
981build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
982build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
983echo "$ac_t""$build" 1>&6
984
985test "$host_alias" != "$target_alias" &&
986 test "$program_prefix$program_suffix$program_transform_name" = \
987 NONENONEs,x,x, &&
988 program_prefix=${target_alias}-
989
990
991ALL_LINGUAS=
992echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
4ff3dfab 993echo "configure:994: checking whether ${MAKE-make} sets \${MAKE}" >&5
fcfc3c0c
TT
994set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
995if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
996 echo $ac_n "(cached) $ac_c" 1>&6
997else
998 cat > conftestmake <<\EOF
999all:
1000 @echo 'ac_maketemp="${MAKE}"'
1001EOF
1002# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
1003eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
1004if test -n "$ac_maketemp"; then
1005 eval ac_cv_prog_make_${ac_make}_set=yes
1006else
1007 eval ac_cv_prog_make_${ac_make}_set=no
1008fi
1009rm -f conftestmake
1010fi
1011if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
1012 echo "$ac_t""yes" 1>&6
1013 SET_MAKE=
1014else
1015 echo "$ac_t""no" 1>&6
1016 SET_MAKE="MAKE=${MAKE-make}"
1017fi
1018
1019# Extract the first word of "ranlib", so it can be a program name with args.
1020set dummy ranlib; ac_word=$2
1021echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4ff3dfab 1022echo "configure:1023: checking for $ac_word" >&5
fcfc3c0c
TT
1023if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
1024 echo $ac_n "(cached) $ac_c" 1>&6
1025else
1026 if test -n "$RANLIB"; then
1027 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
1028else
4ff3dfab 1029 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
fcfc3c0c
TT
1030 for ac_dir in $PATH; do
1031 test -z "$ac_dir" && ac_dir=.
1032 if test -f $ac_dir/$ac_word; then
1033 ac_cv_prog_RANLIB="ranlib"
1034 break
1035 fi
1036 done
1037 IFS="$ac_save_ifs"
1038 test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
1039fi
1040fi
1041RANLIB="$ac_cv_prog_RANLIB"
1042if test -n "$RANLIB"; then
1043 echo "$ac_t""$RANLIB" 1>&6
1044else
1045 echo "$ac_t""no" 1>&6
1046fi
1047
1048echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
4ff3dfab 1049echo "configure:1050: checking for ANSI C header files" >&5
fcfc3c0c
TT
1050if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
1051 echo $ac_n "(cached) $ac_c" 1>&6
1052else
1053 cat > conftest.$ac_ext <<EOF
4ff3dfab 1054#line 1055 "configure"
fcfc3c0c
TT
1055#include "confdefs.h"
1056#include <stdlib.h>
1057#include <stdarg.h>
1058#include <string.h>
1059#include <float.h>
1060EOF
1061ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4ff3dfab
JM
1062{ (eval echo configure:1063: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1063ac_err=`grep -v '^ *+' conftest.out`
fcfc3c0c
TT
1064if test -z "$ac_err"; then
1065 rm -rf conftest*
1066 ac_cv_header_stdc=yes
1067else
1068 echo "$ac_err" >&5
1069 echo "configure: failed program was:" >&5
1070 cat conftest.$ac_ext >&5
1071 rm -rf conftest*
1072 ac_cv_header_stdc=no
1073fi
1074rm -f conftest*
1075
1076if test $ac_cv_header_stdc = yes; then
1077 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
1078cat > conftest.$ac_ext <<EOF
4ff3dfab 1079#line 1080 "configure"
fcfc3c0c
TT
1080#include "confdefs.h"
1081#include <string.h>
1082EOF
1083if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1084 egrep "memchr" >/dev/null 2>&1; then
1085 :
1086else
1087 rm -rf conftest*
1088 ac_cv_header_stdc=no
1089fi
1090rm -f conftest*
1091
1092fi
1093
1094if test $ac_cv_header_stdc = yes; then
1095 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
1096cat > conftest.$ac_ext <<EOF
4ff3dfab 1097#line 1098 "configure"
fcfc3c0c
TT
1098#include "confdefs.h"
1099#include <stdlib.h>
1100EOF
1101if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1102 egrep "free" >/dev/null 2>&1; then
1103 :
1104else
1105 rm -rf conftest*
1106 ac_cv_header_stdc=no
1107fi
1108rm -f conftest*
1109
1110fi
1111
1112if test $ac_cv_header_stdc = yes; then
1113 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
1114if test "$cross_compiling" = yes; then
1115 :
1116else
1117 cat > conftest.$ac_ext <<EOF
4ff3dfab 1118#line 1119 "configure"
fcfc3c0c
TT
1119#include "confdefs.h"
1120#include <ctype.h>
1121#define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
1122#define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
1123#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
1124int main () { int i; for (i = 0; i < 256; i++)
1125if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
1126exit (0); }
1127
1128EOF
4ff3dfab 1129if { (eval echo configure:1130: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
fcfc3c0c
TT
1130then
1131 :
1132else
1133 echo "configure: failed program was:" >&5
1134 cat conftest.$ac_ext >&5
1135 rm -fr conftest*
1136 ac_cv_header_stdc=no
1137fi
1138rm -fr conftest*
1139fi
1140
1141fi
1142fi
1143
1144echo "$ac_t""$ac_cv_header_stdc" 1>&6
1145if test $ac_cv_header_stdc = yes; then
1146 cat >> confdefs.h <<\EOF
1147#define STDC_HEADERS 1
1148EOF
1149
1150fi
1151
1152echo $ac_n "checking for working const""... $ac_c" 1>&6
4ff3dfab 1153echo "configure:1154: checking for working const" >&5
fcfc3c0c
TT
1154if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
1155 echo $ac_n "(cached) $ac_c" 1>&6
1156else
1157 cat > conftest.$ac_ext <<EOF
4ff3dfab 1158#line 1159 "configure"
fcfc3c0c
TT
1159#include "confdefs.h"
1160
1161int main() {
1162
1163/* Ultrix mips cc rejects this. */
1164typedef int charset[2]; const charset x;
1165/* SunOS 4.1.1 cc rejects this. */
1166char const *const *ccp;
1167char **p;
1168/* NEC SVR4.0.2 mips cc rejects this. */
1169struct point {int x, y;};
1170static struct point const zero = {0,0};
1171/* AIX XL C 1.02.0.0 rejects this.
1172 It does not let you subtract one const X* pointer from another in an arm
1173 of an if-expression whose if-part is not a constant expression */
1174const char *g = "string";
1175ccp = &g + (g ? g-g : 0);
1176/* HPUX 7.0 cc rejects these. */
1177++ccp;
1178p = (char**) ccp;
1179ccp = (char const *const *) p;
1180{ /* SCO 3.2v4 cc rejects this. */
1181 char *t;
1182 char const *s = 0 ? (char *) 0 : (char const *) 0;
1183
1184 *t++ = 0;
1185}
1186{ /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
1187 int x[] = {25, 17};
1188 const int *foo = &x[0];
1189 ++foo;
1190}
1191{ /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
1192 typedef const int *iptr;
1193 iptr p = 0;
1194 ++p;
1195}
1196{ /* AIX XL C 1.02.0.0 rejects this saying
1197 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
1198 struct s { int j; const int *ap[3]; };
1199 struct s *b; b->j = 5;
1200}
1201{ /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
1202 const int foo = 10;
1203}
1204
1205; return 0; }
1206EOF
4ff3dfab 1207if { (eval echo configure:1208: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
fcfc3c0c
TT
1208 rm -rf conftest*
1209 ac_cv_c_const=yes
1210else
1211 echo "configure: failed program was:" >&5
1212 cat conftest.$ac_ext >&5
1213 rm -rf conftest*
1214 ac_cv_c_const=no
1215fi
1216rm -f conftest*
1217fi
1218
1219echo "$ac_t""$ac_cv_c_const" 1>&6
1220if test $ac_cv_c_const = no; then
1221 cat >> confdefs.h <<\EOF
1222#define const
1223EOF
1224
1225fi
1226
1227echo $ac_n "checking for inline""... $ac_c" 1>&6
4ff3dfab 1228echo "configure:1229: checking for inline" >&5
fcfc3c0c
TT
1229if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then
1230 echo $ac_n "(cached) $ac_c" 1>&6
1231else
1232 ac_cv_c_inline=no
1233for ac_kw in inline __inline__ __inline; do
1234 cat > conftest.$ac_ext <<EOF
4ff3dfab 1235#line 1236 "configure"
fcfc3c0c
TT
1236#include "confdefs.h"
1237
1238int main() {
1239} $ac_kw foo() {
1240; return 0; }
1241EOF
4ff3dfab 1242if { (eval echo configure:1243: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
fcfc3c0c
TT
1243 rm -rf conftest*
1244 ac_cv_c_inline=$ac_kw; break
1245else
1246 echo "configure: failed program was:" >&5
1247 cat conftest.$ac_ext >&5
1248fi
1249rm -f conftest*
1250done
1251
1252fi
1253
1254echo "$ac_t""$ac_cv_c_inline" 1>&6
1255case "$ac_cv_c_inline" in
1256 inline | yes) ;;
1257 no) cat >> confdefs.h <<\EOF
1258#define inline
1259EOF
1260 ;;
1261 *) cat >> confdefs.h <<EOF
1262#define inline $ac_cv_c_inline
1263EOF
1264 ;;
1265esac
1266
1267echo $ac_n "checking for off_t""... $ac_c" 1>&6
4ff3dfab 1268echo "configure:1269: checking for off_t" >&5
fcfc3c0c
TT
1269if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then
1270 echo $ac_n "(cached) $ac_c" 1>&6
1271else
1272 cat > conftest.$ac_ext <<EOF
4ff3dfab 1273#line 1274 "configure"
fcfc3c0c
TT
1274#include "confdefs.h"
1275#include <sys/types.h>
1276#if STDC_HEADERS
1277#include <stdlib.h>
1278#include <stddef.h>
1279#endif
1280EOF
1281if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1282 egrep "off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
1283 rm -rf conftest*
1284 ac_cv_type_off_t=yes
1285else
1286 rm -rf conftest*
1287 ac_cv_type_off_t=no
1288fi
1289rm -f conftest*
1290
1291fi
1292echo "$ac_t""$ac_cv_type_off_t" 1>&6
1293if test $ac_cv_type_off_t = no; then
1294 cat >> confdefs.h <<\EOF
1295#define off_t long
1296EOF
1297
1298fi
1299
1300echo $ac_n "checking for size_t""... $ac_c" 1>&6
4ff3dfab 1301echo "configure:1302: checking for size_t" >&5
fcfc3c0c
TT
1302if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
1303 echo $ac_n "(cached) $ac_c" 1>&6
1304else
1305 cat > conftest.$ac_ext <<EOF
4ff3dfab 1306#line 1307 "configure"
fcfc3c0c
TT
1307#include "confdefs.h"
1308#include <sys/types.h>
1309#if STDC_HEADERS
1310#include <stdlib.h>
1311#include <stddef.h>
1312#endif
1313EOF
1314if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1315 egrep "size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
1316 rm -rf conftest*
1317 ac_cv_type_size_t=yes
1318else
1319 rm -rf conftest*
1320 ac_cv_type_size_t=no
1321fi
1322rm -f conftest*
1323
1324fi
1325echo "$ac_t""$ac_cv_type_size_t" 1>&6
1326if test $ac_cv_type_size_t = no; then
1327 cat >> confdefs.h <<\EOF
1328#define size_t unsigned
1329EOF
1330
1331fi
1332
1333# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
1334# for constant arguments. Useless!
1335echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6
4ff3dfab 1336echo "configure:1337: checking for working alloca.h" >&5
fcfc3c0c
TT
1337if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then
1338 echo $ac_n "(cached) $ac_c" 1>&6
1339else
1340 cat > conftest.$ac_ext <<EOF
4ff3dfab 1341#line 1342 "configure"
fcfc3c0c
TT
1342#include "confdefs.h"
1343#include <alloca.h>
1344int main() {
1345char *p = alloca(2 * sizeof(int));
1346; return 0; }
1347EOF
4ff3dfab 1348if { (eval echo configure:1349: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
fcfc3c0c
TT
1349 rm -rf conftest*
1350 ac_cv_header_alloca_h=yes
1351else
1352 echo "configure: failed program was:" >&5
1353 cat conftest.$ac_ext >&5
1354 rm -rf conftest*
1355 ac_cv_header_alloca_h=no
1356fi
1357rm -f conftest*
1358fi
1359
1360echo "$ac_t""$ac_cv_header_alloca_h" 1>&6
1361if test $ac_cv_header_alloca_h = yes; then
1362 cat >> confdefs.h <<\EOF
1363#define HAVE_ALLOCA_H 1
1364EOF
1365
1366fi
1367
1368echo $ac_n "checking for alloca""... $ac_c" 1>&6
4ff3dfab 1369echo "configure:1370: checking for alloca" >&5
fcfc3c0c
TT
1370if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then
1371 echo $ac_n "(cached) $ac_c" 1>&6
1372else
1373 cat > conftest.$ac_ext <<EOF
4ff3dfab 1374#line 1375 "configure"
fcfc3c0c
TT
1375#include "confdefs.h"
1376
1377#ifdef __GNUC__
1378# define alloca __builtin_alloca
1379#else
4ff3dfab
JM
1380# if HAVE_ALLOCA_H
1381# include <alloca.h>
fcfc3c0c 1382# else
4ff3dfab 1383# ifdef _AIX
eac4afd1 1384 #pragma alloca
4ff3dfab
JM
1385# else
1386# ifndef alloca /* predefined by HP cc +Olibcalls */
fcfc3c0c
TT
1387char *alloca ();
1388# endif
1389# endif
1390# endif
1391#endif
1392
1393int main() {
1394char *p = (char *) alloca(1);
1395; return 0; }
1396EOF
4ff3dfab 1397if { (eval echo configure:1398: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
fcfc3c0c
TT
1398 rm -rf conftest*
1399 ac_cv_func_alloca_works=yes
1400else
1401 echo "configure: failed program was:" >&5
1402 cat conftest.$ac_ext >&5
1403 rm -rf conftest*
1404 ac_cv_func_alloca_works=no
1405fi
1406rm -f conftest*
1407fi
1408
1409echo "$ac_t""$ac_cv_func_alloca_works" 1>&6
1410if test $ac_cv_func_alloca_works = yes; then
1411 cat >> confdefs.h <<\EOF
1412#define HAVE_ALLOCA 1
1413EOF
1414
1415fi
1416
1417if test $ac_cv_func_alloca_works = no; then
1418 # The SVR3 libPW and SVR4 libucb both contain incompatible functions
1419 # that cause trouble. Some versions do not even contain alloca or
1420 # contain a buggy version. If you still want to use their alloca,
1421 # use ar to extract alloca.o from them instead of compiling alloca.c.
4ff3dfab 1422 ALLOCA=alloca.o
fcfc3c0c
TT
1423 cat >> confdefs.h <<\EOF
1424#define C_ALLOCA 1
1425EOF
1426
1427
1428echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
4ff3dfab 1429echo "configure:1430: checking whether alloca needs Cray hooks" >&5
fcfc3c0c
TT
1430if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then
1431 echo $ac_n "(cached) $ac_c" 1>&6
1432else
1433 cat > conftest.$ac_ext <<EOF
4ff3dfab 1434#line 1435 "configure"
fcfc3c0c
TT
1435#include "confdefs.h"
1436#if defined(CRAY) && ! defined(CRAY2)
1437webecray
1438#else
1439wenotbecray
1440#endif
1441
1442EOF
1443if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1444 egrep "webecray" >/dev/null 2>&1; then
1445 rm -rf conftest*
1446 ac_cv_os_cray=yes
1447else
1448 rm -rf conftest*
1449 ac_cv_os_cray=no
1450fi
1451rm -f conftest*
1452
1453fi
1454
1455echo "$ac_t""$ac_cv_os_cray" 1>&6
1456if test $ac_cv_os_cray = yes; then
1457for ac_func in _getb67 GETB67 getb67; do
1458 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4ff3dfab 1459echo "configure:1460: checking for $ac_func" >&5
fcfc3c0c
TT
1460if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
1461 echo $ac_n "(cached) $ac_c" 1>&6
1462else
1463 cat > conftest.$ac_ext <<EOF
4ff3dfab 1464#line 1465 "configure"
fcfc3c0c
TT
1465#include "confdefs.h"
1466/* System header to define __stub macros and hopefully few prototypes,
1467 which can conflict with char $ac_func(); below. */
1468#include <assert.h>
1469/* Override any gcc2 internal prototype to avoid an error. */
1470/* We use char because int might match the return type of a gcc2
1471 builtin and then its argument prototype would still apply. */
1472char $ac_func();
1473
1474int main() {
1475
1476/* The GNU C library defines this for functions which it implements
1477 to always fail with ENOSYS. Some functions are actually named
1478 something starting with __ and the normal name is an alias. */
1479#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
1480choke me
1481#else
1482$ac_func();
1483#endif
1484
1485; return 0; }
1486EOF
4ff3dfab 1487if { (eval echo configure:1488: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
fcfc3c0c
TT
1488 rm -rf conftest*
1489 eval "ac_cv_func_$ac_func=yes"
1490else
1491 echo "configure: failed program was:" >&5
1492 cat conftest.$ac_ext >&5
1493 rm -rf conftest*
1494 eval "ac_cv_func_$ac_func=no"
1495fi
1496rm -f conftest*
1497fi
1498
1499if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
1500 echo "$ac_t""yes" 1>&6
1501 cat >> confdefs.h <<EOF
1502#define CRAY_STACKSEG_END $ac_func
1503EOF
1504
1505 break
1506else
1507 echo "$ac_t""no" 1>&6
1508fi
1509
1510done
1511fi
1512
1513echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
4ff3dfab 1514echo "configure:1515: checking stack direction for C alloca" >&5
fcfc3c0c
TT
1515if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then
1516 echo $ac_n "(cached) $ac_c" 1>&6
1517else
1518 if test "$cross_compiling" = yes; then
1519 ac_cv_c_stack_direction=0
1520else
1521 cat > conftest.$ac_ext <<EOF
4ff3dfab 1522#line 1523 "configure"
fcfc3c0c
TT
1523#include "confdefs.h"
1524find_stack_direction ()
1525{
1526 static char *addr = 0;
1527 auto char dummy;
1528 if (addr == 0)
1529 {
1530 addr = &dummy;
1531 return find_stack_direction ();
1532 }
1533 else
1534 return (&dummy > addr) ? 1 : -1;
1535}
1536main ()
1537{
1538 exit (find_stack_direction() < 0);
1539}
1540EOF
4ff3dfab 1541if { (eval echo configure:1542: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
fcfc3c0c
TT
1542then
1543 ac_cv_c_stack_direction=1
1544else
1545 echo "configure: failed program was:" >&5
1546 cat conftest.$ac_ext >&5
1547 rm -fr conftest*
1548 ac_cv_c_stack_direction=-1
1549fi
1550rm -fr conftest*
1551fi
1552
1553fi
1554
1555echo "$ac_t""$ac_cv_c_stack_direction" 1>&6
1556cat >> confdefs.h <<EOF
1557#define STACK_DIRECTION $ac_cv_c_stack_direction
1558EOF
1559
1560fi
1561
1562for ac_hdr in unistd.h
1563do
1564ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
1565echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4ff3dfab 1566echo "configure:1567: checking for $ac_hdr" >&5
fcfc3c0c
TT
1567if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1568 echo $ac_n "(cached) $ac_c" 1>&6
1569else
1570 cat > conftest.$ac_ext <<EOF
4ff3dfab 1571#line 1572 "configure"
fcfc3c0c
TT
1572#include "confdefs.h"
1573#include <$ac_hdr>
1574EOF
1575ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4ff3dfab
JM
1576{ (eval echo configure:1577: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1577ac_err=`grep -v '^ *+' conftest.out`
fcfc3c0c
TT
1578if test -z "$ac_err"; then
1579 rm -rf conftest*
1580 eval "ac_cv_header_$ac_safe=yes"
1581else
1582 echo "$ac_err" >&5
1583 echo "configure: failed program was:" >&5
1584 cat conftest.$ac_ext >&5
1585 rm -rf conftest*
1586 eval "ac_cv_header_$ac_safe=no"
1587fi
1588rm -f conftest*
1589fi
1590if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1591 echo "$ac_t""yes" 1>&6
1592 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
1593 cat >> confdefs.h <<EOF
1594#define $ac_tr_hdr 1
1595EOF
1596
1597else
1598 echo "$ac_t""no" 1>&6
1599fi
1600done
1601
1602for ac_func in getpagesize
1603do
1604echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4ff3dfab 1605echo "configure:1606: checking for $ac_func" >&5
fcfc3c0c
TT
1606if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
1607 echo $ac_n "(cached) $ac_c" 1>&6
1608else
1609 cat > conftest.$ac_ext <<EOF
4ff3dfab 1610#line 1611 "configure"
fcfc3c0c
TT
1611#include "confdefs.h"
1612/* System header to define __stub macros and hopefully few prototypes,
1613 which can conflict with char $ac_func(); below. */
1614#include <assert.h>
1615/* Override any gcc2 internal prototype to avoid an error. */
1616/* We use char because int might match the return type of a gcc2
1617 builtin and then its argument prototype would still apply. */
1618char $ac_func();
1619
1620int main() {
1621
1622/* The GNU C library defines this for functions which it implements
1623 to always fail with ENOSYS. Some functions are actually named
1624 something starting with __ and the normal name is an alias. */
1625#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
1626choke me
1627#else
1628$ac_func();
1629#endif
1630
1631; return 0; }
1632EOF
4ff3dfab 1633if { (eval echo configure:1634: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
fcfc3c0c
TT
1634 rm -rf conftest*
1635 eval "ac_cv_func_$ac_func=yes"
1636else
1637 echo "configure: failed program was:" >&5
1638 cat conftest.$ac_ext >&5
1639 rm -rf conftest*
1640 eval "ac_cv_func_$ac_func=no"
1641fi
1642rm -f conftest*
1643fi
1644
1645if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
1646 echo "$ac_t""yes" 1>&6
1647 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
1648 cat >> confdefs.h <<EOF
1649#define $ac_tr_func 1
1650EOF
1651
1652else
1653 echo "$ac_t""no" 1>&6
1654fi
1655done
1656
1657echo $ac_n "checking for working mmap""... $ac_c" 1>&6
4ff3dfab 1658echo "configure:1659: checking for working mmap" >&5
fcfc3c0c
TT
1659if eval "test \"`echo '$''{'ac_cv_func_mmap_fixed_mapped'+set}'`\" = set"; then
1660 echo $ac_n "(cached) $ac_c" 1>&6
1661else
1662 if test "$cross_compiling" = yes; then
1663 ac_cv_func_mmap_fixed_mapped=no
1664else
1665 cat > conftest.$ac_ext <<EOF
4ff3dfab 1666#line 1667 "configure"
fcfc3c0c
TT
1667#include "confdefs.h"
1668
1669/* Thanks to Mike Haertel and Jim Avera for this test.
1670 Here is a matrix of mmap possibilities:
1671 mmap private not fixed
1672 mmap private fixed at somewhere currently unmapped
1673 mmap private fixed at somewhere already mapped
1674 mmap shared not fixed
1675 mmap shared fixed at somewhere currently unmapped
1676 mmap shared fixed at somewhere already mapped
1677 For private mappings, we should verify that changes cannot be read()
1678 back from the file, nor mmap's back from the file at a different
1679 address. (There have been systems where private was not correctly
1680 implemented like the infamous i386 svr4.0, and systems where the
1681 VM page cache was not coherent with the filesystem buffer cache
1682 like early versions of FreeBSD and possibly contemporary NetBSD.)
1683 For shared mappings, we should conversely verify that changes get
1684 propogated back to all the places they're supposed to be.
1685
1686 Grep wants private fixed already mapped.
1687 The main things grep needs to know about mmap are:
1688 * does it exist and is it safe to write into the mmap'd area
1689 * how to use it (BSD variants) */
1690#include <sys/types.h>
1691#include <fcntl.h>
1692#include <sys/mman.h>
1693
1694/* This mess was copied from the GNU getpagesize.h. */
1695#ifndef HAVE_GETPAGESIZE
1696# ifdef HAVE_UNISTD_H
1697# include <unistd.h>
1698# endif
1699
1700/* Assume that all systems that can run configure have sys/param.h. */
1701# ifndef HAVE_SYS_PARAM_H
1702# define HAVE_SYS_PARAM_H 1
1703# endif
1704
1705# ifdef _SC_PAGESIZE
1706# define getpagesize() sysconf(_SC_PAGESIZE)
1707# else /* no _SC_PAGESIZE */
1708# ifdef HAVE_SYS_PARAM_H
1709# include <sys/param.h>
1710# ifdef EXEC_PAGESIZE
1711# define getpagesize() EXEC_PAGESIZE
1712# else /* no EXEC_PAGESIZE */
1713# ifdef NBPG
1714# define getpagesize() NBPG * CLSIZE
1715# ifndef CLSIZE
1716# define CLSIZE 1
1717# endif /* no CLSIZE */
1718# else /* no NBPG */
1719# ifdef NBPC
1720# define getpagesize() NBPC
1721# else /* no NBPC */
1722# ifdef PAGESIZE
1723# define getpagesize() PAGESIZE
1724# endif /* PAGESIZE */
1725# endif /* no NBPC */
1726# endif /* no NBPG */
1727# endif /* no EXEC_PAGESIZE */
1728# else /* no HAVE_SYS_PARAM_H */
1729# define getpagesize() 8192 /* punt totally */
1730# endif /* no HAVE_SYS_PARAM_H */
1731# endif /* no _SC_PAGESIZE */
1732
1733#endif /* no HAVE_GETPAGESIZE */
1734
1735#ifdef __cplusplus
1736extern "C" { void *malloc(unsigned); }
1737#else
1738char *malloc();
1739#endif
1740
1741int
1742main()
1743{
1744 char *data, *data2, *data3;
1745 int i, pagesize;
1746 int fd;
1747
1748 pagesize = getpagesize();
1749
1750 /*
1751 * First, make a file with some known garbage in it.
1752 */
1753 data = malloc(pagesize);
1754 if (!data)
1755 exit(1);
1756 for (i = 0; i < pagesize; ++i)
1757 *(data + i) = rand();
1758 umask(0);
1759 fd = creat("conftestmmap", 0600);
1760 if (fd < 0)
1761 exit(1);
1762 if (write(fd, data, pagesize) != pagesize)
1763 exit(1);
1764 close(fd);
1765
1766 /*
1767 * Next, try to mmap the file at a fixed address which
1768 * already has something else allocated at it. If we can,
1769 * also make sure that we see the same garbage.
1770 */
1771 fd = open("conftestmmap", O_RDWR);
1772 if (fd < 0)
1773 exit(1);
1774 data2 = malloc(2 * pagesize);
1775 if (!data2)
1776 exit(1);
1777 data2 += (pagesize - ((int) data2 & (pagesize - 1))) & (pagesize - 1);
1778 if (data2 != mmap(data2, pagesize, PROT_READ | PROT_WRITE,
1779 MAP_PRIVATE | MAP_FIXED, fd, 0L))
1780 exit(1);
1781 for (i = 0; i < pagesize; ++i)
1782 if (*(data + i) != *(data2 + i))
1783 exit(1);
1784
1785 /*
1786 * Finally, make sure that changes to the mapped area
1787 * do not percolate back to the file as seen by read().
1788 * (This is a bug on some variants of i386 svr4.0.)
1789 */
1790 for (i = 0; i < pagesize; ++i)
1791 *(data2 + i) = *(data2 + i) + 1;
1792 data3 = malloc(pagesize);
1793 if (!data3)
1794 exit(1);
1795 if (read(fd, data3, pagesize) != pagesize)
1796 exit(1);
1797 for (i = 0; i < pagesize; ++i)
1798 if (*(data + i) != *(data3 + i))
1799 exit(1);
1800 close(fd);
1801 unlink("conftestmmap");
1802 exit(0);
1803}
1804
1805EOF
4ff3dfab 1806if { (eval echo configure:1807: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
fcfc3c0c
TT
1807then
1808 ac_cv_func_mmap_fixed_mapped=yes
1809else
1810 echo "configure: failed program was:" >&5
1811 cat conftest.$ac_ext >&5
1812 rm -fr conftest*
1813 ac_cv_func_mmap_fixed_mapped=no
1814fi
1815rm -fr conftest*
1816fi
1817
1818fi
1819
1820echo "$ac_t""$ac_cv_func_mmap_fixed_mapped" 1>&6
1821if test $ac_cv_func_mmap_fixed_mapped = yes; then
1822 cat >> confdefs.h <<\EOF
1823#define HAVE_MMAP 1
1824EOF
1825
1826fi
1827
1828
1829 for ac_hdr in argz.h limits.h locale.h nl_types.h malloc.h string.h \
1830unistd.h values.h sys/param.h
1831do
1832ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
1833echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4ff3dfab 1834echo "configure:1835: checking for $ac_hdr" >&5
fcfc3c0c
TT
1835if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1836 echo $ac_n "(cached) $ac_c" 1>&6
1837else
1838 cat > conftest.$ac_ext <<EOF
4ff3dfab 1839#line 1840 "configure"
fcfc3c0c
TT
1840#include "confdefs.h"
1841#include <$ac_hdr>
1842EOF
1843ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4ff3dfab
JM
1844{ (eval echo configure:1845: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1845ac_err=`grep -v '^ *+' conftest.out`
fcfc3c0c
TT
1846if test -z "$ac_err"; then
1847 rm -rf conftest*
1848 eval "ac_cv_header_$ac_safe=yes"
1849else
1850 echo "$ac_err" >&5
1851 echo "configure: failed program was:" >&5
1852 cat conftest.$ac_ext >&5
1853 rm -rf conftest*
1854 eval "ac_cv_header_$ac_safe=no"
1855fi
1856rm -f conftest*
1857fi
1858if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1859 echo "$ac_t""yes" 1>&6
1860 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
1861 cat >> confdefs.h <<EOF
1862#define $ac_tr_hdr 1
1863EOF
1864
1865else
1866 echo "$ac_t""no" 1>&6
1867fi
1868done
1869
1870 for ac_func in getcwd munmap putenv setenv setlocale strchr strcasecmp \
1871__argz_count __argz_stringify __argz_next
1872do
1873echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4ff3dfab 1874echo "configure:1875: checking for $ac_func" >&5
fcfc3c0c
TT
1875if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
1876 echo $ac_n "(cached) $ac_c" 1>&6
1877else
1878 cat > conftest.$ac_ext <<EOF
4ff3dfab 1879#line 1880 "configure"
fcfc3c0c
TT
1880#include "confdefs.h"
1881/* System header to define __stub macros and hopefully few prototypes,
1882 which can conflict with char $ac_func(); below. */
1883#include <assert.h>
1884/* Override any gcc2 internal prototype to avoid an error. */
1885/* We use char because int might match the return type of a gcc2
1886 builtin and then its argument prototype would still apply. */
1887char $ac_func();
1888
1889int main() {
1890
1891/* The GNU C library defines this for functions which it implements
1892 to always fail with ENOSYS. Some functions are actually named
1893 something starting with __ and the normal name is an alias. */
1894#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
1895choke me
1896#else
1897$ac_func();
1898#endif
1899
1900; return 0; }
1901EOF
4ff3dfab 1902if { (eval echo configure:1903: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
fcfc3c0c
TT
1903 rm -rf conftest*
1904 eval "ac_cv_func_$ac_func=yes"
1905else
1906 echo "configure: failed program was:" >&5
1907 cat conftest.$ac_ext >&5
1908 rm -rf conftest*
1909 eval "ac_cv_func_$ac_func=no"
1910fi
1911rm -f conftest*
1912fi
1913
1914if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
1915 echo "$ac_t""yes" 1>&6
1916 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
1917 cat >> confdefs.h <<EOF
1918#define $ac_tr_func 1
1919EOF
1920
1921else
1922 echo "$ac_t""no" 1>&6
1923fi
1924done
1925
1926
1927 if test "${ac_cv_func_stpcpy+set}" != "set"; then
1928 for ac_func in stpcpy
1929do
1930echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4ff3dfab 1931echo "configure:1932: checking for $ac_func" >&5
fcfc3c0c
TT
1932if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
1933 echo $ac_n "(cached) $ac_c" 1>&6
1934else
1935 cat > conftest.$ac_ext <<EOF
4ff3dfab 1936#line 1937 "configure"
fcfc3c0c
TT
1937#include "confdefs.h"
1938/* System header to define __stub macros and hopefully few prototypes,
1939 which can conflict with char $ac_func(); below. */
1940#include <assert.h>
1941/* Override any gcc2 internal prototype to avoid an error. */
1942/* We use char because int might match the return type of a gcc2
1943 builtin and then its argument prototype would still apply. */
1944char $ac_func();
1945
1946int main() {
1947
1948/* The GNU C library defines this for functions which it implements
1949 to always fail with ENOSYS. Some functions are actually named
1950 something starting with __ and the normal name is an alias. */
1951#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
1952choke me
1953#else
1954$ac_func();
1955#endif
1956
1957; return 0; }
1958EOF
4ff3dfab 1959if { (eval echo configure:1960: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
fcfc3c0c
TT
1960 rm -rf conftest*
1961 eval "ac_cv_func_$ac_func=yes"
1962else
1963 echo "configure: failed program was:" >&5
1964 cat conftest.$ac_ext >&5
1965 rm -rf conftest*
1966 eval "ac_cv_func_$ac_func=no"
1967fi
1968rm -f conftest*
1969fi
1970
1971if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
1972 echo "$ac_t""yes" 1>&6
1973 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
1974 cat >> confdefs.h <<EOF
1975#define $ac_tr_func 1
1976EOF
1977
1978else
1979 echo "$ac_t""no" 1>&6
1980fi
1981done
1982
1983 fi
1984 if test "${ac_cv_func_stpcpy}" = "yes"; then
1985 cat >> confdefs.h <<\EOF
1986#define HAVE_STPCPY 1
1987EOF
1988
1989 fi
1990
1991 if test $ac_cv_header_locale_h = yes; then
1992 echo $ac_n "checking for LC_MESSAGES""... $ac_c" 1>&6
4ff3dfab 1993echo "configure:1994: checking for LC_MESSAGES" >&5
fcfc3c0c
TT
1994if eval "test \"`echo '$''{'am_cv_val_LC_MESSAGES'+set}'`\" = set"; then
1995 echo $ac_n "(cached) $ac_c" 1>&6
1996else
1997 cat > conftest.$ac_ext <<EOF
4ff3dfab 1998#line 1999 "configure"
fcfc3c0c
TT
1999#include "confdefs.h"
2000#include <locale.h>
2001int main() {
2002return LC_MESSAGES
2003; return 0; }
2004EOF
4ff3dfab 2005if { (eval echo configure:2006: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
fcfc3c0c
TT
2006 rm -rf conftest*
2007 am_cv_val_LC_MESSAGES=yes
2008else
2009 echo "configure: failed program was:" >&5
2010 cat conftest.$ac_ext >&5
2011 rm -rf conftest*
2012 am_cv_val_LC_MESSAGES=no
2013fi
2014rm -f conftest*
2015fi
2016
2017echo "$ac_t""$am_cv_val_LC_MESSAGES" 1>&6
2018 if test $am_cv_val_LC_MESSAGES = yes; then
2019 cat >> confdefs.h <<\EOF
2020#define HAVE_LC_MESSAGES 1
2021EOF
2022
2023 fi
2024 fi
2025 echo $ac_n "checking whether NLS is requested""... $ac_c" 1>&6
4ff3dfab 2026echo "configure:2027: checking whether NLS is requested" >&5
fcfc3c0c
TT
2027 # Check whether --enable-nls or --disable-nls was given.
2028if test "${enable_nls+set}" = set; then
2029 enableval="$enable_nls"
2030 USE_NLS=$enableval
2031else
2032 USE_NLS=yes
2033fi
2034
2035 echo "$ac_t""$USE_NLS" 1>&6
2036
2037
2038 USE_INCLUDED_LIBINTL=no
2039
2040 if test "$USE_NLS" = "yes"; then
2041 cat >> confdefs.h <<\EOF
2042#define ENABLE_NLS 1
2043EOF
2044
2045 echo $ac_n "checking whether included gettext is requested""... $ac_c" 1>&6
4ff3dfab 2046echo "configure:2047: checking whether included gettext is requested" >&5
fcfc3c0c
TT
2047 # Check whether --with-included-gettext or --without-included-gettext was given.
2048if test "${with_included_gettext+set}" = set; then
2049 withval="$with_included_gettext"
2050 nls_cv_force_use_gnu_gettext=$withval
2051else
2052 nls_cv_force_use_gnu_gettext=no
2053fi
2054
2055 echo "$ac_t""$nls_cv_force_use_gnu_gettext" 1>&6
2056
2057 nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext"
2058 if test "$nls_cv_force_use_gnu_gettext" != "yes"; then
2059 nls_cv_header_intl=
2060 nls_cv_header_libgt=
2061 CATOBJEXT=NONE
2062
2063 ac_safe=`echo "libintl.h" | sed 'y%./+-%__p_%'`
2064echo $ac_n "checking for libintl.h""... $ac_c" 1>&6
4ff3dfab 2065echo "configure:2066: checking for libintl.h" >&5
fcfc3c0c
TT
2066if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2067 echo $ac_n "(cached) $ac_c" 1>&6
2068else
2069 cat > conftest.$ac_ext <<EOF
4ff3dfab 2070#line 2071 "configure"
fcfc3c0c
TT
2071#include "confdefs.h"
2072#include <libintl.h>
2073EOF
2074ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4ff3dfab
JM
2075{ (eval echo configure:2076: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2076ac_err=`grep -v '^ *+' conftest.out`
fcfc3c0c
TT
2077if test -z "$ac_err"; then
2078 rm -rf conftest*
2079 eval "ac_cv_header_$ac_safe=yes"
2080else
2081 echo "$ac_err" >&5
2082 echo "configure: failed program was:" >&5
2083 cat conftest.$ac_ext >&5
2084 rm -rf conftest*
2085 eval "ac_cv_header_$ac_safe=no"
2086fi
2087rm -f conftest*
2088fi
2089if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2090 echo "$ac_t""yes" 1>&6
2091 echo $ac_n "checking for gettext in libc""... $ac_c" 1>&6
4ff3dfab 2092echo "configure:2093: checking for gettext in libc" >&5
fcfc3c0c
TT
2093if eval "test \"`echo '$''{'gt_cv_func_gettext_libc'+set}'`\" = set"; then
2094 echo $ac_n "(cached) $ac_c" 1>&6
2095else
2096 cat > conftest.$ac_ext <<EOF
4ff3dfab 2097#line 2098 "configure"
fcfc3c0c
TT
2098#include "confdefs.h"
2099#include <libintl.h>
2100int main() {
2101return (int) gettext ("")
2102; return 0; }
2103EOF
4ff3dfab 2104if { (eval echo configure:2105: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
fcfc3c0c
TT
2105 rm -rf conftest*
2106 gt_cv_func_gettext_libc=yes
2107else
2108 echo "configure: failed program was:" >&5
2109 cat conftest.$ac_ext >&5
2110 rm -rf conftest*
2111 gt_cv_func_gettext_libc=no
2112fi
2113rm -f conftest*
2114fi
2115
2116echo "$ac_t""$gt_cv_func_gettext_libc" 1>&6
2117
2118 if test "$gt_cv_func_gettext_libc" != "yes"; then
2119 echo $ac_n "checking for bindtextdomain in -lintl""... $ac_c" 1>&6
4ff3dfab 2120echo "configure:2121: checking for bindtextdomain in -lintl" >&5
fcfc3c0c
TT
2121ac_lib_var=`echo intl'_'bindtextdomain | sed 'y%./+-%__p_%'`
2122if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2123 echo $ac_n "(cached) $ac_c" 1>&6
2124else
2125 ac_save_LIBS="$LIBS"
2126LIBS="-lintl $LIBS"
2127cat > conftest.$ac_ext <<EOF
4ff3dfab 2128#line 2129 "configure"
fcfc3c0c
TT
2129#include "confdefs.h"
2130/* Override any gcc2 internal prototype to avoid an error. */
2131/* We use char because int might match the return type of a gcc2
2132 builtin and then its argument prototype would still apply. */
2133char bindtextdomain();
2134
2135int main() {
2136bindtextdomain()
2137; return 0; }
2138EOF
4ff3dfab 2139if { (eval echo configure:2140: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
fcfc3c0c
TT
2140 rm -rf conftest*
2141 eval "ac_cv_lib_$ac_lib_var=yes"
2142else
2143 echo "configure: failed program was:" >&5
2144 cat conftest.$ac_ext >&5
2145 rm -rf conftest*
2146 eval "ac_cv_lib_$ac_lib_var=no"
2147fi
2148rm -f conftest*
2149LIBS="$ac_save_LIBS"
2150
2151fi
2152if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2153 echo "$ac_t""yes" 1>&6
2154 echo $ac_n "checking for gettext in libintl""... $ac_c" 1>&6
4ff3dfab 2155echo "configure:2156: checking for gettext in libintl" >&5
fcfc3c0c
TT
2156if eval "test \"`echo '$''{'gt_cv_func_gettext_libintl'+set}'`\" = set"; then
2157 echo $ac_n "(cached) $ac_c" 1>&6
2158else
2159 cat > conftest.$ac_ext <<EOF
4ff3dfab 2160#line 2161 "configure"
fcfc3c0c
TT
2161#include "confdefs.h"
2162
2163int main() {
2164return (int) gettext ("")
2165; return 0; }
2166EOF
4ff3dfab 2167if { (eval echo configure:2168: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
fcfc3c0c
TT
2168 rm -rf conftest*
2169 gt_cv_func_gettext_libintl=yes
2170else
2171 echo "configure: failed program was:" >&5
2172 cat conftest.$ac_ext >&5
2173 rm -rf conftest*
2174 gt_cv_func_gettext_libintl=no
2175fi
2176rm -f conftest*
2177fi
2178
2179echo "$ac_t""$gt_cv_func_gettext_libintl" 1>&6
2180else
2181 echo "$ac_t""no" 1>&6
2182fi
2183
2184 fi
2185
2186 if test "$gt_cv_func_gettext_libc" = "yes" \
2187 || test "$gt_cv_func_gettext_libintl" = "yes"; then
2188 cat >> confdefs.h <<\EOF
2189#define HAVE_GETTEXT 1
2190EOF
2191
2192 # Extract the first word of "msgfmt", so it can be a program name with args.
2193set dummy msgfmt; ac_word=$2
2194echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4ff3dfab 2195echo "configure:2196: checking for $ac_word" >&5
fcfc3c0c
TT
2196if eval "test \"`echo '$''{'ac_cv_path_MSGFMT'+set}'`\" = set"; then
2197 echo $ac_n "(cached) $ac_c" 1>&6
2198else
2199 case "$MSGFMT" in
2200 /*)
2201 ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path.
2202 ;;
2203 *)
2204 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
2205 for ac_dir in $PATH; do
2206 test -z "$ac_dir" && ac_dir=.
2207 if test -f $ac_dir/$ac_word; then
2208 if test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"; then
2209 ac_cv_path_MSGFMT="$ac_dir/$ac_word"
2210 break
2211 fi
2212 fi
2213 done
2214 IFS="$ac_save_ifs"
2215 test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT="no"
2216 ;;
2217esac
2218fi
2219MSGFMT="$ac_cv_path_MSGFMT"
2220if test -n "$MSGFMT"; then
2221 echo "$ac_t""$MSGFMT" 1>&6
2222else
2223 echo "$ac_t""no" 1>&6
2224fi
2225 if test "$MSGFMT" != "no"; then
2226 for ac_func in dcgettext
2227do
2228echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4ff3dfab 2229echo "configure:2230: checking for $ac_func" >&5
fcfc3c0c
TT
2230if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2231 echo $ac_n "(cached) $ac_c" 1>&6
2232else
2233 cat > conftest.$ac_ext <<EOF
4ff3dfab 2234#line 2235 "configure"
fcfc3c0c
TT
2235#include "confdefs.h"
2236/* System header to define __stub macros and hopefully few prototypes,
2237 which can conflict with char $ac_func(); below. */
2238#include <assert.h>
2239/* Override any gcc2 internal prototype to avoid an error. */
2240/* We use char because int might match the return type of a gcc2
2241 builtin and then its argument prototype would still apply. */
2242char $ac_func();
2243
2244int main() {
2245
2246/* The GNU C library defines this for functions which it implements
2247 to always fail with ENOSYS. Some functions are actually named
2248 something starting with __ and the normal name is an alias. */
2249#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
2250choke me
2251#else
2252$ac_func();
2253#endif
2254
2255; return 0; }
2256EOF
4ff3dfab 2257if { (eval echo configure:2258: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
fcfc3c0c
TT
2258 rm -rf conftest*
2259 eval "ac_cv_func_$ac_func=yes"
2260else
2261 echo "configure: failed program was:" >&5
2262 cat conftest.$ac_ext >&5
2263 rm -rf conftest*
2264 eval "ac_cv_func_$ac_func=no"
2265fi
2266rm -f conftest*
2267fi
2268
2269if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
2270 echo "$ac_t""yes" 1>&6
2271 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2272 cat >> confdefs.h <<EOF
2273#define $ac_tr_func 1
2274EOF
2275
2276else
2277 echo "$ac_t""no" 1>&6
2278fi
2279done
2280
2281 # Extract the first word of "gmsgfmt", so it can be a program name with args.
2282set dummy gmsgfmt; ac_word=$2
2283echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4ff3dfab 2284echo "configure:2285: checking for $ac_word" >&5
fcfc3c0c
TT
2285if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then
2286 echo $ac_n "(cached) $ac_c" 1>&6
2287else
2288 case "$GMSGFMT" in
2289 /*)
2290 ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path.
2291 ;;
fcfc3c0c 2292 *)
4ff3dfab 2293 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
fcfc3c0c
TT
2294 for ac_dir in $PATH; do
2295 test -z "$ac_dir" && ac_dir=.
2296 if test -f $ac_dir/$ac_word; then
2297 ac_cv_path_GMSGFMT="$ac_dir/$ac_word"
2298 break
2299 fi
2300 done
2301 IFS="$ac_save_ifs"
2302 test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT"
2303 ;;
2304esac
2305fi
2306GMSGFMT="$ac_cv_path_GMSGFMT"
2307if test -n "$GMSGFMT"; then
2308 echo "$ac_t""$GMSGFMT" 1>&6
2309else
2310 echo "$ac_t""no" 1>&6
2311fi
2312
2313 # Extract the first word of "xgettext", so it can be a program name with args.
2314set dummy xgettext; ac_word=$2
2315echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4ff3dfab 2316echo "configure:2317: checking for $ac_word" >&5
fcfc3c0c
TT
2317if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then
2318 echo $ac_n "(cached) $ac_c" 1>&6
2319else
2320 case "$XGETTEXT" in
2321 /*)
2322 ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path.
2323 ;;
2324 *)
2325 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
2326 for ac_dir in $PATH; do
2327 test -z "$ac_dir" && ac_dir=.
2328 if test -f $ac_dir/$ac_word; then
2329 if test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"; then
2330 ac_cv_path_XGETTEXT="$ac_dir/$ac_word"
2331 break
2332 fi
2333 fi
2334 done
2335 IFS="$ac_save_ifs"
2336 test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":"
2337 ;;
2338esac
2339fi
2340XGETTEXT="$ac_cv_path_XGETTEXT"
2341if test -n "$XGETTEXT"; then
2342 echo "$ac_t""$XGETTEXT" 1>&6
2343else
2344 echo "$ac_t""no" 1>&6
2345fi
2346
2347 cat > conftest.$ac_ext <<EOF
4ff3dfab 2348#line 2349 "configure"
fcfc3c0c
TT
2349#include "confdefs.h"
2350
2351int main() {
2352extern int _nl_msg_cat_cntr;
2353 return _nl_msg_cat_cntr
2354; return 0; }
2355EOF
4ff3dfab 2356if { (eval echo configure:2357: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
fcfc3c0c
TT
2357 rm -rf conftest*
2358 CATOBJEXT=.gmo
2359 DATADIRNAME=share
2360else
2361 echo "configure: failed program was:" >&5
2362 cat conftest.$ac_ext >&5
2363 rm -rf conftest*
2364 CATOBJEXT=.mo
2365 DATADIRNAME=lib
5436fc65
C
2366fi
2367rm -f conftest*
fcfc3c0c
TT
2368 INSTOBJEXT=.mo
2369 fi
2370 fi
2371
2372else
2373 echo "$ac_t""no" 1>&6
5436fc65 2374fi
fcfc3c0c
TT
2375
2376
2377
2378 if test "$CATOBJEXT" = "NONE"; then
2379 nls_cv_use_gnu_gettext=yes
2380 fi
2381 fi
2382
2383 if test "$nls_cv_use_gnu_gettext" = "yes"; then
2384 INTLOBJS="\$(GETTOBJS)"
2385 # Extract the first word of "msgfmt", so it can be a program name with args.
2386set dummy msgfmt; ac_word=$2
2387echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4ff3dfab 2388echo "configure:2389: checking for $ac_word" >&5
fcfc3c0c
TT
2389if eval "test \"`echo '$''{'ac_cv_path_MSGFMT'+set}'`\" = set"; then
2390 echo $ac_n "(cached) $ac_c" 1>&6
2391else
2392 case "$MSGFMT" in
2393 /*)
2394 ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path.
2395 ;;
2396 *)
2397 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
2398 for ac_dir in $PATH; do
2399 test -z "$ac_dir" && ac_dir=.
2400 if test -f $ac_dir/$ac_word; then
2401 if test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"; then
2402 ac_cv_path_MSGFMT="$ac_dir/$ac_word"
2403 break
2404 fi
2405 fi
2406 done
2407 IFS="$ac_save_ifs"
2408 test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT="msgfmt"
2409 ;;
2410esac
5436fc65 2411fi
fcfc3c0c
TT
2412MSGFMT="$ac_cv_path_MSGFMT"
2413if test -n "$MSGFMT"; then
2414 echo "$ac_t""$MSGFMT" 1>&6
dedcc91d 2415else
fcfc3c0c 2416 echo "$ac_t""no" 1>&6
5436fc65 2417fi
5436fc65 2418
fcfc3c0c
TT
2419 # Extract the first word of "gmsgfmt", so it can be a program name with args.
2420set dummy gmsgfmt; ac_word=$2
2421echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4ff3dfab 2422echo "configure:2423: checking for $ac_word" >&5
fcfc3c0c
TT
2423if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then
2424 echo $ac_n "(cached) $ac_c" 1>&6
2425else
2426 case "$GMSGFMT" in
2427 /*)
2428 ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path.
2429 ;;
fcfc3c0c 2430 *)
4ff3dfab 2431 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
fcfc3c0c
TT
2432 for ac_dir in $PATH; do
2433 test -z "$ac_dir" && ac_dir=.
2434 if test -f $ac_dir/$ac_word; then
2435 ac_cv_path_GMSGFMT="$ac_dir/$ac_word"
2436 break
2437 fi
2438 done
2439 IFS="$ac_save_ifs"
2440 test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT"
2441 ;;
2442esac
2443fi
2444GMSGFMT="$ac_cv_path_GMSGFMT"
2445if test -n "$GMSGFMT"; then
2446 echo "$ac_t""$GMSGFMT" 1>&6
2447else
2448 echo "$ac_t""no" 1>&6
2449fi
5436fc65 2450
fcfc3c0c
TT
2451 # Extract the first word of "xgettext", so it can be a program name with args.
2452set dummy xgettext; ac_word=$2
2453echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4ff3dfab 2454echo "configure:2455: checking for $ac_word" >&5
fcfc3c0c
TT
2455if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then
2456 echo $ac_n "(cached) $ac_c" 1>&6
2457else
2458 case "$XGETTEXT" in
2459 /*)
2460 ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path.
2461 ;;
2462 *)
2463 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
2464 for ac_dir in $PATH; do
2465 test -z "$ac_dir" && ac_dir=.
2466 if test -f $ac_dir/$ac_word; then
2467 if test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"; then
2468 ac_cv_path_XGETTEXT="$ac_dir/$ac_word"
2469 break
2470 fi
2471 fi
2472 done
2473 IFS="$ac_save_ifs"
2474 test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":"
2475 ;;
2476esac
2477fi
2478XGETTEXT="$ac_cv_path_XGETTEXT"
2479if test -n "$XGETTEXT"; then
2480 echo "$ac_t""$XGETTEXT" 1>&6
5436fc65 2481else
5436fc65
C
2482 echo "$ac_t""no" 1>&6
2483fi
5436fc65 2484
fcfc3c0c
TT
2485
2486 USE_INCLUDED_LIBINTL=yes
2487 CATOBJEXT=.gmo
2488 INSTOBJEXT=.mo
2489 DATADIRNAME=share
2490 INTLDEPS='$(top_builddir)/../intl/libintl.a'
2491 INTLLIBS=$INTLDEPS
2492 LIBS=`echo $LIBS | sed -e 's/-lintl//'`
2493 nls_cv_header_intl=libintl.h
2494 nls_cv_header_libgt=libgettext.h
2495 fi
5436fc65 2496
fcfc3c0c
TT
2497 if test "$XGETTEXT" != ":"; then
2498 if $XGETTEXT --omit-header /dev/null 2> /dev/null; then
2499 : ;
2500 else
2501 echo "$ac_t""found xgettext programs is not GNU xgettext; ignore it" 1>&6
2502 XGETTEXT=":"
2503 fi
2504 fi
2505
2506 # We need to process the po/ directory.
2507 POSUB=po
2508 else
2509 DATADIRNAME=share
2510 nls_cv_header_intl=libintl.h
2511 nls_cv_header_libgt=libgettext.h
2512 fi
2513
2514 # If this is used in GNU gettext we have to set USE_NLS to `yes'
2515 # because some of the sources are only built for this goal.
2516 if test "$PACKAGE" = gettext; then
2517 USE_NLS=yes
2518 USE_INCLUDED_LIBINTL=yes
2519 fi
2520
2521 for lang in $ALL_LINGUAS; do
2522 GMOFILES="$GMOFILES $lang.gmo"
2523 POFILES="$POFILES $lang.po"
2524 done
2525
2526
2527
2528
2529
2530
2531
2532
2533
2534
2535
2536
2537
2538
2539 if test "x$CATOBJEXT" != "x"; then
2540 if test "x$ALL_LINGUAS" = "x"; then
2541 LINGUAS=
2542 else
2543 echo $ac_n "checking for catalogs to be installed""... $ac_c" 1>&6
4ff3dfab 2544echo "configure:2545: checking for catalogs to be installed" >&5
fcfc3c0c
TT
2545 NEW_LINGUAS=
2546 for lang in ${LINGUAS=$ALL_LINGUAS}; do
2547 case "$ALL_LINGUAS" in
2548 *$lang*) NEW_LINGUAS="$NEW_LINGUAS $lang" ;;
2549 esac
2550 done
2551 LINGUAS=$NEW_LINGUAS
2552 echo "$ac_t""$LINGUAS" 1>&6
2553 fi
2554
2555 if test -n "$LINGUAS"; then
2556 for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done
2557 fi
2558 fi
2559
2560 if test $ac_cv_header_locale_h = yes; then
2561 INCLUDE_LOCALE_H="#include <locale.h>"
2562 else
2563 INCLUDE_LOCALE_H="\
2564/* The system does not provide the header <locale.h>. Take care yourself. */"
2565 fi
2566
2567
2568 if test -f $srcdir/po2tbl.sed.in; then
2569 if test "$CATOBJEXT" = ".cat"; then
2570 ac_safe=`echo "linux/version.h" | sed 'y%./+-%__p_%'`
2571echo $ac_n "checking for linux/version.h""... $ac_c" 1>&6
4ff3dfab 2572echo "configure:2573: checking for linux/version.h" >&5
5436fc65
C
2573if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2574 echo $ac_n "(cached) $ac_c" 1>&6
2575else
2576 cat > conftest.$ac_ext <<EOF
4ff3dfab 2577#line 2578 "configure"
5436fc65 2578#include "confdefs.h"
fcfc3c0c 2579#include <linux/version.h>
5436fc65 2580EOF
1a7b4b7c 2581ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4ff3dfab
JM
2582{ (eval echo configure:2583: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2583ac_err=`grep -v '^ *+' conftest.out`
5436fc65
C
2584if test -z "$ac_err"; then
2585 rm -rf conftest*
2586 eval "ac_cv_header_$ac_safe=yes"
2587else
2588 echo "$ac_err" >&5
bfde4a67
SG
2589 echo "configure: failed program was:" >&5
2590 cat conftest.$ac_ext >&5
5436fc65
C
2591 rm -rf conftest*
2592 eval "ac_cv_header_$ac_safe=no"
2593fi
2594rm -f conftest*
2595fi
2596if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2597 echo "$ac_t""yes" 1>&6
fcfc3c0c 2598 msgformat=linux
5436fc65
C
2599else
2600 echo "$ac_t""no" 1>&6
fcfc3c0c 2601msgformat=xopen
0579b53d
GN
2602fi
2603
0579b53d 2604
fcfc3c0c
TT
2605 sed -e '/^#/d' $srcdir/$msgformat-msg.sed > po2msg.sed
2606 fi
2607 sed -e '/^#.*[^\\]$/d' -e '/^#$/d' \
2608 $srcdir/po2tbl.sed.in > po2tbl.sed
2609 fi
2610
2611 if test "$PACKAGE" = "gettext"; then
2612 GT_NO="#NO#"
2613 GT_YES=
2614 else
2615 GT_NO=
2616 GT_YES="#YES#"
2617 fi
2618
2619
0579b53d 2620
fcfc3c0c
TT
2621 MKINSTALLDIRS="\$(srcdir)/../../mkinstalldirs"
2622
0579b53d 2623
fcfc3c0c
TT
2624 l=
2625
0579b53d 2626
fcfc3c0c
TT
2627 if test -d $srcdir/po; then
2628 test -d po || mkdir po
2629 if test "x$srcdir" != "x."; then
2630 if test "x`echo $srcdir | sed 's@/.*@@'`" = "x"; then
2631 posrcprefix="$srcdir/"
2632 else
2633 posrcprefix="../$srcdir/"
2634 fi
2635 else
2636 posrcprefix="../"
2637 fi
2638 rm -f po/POTFILES
2639 sed -e "/^#/d" -e "/^\$/d" -e "s,.*, $posrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \
2640 < $srcdir/po/POTFILES.in > po/POTFILES
2641 fi
2642
0579b53d 2643
bfde4a67
SG
2644
2645CONFIG_OBS=
018d76dd 2646CONFIG_DEPS=
c7bb1531 2647CONFIG_SRCS=
bfde4a67
SG
2648
2649configdirs="doc testsuite"
2650
2651
2652. ${srcdir}/configure.host
2653
2654. ${srcdir}/configure.tgt
2655
2656
5436fc65
C
2657# Find a good install program. We prefer a C program (faster),
2658# so one script is as good as another. But avoid the broken or
2659# incompatible versions:
2660# SysV /etc/install, /usr/sbin/install
2661# SunOS /usr/etc/install
2662# IRIX /sbin/install
2663# AIX /bin/install
2664# AFS /usr/afsws/bin/install, which mishandles nonexistent args
2665# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
2666# ./install, which can be erroneously created by make from ./install.sh.
2667echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
4ff3dfab 2668echo "configure:2669: checking for a BSD compatible install" >&5
5436fc65
C
2669if test -z "$INSTALL"; then
2670if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
2671 echo $ac_n "(cached) $ac_c" 1>&6
2672else
4ff3dfab 2673 IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS="${IFS}:"
5436fc65
C
2674 for ac_dir in $PATH; do
2675 # Account for people who put trailing slashes in PATH elements.
2676 case "$ac_dir/" in
2677 /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
2678 *)
2679 # OSF1 and SCO ODT 3.0 have their own names for install.
4ff3dfab 2680 for ac_prog in ginstall installbsd scoinst install; do
5436fc65
C
2681 if test -f $ac_dir/$ac_prog; then
2682 if test $ac_prog = install &&
2683 grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
2684 # AIX install. It has an incompatible calling convention.
4ff3dfab 2685 # OSF/1 installbsd also uses dspmsg, but is usable.
5436fc65
C
2686 :
2687 else
2688 ac_cv_path_install="$ac_dir/$ac_prog -c"
2689 break 2
2690 fi
2691 fi
2692 done
2693 ;;
2694 esac
2695 done
bfde4a67 2696 IFS="$ac_save_IFS"
1a7b4b7c 2697
5436fc65 2698fi
1a7b4b7c
DE
2699 if test "${ac_cv_path_install+set}" = set; then
2700 INSTALL="$ac_cv_path_install"
2701 else
2702 # As a last resort, use the slow shell script. We don't cache a
2703 # path for INSTALL within a source directory, because that will
2704 # break other packages using the cache if that directory is
2705 # removed, or if the path is relative.
2706 INSTALL="$ac_install_sh"
2707 fi
5436fc65
C
2708fi
2709echo "$ac_t""$INSTALL" 1>&6
2710
2711# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
2712# It thinks the first close brace ends the variable substitution.
2713test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
2714
2715test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
2716
d8efbc66
FF
2717if test $host != $build; then
2718 ac_tool_prefix=${host_alias}-
2719else
2720 ac_tool_prefix=
2721fi
2722
2723# Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
2724set dummy ${ac_tool_prefix}ar; ac_word=$2
2725echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4ff3dfab 2726echo "configure:2727: checking for $ac_word" >&5
d8efbc66
FF
2727if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then
2728 echo $ac_n "(cached) $ac_c" 1>&6
2729else
2730 if test -n "$AR"; then
2731 ac_cv_prog_AR="$AR" # Let the user override the test.
2732else
4ff3dfab 2733 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
d8efbc66
FF
2734 for ac_dir in $PATH; do
2735 test -z "$ac_dir" && ac_dir=.
2736 if test -f $ac_dir/$ac_word; then
2737 ac_cv_prog_AR="${ac_tool_prefix}ar"
2738 break
2739 fi
2740 done
2741 IFS="$ac_save_ifs"
2742 test -z "$ac_cv_prog_AR" && ac_cv_prog_AR="ar"
2743fi
2744fi
2745AR="$ac_cv_prog_AR"
2746if test -n "$AR"; then
2747 echo "$ac_t""$AR" 1>&6
2748else
2749 echo "$ac_t""no" 1>&6
2750fi
2751
2752
2753
2754# Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
2755set dummy ${ac_tool_prefix}ranlib; ac_word=$2
2756echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4ff3dfab 2757echo "configure:2758: checking for $ac_word" >&5
d8efbc66
FF
2758if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
2759 echo $ac_n "(cached) $ac_c" 1>&6
2760else
2761 if test -n "$RANLIB"; then
2762 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
2763else
4ff3dfab 2764 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
d8efbc66
FF
2765 for ac_dir in $PATH; do
2766 test -z "$ac_dir" && ac_dir=.
2767 if test -f $ac_dir/$ac_word; then
2768 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
2769 break
2770 fi
2771 done
2772 IFS="$ac_save_ifs"
2773fi
2774fi
2775RANLIB="$ac_cv_prog_RANLIB"
2776if test -n "$RANLIB"; then
2777 echo "$ac_t""$RANLIB" 1>&6
2778else
2779 echo "$ac_t""no" 1>&6
2780fi
2781
2782
2783if test -z "$ac_cv_prog_RANLIB"; then
2784if test -n "$ac_tool_prefix"; then
2785 # Extract the first word of "ranlib", so it can be a program name with args.
5436fc65
C
2786set dummy ranlib; ac_word=$2
2787echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4ff3dfab 2788echo "configure:2789: checking for $ac_word" >&5
5436fc65
C
2789if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
2790 echo $ac_n "(cached) $ac_c" 1>&6
2791else
2792 if test -n "$RANLIB"; then
2793 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
2794else
4ff3dfab 2795 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
da3d57e3 2796 for ac_dir in $PATH; do
5436fc65
C
2797 test -z "$ac_dir" && ac_dir=.
2798 if test -f $ac_dir/$ac_word; then
2799 ac_cv_prog_RANLIB="ranlib"
2800 break
2801 fi
2802 done
2803 IFS="$ac_save_ifs"
2804 test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
2805fi
2806fi
2807RANLIB="$ac_cv_prog_RANLIB"
2808if test -n "$RANLIB"; then
2809 echo "$ac_t""$RANLIB" 1>&6
2810else
2811 echo "$ac_t""no" 1>&6
2812fi
2813
d8efbc66
FF
2814else
2815 RANLIB=":"
2816fi
2817fi
2818
204c8825
FF
2819for ac_prog in 'bison -y' byacc
2820do
2821# Extract the first word of "$ac_prog", so it can be a program name with args.
2822set dummy $ac_prog; ac_word=$2
2823echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4ff3dfab 2824echo "configure:2825: checking for $ac_word" >&5
204c8825
FF
2825if eval "test \"`echo '$''{'ac_cv_prog_YACC'+set}'`\" = set"; then
2826 echo $ac_n "(cached) $ac_c" 1>&6
2827else
2828 if test -n "$YACC"; then
2829 ac_cv_prog_YACC="$YACC" # Let the user override the test.
2830else
4ff3dfab 2831 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
204c8825
FF
2832 for ac_dir in $PATH; do
2833 test -z "$ac_dir" && ac_dir=.
2834 if test -f $ac_dir/$ac_word; then
2835 ac_cv_prog_YACC="$ac_prog"
2836 break
2837 fi
2838 done
2839 IFS="$ac_save_ifs"
2840fi
2841fi
2842YACC="$ac_cv_prog_YACC"
2843if test -n "$YACC"; then
2844 echo "$ac_t""$YACC" 1>&6
2845else
2846 echo "$ac_t""no" 1>&6
2847fi
2848
2849test -n "$YACC" && break
2850done
2851test -n "$YACC" || YACC="yacc"
2852
d8efbc66
FF
2853for ac_prog in mawk gawk nawk awk
2854do
2855# Extract the first word of "$ac_prog", so it can be a program name with args.
2856set dummy $ac_prog; ac_word=$2
2857echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4ff3dfab 2858echo "configure:2859: checking for $ac_word" >&5
d8efbc66
FF
2859if eval "test \"`echo '$''{'ac_cv_prog_AWK'+set}'`\" = set"; then
2860 echo $ac_n "(cached) $ac_c" 1>&6
2861else
2862 if test -n "$AWK"; then
2863 ac_cv_prog_AWK="$AWK" # Let the user override the test.
2864else
4ff3dfab 2865 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
d8efbc66
FF
2866 for ac_dir in $PATH; do
2867 test -z "$ac_dir" && ac_dir=.
2868 if test -f $ac_dir/$ac_word; then
2869 ac_cv_prog_AWK="$ac_prog"
2870 break
2871 fi
2872 done
2873 IFS="$ac_save_ifs"
2874fi
2875fi
2876AWK="$ac_cv_prog_AWK"
2877if test -n "$AWK"; then
2878 echo "$ac_t""$AWK" 1>&6
2879else
2880 echo "$ac_t""no" 1>&6
2881fi
2882
2883test -n "$AWK" && break
2884done
2885
5436fc65 2886
5436fc65
C
2887if test "$program_transform_name" = s,x,x,; then
2888 program_transform_name=
2889else
1a7b4b7c
DE
2890 # Double any \ or $. echo might interpret backslashes.
2891 cat <<\EOF_SED > conftestsed
2892s,\\,\\\\,g; s,\$,$$,g
2893EOF_SED
5436fc65
C
2894 program_transform_name="`echo $program_transform_name|sed -f conftestsed`"
2895 rm -f conftestsed
2896fi
2897test "$program_prefix" != NONE &&
2898 program_transform_name="s,^,${program_prefix},; $program_transform_name"
2899# Use a double $ so make ignores it.
2900test "$program_suffix" != NONE &&
2901 program_transform_name="s,\$\$,${program_suffix},; $program_transform_name"
2902
2903# sed with no file args requires a program.
2904test "$program_transform_name" = "" && program_transform_name="s,x,x,"
2905
2906
c14cabba 2907echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
4ff3dfab 2908echo "configure:2909: checking return type of signal handlers" >&5
c14cabba
AC
2909if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
2910 echo $ac_n "(cached) $ac_c" 1>&6
2911else
2912 cat > conftest.$ac_ext <<EOF
4ff3dfab 2913#line 2914 "configure"
c14cabba
AC
2914#include "confdefs.h"
2915#include <sys/types.h>
2916#include <signal.h>
2917#ifdef signal
2918#undef signal
2919#endif
2920#ifdef __cplusplus
2921extern "C" void (*signal (int, void (*)(int)))(int);
2922#else
2923void (*signal ()) ();
2924#endif
2925
2926int main() {
2927int i;
2928; return 0; }
2929EOF
4ff3dfab 2930if { (eval echo configure:2931: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c14cabba
AC
2931 rm -rf conftest*
2932 ac_cv_type_signal=void
2933else
2934 echo "configure: failed program was:" >&5
2935 cat conftest.$ac_ext >&5
2936 rm -rf conftest*
2937 ac_cv_type_signal=int
2938fi
2939rm -f conftest*
2940fi
2941
2942echo "$ac_t""$ac_cv_type_signal" 1>&6
2943cat >> confdefs.h <<EOF
2944#define RETSIGTYPE $ac_cv_type_signal
2945EOF
2946
2947
2948
2b576293 2949echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
4ff3dfab 2950echo "configure:2951: checking for ANSI C header files" >&5
2b576293
C
2951if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
2952 echo $ac_n "(cached) $ac_c" 1>&6
2953else
2954 cat > conftest.$ac_ext <<EOF
4ff3dfab 2955#line 2956 "configure"
2b576293
C
2956#include "confdefs.h"
2957#include <stdlib.h>
2958#include <stdarg.h>
2959#include <string.h>
2960#include <float.h>
2961EOF
1a7b4b7c 2962ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4ff3dfab
JM
2963{ (eval echo configure:2964: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2964ac_err=`grep -v '^ *+' conftest.out`
2b576293
C
2965if test -z "$ac_err"; then
2966 rm -rf conftest*
2967 ac_cv_header_stdc=yes
2968else
2969 echo "$ac_err" >&5
bfde4a67
SG
2970 echo "configure: failed program was:" >&5
2971 cat conftest.$ac_ext >&5
2b576293
C
2972 rm -rf conftest*
2973 ac_cv_header_stdc=no
2974fi
2975rm -f conftest*
2976
2977if test $ac_cv_header_stdc = yes; then
2978 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
2979cat > conftest.$ac_ext <<EOF
4ff3dfab 2980#line 2981 "configure"
2b576293
C
2981#include "confdefs.h"
2982#include <string.h>
2983EOF
2984if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2985 egrep "memchr" >/dev/null 2>&1; then
2986 :
2987else
2988 rm -rf conftest*
2989 ac_cv_header_stdc=no
2990fi
2991rm -f conftest*
2992
2993fi
2994
2995if test $ac_cv_header_stdc = yes; then
2996 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
2997cat > conftest.$ac_ext <<EOF
4ff3dfab 2998#line 2999 "configure"
2b576293
C
2999#include "confdefs.h"
3000#include <stdlib.h>
3001EOF
3002if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3003 egrep "free" >/dev/null 2>&1; then
3004 :
3005else
3006 rm -rf conftest*
3007 ac_cv_header_stdc=no
3008fi
3009rm -f conftest*
3010
3011fi
3012
3013if test $ac_cv_header_stdc = yes; then
3014 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
3015if test "$cross_compiling" = yes; then
1a7b4b7c 3016 :
2b576293 3017else
bfde4a67 3018 cat > conftest.$ac_ext <<EOF
4ff3dfab 3019#line 3020 "configure"
2b576293
C
3020#include "confdefs.h"
3021#include <ctype.h>
3022#define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
3023#define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
3024#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
3025int main () { int i; for (i = 0; i < 256; i++)
3026if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
3027exit (0); }
3028
3029EOF
4ff3dfab 3030if { (eval echo configure:3031: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
bfde4a67 3031then
2b576293
C
3032 :
3033else
bfde4a67
SG
3034 echo "configure: failed program was:" >&5
3035 cat conftest.$ac_ext >&5
3036 rm -fr conftest*
2b576293
C
3037 ac_cv_header_stdc=no
3038fi
ef6c51d1 3039rm -fr conftest*
bfde4a67
SG
3040fi
3041
2b576293
C
3042fi
3043fi
1a7b4b7c 3044
2b576293
C
3045echo "$ac_t""$ac_cv_header_stdc" 1>&6
3046if test $ac_cv_header_stdc = yes; then
3047 cat >> confdefs.h <<\EOF
3048#define STDC_HEADERS 1
3049EOF
3050
3051fi
3052
4ff3dfab
JM
3053for ac_hdr in ctype.h curses.h endian.h libintl.h limits.h link.h \
3054 memory.h objlist.h ptrace.h sgtty.h stddef.h stdlib.h \
3055 string.h strings.h sys/procfs.h sys/ptrace.h sys/reg.h \
3056 term.h termio.h termios.h unistd.h wait.h sys/wait.h \
3057 wchar.h wctype.h
1a494973 3058do
bfde4a67 3059ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
1a494973 3060echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4ff3dfab 3061echo "configure:3062: checking for $ac_hdr" >&5
1a494973
C
3062if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3063 echo $ac_n "(cached) $ac_c" 1>&6
3064else
3065 cat > conftest.$ac_ext <<EOF
4ff3dfab 3066#line 3067 "configure"
1a494973
C
3067#include "confdefs.h"
3068#include <$ac_hdr>
3069EOF
1a7b4b7c 3070ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4ff3dfab
JM
3071{ (eval echo configure:3072: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3072ac_err=`grep -v '^ *+' conftest.out`
1a494973
C
3073if test -z "$ac_err"; then
3074 rm -rf conftest*
3075 eval "ac_cv_header_$ac_safe=yes"
3076else
3077 echo "$ac_err" >&5
bfde4a67
SG
3078 echo "configure: failed program was:" >&5
3079 cat conftest.$ac_ext >&5
1a494973
C
3080 rm -rf conftest*
3081 eval "ac_cv_header_$ac_safe=no"
3082fi
3083rm -f conftest*
3084fi
3085if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3086 echo "$ac_t""yes" 1>&6
bfde4a67 3087 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
1a494973
C
3088 cat >> confdefs.h <<EOF
3089#define $ac_tr_hdr 1
3090EOF
3091
3092else
3093 echo "$ac_t""no" 1>&6
3094fi
3095done
3096
eac4afd1 3097
2b576293 3098echo $ac_n "checking whether stat file-mode macros are broken""... $ac_c" 1>&6
4ff3dfab 3099echo "configure:3100: checking whether stat file-mode macros are broken" >&5
2b576293
C
3100if eval "test \"`echo '$''{'ac_cv_header_stat_broken'+set}'`\" = set"; then
3101 echo $ac_n "(cached) $ac_c" 1>&6
3102else
3103 cat > conftest.$ac_ext <<EOF
4ff3dfab 3104#line 3105 "configure"
2b576293
C
3105#include "confdefs.h"
3106#include <sys/types.h>
3107#include <sys/stat.h>
3108
3109#if defined(S_ISBLK) && defined(S_IFDIR)
3110# if S_ISBLK (S_IFDIR)
3111You lose.
3112# endif
3113#endif
3114
3115#if defined(S_ISBLK) && defined(S_IFCHR)
3116# if S_ISBLK (S_IFCHR)
3117You lose.
3118# endif
3119#endif
3120
3121#if defined(S_ISLNK) && defined(S_IFREG)
3122# if S_ISLNK (S_IFREG)
3123You lose.
3124# endif
3125#endif
3126
3127#if defined(S_ISSOCK) && defined(S_IFREG)
3128# if S_ISSOCK (S_IFREG)
3129You lose.
3130# endif
3131#endif
3132
3133EOF
3134if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3135 egrep "You lose" >/dev/null 2>&1; then
3136 rm -rf conftest*
3137 ac_cv_header_stat_broken=yes
3138else
3139 rm -rf conftest*
3140 ac_cv_header_stat_broken=no
3141fi
3142rm -f conftest*
3143
3144fi
1a7b4b7c 3145
2b576293
C
3146echo "$ac_t""$ac_cv_header_stat_broken" 1>&6
3147if test $ac_cv_header_stat_broken = yes; then
3148 cat >> confdefs.h <<\EOF
3149#define STAT_MACROS_BROKEN 1
3150EOF
3151
3152fi
3153
3154
8501c742 3155echo $ac_n "checking for working const""... $ac_c" 1>&6
4ff3dfab 3156echo "configure:3157: checking for working const" >&5
8501c742
SG
3157if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
3158 echo $ac_n "(cached) $ac_c" 1>&6
3159else
3160 cat > conftest.$ac_ext <<EOF
4ff3dfab 3161#line 3162 "configure"
8501c742
SG
3162#include "confdefs.h"
3163
bfde4a67 3164int main() {
8501c742
SG
3165
3166/* Ultrix mips cc rejects this. */
3167typedef int charset[2]; const charset x;
3168/* SunOS 4.1.1 cc rejects this. */
3169char const *const *ccp;
3170char **p;
3171/* NEC SVR4.0.2 mips cc rejects this. */
3172struct point {int x, y;};
3173static struct point const zero = {0,0};
3174/* AIX XL C 1.02.0.0 rejects this.
3175 It does not let you subtract one const X* pointer from another in an arm
3176 of an if-expression whose if-part is not a constant expression */
3177const char *g = "string";
3178ccp = &g + (g ? g-g : 0);
3179/* HPUX 7.0 cc rejects these. */
3180++ccp;
3181p = (char**) ccp;
3182ccp = (char const *const *) p;
3183{ /* SCO 3.2v4 cc rejects this. */
3184 char *t;
3185 char const *s = 0 ? (char *) 0 : (char const *) 0;
3186
3187 *t++ = 0;
3188}
3189{ /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
3190 int x[] = {25, 17};
3191 const int *foo = &x[0];
3192 ++foo;
3193}
3194{ /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
3195 typedef const int *iptr;
3196 iptr p = 0;
3197 ++p;
3198}
3199{ /* AIX XL C 1.02.0.0 rejects this saying
3200 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
3201 struct s { int j; const int *ap[3]; };
3202 struct s *b; b->j = 5;
3203}
3204{ /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
3205 const int foo = 10;
3206}
3207
3208; return 0; }
3209EOF
4ff3dfab 3210if { (eval echo configure:3211: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8501c742
SG
3211 rm -rf conftest*
3212 ac_cv_c_const=yes
3213else
bfde4a67
SG
3214 echo "configure: failed program was:" >&5
3215 cat conftest.$ac_ext >&5
8501c742
SG
3216 rm -rf conftest*
3217 ac_cv_c_const=no
3218fi
3219rm -f conftest*
8501c742
SG
3220fi
3221
3222echo "$ac_t""$ac_cv_c_const" 1>&6
3223if test $ac_cv_c_const = no; then
3224 cat >> confdefs.h <<\EOF
3225#define const
3226EOF
3227
3228fi
3229
3230
46ccc6bf 3231for ac_func in setpgid sbrk select poll sigaction isascii bzero bcopy memcpy btowc
72ae15f6
FF
3232do
3233echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4ff3dfab 3234echo "configure:3235: checking for $ac_func" >&5
72ae15f6
FF
3235if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3236 echo $ac_n "(cached) $ac_c" 1>&6
3237else
3238 cat > conftest.$ac_ext <<EOF
4ff3dfab 3239#line 3240 "configure"
72ae15f6
FF
3240#include "confdefs.h"
3241/* System header to define __stub macros and hopefully few prototypes,
3242 which can conflict with char $ac_func(); below. */
3243#include <assert.h>
3244/* Override any gcc2 internal prototype to avoid an error. */
bc859e63
SG
3245/* We use char because int might match the return type of a gcc2
3246 builtin and then its argument prototype would still apply. */
1a7b4b7c 3247char $ac_func();
72ae15f6 3248
bfde4a67 3249int main() {
72ae15f6
FF
3250
3251/* The GNU C library defines this for functions which it implements
3252 to always fail with ENOSYS. Some functions are actually named
3253 something starting with __ and the normal name is an alias. */
3254#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3255choke me
3256#else
3257$ac_func();
3258#endif
3259
3260; return 0; }
3261EOF
4ff3dfab 3262if { (eval echo configure:3263: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
72ae15f6
FF
3263 rm -rf conftest*
3264 eval "ac_cv_func_$ac_func=yes"
3265else
bfde4a67
SG
3266 echo "configure: failed program was:" >&5
3267 cat conftest.$ac_ext >&5
72ae15f6
FF
3268 rm -rf conftest*
3269 eval "ac_cv_func_$ac_func=no"
3270fi
3271rm -f conftest*
ef6c51d1 3272fi
bfde4a67 3273
72ae15f6
FF
3274if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3275 echo "$ac_t""yes" 1>&6
1a7b4b7c 3276 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
72ae15f6
FF
3277 cat >> confdefs.h <<EOF
3278#define $ac_tr_func 1
3279EOF
3280
3281else
3282 echo "$ac_t""no" 1>&6
3283fi
3284done
3285
0aa3233e
ILT
3286# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
3287# for constant arguments. Useless!
3288echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6
4ff3dfab 3289echo "configure:3290: checking for working alloca.h" >&5
0aa3233e
ILT
3290if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then
3291 echo $ac_n "(cached) $ac_c" 1>&6
3292else
3293 cat > conftest.$ac_ext <<EOF
4ff3dfab 3294#line 3295 "configure"
0aa3233e
ILT
3295#include "confdefs.h"
3296#include <alloca.h>
3297int main() {
3298char *p = alloca(2 * sizeof(int));
3299; return 0; }
3300EOF
4ff3dfab 3301if { (eval echo configure:3302: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
0aa3233e
ILT
3302 rm -rf conftest*
3303 ac_cv_header_alloca_h=yes
3304else
3305 echo "configure: failed program was:" >&5
3306 cat conftest.$ac_ext >&5
3307 rm -rf conftest*
3308 ac_cv_header_alloca_h=no
3309fi
3310rm -f conftest*
3311fi
3312
3313echo "$ac_t""$ac_cv_header_alloca_h" 1>&6
3314if test $ac_cv_header_alloca_h = yes; then
3315 cat >> confdefs.h <<\EOF
3316#define HAVE_ALLOCA_H 1
3317EOF
3318
3319fi
3320
3321echo $ac_n "checking for alloca""... $ac_c" 1>&6
4ff3dfab 3322echo "configure:3323: checking for alloca" >&5
0aa3233e
ILT
3323if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then
3324 echo $ac_n "(cached) $ac_c" 1>&6
3325else
3326 cat > conftest.$ac_ext <<EOF
4ff3dfab 3327#line 3328 "configure"
0aa3233e
ILT
3328#include "confdefs.h"
3329
3330#ifdef __GNUC__
3331# define alloca __builtin_alloca
3332#else
4ff3dfab
JM
3333# if HAVE_ALLOCA_H
3334# include <alloca.h>
0aa3233e 3335# else
4ff3dfab 3336# ifdef _AIX
eac4afd1 3337 #pragma alloca
4ff3dfab
JM
3338# else
3339# ifndef alloca /* predefined by HP cc +Olibcalls */
0aa3233e
ILT
3340char *alloca ();
3341# endif
3342# endif
3343# endif
3344#endif
3345
3346int main() {
3347char *p = (char *) alloca(1);
3348; return 0; }
3349EOF
4ff3dfab 3350if { (eval echo configure:3351: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
0aa3233e
ILT
3351 rm -rf conftest*
3352 ac_cv_func_alloca_works=yes
3353else
3354 echo "configure: failed program was:" >&5
3355 cat conftest.$ac_ext >&5
3356 rm -rf conftest*
3357 ac_cv_func_alloca_works=no
3358fi
3359rm -f conftest*
3360fi
3361
3362echo "$ac_t""$ac_cv_func_alloca_works" 1>&6
3363if test $ac_cv_func_alloca_works = yes; then
3364 cat >> confdefs.h <<\EOF
3365#define HAVE_ALLOCA 1
3366EOF
3367
3368fi
3369
3370if test $ac_cv_func_alloca_works = no; then
3371 # The SVR3 libPW and SVR4 libucb both contain incompatible functions
3372 # that cause trouble. Some versions do not even contain alloca or
3373 # contain a buggy version. If you still want to use their alloca,
3374 # use ar to extract alloca.o from them instead of compiling alloca.c.
4ff3dfab 3375 ALLOCA=alloca.o
0aa3233e
ILT
3376 cat >> confdefs.h <<\EOF
3377#define C_ALLOCA 1
3378EOF
3379
3380
3381echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
4ff3dfab 3382echo "configure:3383: checking whether alloca needs Cray hooks" >&5
0aa3233e
ILT
3383if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then
3384 echo $ac_n "(cached) $ac_c" 1>&6
3385else
3386 cat > conftest.$ac_ext <<EOF
4ff3dfab 3387#line 3388 "configure"
0aa3233e
ILT
3388#include "confdefs.h"
3389#if defined(CRAY) && ! defined(CRAY2)
3390webecray
3391#else
3392wenotbecray
3393#endif
3394
3395EOF
3396if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3397 egrep "webecray" >/dev/null 2>&1; then
3398 rm -rf conftest*
3399 ac_cv_os_cray=yes
3400else
3401 rm -rf conftest*
3402 ac_cv_os_cray=no
3403fi
3404rm -f conftest*
3405
3406fi
3407
3408echo "$ac_t""$ac_cv_os_cray" 1>&6
3409if test $ac_cv_os_cray = yes; then
3410for ac_func in _getb67 GETB67 getb67; do
3411 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4ff3dfab 3412echo "configure:3413: checking for $ac_func" >&5
0aa3233e
ILT
3413if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3414 echo $ac_n "(cached) $ac_c" 1>&6
3415else
3416 cat > conftest.$ac_ext <<EOF
4ff3dfab 3417#line 3418 "configure"
0aa3233e
ILT
3418#include "confdefs.h"
3419/* System header to define __stub macros and hopefully few prototypes,
3420 which can conflict with char $ac_func(); below. */
3421#include <assert.h>
3422/* Override any gcc2 internal prototype to avoid an error. */
3423/* We use char because int might match the return type of a gcc2
3424 builtin and then its argument prototype would still apply. */
3425char $ac_func();
3426
3427int main() {
3428
3429/* The GNU C library defines this for functions which it implements
3430 to always fail with ENOSYS. Some functions are actually named
3431 something starting with __ and the normal name is an alias. */
3432#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3433choke me
3434#else
3435$ac_func();
3436#endif
3437
3438; return 0; }
3439EOF
4ff3dfab 3440if { (eval echo configure:3441: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
0aa3233e
ILT
3441 rm -rf conftest*
3442 eval "ac_cv_func_$ac_func=yes"
3443else
3444 echo "configure: failed program was:" >&5
3445 cat conftest.$ac_ext >&5
3446 rm -rf conftest*
3447 eval "ac_cv_func_$ac_func=no"
3448fi
3449rm -f conftest*
3450fi
3451
3452if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3453 echo "$ac_t""yes" 1>&6
3454 cat >> confdefs.h <<EOF
3455#define CRAY_STACKSEG_END $ac_func
3456EOF
3457
3458 break
3459else
3460 echo "$ac_t""no" 1>&6
3461fi
3462
3463done
3464fi
3465
3466echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
4ff3dfab 3467echo "configure:3468: checking stack direction for C alloca" >&5
0aa3233e
ILT
3468if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then
3469 echo $ac_n "(cached) $ac_c" 1>&6
3470else
3471 if test "$cross_compiling" = yes; then
3472 ac_cv_c_stack_direction=0
3473else
3474 cat > conftest.$ac_ext <<EOF
4ff3dfab 3475#line 3476 "configure"
0aa3233e
ILT
3476#include "confdefs.h"
3477find_stack_direction ()
3478{
3479 static char *addr = 0;
3480 auto char dummy;
3481 if (addr == 0)
3482 {
3483 addr = &dummy;
3484 return find_stack_direction ();
3485 }
3486 else
3487 return (&dummy > addr) ? 1 : -1;
3488}
3489main ()
3490{
3491 exit (find_stack_direction() < 0);
3492}
3493EOF
4ff3dfab 3494if { (eval echo configure:3495: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
0aa3233e
ILT
3495then
3496 ac_cv_c_stack_direction=1
3497else
3498 echo "configure: failed program was:" >&5
3499 cat conftest.$ac_ext >&5
3500 rm -fr conftest*
3501 ac_cv_c_stack_direction=-1
3502fi
3503rm -fr conftest*
3504fi
3505
3506fi
3507
3508echo "$ac_t""$ac_cv_c_stack_direction" 1>&6
3509cat >> confdefs.h <<EOF
3510#define STACK_DIRECTION $ac_cv_c_stack_direction
3511EOF
3512
3513fi
3514
72ae15f6 3515
75a55dc3 3516# If we are configured native on GNU/Linux, work around problems with sys/procfs.h
0d4c1152
FF
3517if test "${target}" = "${host}"; then
3518 case "${host}" in
0728afad 3519 i[3456]86-*-linux*)
0d4c1152 3520 cat >> confdefs.h <<\EOF
0728afad 3521#define START_INFERIOR_TRAPS_EXPECTED 2
0d4c1152
FF
3522EOF
3523
3524 cat >> confdefs.h <<\EOF
3525#define sys_quotactl 1
3526EOF
3527
3528 ;;
3529 esac
3530fi
3531
4708ac65 3532echo $ac_n "checking for gregset_t type""... $ac_c" 1>&6
4ff3dfab 3533echo "configure:3534: checking for gregset_t type" >&5
07b77f5c 3534if eval "test \"`echo '$''{'gdb_cv_have_gregset_t'+set}'`\" = set"; then
4708ac65
FF
3535 echo $ac_n "(cached) $ac_c" 1>&6
3536else
3537 cat > conftest.$ac_ext <<EOF
4ff3dfab 3538#line 3539 "configure"
4708ac65
FF
3539#include "confdefs.h"
3540#include <sys/procfs.h>
bfde4a67 3541int main() {
4708ac65
FF
3542gregset_t *gregsetp = 0
3543; return 0; }
3544EOF
4ff3dfab 3545if { (eval echo configure:3546: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
4708ac65 3546 rm -rf conftest*
07b77f5c 3547 gdb_cv_have_gregset_t=yes
4708ac65 3548else
bfde4a67
SG
3549 echo "configure: failed program was:" >&5
3550 cat conftest.$ac_ext >&5
4708ac65 3551 rm -rf conftest*
07b77f5c 3552 gdb_cv_have_gregset_t=no
4708ac65
FF
3553fi
3554rm -f conftest*
4708ac65
FF
3555fi
3556
07b77f5c
FF
3557echo "$ac_t""$gdb_cv_have_gregset_t" 1>&6
3558if test $gdb_cv_have_gregset_t = yes; then
4708ac65
FF
3559 cat >> confdefs.h <<\EOF
3560#define HAVE_GREGSET_T 1
3561EOF
3562
3563fi
3564
3565echo $ac_n "checking for fpregset_t type""... $ac_c" 1>&6
4ff3dfab 3566echo "configure:3567: checking for fpregset_t type" >&5
07b77f5c 3567if eval "test \"`echo '$''{'gdb_cv_have_fpregset_t'+set}'`\" = set"; then
4708ac65
FF
3568 echo $ac_n "(cached) $ac_c" 1>&6
3569else
3570 cat > conftest.$ac_ext <<EOF
4ff3dfab 3571#line 3572 "configure"
4708ac65
FF
3572#include "confdefs.h"
3573#include <sys/procfs.h>
bfde4a67 3574int main() {
4708ac65
FF
3575fpregset_t *fpregsetp = 0
3576; return 0; }
3577EOF
4ff3dfab 3578if { (eval echo configure:3579: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
4708ac65 3579 rm -rf conftest*
07b77f5c 3580 gdb_cv_have_fpregset_t=yes
4708ac65 3581else
bfde4a67
SG
3582 echo "configure: failed program was:" >&5
3583 cat conftest.$ac_ext >&5
4708ac65 3584 rm -rf conftest*
07b77f5c 3585 gdb_cv_have_fpregset_t=no
4708ac65
FF
3586fi
3587rm -f conftest*
4708ac65
FF
3588fi
3589
07b77f5c
FF
3590echo "$ac_t""$gdb_cv_have_fpregset_t" 1>&6
3591if test $gdb_cv_have_fpregset_t = yes; then
4708ac65
FF
3592 cat >> confdefs.h <<\EOF
3593#define HAVE_FPREGSET_T 1
3594EOF
3595
3596fi
3597
bfde4a67 3598echo $ac_n "checking for main in -lm""... $ac_c" 1>&6
4ff3dfab 3599echo "configure:3600: checking for main in -lm" >&5
bfde4a67 3600ac_lib_var=`echo m'_'main | sed 'y%./+-%__p_%'`
ef6c51d1
SG
3601if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3602 echo $ac_n "(cached) $ac_c" 1>&6
3603else
3604 ac_save_LIBS="$LIBS"
3605LIBS="-lm $LIBS"
3606cat > conftest.$ac_ext <<EOF
4ff3dfab 3607#line 3608 "configure"
ef6c51d1
SG
3608#include "confdefs.h"
3609
bfde4a67 3610int main() {
ef6c51d1
SG
3611main()
3612; return 0; }
3613EOF
4ff3dfab 3614if { (eval echo configure:3615: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
ef6c51d1
SG
3615 rm -rf conftest*
3616 eval "ac_cv_lib_$ac_lib_var=yes"
3617else
bfde4a67
SG
3618 echo "configure: failed program was:" >&5
3619 cat conftest.$ac_ext >&5
ef6c51d1
SG
3620 rm -rf conftest*
3621 eval "ac_cv_lib_$ac_lib_var=no"
3622fi
3623rm -f conftest*
3624LIBS="$ac_save_LIBS"
3625
3626fi
3627if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3628 echo "$ac_t""yes" 1>&6
bfde4a67
SG
3629 ac_tr_lib=HAVE_LIB`echo m | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3630 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
ef6c51d1
SG
3631 cat >> confdefs.h <<EOF
3632#define $ac_tr_lib 1
3633EOF
3634
3635 LIBS="-lm $LIBS"
3636
3637else
3638 echo "$ac_t""no" 1>&6
3639fi
3640
3641
aa220473 3642
3f550b59 3643echo $ac_n "checking for long long support in compiler""... $ac_c" 1>&6
4ff3dfab 3644echo "configure:3645: checking for long long support in compiler" >&5
3f550b59
FF
3645if eval "test \"`echo '$''{'gdb_cv_c_long_long'+set}'`\" = set"; then
3646 echo $ac_n "(cached) $ac_c" 1>&6
3647else
3648 cat > conftest.$ac_ext <<EOF
4ff3dfab 3649#line 3650 "configure"
3f550b59
FF
3650#include "confdefs.h"
3651
bfde4a67 3652int main() {
80f600a4 3653
d538f9cf
FF
3654 extern long long foo;
3655 switch (foo & 2) { case 0: return 1; }
3656
3f550b59
FF
3657; return 0; }
3658EOF
4ff3dfab 3659if { (eval echo configure:3660: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3f550b59
FF
3660 rm -rf conftest*
3661 gdb_cv_c_long_long=yes
3662else
bfde4a67
SG
3663 echo "configure: failed program was:" >&5
3664 cat conftest.$ac_ext >&5
3f550b59
FF
3665 rm -rf conftest*
3666 gdb_cv_c_long_long=no
3667fi
3668rm -f conftest*
3f550b59
FF
3669fi
3670
3671echo "$ac_t""$gdb_cv_c_long_long" 1>&6
3672if test $gdb_cv_c_long_long = yes; then
3673 cat >> confdefs.h <<\EOF
3674#define CC_HAS_LONG_LONG 1
3675EOF
3676
3677fi
3678
3679
3680echo $ac_n "checking for long long support in printf""... $ac_c" 1>&6
4ff3dfab 3681echo "configure:3682: checking for long long support in printf" >&5
3f550b59
FF
3682if eval "test \"`echo '$''{'gdb_cv_printf_has_long_long'+set}'`\" = set"; then
3683 echo $ac_n "(cached) $ac_c" 1>&6
3684else
3685 if test "$cross_compiling" = yes; then
3686 gdb_cv_printf_has_long_long=no
3687else
bfde4a67 3688 cat > conftest.$ac_ext <<EOF
4ff3dfab 3689#line 3690 "configure"
3f550b59
FF
3690#include "confdefs.h"
3691
3692int main () {
f7b8c9ce
AC
3693 char buf[32];
3694 long long l = 0;
3695 l = (l << 16) + 0x0123;
3696 l = (l << 16) + 0x4567;
3697 l = (l << 16) + 0x89ab;
3698 l = (l << 16) + 0xcdef;
3699 sprintf (buf, "0x%016llx", l);
3700 return (strcmp ("0x0123456789abcdef", buf));
3f550b59
FF
3701}
3702EOF
4ff3dfab 3703if { (eval echo configure:3704: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
bfde4a67 3704then
3f550b59
FF
3705 gdb_cv_printf_has_long_long=yes
3706else
bfde4a67
SG
3707 echo "configure: failed program was:" >&5
3708 cat conftest.$ac_ext >&5
3709 rm -fr conftest*
3f550b59
FF
3710 gdb_cv_printf_has_long_long=no
3711fi
ef6c51d1 3712rm -fr conftest*
8b701284
ILT
3713fi
3714
bfde4a67
SG
3715fi
3716
3f550b59
FF
3717if test $gdb_cv_printf_has_long_long = yes; then
3718 cat >> confdefs.h <<\EOF
3719#define PRINTF_HAS_LONG_LONG 1
3720EOF
3721
3722fi
3723echo "$ac_t""$gdb_cv_printf_has_long_long" 1>&6
3724
3725
07b77f5c 3726echo $ac_n "checking for long double support in compiler""... $ac_c" 1>&6
4ff3dfab 3727echo "configure:3728: checking for long double support in compiler" >&5
aa220473
SG
3728if eval "test \"`echo '$''{'ac_cv_c_long_double'+set}'`\" = set"; then
3729 echo $ac_n "(cached) $ac_c" 1>&6
3730else
3731 cat > conftest.$ac_ext <<EOF
4ff3dfab 3732#line 3733 "configure"
aa220473
SG
3733#include "confdefs.h"
3734
bfde4a67 3735int main() {
aa220473
SG
3736long double foo;
3737; return 0; }
3738EOF
4ff3dfab 3739if { (eval echo configure:3740: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
aa220473
SG
3740 rm -rf conftest*
3741 ac_cv_c_long_double=yes
3742else
bfde4a67
SG
3743 echo "configure: failed program was:" >&5
3744 cat conftest.$ac_ext >&5
aa220473
SG
3745 rm -rf conftest*
3746 ac_cv_c_long_double=no
3747fi
3748rm -f conftest*
aa220473
SG
3749fi
3750
3751echo "$ac_t""$ac_cv_c_long_double" 1>&6
3752if test $ac_cv_c_long_double = yes; then
3753 cat >> confdefs.h <<\EOF
3754#define HAVE_LONG_DOUBLE 1
3755EOF
3756
3757fi
3758
07b77f5c
FF
3759
3760echo $ac_n "checking for long double support in printf""... $ac_c" 1>&6
4ff3dfab 3761echo "configure:3762: checking for long double support in printf" >&5
07b77f5c
FF
3762if eval "test \"`echo '$''{'gdb_cv_printf_has_long_double'+set}'`\" = set"; then
3763 echo $ac_n "(cached) $ac_c" 1>&6
3764else
3765 if test "$cross_compiling" = yes; then
3766 gdb_cv_printf_has_long_double=no
3767else
bfde4a67 3768 cat > conftest.$ac_ext <<EOF
4ff3dfab 3769#line 3770 "configure"
07b77f5c
FF
3770#include "confdefs.h"
3771
3772int main () {
3773 char buf[16];
3774 long double f = 3.141592653;
3775 sprintf (buf, "%Lg", f);
3776 return (strncmp ("3.14159", buf, 7));
3777}
3778EOF
4ff3dfab 3779if { (eval echo configure:3780: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
bfde4a67 3780then
07b77f5c
FF
3781 gdb_cv_printf_has_long_double=yes
3782else
bfde4a67
SG
3783 echo "configure: failed program was:" >&5
3784 cat conftest.$ac_ext >&5
3785 rm -fr conftest*
07b77f5c
FF
3786 gdb_cv_printf_has_long_double=no
3787fi
ef6c51d1 3788rm -fr conftest*
8b701284
ILT
3789fi
3790
bfde4a67
SG
3791fi
3792
07b77f5c
FF
3793if test $gdb_cv_printf_has_long_double = yes; then
3794 cat >> confdefs.h <<\EOF
3795#define PRINTF_HAS_LONG_DOUBLE 1
3796EOF
3797
3798fi
3799echo "$ac_t""$gdb_cv_printf_has_long_double" 1>&6
3800
f7b8c9ce
AC
3801
3802echo $ac_n "checking for long double support in scanf""... $ac_c" 1>&6
4ff3dfab 3803echo "configure:3804: checking for long double support in scanf" >&5
f7b8c9ce
AC
3804if eval "test \"`echo '$''{'gdb_cv_scanf_has_long_double'+set}'`\" = set"; then
3805 echo $ac_n "(cached) $ac_c" 1>&6
3806else
3807 if test "$cross_compiling" = yes; then
3808 gdb_cv_scanf_has_long_double=no
3809else
3810 cat > conftest.$ac_ext <<EOF
4ff3dfab 3811#line 3812 "configure"
f7b8c9ce
AC
3812#include "confdefs.h"
3813
3814int main () {
3815 char *buf = "3.141592653";
3816 long double f = 0;
3817 sscanf (buf, "%Lg", &f);
3818 return !(f > 3.14159 && f < 3.14160);
3819}
3820EOF
4ff3dfab 3821if { (eval echo configure:3822: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
f7b8c9ce
AC
3822then
3823 gdb_cv_scanf_has_long_double=yes
3824else
3825 echo "configure: failed program was:" >&5
3826 cat conftest.$ac_ext >&5
3827 rm -fr conftest*
3828 gdb_cv_scanf_has_long_double=no
3829fi
3830rm -fr conftest*
3831fi
3832
3833fi
3834
3835if test $gdb_cv_scanf_has_long_double = yes; then
3836 cat >> confdefs.h <<\EOF
3837#define SCANF_HAS_LONG_DOUBLE 1
3838EOF
3839
3840fi
3841echo "$ac_t""$gdb_cv_scanf_has_long_double" 1>&6
3842
bfde4a67
SG
3843for ac_hdr in unistd.h
3844do
3845ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
3846echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4ff3dfab 3847echo "configure:3848: checking for $ac_hdr" >&5
bfde4a67
SG
3848if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3849 echo $ac_n "(cached) $ac_c" 1>&6
3850else
3851 cat > conftest.$ac_ext <<EOF
4ff3dfab 3852#line 3853 "configure"
bfde4a67
SG
3853#include "confdefs.h"
3854#include <$ac_hdr>
3855EOF
3856ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4ff3dfab
JM
3857{ (eval echo configure:3858: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3858ac_err=`grep -v '^ *+' conftest.out`
bfde4a67
SG
3859if test -z "$ac_err"; then
3860 rm -rf conftest*
3861 eval "ac_cv_header_$ac_safe=yes"
3862else
3863 echo "$ac_err" >&5
3864 echo "configure: failed program was:" >&5
3865 cat conftest.$ac_ext >&5
3866 rm -rf conftest*
3867 eval "ac_cv_header_$ac_safe=no"
3868fi
3869rm -f conftest*
3870fi
3871if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3872 echo "$ac_t""yes" 1>&6
3873 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
3874 cat >> confdefs.h <<EOF
3875#define $ac_tr_hdr 1
3876EOF
3877
3878else
3879 echo "$ac_t""no" 1>&6
3880fi
3881done
3882
3883for ac_func in getpagesize
1a7b4b7c
DE
3884do
3885echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4ff3dfab 3886echo "configure:3887: checking for $ac_func" >&5
1a7b4b7c
DE
3887if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3888 echo $ac_n "(cached) $ac_c" 1>&6
3889else
3890 cat > conftest.$ac_ext <<EOF
4ff3dfab 3891#line 3892 "configure"
1a7b4b7c
DE
3892#include "confdefs.h"
3893/* System header to define __stub macros and hopefully few prototypes,
3894 which can conflict with char $ac_func(); below. */
3895#include <assert.h>
3896/* Override any gcc2 internal prototype to avoid an error. */
bc859e63
SG
3897/* We use char because int might match the return type of a gcc2
3898 builtin and then its argument prototype would still apply. */
1a7b4b7c
DE
3899char $ac_func();
3900
bfde4a67 3901int main() {
1a7b4b7c
DE
3902
3903/* The GNU C library defines this for functions which it implements
3904 to always fail with ENOSYS. Some functions are actually named
3905 something starting with __ and the normal name is an alias. */
3906#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3907choke me
3908#else
3909$ac_func();
3910#endif
3911
3912; return 0; }
3913EOF
4ff3dfab 3914if { (eval echo configure:3915: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
1a7b4b7c
DE
3915 rm -rf conftest*
3916 eval "ac_cv_func_$ac_func=yes"
3917else
bfde4a67
SG
3918 echo "configure: failed program was:" >&5
3919 cat conftest.$ac_ext >&5
1a7b4b7c
DE
3920 rm -rf conftest*
3921 eval "ac_cv_func_$ac_func=no"
3922fi
3923rm -f conftest*
ef6c51d1 3924fi
bfde4a67 3925
1a7b4b7c
DE
3926if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3927 echo "$ac_t""yes" 1>&6
3928 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3929 cat >> confdefs.h <<EOF
3930#define $ac_tr_func 1
3931EOF
3932
3933else
3934 echo "$ac_t""no" 1>&6
3935fi
3936done
3937
2b576293 3938echo $ac_n "checking for working mmap""... $ac_c" 1>&6
4ff3dfab 3939echo "configure:3940: checking for working mmap" >&5
bfde4a67 3940if eval "test \"`echo '$''{'ac_cv_func_mmap_fixed_mapped'+set}'`\" = set"; then
2b576293
C
3941 echo $ac_n "(cached) $ac_c" 1>&6
3942else
3943 if test "$cross_compiling" = yes; then
bfde4a67 3944 ac_cv_func_mmap_fixed_mapped=no
2b576293 3945else
bfde4a67 3946 cat > conftest.$ac_ext <<EOF
4ff3dfab 3947#line 3948 "configure"
2b576293
C
3948#include "confdefs.h"
3949
bfde4a67
SG
3950/* Thanks to Mike Haertel and Jim Avera for this test.
3951 Here is a matrix of mmap possibilities:
3952 mmap private not fixed
3953 mmap private fixed at somewhere currently unmapped
3954 mmap private fixed at somewhere already mapped
3955 mmap shared not fixed
3956 mmap shared fixed at somewhere currently unmapped
3957 mmap shared fixed at somewhere already mapped
3958 For private mappings, we should verify that changes cannot be read()
3959 back from the file, nor mmap's back from the file at a different
3960 address. (There have been systems where private was not correctly
3961 implemented like the infamous i386 svr4.0, and systems where the
3962 VM page cache was not coherent with the filesystem buffer cache
3963 like early versions of FreeBSD and possibly contemporary NetBSD.)
3964 For shared mappings, we should conversely verify that changes get
3965 propogated back to all the places they're supposed to be.
3966
3967 Grep wants private fixed already mapped.
3968 The main things grep needs to know about mmap are:
3969 * does it exist and is it safe to write into the mmap'd area
3970 * how to use it (BSD variants) */
2b576293
C
3971#include <sys/types.h>
3972#include <fcntl.h>
3973#include <sys/mman.h>
3974
bfde4a67 3975/* This mess was copied from the GNU getpagesize.h. */
2b576293 3976#ifndef HAVE_GETPAGESIZE
bfde4a67
SG
3977# ifdef HAVE_UNISTD_H
3978# include <unistd.h>
8b701284
ILT
3979# endif
3980
bfde4a67
SG
3981/* Assume that all systems that can run configure have sys/param.h. */
3982# ifndef HAVE_SYS_PARAM_H
3983# define HAVE_SYS_PARAM_H 1
3984# endif
3985
3986# ifdef _SC_PAGESIZE
3987# define getpagesize() sysconf(_SC_PAGESIZE)
3988# else /* no _SC_PAGESIZE */
3989# ifdef HAVE_SYS_PARAM_H
3990# include <sys/param.h>
3991# ifdef EXEC_PAGESIZE
3992# define getpagesize() EXEC_PAGESIZE
3993# else /* no EXEC_PAGESIZE */
3994# ifdef NBPG
3995# define getpagesize() NBPG * CLSIZE
3996# ifndef CLSIZE
3997# define CLSIZE 1
3998# endif /* no CLSIZE */
3999# else /* no NBPG */
4000# ifdef NBPC
4001# define getpagesize() NBPC
4002# else /* no NBPC */
4003# ifdef PAGESIZE
4004# define getpagesize() PAGESIZE
4005# endif /* PAGESIZE */
4006# endif /* no NBPC */
4007# endif /* no NBPG */
4008# endif /* no EXEC_PAGESIZE */
4009# else /* no HAVE_SYS_PARAM_H */
4010# define getpagesize() 8192 /* punt totally */
4011# endif /* no HAVE_SYS_PARAM_H */
4012# endif /* no _SC_PAGESIZE */
4013
4014#endif /* no HAVE_GETPAGESIZE */
2b576293
C
4015
4016#ifdef __cplusplus
bfde4a67 4017extern "C" { void *malloc(unsigned); }
2b576293 4018#else
bfde4a67 4019char *malloc();
2b576293
C
4020#endif
4021
4022int
4023main()
4024{
bfde4a67
SG
4025 char *data, *data2, *data3;
4026 int i, pagesize;
4027 int fd;
4028
4029 pagesize = getpagesize();
4030
4031 /*
4032 * First, make a file with some known garbage in it.
4033 */
4034 data = malloc(pagesize);
4035 if (!data)
4036 exit(1);
4037 for (i = 0; i < pagesize; ++i)
4038 *(data + i) = rand();
4039 umask(0);
4040 fd = creat("conftestmmap", 0600);
4041 if (fd < 0)
4042 exit(1);
4043 if (write(fd, data, pagesize) != pagesize)
4044 exit(1);
4045 close(fd);
4046
4047 /*
4048 * Next, try to mmap the file at a fixed address which
4049 * already has something else allocated at it. If we can,
4050 * also make sure that we see the same garbage.
4051 */
4052 fd = open("conftestmmap", O_RDWR);
4053 if (fd < 0)
4054 exit(1);
4055 data2 = malloc(2 * pagesize);
4056 if (!data2)
4057 exit(1);
4058 data2 += (pagesize - ((int) data2 & (pagesize - 1))) & (pagesize - 1);
4059 if (data2 != mmap(data2, pagesize, PROT_READ | PROT_WRITE,
4060 MAP_PRIVATE | MAP_FIXED, fd, 0L))
4061 exit(1);
4062 for (i = 0; i < pagesize; ++i)
4063 if (*(data + i) != *(data2 + i))
4064 exit(1);
4065
4066 /*
4067 * Finally, make sure that changes to the mapped area
4068 * do not percolate back to the file as seen by read().
4069 * (This is a bug on some variants of i386 svr4.0.)
4070 */
4071 for (i = 0; i < pagesize; ++i)
4072 *(data2 + i) = *(data2 + i) + 1;
4073 data3 = malloc(pagesize);
4074 if (!data3)
4075 exit(1);
4076 if (read(fd, data3, pagesize) != pagesize)
4077 exit(1);
4078 for (i = 0; i < pagesize; ++i)
4079 if (*(data + i) != *(data3 + i))
4080 exit(1);
4081 close(fd);
4082 unlink("conftestmmap");
4083 exit(0);
2b576293
C
4084}
4085
4086EOF
4ff3dfab 4087if { (eval echo configure:4088: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
bfde4a67
SG
4088then
4089 ac_cv_func_mmap_fixed_mapped=yes
2b576293 4090else
bfde4a67
SG
4091 echo "configure: failed program was:" >&5
4092 cat conftest.$ac_ext >&5
4093 rm -fr conftest*
4094 ac_cv_func_mmap_fixed_mapped=no
2b576293 4095fi
ef6c51d1 4096rm -fr conftest*
8b701284
ILT
4097fi
4098
bfde4a67
SG
4099fi
4100
4101echo "$ac_t""$ac_cv_func_mmap_fixed_mapped" 1>&6
4102if test $ac_cv_func_mmap_fixed_mapped = yes; then
2b576293
C
4103 cat >> confdefs.h <<\EOF
4104#define HAVE_MMAP 1
4105EOF
4106
4107fi
4108
5436fc65 4109
5819f35d 4110echo $ac_n "checking whether malloc must be declared""... $ac_c" 1>&6
4ff3dfab 4111echo "configure:4112: checking whether malloc must be declared" >&5
5819f35d
SG
4112if eval "test \"`echo '$''{'bfd_cv_decl_needed_malloc'+set}'`\" = set"; then
4113 echo $ac_n "(cached) $ac_c" 1>&6
4114else
4115 cat > conftest.$ac_ext <<EOF
4ff3dfab 4116#line 4117 "configure"
5819f35d
SG
4117#include "confdefs.h"
4118
4119#include <stdio.h>
4120#ifdef HAVE_STRING_H
4121#include <string.h>
4122#else
4123#ifdef HAVE_STRINGS_H
4124#include <strings.h>
4125#endif
4126#endif
4127#ifdef HAVE_STDLIB_H
4128#include <stdlib.h>
4129#endif
4130#ifdef HAVE_UNISTD_H
4131#include <unistd.h>
4132#endif
bfde4a67 4133int main() {
5819f35d
SG
4134char *(*pfn) = (char *(*)) malloc
4135; return 0; }
4136EOF
4ff3dfab 4137if { (eval echo configure:4138: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5819f35d
SG
4138 rm -rf conftest*
4139 bfd_cv_decl_needed_malloc=no
4140else
bfde4a67
SG
4141 echo "configure: failed program was:" >&5
4142 cat conftest.$ac_ext >&5
5819f35d
SG
4143 rm -rf conftest*
4144 bfd_cv_decl_needed_malloc=yes
4145fi
4146rm -f conftest*
5819f35d
SG
4147fi
4148
4149echo "$ac_t""$bfd_cv_decl_needed_malloc" 1>&6
4150if test $bfd_cv_decl_needed_malloc = yes; then
4151 bfd_tr_decl=NEED_DECLARATION_`echo malloc | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4152 cat >> confdefs.h <<EOF
4153#define $bfd_tr_decl 1
4154EOF
4155
4156fi
4157
4158echo $ac_n "checking whether realloc must be declared""... $ac_c" 1>&6
4ff3dfab 4159echo "configure:4160: checking whether realloc must be declared" >&5
5819f35d
SG
4160if eval "test \"`echo '$''{'bfd_cv_decl_needed_realloc'+set}'`\" = set"; then
4161 echo $ac_n "(cached) $ac_c" 1>&6
4162else
4163 cat > conftest.$ac_ext <<EOF
4ff3dfab 4164#line 4165 "configure"
5819f35d
SG
4165#include "confdefs.h"
4166
4167#include <stdio.h>
4168#ifdef HAVE_STRING_H
4169#include <string.h>
4170#else
4171#ifdef HAVE_STRINGS_H
4172#include <strings.h>
4173#endif
4174#endif
4175#ifdef HAVE_STDLIB_H
4176#include <stdlib.h>
4177#endif
4178#ifdef HAVE_UNISTD_H
4179#include <unistd.h>
4180#endif
bfde4a67 4181int main() {
5819f35d
SG
4182char *(*pfn) = (char *(*)) realloc
4183; return 0; }
4184EOF
4ff3dfab 4185if { (eval echo configure:4186: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5819f35d
SG
4186 rm -rf conftest*
4187 bfd_cv_decl_needed_realloc=no
4188else
bfde4a67
SG
4189 echo "configure: failed program was:" >&5
4190 cat conftest.$ac_ext >&5
5819f35d
SG
4191 rm -rf conftest*
4192 bfd_cv_decl_needed_realloc=yes
4193fi
4194rm -f conftest*
5819f35d
SG
4195fi
4196
4197echo "$ac_t""$bfd_cv_decl_needed_realloc" 1>&6
4198if test $bfd_cv_decl_needed_realloc = yes; then
4199 bfd_tr_decl=NEED_DECLARATION_`echo realloc | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4200 cat >> confdefs.h <<EOF
4201#define $bfd_tr_decl 1
4202EOF
4203
4204fi
4205
4206echo $ac_n "checking whether free must be declared""... $ac_c" 1>&6
4ff3dfab 4207echo "configure:4208: checking whether free must be declared" >&5
5819f35d
SG
4208if eval "test \"`echo '$''{'bfd_cv_decl_needed_free'+set}'`\" = set"; then
4209 echo $ac_n "(cached) $ac_c" 1>&6
4210else
4211 cat > conftest.$ac_ext <<EOF
4ff3dfab 4212#line 4213 "configure"
5819f35d
SG
4213#include "confdefs.h"
4214
4215#include <stdio.h>
4216#ifdef HAVE_STRING_H
4217#include <string.h>
4218#else
4219#ifdef HAVE_STRINGS_H
4220#include <strings.h>
4221#endif
4222#endif
4223#ifdef HAVE_STDLIB_H
4224#include <stdlib.h>
4225#endif
4226#ifdef HAVE_UNISTD_H
4227#include <unistd.h>
4228#endif
bfde4a67 4229int main() {
5819f35d
SG
4230char *(*pfn) = (char *(*)) free
4231; return 0; }
4232EOF
4ff3dfab 4233if { (eval echo configure:4234: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5819f35d
SG
4234 rm -rf conftest*
4235 bfd_cv_decl_needed_free=no
4236else
bfde4a67
SG
4237 echo "configure: failed program was:" >&5
4238 cat conftest.$ac_ext >&5
5819f35d
SG
4239 rm -rf conftest*
4240 bfd_cv_decl_needed_free=yes
4241fi
4242rm -f conftest*
5819f35d
SG
4243fi
4244
4245echo "$ac_t""$bfd_cv_decl_needed_free" 1>&6
4246if test $bfd_cv_decl_needed_free = yes; then
4247 bfd_tr_decl=NEED_DECLARATION_`echo free | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4248 cat >> confdefs.h <<EOF
4249#define $bfd_tr_decl 1
4250EOF
4251
4252fi
4253
fef1696f 4254
21cbc60c 4255echo $ac_n "checking whether strerror must be declared""... $ac_c" 1>&6
4ff3dfab 4256echo "configure:4257: checking whether strerror must be declared" >&5
21cbc60c
JM
4257if eval "test \"`echo '$''{'bfd_cv_decl_needed_strerror'+set}'`\" = set"; then
4258 echo $ac_n "(cached) $ac_c" 1>&6
4259else
4260 cat > conftest.$ac_ext <<EOF
4ff3dfab 4261#line 4262 "configure"
21cbc60c
JM
4262#include "confdefs.h"
4263
4264#include <stdio.h>
4265#ifdef HAVE_STRING_H
4266#include <string.h>
4267#else
4268#ifdef HAVE_STRINGS_H
4269#include <strings.h>
4270#endif
4271#endif
4272#ifdef HAVE_STDLIB_H
4273#include <stdlib.h>
4274#endif
4275#ifdef HAVE_UNISTD_H
4276#include <unistd.h>
4277#endif
4278int main() {
4279char *(*pfn) = (char *(*)) strerror
4280; return 0; }
4281EOF
4ff3dfab 4282if { (eval echo configure:4283: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21cbc60c
JM
4283 rm -rf conftest*
4284 bfd_cv_decl_needed_strerror=no
4285else
4286 echo "configure: failed program was:" >&5
4287 cat conftest.$ac_ext >&5
4288 rm -rf conftest*
4289 bfd_cv_decl_needed_strerror=yes
4290fi
4291rm -f conftest*
4292fi
4293
4294echo "$ac_t""$bfd_cv_decl_needed_strerror" 1>&6
4295if test $bfd_cv_decl_needed_strerror = yes; then
4296 bfd_tr_decl=NEED_DECLARATION_`echo strerror | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4297 cat >> confdefs.h <<EOF
4298#define $bfd_tr_decl 1
4299EOF
4300
4301fi
4302
4303
47ef0da5 4304
89e673a4
SG
4305
4306if test ${build} = ${host} -a ${host} = ${target} ; then
4b95e9a1
JM
4307 case ${host_os} in
4308 hpux*)
4309 echo $ac_n "checking for HPUX/OSF thread support""... $ac_c" 1>&6
4ff3dfab 4310echo "configure:4311: checking for HPUX/OSF thread support" >&5
4b95e9a1
JM
4311 if test -f /usr/include/dce/cma_config.h ; then
4312 if test "$GCC" = "yes" ; then
4313 echo "$ac_t""yes" 1>&6
4314 cat >> confdefs.h <<\EOF
5d394f70
SG
4315#define HAVE_HPUX_THREAD_SUPPORT 1
4316EOF
4317
4b95e9a1 4318 CONFIG_OBS="${CONFIG_OJS} hpux-thread.o"
c7bb1531 4319 CONFIG_SRCS="${CONFIG_SRCS} hpux-thread.c"
4b95e9a1
JM
4320 else
4321 echo "$ac_t""no (suppressed because you are not using GCC)" 1>&6
4322 fi
4323 else
4324 echo "$ac_t""no" 1>&6
4325 fi
4326 ;;
4327 solaris*)
4328 echo $ac_n "checking for Solaris thread debugging library""... $ac_c" 1>&6
4ff3dfab 4329echo "configure:4330: checking for Solaris thread debugging library" >&5
4b95e9a1
JM
4330 if test -f /usr/lib/libthread_db.so.1 ; then
4331 echo "$ac_t""yes" 1>&6
4332 cat >> confdefs.h <<\EOF
6c310da8
SG
4333#define HAVE_THREAD_DB_LIB 1
4334EOF
4335
4b95e9a1 4336 CONFIG_OBS="${CONFIG_OBS} sol-thread.o"
c7bb1531 4337 CONFIG_SRCS="${CONFIG_SRCS} sol-thread.c"
4b95e9a1 4338 echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
4ff3dfab 4339echo "configure:4340: checking for dlopen in -ldl" >&5
bfde4a67 4340ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'`
95b47547
SG
4341if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4342 echo $ac_n "(cached) $ac_c" 1>&6
4343else
4344 ac_save_LIBS="$LIBS"
4345LIBS="-ldl $LIBS"
4346cat > conftest.$ac_ext <<EOF
4ff3dfab 4347#line 4348 "configure"
95b47547
SG
4348#include "confdefs.h"
4349/* Override any gcc2 internal prototype to avoid an error. */
4350/* We use char because int might match the return type of a gcc2
4351 builtin and then its argument prototype would still apply. */
4352char dlopen();
4353
bfde4a67 4354int main() {
95b47547
SG
4355dlopen()
4356; return 0; }
4357EOF
4ff3dfab 4358if { (eval echo configure:4359: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
95b47547
SG
4359 rm -rf conftest*
4360 eval "ac_cv_lib_$ac_lib_var=yes"
4361else
bfde4a67
SG
4362 echo "configure: failed program was:" >&5
4363 cat conftest.$ac_ext >&5
95b47547
SG
4364 rm -rf conftest*
4365 eval "ac_cv_lib_$ac_lib_var=no"
4366fi
4367rm -f conftest*
4368LIBS="$ac_save_LIBS"
4369
4370fi
4371if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4372 echo "$ac_t""yes" 1>&6
bfde4a67
SG
4373 ac_tr_lib=HAVE_LIB`echo dl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4374 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
95b47547
SG
4375 cat >> confdefs.h <<EOF
4376#define $ac_tr_lib 1
4377EOF
4378
4379 LIBS="-ldl $LIBS"
4380
4381else
4382 echo "$ac_t""no" 1>&6
4383fi
4384
4b95e9a1
JM
4385 if test "$GCC" = "yes" ; then
4386 # The GNU linker requires the -export-dynamic option to make
4387 # all symbols visible in the dynamic symbol table.
4388 hold_ldflags=$LDFLAGS
4389 echo $ac_n "checking for the ld -export-dynamic flag""... $ac_c" 1>&6
4ff3dfab 4390echo "configure:4391: checking for the ld -export-dynamic flag" >&5
4b95e9a1
JM
4391 LDFLAGS="${LDFLAGS} -Wl,-export-dynamic"
4392 cat > conftest.$ac_ext <<EOF
4ff3dfab 4393#line 4394 "configure"
4b95e9a1
JM
4394#include "confdefs.h"
4395
4396int main() {
4397int i;
4398; return 0; }
4399EOF
4ff3dfab 4400if { (eval echo configure:4401: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
4b95e9a1
JM
4401 rm -rf conftest*
4402 found=yes
4403else
4404 echo "configure: failed program was:" >&5
4405 cat conftest.$ac_ext >&5
4406 rm -rf conftest*
4407 found=no
4408fi
4409rm -f conftest*
4410 LDFLAGS=$hold_ldflags
4411 echo "$ac_t""$found" 1>&6
4412 if test $found = yes; then
4413 CONFIG_LDFLAGS="${CONFIG_LDFLAGS} -Wl,-export-dynamic"
4414 fi
4415 fi
4416 else
4417 echo "$ac_t""no" 1>&6
4418 fi
4419 ;;
4420 esac
4421
89e673a4 4422fi
47ef0da5 4423
5436fc65 4424ENABLE_CFLAGS=
5436fc65
C
4425
4426# Check whether --enable-netrom or --disable-netrom was given.
1a7b4b7c
DE
4427if test "${enable_netrom+set}" = set; then
4428 enableval="$enable_netrom"
5436fc65
C
4429 case "${enableval}" in
4430yes) enable_netrom=yes ;;
4431no) enable_netrom=no ;;
4432*) { echo "configure: error: bad value ${enableval} given for netrom option" 1>&2; exit 1; } ;;
4433esac
4434fi
4435
4436
4437if test "${enable_netrom}" = "yes"; then
6c310da8 4438 CONFIG_OBS="${CONFIG_OBS} remote-nrom.o"
c7bb1531 4439 CONFIG_SRCS="${CONFIG_SRCS} remote-nrom.c"
5436fc65
C
4440fi
4441
0728afad
FF
4442MMALLOC_CFLAGS=
4443MMALLOC=
4444
4445
4446
4447# Check whether --with-mmalloc or --without-mmalloc was given.
4448if test "${with_mmalloc+set}" = set; then
4449 withval="$with_mmalloc"
4450 case "${withval}" in
4451 yes) want_mmalloc=true ;;
4452 no) want_mmalloc=false;;
4453 *) { echo "configure: error: bad value ${withval} for GDB with-mmalloc option" 1>&2; exit 1; } ;;
4454esac
4455else
4456 want_mmalloc=false
4457fi
4458
4459if test x$want_mmalloc = xtrue; then
4460 cat >> confdefs.h <<\EOF
4461#define USE_MMALLOC 1
4462EOF
4463
4464 cat >> confdefs.h <<\EOF
dd600735 4465#define MMCHECK_FORCE 1
0728afad
FF
4466EOF
4467
4468 MMALLOC_CFLAGS="-I$srcdir/../mmalloc"
4469 MMALLOC='../mmalloc/libmmalloc.a'
4470fi
4471
5436fc65 4472# start-sanitize-gdbtk
2476848a
MH
4473ENABLE_IDE=
4474# Check whether --enable-ide or --disable-ide was given.
4475if test "${enable_ide+set}" = set; then
4476 enableval="$enable_ide"
4477 :
4478fi
4479
4480if test "$enable_ide" = yes; then
4481 enable_ide=yes
4482 ENABLE_IDE=1
4483else
4484 enable_ide=no
4485fi
4486
4487
c076f1ed
DM
4488# Check whether --with-foundry-libs or --without-foundry-libs was given.
4489if test "${with_foundry_libs+set}" = set; then
4490 withval="$with_foundry_libs"
4491 FOUNDRY_LIB_BASE=${withval}
4492fi
4493
4494
4495
4496#
4497# This is the Foundry SDK
4498#
4499# These variables are used to determine where the Foundry libs and
4500# header files are located.
4501#
4502if test "$FOUNDRY_LIB_BASE" != ""; then
4503 LIBGUI="${FOUNDRY_LIB_BASE}/lib/libgui.a"
4504 GUI_CFLAGS_X="-I${FOUNDRY_LIB_BASE}/include"
4505 if test x$enable_ide = xyes; then
4506 IDE_CFLAGS_X="-I${FOUNDRY_LIB_BASE}/include -DIDE"
4507 IDE_X="-L${FOUNDRY_LIB_BASE}/lib -lilu-Tk -lilu-c -lilu"
4508 else
4509 IDE_CFLAGS_X="-I${FOUNDRY_LIB_BASE}/include"
4510 fi
4511 LIBIDETCL="${FOUNDRY_LIB_BASE}/lib/libidetcl.a"
4512 LIBIDE="${FOUNDRY_LIB_BASE}/lib/libide.a"
4513 IDE_DEPS="${FOUNDRY_LIB_BASE}/lib/libilu-Tk.a ${FOUNDRY_LIB_BASE}/lib/libilu-c.a ${FOUNDRY_LIB_BASE}/lib/libilu.a"
4514else
4515 LIBGUI="../libgui/src/libgui.a"
4516 GUI_CFLAGS_X="-I${srcdir}/../libgui/src"
4517 if test x$enable_ide = xyes; then
4518 IDE_CFLAGS_X="-I${srcdir}/../libidetcl/src -I${srcdir}/../libide/src -DIDE -I${srcdir}/../ilu/runtime/mainloop"
4519 IDE_X="-L../ilu/runtime/mainloop -lilu-Tk -L../ilu/runtime/c -lilu-c -L../ilu/runtime/kernel -lilu"
4520 else
4521 IDE_CFLAGS_X="-I${srcdir}/../libidetcl/src -I${srcdir}/../libide/src"
4522 fi
4523 LIBIDETCL="../libidetcl/src/libidetcl.a"
4524 LIBIDE="../libide/src/libide.a"
4525 IDE_DEPS="../ilu/runtime/mainloop/libilu-Tk.a ../ilu/runtime/c/libilu-c.a ../ilu/runtime/kernel/libilu.a"
4526fi
4527
4528
4529
4530
4531
4532
4533
4534
5436fc65
C
4535ENABLE_GDBTK=
4536
4537# Check whether --enable-gdbtk or --disable-gdbtk was given.
1a7b4b7c
DE
4538if test "${enable_gdbtk+set}" = set; then
4539 enableval="$enable_gdbtk"
5436fc65 4540 case "${enableval}" in
0fe1522a
SG
4541 yes)
4542 case "$host" in
4543 *go32*)
4544 echo "configure: warning: GDB does not support GDBtk on host ${host}. GDBtk will be disabled." 1>&2
4545 enable_gdbtk=no ;;
8a19b35a 4546 *windows*)
b613bfbf
GN
4547 echo "configure: warning: GDB does not support GDBtk on host ${host}. GDBtk will be disabled." 1>&2
4548 enable_gdbtk=no ;;
0fe1522a
SG
4549 *)
4550 enable_gdbtk=yes ;;
4551 esac ;;
4552 no)
4553 enable_gdbtk=no ;;
4554 *)
4555 { echo "configure: error: bad value ${enableval} given for gdbtk option" 1>&2; exit 1; } ;;
5436fc65 4556esac
0fe1522a
SG
4557else
4558
b613bfbf 4559# Default is on for everything but go32 and cygwin32
0fe1522a 4560case "$host" in
8a19b35a 4561 *go32* | *windows*)
b613bfbf 4562 ;;
0fe1522a
SG
4563 *)
4564 enable_gdbtk=yes ;;
4565 esac
4566
5436fc65
C
4567fi
4568
4569
9b119644
ILT
4570# In the cygwin32 environment, we need some additional flags.
4571echo $ac_n "checking for cygwin32""... $ac_c" 1>&6
4ff3dfab 4572echo "configure:4573: checking for cygwin32" >&5
9b119644
ILT
4573if eval "test \"`echo '$''{'gdb_cv_os_cygwin32'+set}'`\" = set"; then
4574 echo $ac_n "(cached) $ac_c" 1>&6
4575else
4576 cat > conftest.$ac_ext <<EOF
4ff3dfab 4577#line 4578 "configure"
9b119644
ILT
4578#include "confdefs.h"
4579
4580#ifdef __CYGWIN32__
4581lose
4582#endif
4583EOF
4584if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4585 egrep "lose" >/dev/null 2>&1; then
4586 rm -rf conftest*
4587 gdb_cv_os_cygwin32=yes
4588else
4589 rm -rf conftest*
4590 gdb_cv_os_cygwin32=no
4591fi
4592rm -f conftest*
4593
4594fi
4595
4596echo "$ac_t""$gdb_cv_os_cygwin32" 1>&6
4597
4598WIN32LIBS=
4599WIN32LDAPP=
4600
4601
4602
929db6e5
EZ
4603WINDRES=${WINDRES-windres}
4604
4605
9b119644
ILT
4606if test x$gdb_cv_os_cygwin32 = xyes; then
4607 if test x$enable_ide = xyes; then
4608 WIN32LIBS="-ladvapi32"
4609 fi
4610fi
4611
4612configdir="unix"
8a19b35a 4613
b177bf84 4614GDBTKLIBS=
5436fc65 4615if test "${enable_gdbtk}" = "yes"; then
0fe1522a 4616
047465fd
TT
4617
4618#
4619# Ok, lets find the tcl configuration
4620# First, look for one uninstalled.
4621# the alternative search directory is invoked by --with-tclconfig
4622#
5436fc65 4623
047465fd
TT
4624if test x"${no_tcl}" = x ; then
4625 # we reset no_tcl in case something fails here
4626 no_tcl=true
4627 # Check whether --with-tclconfig or --without-tclconfig was given.
4628if test "${with_tclconfig+set}" = set; then
4629 withval="$with_tclconfig"
4630 with_tclconfig=${withval}
5436fc65
C
4631fi
4632
047465fd 4633 echo $ac_n "checking for Tcl configuration""... $ac_c" 1>&6
4ff3dfab 4634echo "configure:4635: checking for Tcl configuration" >&5
047465fd 4635 if eval "test \"`echo '$''{'ac_cv_c_tclconfig'+set}'`\" = set"; then
5436fc65
C
4636 echo $ac_n "(cached) $ac_c" 1>&6
4637else
047465fd 4638
1a7b4b7c 4639
047465fd
TT
4640 # First check to see if --with-tclconfig was specified.
4641 if test x"${with_tclconfig}" != x ; then
4642 if test -f "${with_tclconfig}/tclConfig.sh" ; then
4643 ac_cv_c_tclconfig=`(cd ${with_tclconfig}; pwd)`
4644 else
4645 { echo "configure: error: ${with_tclconfig} directory doesn't contain tclConfig.sh" 1>&2; exit 1; }
5436fc65 4646 fi
047465fd 4647 fi
5436fc65 4648
047465fd
TT
4649 # then check for a private Tcl installation
4650 if test x"${ac_cv_c_tclconfig}" = x ; then
4651 for i in \
4652 ../tcl \
4653 `ls -dr ../tcl[7-9]* 2>/dev/null` \
4654 ../../tcl \
4655 `ls -dr ../../tcl[7-9]* 2>/dev/null` \
4656 ../../../tcl \
4657 `ls -dr ../../../tcl[7-9]* 2>/dev/null` ; do
8a19b35a
MH
4658 if test -f "$i/${configdir}/tclConfig.sh" ; then
4659 ac_cv_c_tclconfig=`(cd $i/${configdir}; pwd)`
047465fd
TT
4660 break
4661 fi
4662 done
4663 fi
4664 # check in a few common install locations
4665 if test x"${ac_cv_c_tclconfig}" = x ; then
4666 for i in `ls -d ${prefix}/lib /usr/local/lib 2>/dev/null` ; do
4667 if test -f "$i/tclConfig.sh" ; then
4668 ac_cv_c_tclconfig=`(cd $i; pwd)`
4669 break
4670 fi
4671 done
4672 fi
4673 # check in a few other private locations
4674 if test x"${ac_cv_c_tclconfig}" = x ; then
4675 for i in \
4676 ${srcdir}/../tcl \
4677 `ls -dr ${srcdir}/../tcl[7-9]* 2>/dev/null` ; do
8a19b35a
MH
4678 if test -f "$i/${configdir}/tclConfig.sh" ; then
4679 ac_cv_c_tclconfig=`(cd $i/${configdir}; pwd)`
047465fd
TT
4680 break
4681 fi
4682 done
4683 fi
4684
5436fc65 4685fi
1a7b4b7c 4686
047465fd
TT
4687 if test x"${ac_cv_c_tclconfig}" = x ; then
4688 TCLCONFIG="# no Tcl configs found"
4689 echo "configure: warning: Can't find Tcl configuration definitions" 1>&2
4690 else
4691 no_tcl=
4692 TCLCONFIG=${ac_cv_c_tclconfig}/tclConfig.sh
4693 echo "$ac_t""found $TCLCONFIG" 1>&6
5436fc65 4694 fi
5436fc65
C
4695fi
4696
0cf433d9
ILT
4697 if test -z "${no_tcl}"; then
4698
047465fd 4699 . $TCLCONFIG
5436fc65 4700
047465fd
TT
4701
4702
4703
4704
4705
5436fc65 4706
5436fc65 4707
5436fc65 4708
5436fc65 4709
047465fd
TT
4710
4711
4712
4713
4714
4715
4716
4717
4718
4719
4720
4721
5436fc65 4722
5436fc65 4723
5436fc65 4724
0cf433d9 4725
047465fd
TT
4726#
4727# Ok, lets find the tk configuration
4728# First, look for one uninstalled.
4729# the alternative search directory is invoked by --with-tkconfig
4730#
5436fc65 4731
047465fd
TT
4732if test x"${no_tk}" = x ; then
4733 # we reset no_tk in case something fails here
4734 no_tk=true
4735 # Check whether --with-tkconfig or --without-tkconfig was given.
4736if test "${with_tkconfig+set}" = set; then
4737 withval="$with_tkconfig"
4738 with_tkconfig=${withval}
5436fc65
C
4739fi
4740
047465fd 4741 echo $ac_n "checking for Tk configuration""... $ac_c" 1>&6
4ff3dfab 4742echo "configure:4743: checking for Tk configuration" >&5
047465fd 4743 if eval "test \"`echo '$''{'ac_cv_c_tkconfig'+set}'`\" = set"; then
5436fc65
C
4744 echo $ac_n "(cached) $ac_c" 1>&6
4745else
047465fd 4746
5436fc65 4747
047465fd
TT
4748 # First check to see if --with-tkconfig was specified.
4749 if test x"${with_tkconfig}" != x ; then
4750 if test -f "${with_tkconfig}/tkConfig.sh" ; then
4751 ac_cv_c_tkconfig=`(cd ${with_tkconfig}; pwd)`
4752 else
4753 { echo "configure: error: ${with_tkconfig} directory doesn't contain tkConfig.sh" 1>&2; exit 1; }
5436fc65 4754 fi
047465fd 4755 fi
5436fc65 4756
047465fd
TT
4757 # then check for a private Tk library
4758 if test x"${ac_cv_c_tkconfig}" = x ; then
4759 for i in \
4760 ../tk \
4761 `ls -dr ../tk[4-9]* 2>/dev/null` \
4762 ../../tk \
4763 `ls -dr ../../tk[4-9]* 2>/dev/null` \
4764 ../../../tk \
4765 `ls -dr ../../../tk[4-9]* 2>/dev/null` ; do
8a19b35a
MH
4766 if test -f "$i/${configdir}/tkConfig.sh" ; then
4767 ac_cv_c_tkconfig=`(cd $i/${configdir}; pwd)`
047465fd
TT
4768 break
4769 fi
4770 done
4771 fi
4772 # check in a few common install locations
4773 if test x"${ac_cv_c_tkconfig}" = x ; then
4774 for i in `ls -d ${prefix}/lib /usr/local/lib 2>/dev/null` ; do
4775 if test -f "$i/tkConfig.sh" ; then
4776 ac_cv_c_tkconfig=`(cd $i; pwd)`
4777 break
4778 fi
4779 done
4780 fi
4781 # check in a few other private locations
4782 if test x"${ac_cv_c_tkconfig}" = x ; then
4783 for i in \
4784 ${srcdir}/../tk \
4785 `ls -dr ${srcdir}/../tk[4-9]* 2>/dev/null` ; do
8a19b35a
MH
4786 if test -f "$i/${configdir}/tkConfig.sh" ; then
4787 ac_cv_c_tkconfig=`(cd $i/${configdir}; pwd)`
047465fd
TT
4788 break
4789 fi
4790 done
4791 fi
4792
5436fc65 4793fi
5436fc65 4794
047465fd
TT
4795 if test x"${ac_cv_c_tkconfig}" = x ; then
4796 TKCONFIG="# no Tk configs found"
4797 echo "configure: warning: Can't find Tk configuration definitions" 1>&2
4798 else
4799 no_tk=
4800 TKCONFIG=${ac_cv_c_tkconfig}/tkConfig.sh
4801 echo "$ac_t""found $TKCONFIG" 1>&6
4802 fi
5436fc65
C
4803fi
4804
4805
5436fc65 4806
0cf433d9
ILT
4807 # If $no_tk is nonempty, then we can't do Tk, and there is no
4808 # point to doing Tcl.
4809 if test -z "${no_tk}"; then
4810
047465fd
TT
4811 if test -f "$TKCONFIG" ; then
4812 . $TKCONFIG
4813 fi
5436fc65 4814
047465fd
TT
4815
4816
5436fc65 4817
047465fd 4818
5436fc65
C
4819
4820
a2b63bbd 4821
047465fd
TT
4822
4823
4824
9b119644 4825
047465fd 4826
0cf433d9 4827
5436fc65 4828#
4e327047
TT
4829# Ok, lets find the tcl source trees so we can use the headers
4830# Warning: transition of version 9 to 10 will break this algorithm
4831# because 10 sorts before 9. We also look for just tcl. We have to
4832# be careful that we don't match stuff like tclX by accident.
4833# the alternative search directory is involked by --with-tclinclude
5436fc65 4834#
8a19b35a 4835
4e327047 4836no_tcl=true
8a19b35a 4837echo $ac_n "checking for Tcl private headers. dir=${configdir}""... $ac_c" 1>&6
4ff3dfab 4838echo "configure:4839: checking for Tcl private headers. dir=${configdir}" >&5
4e327047 4839# Check whether --with-tclinclude or --without-tclinclude was given.
1a7b4b7c
DE
4840if test "${with_tclinclude+set}" = set; then
4841 withval="$with_tclinclude"
4e327047
TT
4842 with_tclinclude=${withval}
4843fi
4844
4845if eval "test \"`echo '$''{'ac_cv_c_tclh'+set}'`\" = set"; then
4846 echo $ac_n "(cached) $ac_c" 1>&6
4847else
4848
4849# first check to see if --with-tclinclude was specified
4850if test x"${with_tclinclude}" != x ; then
4851 if test -f ${with_tclinclude}/tclInt.h ; then
4852 ac_cv_c_tclh=`(cd ${with_tclinclude}; pwd)`
047465fd
TT
4853 elif test -f ${with_tclinclude}/generic/tclInt.h ; then
4854 ac_cv_c_tclh=`(cd ${with_tclinclude}/generic; pwd)`
5436fc65 4855 else
4e327047
TT
4856 { echo "configure: error: ${with_tclinclude} directory doesn't contain private headers" 1>&2; exit 1; }
4857 fi
4858fi
047465fd
TT
4859
4860# next check if it came with Tcl configuration file
4861if test x"${ac_cv_c_tclconfig}" = x ; then
4862 if test -f $ac_cv_c_tclconfig/../generic/tclInt.h ; then
4863 ac_cv_c_tclh=`(cd $ac_cv_c_tclconfig/..; pwd)`
4864 fi
4865fi
4866
4e327047
TT
4867# next check in private source directory
4868#
4869# since ls returns lowest version numbers first, reverse its output
4870if test x"${ac_cv_c_tclh}" = x ; then
4871 for i in \
4872 ${srcdir}/../tcl \
047465fd 4873 `ls -dr ${srcdir}/../tcl[7-9]* 2>/dev/null` \
4e327047 4874 ${srcdir}/../../tcl \
047465fd 4875 `ls -dr ${srcdir}/../../tcl[7-9]* 2>/dev/null` \
4e327047 4876 ${srcdir}/../../../tcl \
047465fd 4877 `ls -dr ${srcdir}/../../../tcl[7-9]* 2>/dev/null ` ; do
4e327047 4878 if test -f $i/generic/tclInt.h ; then
047465fd 4879 ac_cv_c_tclh=`(cd $i/generic; pwd)`
1a7b4b7c 4880 break
4e327047
TT
4881 fi
4882 done
4883fi
4884# finally check in a few common install locations
4885#
4886# since ls returns lowest version numbers first, reverse its output
4887if test x"${ac_cv_c_tclh}" = x ; then
4888 for i in \
047465fd
TT
4889 `ls -dr /usr/local/src/tcl[7-9]* 2>/dev/null` \
4890 `ls -dr /usr/local/lib/tcl[7-9]* 2>/dev/null` \
4e327047
TT
4891 /usr/local/src/tcl \
4892 /usr/local/lib/tcl \
4893 ${prefix}/include ; do
047465fd
TT
4894 if test -f $i/generic/tclInt.h ; then
4895 ac_cv_c_tclh=`(cd $i/generic; pwd)`
4e327047
TT
4896 break
4897 fi
4898 done
4899fi
4900# see if one is installed
4901if test x"${ac_cv_c_tclh}" = x ; then
bfde4a67 4902 ac_safe=`echo "tclInt.h" | sed 'y%./+-%__p_%'`
4e327047 4903echo $ac_n "checking for tclInt.h""... $ac_c" 1>&6
4ff3dfab 4904echo "configure:4905: checking for tclInt.h" >&5
5436fc65
C
4905if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4906 echo $ac_n "(cached) $ac_c" 1>&6
4907else
4908 cat > conftest.$ac_ext <<EOF
4ff3dfab 4909#line 4910 "configure"
5436fc65 4910#include "confdefs.h"
4e327047 4911#include <tclInt.h>
5436fc65 4912EOF
1a7b4b7c 4913ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4ff3dfab
JM
4914{ (eval echo configure:4915: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4915ac_err=`grep -v '^ *+' conftest.out`
5436fc65
C
4916if test -z "$ac_err"; then
4917 rm -rf conftest*
4918 eval "ac_cv_header_$ac_safe=yes"
4919else
4920 echo "$ac_err" >&5
bfde4a67
SG
4921 echo "configure: failed program was:" >&5
4922 cat conftest.$ac_ext >&5
5436fc65
C
4923 rm -rf conftest*
4924 eval "ac_cv_header_$ac_safe=no"
4925fi
4926rm -f conftest*
4927fi
4928if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4929 echo "$ac_t""yes" 1>&6
4e327047 4930 ac_cv_c_tclh=installed
5436fc65
C
4931else
4932 echo "$ac_t""no" 1>&6
4e327047 4933ac_cv_c_tclh=""
5436fc65
C
4934fi
4935
4e327047
TT
4936fi
4937
4938fi
4939
4940if test x"${ac_cv_c_tclh}" = x ; then
4941 TCLHDIR="# no Tcl private headers found"
4942 { echo "configure: error: Can't find Tcl private headers" 1>&2; exit 1; }
4943fi
4944if test x"${ac_cv_c_tclh}" != x ; then
4945 no_tcl=""
1a7b4b7c 4946 if test x"${ac_cv_c_tclh}" = x"installed" ; then
4e327047
TT
4947 echo "$ac_t""is installed" 1>&6
4948 TCLHDIR=""
4949 else
4950 echo "$ac_t""found in ${ac_cv_c_tclh}" 1>&6
4951 # this hack is cause the TCLHDIR won't print if there is a "-I" in it.
4952 TCLHDIR="-I${ac_cv_c_tclh}"
5436fc65 4953 fi
5436fc65 4954fi
4e327047 4955
4e327047 4956
5436fc65 4957
0cf433d9 4958
5436fc65 4959#
4e327047
TT
4960# Ok, lets find the tk source trees so we can use the headers
4961# If the directory (presumably symlink) named "tk" exists, use that one
4962# in preference to any others. Same logic is used when choosing library
4963# and again with Tcl. The search order is the best place to look first, then in
4964# decreasing significance. The loop breaks if the trigger file is found.
4965# Note the gross little conversion here of srcdir by cd'ing to the found
4966# directory. This converts the path from a relative to an absolute, so
4967# recursive cache variables for the path will work right. We check all
4968# the possible paths in one loop rather than many seperate loops to speed
4969# things up.
047465fd 4970# the alternative search directory is involked by --with-tkinclude
5436fc65 4971#
047465fd 4972no_tk=true
4e327047 4973echo $ac_n "checking for Tk private headers""... $ac_c" 1>&6
4ff3dfab 4974echo "configure:4975: checking for Tk private headers" >&5
4e327047 4975# Check whether --with-tkinclude or --without-tkinclude was given.
1a7b4b7c
DE
4976if test "${with_tkinclude+set}" = set; then
4977 withval="$with_tkinclude"
4e327047
TT
4978 with_tkinclude=${withval}
4979fi
4980
4e327047
TT
4981if eval "test \"`echo '$''{'ac_cv_c_tkh'+set}'`\" = set"; then
4982 echo $ac_n "(cached) $ac_c" 1>&6
4983else
4984
4985# first check to see if --with-tkinclude was specified
4986if test x"${with_tkinclude}" != x ; then
4987 if test -f ${with_tkinclude}/tk.h ; then
4988 ac_cv_c_tkh=`(cd ${with_tkinclude}; pwd)`
047465fd
TT
4989 elif test -f ${with_tkinclude}/generic/tk.h ; then
4990 ac_cv_c_tkh=`(cd ${with_tkinclude}/generic; pwd)`
5436fc65 4991 else
4e327047
TT
4992 { echo "configure: error: ${with_tkinclude} directory doesn't contain private headers" 1>&2; exit 1; }
4993 fi
4994fi
047465fd
TT
4995
4996# next check if it came with Tk configuration file
4997if test x"${ac_cv_c_tkconfig}" = x ; then
4998 if test -f $ac_cv_c_tkconfig/../generic/tk.h ; then
4999 ac_cv_c_tkh=`(cd $ac_cv_c_tkconfig/..; pwd)`
5000 fi
5001fi
5002
4e327047
TT
5003# next check in private source directory
5004#
047465fd 5005# since ls returns lowest version numbers first, reverse its output
4e327047
TT
5006if test x"${ac_cv_c_tkh}" = x ; then
5007 for i in \
5008 ${srcdir}/../tk \
047465fd 5009 `ls -dr ${srcdir}/../tk[4-9]* 2>/dev/null` \
4e327047 5010 ${srcdir}/../../tk \
047465fd 5011 `ls -dr ${srcdir}/../../tk[4-9]* 2>/dev/null` \
4e327047 5012 ${srcdir}/../../../tk \
047465fd
TT
5013 `ls -dr ${srcdir}/../../../tk[4-9]* 2>/dev/null ` ; do
5014 if test -f $i/generic/tk.h ; then
5015 ac_cv_c_tkh=`(cd $i/generic; pwd)`
4e327047
TT
5016 break
5017 fi
4e327047
TT
5018 done
5019fi
5020# finally check in a few common install locations
5021#
047465fd 5022# since ls returns lowest version numbers first, reverse its output
4e327047
TT
5023if test x"${ac_cv_c_tkh}" = x ; then
5024 for i in \
047465fd
TT
5025 `ls -dr /usr/local/src/tk[4-9]* 2>/dev/null` \
5026 `ls -dr /usr/local/lib/tk[4-9]* 2>/dev/null` \
4e327047
TT
5027 /usr/local/src/tk \
5028 /usr/local/lib/tk \
5029 ${prefix}/include ; do
047465fd
TT
5030 if test -f $i/generic/tk.h ; then
5031 ac_cv_c_tkh=`(cd $i/generic; pwd)`
4e327047
TT
5032 break
5033 fi
5034 done
5035fi
5036# see if one is installed
5037if test x"${ac_cv_c_tkh}" = x ; then
bfde4a67 5038 ac_safe=`echo "tk.h" | sed 'y%./+-%__p_%'`
4e327047 5039echo $ac_n "checking for tk.h""... $ac_c" 1>&6
4ff3dfab 5040echo "configure:5041: checking for tk.h" >&5
5436fc65
C
5041if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5042 echo $ac_n "(cached) $ac_c" 1>&6
5043else
5044 cat > conftest.$ac_ext <<EOF
4ff3dfab 5045#line 5046 "configure"
5436fc65 5046#include "confdefs.h"
4e327047 5047#include <tk.h>
5436fc65 5048EOF
1a7b4b7c 5049ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4ff3dfab
JM
5050{ (eval echo configure:5051: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5051ac_err=`grep -v '^ *+' conftest.out`
5436fc65
C
5052if test -z "$ac_err"; then
5053 rm -rf conftest*
5054 eval "ac_cv_header_$ac_safe=yes"
5055else
5056 echo "$ac_err" >&5
bfde4a67
SG
5057 echo "configure: failed program was:" >&5
5058 cat conftest.$ac_ext >&5
5436fc65
C
5059 rm -rf conftest*
5060 eval "ac_cv_header_$ac_safe=no"
5061fi
5062rm -f conftest*
5063fi
5064if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5065 echo "$ac_t""yes" 1>&6
4e327047 5066 ac_cv_c_tkh=installed
5436fc65
C
5067else
5068 echo "$ac_t""no" 1>&6
047465fd 5069ac_cv_c_tkh=""
5436fc65
C
5070fi
5071
4e327047
TT
5072fi
5073
5074fi
5075
5076if test x"${ac_cv_c_tkh}" != x ; then
5077 no_tk=""
5078 if test x"${ac_cv_c_tkh}" = x"installed" ; then
5079 echo "$ac_t""is installed" 1>&6
5080 TKHDIR=""
5081 else
047465fd 5082 echo "$ac_t""found in ${ac_cv_c_tkh}" 1>&6
4e327047
TT
5083 # this hack is cause the TKHDIR won't print if there is a "-I" in it.
5084 TKHDIR="-I${ac_cv_c_tkh}"
5436fc65
C
5085 fi
5086else
4e327047
TT
5087 TKHDIR="# no Tk directory found"
5088 echo "configure: warning: Can't find Tk private headers" 1>&2
5089 no_tk=true
5436fc65
C
5090fi
5091
5436fc65
C
5092
5093
2476848a
MH
5094
5095echo $ac_n "checking for Itcl private headers. srcdir=${srcdir}""... $ac_c" 1>&6
4ff3dfab 5096echo "configure:5097: checking for Itcl private headers. srcdir=${srcdir}" >&5
2476848a
MH
5097if test x"${ac_cv_c_itclh}" = x ; then
5098 for i in ${srcdir}/../itcl ${srcdir}/../../itcl ${srcdir}/../../../itcl ; do
5099 if test -f $i/src/itcl.h ; then
5100 ac_cv_c_itclh=`(cd $i/src; pwd)`
5101 break
5102 fi
5103 done
5104fi
5105if test x"${ac_cv_c_itclh}" = x ; then
5106 ITCLHDIR="# no Itcl private headers found"
5107 { echo "configure: error: Can't find Itcl private headers" 1>&2; exit 1; }
5108fi
5109if test x"${ac_cv_c_itclh}" != x ; then
5110 ITCLHDIR="-I${ac_cv_c_itclh}"
5111fi
5112# should always be here
5113 ITCLLIB="../itcl/src/libitcl.a"
5114
5115
5116
5117
5118echo $ac_n "checking for Tix private headers. srcdir=${srcdir}""... $ac_c" 1>&6
4ff3dfab 5119echo "configure:5120: checking for Tix private headers. srcdir=${srcdir}" >&5
2476848a
MH
5120if test x"${ac_cv_c_tixh}" = x ; then
5121 for i in ${srcdir}/../tix ${srcdir}/../../tix ${srcdir}/../../../tix ; do
5122 if test -f $i/generic/tix.h ; then
5123 ac_cv_c_tixh=`(cd $i/generic; pwd)`
5124 break
5125 fi
5126 done
5127fi
5128if test x"${ac_cv_c_tixh}" = x ; then
5129 TIXHDIR="# no Tix private headers found"
5130 { echo "configure: error: Can't find Tix private headers" 1>&2; exit 1; }
5131fi
5132if test x"${ac_cv_c_tixh}" != x ; then
5133 TIXHDIR="-I${ac_cv_c_tixh}"
5134fi
2476848a
MH
5135
5136
5137
6bc5b2fa 5138 # now look for tix library stuff
1154b47a 5139 TIXVERSION=4.1.8.0
6bc5b2fa
MH
5140 . ${ac_cv_c_tclconfig}/tclConfig.sh
5141 case "${host}" in
5142 *-*-cygwin32*)
f1f6dd9c 5143 tixdir=../tix/win/tcl8.0
6bc5b2fa
MH
5144 ;;
5145 *)
1154b47a 5146 tixdir=../tix/unix/tk8.0
6bc5b2fa
MH
5147 ;;
5148 esac
bb3d9f43
KS
5149 if test "${TCL_SHARED_BUILD}" = "1"; then
5150 TIX_LIB_EXT="${TCL_SHLIB_SUFFIX}"
11f91b2b
KS
5151
5152 # Can't win them all: SunOS 4 (others?) appends a version
5153 # number after the ".so"
5154 case "${host}" in
5155 *-*-sunos4*)
5156 TIX_LIB_EXT="${TIX_LIB_EXT}.1.0" ;;
5157 esac
5158
bb3d9f43
KS
5159 else
5160 TIX_LIB_EXT=".a"
5161 fi
11f91b2b 5162
6bc5b2fa
MH
5163 if test "${TCL_LIB_VERSIONS_OK}" = "ok"; then
5164 TIXLIB="-L${tixdir} -ltix${TIXVERSION}"
bb3d9f43 5165 TIX_DEPS="${tixdir}/libtix${TIXVERSION}${TIX_LIB_EXT}"
6bc5b2fa
MH
5166 else
5167 TIXLIB="-L${tixdir} -ltix`echo ${TIXVERSION} | tr -d .`"
bb3d9f43 5168 TIX_DEPS="${tixdir}/libtix`echo ${TIXVERSION} | tr -d .`${TIX_LIB_EXT}"
6bc5b2fa 5169 fi
5436fc65 5170
0cf433d9 5171 ENABLE_GDBTK=1
509b70ac 5172 ENABLE_CFLAGS="${ENABLE_CFLAGS} -DGDBTK"
5436fc65 5173
6c310da8 5174 # Include some libraries that Tcl and Tk want.
2476848a 5175 if test "${enable_ide}" = "yes"; then
8b5befef
ILT
5176 TCL_LIBS='$(LIBIDETCL) $(LIBIDE) $(LIBGUI) $(IDE) $(ITCL) $(TIX) $(TK) $(TCL) $(X11_LDFLAGS) $(X11_LIBS)'
5177 CONFIG_DEPS='$(LIBIDETCL) $(LIBIDE) $(LIBGUI) $(IDE_DEPS) $(ITCL_DEPS) $(TIX_DEPS) $(TK_DEPS) $(TCL_DEPS)'
2476848a 5178 else
dafec9dd
ILT
5179 TCL_LIBS='$(LIBGUI) $(ITCL) $(TIX) $(TK) $(TCL) $(X11_LDFLAGS) $(X11_LIBS)'
5180 CONFIG_DEPS='$(LIBGUI) $(ITCL_DEPS) $(TIX_DEPS) $(TK_DEPS) $(TCL_DEPS)'
2476848a 5181 fi
46964086
TT
5182 # Yes, the ordering seems wrong here. But it isn't.
5183 # TK_LIBS is the list of libraries that need to be linked
b177bf84
TT
5184 # after Tcl/Tk. Note that this isn't put into LIBS. If it
5185 # were in LIBS then any link tests after this point would
5186 # try to include things like `$(LIBGUI)', which wouldn't work.
5187 GDBTKLIBS="${TCL_LIBS} ${TK_LIBS}"
f3b86a30 5188 CONFIG_OBS="${CONFIG_OBS} gdbtk.o gdbtk-cmds.o gdbtk-hooks.o"
9b119644
ILT
5189
5190 if test x$gdb_cv_os_cygwin32 = xyes; then
018d76dd 5191 WIN32LIBS="${WIN32LIBS} -lshell32 -lgdi32 -lcomdlg32 -ladvapi32 -luser32"
47792960 5192 WIN32LDAPP="-Wl,--subsystem,console"
929db6e5 5193 CONFIG_OBS="${CONFIG_OBS} gdbres.o"
9b119644 5194 fi
0cf433d9 5195 fi
1a57cd09 5196 fi
a2b63bbd 5197fi
66efdff9 5198
66efdff9 5199
5436fc65 5200
66efdff9
JM
5201
5202
6bc5b2fa 5203
018d76dd 5204
b177bf84 5205
5436fc65
C
5206# end-sanitize-gdbtk
5207
b236defa
FCE
5208# If we find X, set shell vars x_includes and x_libraries to the
5209# paths, otherwise set no_x=yes.
5210# Uses ac_ vars as temps to allow command line to override cache and checks.
5211# --without-x overrides everything else, but does not touch the cache.
5212echo $ac_n "checking for X""... $ac_c" 1>&6
4ff3dfab 5213echo "configure:5214: checking for X" >&5
b236defa
FCE
5214
5215# Check whether --with-x or --without-x was given.
5216if test "${with_x+set}" = set; then
5217 withval="$with_x"
5218 :
5219fi
5220
5221# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
5222if test "x$with_x" = xno; then
5223 # The user explicitly disabled X.
5224 have_x=disabled
5225else
5226 if test "x$x_includes" != xNONE && test "x$x_libraries" != xNONE; then
5227 # Both variables are already set.
5228 have_x=yes
5229 else
5230if eval "test \"`echo '$''{'ac_cv_have_x'+set}'`\" = set"; then
5231 echo $ac_n "(cached) $ac_c" 1>&6
5232else
5233 # One or both of the vars are not set, and there is no cached value.
5234ac_x_includes=NO ac_x_libraries=NO
5235rm -fr conftestdir
5236if mkdir conftestdir; then
5237 cd conftestdir
5238 # Make sure to not put "make" in the Imakefile rules, since we grep it out.
5239 cat > Imakefile <<'EOF'
5240acfindx:
5241 @echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"'
5242EOF
5243 if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
5244 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
5245 eval `${MAKE-make} acfindx 2>/dev/null | grep -v make`
5246 # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
5247 for ac_extension in a so sl; do
5248 if test ! -f $ac_im_usrlibdir/libX11.$ac_extension &&
5249 test -f $ac_im_libdir/libX11.$ac_extension; then
5250 ac_im_usrlibdir=$ac_im_libdir; break
5251 fi
5252 done
5253 # Screen out bogus values from the imake configuration. They are
5254 # bogus both because they are the default anyway, and because
5255 # using them would break gcc on systems where it needs fixed includes.
5256 case "$ac_im_incroot" in
5257 /usr/include) ;;
5258 *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes="$ac_im_incroot" ;;
5259 esac
5260 case "$ac_im_usrlibdir" in
5261 /usr/lib | /lib) ;;
5262 *) test -d "$ac_im_usrlibdir" && ac_x_libraries="$ac_im_usrlibdir" ;;
5263 esac
5264 fi
5265 cd ..
5266 rm -fr conftestdir
5267fi
5268
5269if test "$ac_x_includes" = NO; then
5270 # Guess where to find include files, by looking for this one X11 .h file.
5271 test -z "$x_direct_test_include" && x_direct_test_include=X11/Intrinsic.h
5272
5273 # First, try using that file with no special directory specified.
5274cat > conftest.$ac_ext <<EOF
4ff3dfab 5275#line 5276 "configure"
b236defa
FCE
5276#include "confdefs.h"
5277#include <$x_direct_test_include>
5278EOF
5279ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4ff3dfab
JM
5280{ (eval echo configure:5281: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5281ac_err=`grep -v '^ *+' conftest.out`
b236defa
FCE
5282if test -z "$ac_err"; then
5283 rm -rf conftest*
5284 # We can compile using X headers with no special include directory.
5285ac_x_includes=
5286else
5287 echo "$ac_err" >&5
5288 echo "configure: failed program was:" >&5
5289 cat conftest.$ac_ext >&5
5290 rm -rf conftest*
5291 # Look for the header file in a standard set of common directories.
5292# Check X11 before X11Rn because it is often a symlink to the current release.
5293 for ac_dir in \
5294 /usr/X11/include \
5295 /usr/X11R6/include \
5296 /usr/X11R5/include \
5297 /usr/X11R4/include \
5298 \
5299 /usr/include/X11 \
5300 /usr/include/X11R6 \
5301 /usr/include/X11R5 \
5302 /usr/include/X11R4 \
5303 \
5304 /usr/local/X11/include \
5305 /usr/local/X11R6/include \
5306 /usr/local/X11R5/include \
5307 /usr/local/X11R4/include \
5308 \
5309 /usr/local/include/X11 \
5310 /usr/local/include/X11R6 \
5311 /usr/local/include/X11R5 \
5312 /usr/local/include/X11R4 \
5313 \
5314 /usr/X386/include \
5315 /usr/x386/include \
5316 /usr/XFree86/include/X11 \
5317 \
5318 /usr/include \
5319 /usr/local/include \
5320 /usr/unsupported/include \
5321 /usr/athena/include \
5322 /usr/local/x11r5/include \
5323 /usr/lpp/Xamples/include \
5324 \
5325 /usr/openwin/include \
5326 /usr/openwin/share/include \
5327 ; \
5328 do
5329 if test -r "$ac_dir/$x_direct_test_include"; then
5330 ac_x_includes=$ac_dir
5331 break
5332 fi
5333 done
5334fi
5335rm -f conftest*
5336fi # $ac_x_includes = NO
5337
5338if test "$ac_x_libraries" = NO; then
5339 # Check for the libraries.
5340
5341 test -z "$x_direct_test_library" && x_direct_test_library=Xt
5342 test -z "$x_direct_test_function" && x_direct_test_function=XtMalloc
5343
5344 # See if we find them without any special options.
5345 # Don't add to $LIBS permanently.
5346 ac_save_LIBS="$LIBS"
5347 LIBS="-l$x_direct_test_library $LIBS"
5348cat > conftest.$ac_ext <<EOF
4ff3dfab 5349#line 5350 "configure"
b236defa
FCE
5350#include "confdefs.h"
5351
5352int main() {
5353${x_direct_test_function}()
5354; return 0; }
5355EOF
4ff3dfab 5356if { (eval echo configure:5357: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
b236defa
FCE
5357 rm -rf conftest*
5358 LIBS="$ac_save_LIBS"
5359# We can link X programs with no special library path.
5360ac_x_libraries=
5361else
5362 echo "configure: failed program was:" >&5
5363 cat conftest.$ac_ext >&5
5364 rm -rf conftest*
5365 LIBS="$ac_save_LIBS"
5366# First see if replacing the include by lib works.
5367# Check X11 before X11Rn because it is often a symlink to the current release.
5368for ac_dir in `echo "$ac_x_includes" | sed s/include/lib/` \
5369 /usr/X11/lib \
5370 /usr/X11R6/lib \
5371 /usr/X11R5/lib \
5372 /usr/X11R4/lib \
5373 \
5374 /usr/lib/X11 \
5375 /usr/lib/X11R6 \
5376 /usr/lib/X11R5 \
5377 /usr/lib/X11R4 \
5378 \
5379 /usr/local/X11/lib \
5380 /usr/local/X11R6/lib \
5381 /usr/local/X11R5/lib \
5382 /usr/local/X11R4/lib \
5383 \
5384 /usr/local/lib/X11 \
5385 /usr/local/lib/X11R6 \
5386 /usr/local/lib/X11R5 \
5387 /usr/local/lib/X11R4 \
5388 \
5389 /usr/X386/lib \
5390 /usr/x386/lib \
5391 /usr/XFree86/lib/X11 \
5392 \
5393 /usr/lib \
5394 /usr/local/lib \
5395 /usr/unsupported/lib \
5396 /usr/athena/lib \
5397 /usr/local/x11r5/lib \
5398 /usr/lpp/Xamples/lib \
5399 /lib/usr/lib/X11 \
5400 \
5401 /usr/openwin/lib \
5402 /usr/openwin/share/lib \
5403 ; \
5404do
5405 for ac_extension in a so sl; do
5406 if test -r $ac_dir/lib${x_direct_test_library}.$ac_extension; then
5407 ac_x_libraries=$ac_dir
5408 break 2
5409 fi
5410 done
5411done
5412fi
5413rm -f conftest*
5414fi # $ac_x_libraries = NO
5415
5416if test "$ac_x_includes" = NO || test "$ac_x_libraries" = NO; then
5417 # Didn't find X anywhere. Cache the known absence of X.
5418 ac_cv_have_x="have_x=no"
5419else
5420 # Record where we found X for the cache.
5421 ac_cv_have_x="have_x=yes \
5422 ac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries"
5423fi
5424fi
5425 fi
5426 eval "$ac_cv_have_x"
5427fi # $with_x != no
5428
5429if test "$have_x" != yes; then
5430 echo "$ac_t""$have_x" 1>&6
5431 no_x=yes
5432else
5433 # If each of the values was on the command line, it overrides each guess.
5434 test "x$x_includes" = xNONE && x_includes=$ac_x_includes
5435 test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
5436 # Update the cache value to reflect the command line values.
5437 ac_cv_have_x="have_x=yes \
5438 ac_x_includes=$x_includes ac_x_libraries=$x_libraries"
5439 echo "$ac_t""libraries $x_libraries, headers $x_includes" 1>&6
5440fi
5441
5442# start-sanitize-sky
5443# Enable GPU2 library for MIPS simulator
5444# Check whether --with-sim-gpu2 or --without-sim-gpu2 was given.
5445if test "${with_sim_gpu2+set}" = set; then
5446 withval="$with_sim_gpu2"
bd5eafcd
FCE
5447 case "${target}" in
5448 mips*-sky-*)
5449 if test -d "${withval}"
5450 then
f915cc91 5451 LIBS="${LIBS} -L${withval}/lib -lgpu2 -L${x_libraries} -lX11 -lXext"
bd5eafcd
FCE
5452 else
5453 echo "configure: warning: Directory ${withval} does not exist." 1>&2
5454 fi ;;
5455 *) echo "configure: warning: --with-sim-gpu2 option invalid for target ${target}" 1>&2
5456esac
b236defa 5457fi
75a55dc3
JM
5458
5459# Enable target accurate FP library
5460# Check whether --with-sim-funit or --without-sim-funit was given.
5461if test "${with_sim_funit+set}" = set; then
5462 withval="$with_sim_funit"
5463 case "${target}" in
5464 mips*-sky-*)
5465 if test -d "${withval}"
5466 then
5467 LIBS="${LIBS} -L${withval}/lib -lfunit"
5468 else
5469 echo "configure: warning: Directory ${withval} does not exist." 1>&2
5470 fi ;;
5471 *) echo "configure: warning: --with-sim-funit option invalid for target ${target}" 1>&2
5472esac
5473fi
b236defa
FCE
5474# end-sanitize-sky
5475
15125484 5476echo $ac_n "checking for wctype in -lw""... $ac_c" 1>&6
4ff3dfab 5477echo "configure:5478: checking for wctype in -lw" >&5
15125484
JM
5478ac_lib_var=`echo w'_'wctype | sed 'y%./+-%__p_%'`
5479if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5480 echo $ac_n "(cached) $ac_c" 1>&6
5481else
5482 ac_save_LIBS="$LIBS"
5483LIBS="-lw $LIBS"
5484cat > conftest.$ac_ext <<EOF
4ff3dfab 5485#line 5486 "configure"
15125484
JM
5486#include "confdefs.h"
5487/* Override any gcc2 internal prototype to avoid an error. */
5488/* We use char because int might match the return type of a gcc2
5489 builtin and then its argument prototype would still apply. */
5490char wctype();
5491
5492int main() {
5493wctype()
5494; return 0; }
5495EOF
4ff3dfab 5496if { (eval echo configure:5497: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
15125484
JM
5497 rm -rf conftest*
5498 eval "ac_cv_lib_$ac_lib_var=yes"
5499else
5500 echo "configure: failed program was:" >&5
5501 cat conftest.$ac_ext >&5
5502 rm -rf conftest*
5503 eval "ac_cv_lib_$ac_lib_var=no"
5504fi
5505rm -f conftest*
5506LIBS="$ac_save_LIBS"
5507
5508fi
5509if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5510 echo "$ac_t""yes" 1>&6
5511 LIBS="$LIBS -lw"
5512else
5513 echo "$ac_t""no" 1>&6
5514fi
5515
5516
5436fc65
C
5517
5518
5519
5520
018d76dd 5521
c7bb1531 5522
1d5eb137
FF
5523# Begin stuff to support --enable-shared
5524# Check whether --enable-shared or --disable-shared was given.
5525if test "${enable_shared+set}" = set; then
5526 enableval="$enable_shared"
5527 case "${enableval}" in
5528 yes) shared=true ;;
5529 no) shared=false ;;
5530 *) shared=true ;;
5531esac
5532fi
5533
5534HLDFLAGS=
5535HLDENV=
5536# If we have shared libraries, try to set rpath reasonably.
5537if test "${shared}" = "true"; then
5538 case "${host}" in
5539 *-*-hpux*)
5540 HLDFLAGS='-Wl,+s,+b,$(libdir)'
5541 ;;
5542 *-*-irix5* | *-*-irix6*)
5543 HLDFLAGS='-Wl,-rpath,$(libdir)'
5544 ;;
5545 *-*-linux*aout*)
5546 ;;
8ddf07a2 5547 *-*-linux* | *-pc-linux-gnu)
1d5eb137
FF
5548 HLDFLAGS='-Wl,-rpath,$(libdir)'
5549 ;;
5550 *-*-solaris*)
5551 HLDFLAGS='-R $(libdir)'
5552 ;;
5553 *-*-sysv4*)
5554 HLDENV='if test -z "$${LD_RUN_PATH}"; then LD_RUN_PATH=$(libdir); else LD_RUN_PATH=$${LD_RUN_PATH}:$(libdir); fi; export LD_RUN_PATH;'
5555 ;;
5556 esac
5557fi
5558
5559# On SunOS, if the linker supports the -rpath option, use it to
5560# prevent ../bfd and ../opcodes from being included in the run time
5561# search path.
5562case "${host}" in
5563 *-*-sunos*)
5564 echo 'main () { }' > conftest.c
5565 ${CC} -o conftest -Wl,-rpath= conftest.c >/dev/null 2>conftest.t
5566 if grep 'unrecognized' conftest.t >/dev/null 2>&1; then
5567 :
5568 elif grep 'No such file' conftest.t >/dev/null 2>&1; then
5569 :
5570 elif grep 'do not mix' conftest.t >/dev/null 2>&1; then
5571 :
074d813d
PS
5572 elif grep 'some text already loaded' conftest.t >/dev/null 2>&1; then
5573 :
1d5eb137
FF
5574 elif test "${shared}" = "true"; then
5575 HLDFLAGS='-Wl,-rpath=$(libdir)'
5576 else
5577 HLDFLAGS='-Wl,-rpath='
5578 fi
5579 rm -f conftest.t conftest.c conftest
5580 ;;
5581esac
5582
5583
5584# End stuff to support --enable-shared
5585
7c40dd08
DE
5586# target_subdir is used by the testsuite to find the target libraries.
5587target_subdir=
5588if test "${host}" != "${target}"; then
5589 target_subdir="${target_alias}/"
5590fi
5591
5436fc65 5592
5f107900 5593frags=
5436fc65
C
5594host_makefile_frag=${srcdir}/config/${gdb_host_cpu}/${gdb_host}.mh
5595if test ! -f ${host_makefile_frag}; then
5596{ echo "configure: error: "*** Gdb does not support host ${host}"" 1>&2; exit 1; }
5597fi
5f107900 5598frags="$frags $host_makefile_frag"
5436fc65
C
5599
5600target_makefile_frag=${srcdir}/config/${gdb_target_cpu}/${gdb_target}.mt
5601if test ! -f ${target_makefile_frag}; then
5602{ echo "configure: error: "*** Gdb does not support target ${target}"" 1>&2; exit 1; }
5603fi
5f107900 5604frags="$frags $target_makefile_frag"
5436fc65
C
5605
5606
5607
5608
5609
094fd4ae
C
5610hostfile=`sed -n '
5611s/XM_FILE[ ]*=[ ]*\([^ ]*\)/\1/p
5612' ${host_makefile_frag}`
5436fc65 5613
094fd4ae
C
5614targetfile=`sed -n '
5615s/TM_FILE[ ]*=[ ]*\([^ ]*\)/\1/p
5616' ${target_makefile_frag}`
5436fc65
C
5617
5618# these really aren't orthogonal true/false values of the same condition,
5619# but shells are slow enough that I like to reuse the test conditions
5620# whenever possible
5621if test "${target}" = "${host}"; then
094fd4ae
C
5622nativefile=`sed -n '
5623s/NAT_FILE[ ]*=[ ]*\([^ ]*\)/\1/p
5624' ${host_makefile_frag}`
33ef0f93 5625# else
5436fc65 5626# GDBserver is only useful in a "native" enviroment
33ef0f93 5627# configdirs=`echo $configdirs | sed 's/gdbserver//'`
5436fc65
C
5628fi
5629
094fd4ae 5630
5436fc65
C
5631# If hostfile (XM_FILE) and/or targetfile (TM_FILE) and/or nativefile
5632# (NAT_FILE) is not set in config/*/*.m[ht] files, we don't make the
5633# corresponding links. But we have to remove the xm.h files and tm.h
5634# files anyway, e.g. when switching from "configure host" to
5635# "configure none".
5636
5637files=
5638links=
5639rm -f xm.h
5640if test "${hostfile}" != ""; then
5641files="${files} config/${gdb_host_cpu}/${hostfile}"
5642links="${links} xm.h"
5643fi
5644rm -f tm.h
5645if test "${targetfile}" != ""; then
5646files="${files} config/${gdb_target_cpu}/${targetfile}"
5647links="${links} tm.h"
5648fi
5649rm -f nm.h
5650if test "${nativefile}" != ""; then
5651files="${files} config/${gdb_host_cpu}/${nativefile}"
5652links="${links} nm.h"
5653else
5654# A cross-only configuration.
5655files="${files} config/nm-empty.h"
5656links="${links} nm.h"
5657fi
5658# start-sanitize-gdbtk
99174711 5659echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
4ff3dfab 5660echo "configure:5661: checking whether ln -s works" >&5
99174711
JM
5661if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then
5662 echo $ac_n "(cached) $ac_c" 1>&6
5663else
5664 rm -f conftestdata
5665if ln -s X conftestdata 2>/dev/null
5666then
5667 rm -f conftestdata
5668 ac_cv_prog_LN_S="ln -s"
5669else
5670 ac_cv_prog_LN_S=ln
5671fi
5672fi
5673LN_S="$ac_cv_prog_LN_S"
5674if test "$ac_cv_prog_LN_S" = "ln -s"; then
5675 echo "$ac_t""yes" 1>&6
5676else
5677 echo "$ac_t""no" 1>&6
5678fi
5436fc65
C
5679
5680# Make it possible to use the GUI without doing a full install
99174711
JM
5681if test "${enable_gdbtk}" = "yes" -a ! -d gdbtcl ; then
5682 if test "$LN_S" = "ln -s" -a ! -f gdbtcl ; then
5683 echo linking $srcdir/gdbtcl to gdbtcl
5684 $LN_S $srcdir/gdbtcl gdbtcl
5685 else
5686 echo Warning: Unable to link $srcdir/gdbtcl to gdbtcl. You will need to do a
5687 echo " " make install before you are able to run the GUI.
5688 fi
5436fc65
C
5689fi
5690# end-sanitize-gdbtk
5691
5692
5693
3fbb8cde 5694echo $ac_n "checking for Cygwin32 environment""... $ac_c" 1>&6
4ff3dfab 5695echo "configure:5696: checking for Cygwin32 environment" >&5
3fbb8cde
ILT
5696if eval "test \"`echo '$''{'am_cv_cygwin32'+set}'`\" = set"; then
5697 echo $ac_n "(cached) $ac_c" 1>&6
5698else
5699 cat > conftest.$ac_ext <<EOF
4ff3dfab 5700#line 5701 "configure"
3fbb8cde
ILT
5701#include "confdefs.h"
5702
5703int main() {
b2b1c5da 5704return __CYGWIN32__;
3fbb8cde
ILT
5705; return 0; }
5706EOF
4ff3dfab 5707if { (eval echo configure:5708: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3fbb8cde
ILT
5708 rm -rf conftest*
5709 am_cv_cygwin32=yes
5710else
5711 echo "configure: failed program was:" >&5
5712 cat conftest.$ac_ext >&5
5713 rm -rf conftest*
5714 am_cv_cygwin32=no
5715fi
5716rm -f conftest*
5717rm -f conftest*
5718fi
5719
5720echo "$ac_t""$am_cv_cygwin32" 1>&6
5721CYGWIN32=
5722test "$am_cv_cygwin32" = yes && CYGWIN32=yes
b2b1c5da 5723echo $ac_n "checking for Mingw32 environment""... $ac_c" 1>&6
4ff3dfab 5724echo "configure:5725: checking for Mingw32 environment" >&5
b2b1c5da
MM
5725if eval "test \"`echo '$''{'am_cv_mingw32'+set}'`\" = set"; then
5726 echo $ac_n "(cached) $ac_c" 1>&6
5727else
5728 cat > conftest.$ac_ext <<EOF
4ff3dfab 5729#line 5730 "configure"
b2b1c5da
MM
5730#include "confdefs.h"
5731
5732int main() {
5733return __MINGW32__;
5734; return 0; }
5735EOF
4ff3dfab 5736if { (eval echo configure:5737: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
b2b1c5da
MM
5737 rm -rf conftest*
5738 am_cv_mingw32=yes
5739else
5740 echo "configure: failed program was:" >&5
5741 cat conftest.$ac_ext >&5
5742 rm -rf conftest*
5743 am_cv_mingw32=no
5744fi
5745rm -f conftest*
5746rm -f conftest*
5747fi
5748
5749echo "$ac_t""$am_cv_mingw32" 1>&6
5750MINGW32=
5751test "$am_cv_mingw32" = yes && MINGW32=yes
5752
98fa4ade
GN
5753
5754echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
4ff3dfab 5755echo "configure:5756: checking for executable suffix" >&5
98fa4ade
GN
5756if eval "test \"`echo '$''{'am_cv_exeext'+set}'`\" = set"; then
5757 echo $ac_n "(cached) $ac_c" 1>&6
5758else
dd600735 5759 if test "$CYGWIN32" = yes || test "$MINGW32" = yes; then
98fa4ade
GN
5760am_cv_exeext=.exe
5761else
5762cat > am_c_test.c << 'EOF'
5763int main() {
5764/* Nothing needed here */
5765}
5766EOF
5767${CC-cc} -o am_c_test $CFLAGS $CPPFLAGS $LDFLAGS am_c_test.c $LIBS 1>&5
75a55dc3
JM
5768am_cv_exeext=
5769for file in am_c_test.*; do
5770 case $file in
5771 *.c) ;;
5772 *.o) ;;
5773 *) am_cv_exeext=`echo $file | sed -e s/am_c_test//` ;;
5774 esac
5775done
98fa4ade
GN
5776rm -f am_c_test*
5777fi
5778
5779test x"${am_cv_exeext}" = x && am_cv_exeext=no
5780fi
5781EXEEXT=""
5782test x"${am_cv_exeext}" != xno && EXEEXT=${am_cv_exeext}
5783echo "$ac_t""${am_cv_exeext}" 1>&6
5784
5785
5436fc65
C
5786subdirs="$configdirs"
5787
5788trap '' 1 2 15
5789cat > confcache <<\EOF
5790# This file is a shell script that caches the results of configure
5791# tests run on this system so they can be shared between configure
5792# scripts and configure runs. It is not useful on other systems.
5793# If it contains results you don't want to keep, you may remove or edit it.
5794#
5795# By default, configure uses ./config.cache as the cache file,
5796# creating it if it does not exist already. You can give configure
5797# the --cache-file=FILE option to use a different cache file; that is
5798# what configure does when it calls configure scripts in
5799# subdirectories, so they share the cache.
5800# Giving --cache-file=/dev/null disables caching, for debugging configure.
5801# config.status only pays attention to the cache file if you give it the
5802# --recheck option to rerun configure.
5803#
5804EOF
bfde4a67
SG
5805# The following way of writing the cache mishandles newlines in values,
5806# but we know of no workaround that is simple, portable, and efficient.
5807# So, don't put newlines in cache variables' values.
5436fc65
C
5808# Ultrix sh set writes to stderr and can't be redirected directly,
5809# and sets the high bit in the cache file unless we assign to the vars.
5810(set) 2>&1 |
4ff3dfab 5811 case `(ac_space=' '; set) 2>&1` in
bfde4a67
SG
5812 *ac_space=\ *)
5813 # `set' does not quote correctly, so add quotes (double-quote substitution
5814 # turns \\\\ into \\, and sed turns \\ into \).
5815 sed -n \
5816 -e "s/'/'\\\\''/g" \
5817 -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
5818 ;;
5819 *)
5820 # `set' quotes correctly as required by POSIX, so do not add quotes.
5821 sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
5822 ;;
5823 esac >> confcache
5436fc65
C
5824if cmp -s $cache_file confcache; then
5825 :
5826else
5827 if test -w $cache_file; then
5828 echo "updating cache $cache_file"
5829 cat confcache > $cache_file
5830 else
5831 echo "not updating unwritable cache $cache_file"
5832 fi
5833fi
5834rm -f confcache
5835
5836trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
5837
5838test "x$prefix" = xNONE && prefix=$ac_default_prefix
5839# Let make expand exec_prefix.
5840test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
5841
5842# Any assignment to VPATH causes Sun make to only execute
5843# the first set of double-colon rules, so remove it if not needed.
5844# If there is a colon in the path, we need to keep it.
5845if test "x$srcdir" = x.; then
5846 ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d'
5847fi
5848
5849trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
5850
db210d08 5851DEFS=-DHAVE_CONFIG_H
5436fc65
C
5852
5853# Without the "./", some shells look in PATH for config.status.
5854: ${CONFIG_STATUS=./config.status}
5855
5856echo creating $CONFIG_STATUS
5857rm -f $CONFIG_STATUS
5858cat > $CONFIG_STATUS <<EOF
5859#! /bin/sh
5860# Generated automatically by configure.
5861# Run this file to recreate the current configuration.
5862# This directory was configured as follows,
5863# on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
5864#
5865# $0 $ac_configure_args
5866#
5867# Compiler output produced by configure, useful for debugging
5868# configure, is in ./config.log if it exists.
5869
5870ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
5871for ac_option
5872do
5873 case "\$ac_option" in
5874 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
5875 echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
5876 exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
5877 -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
4ff3dfab 5878 echo "$CONFIG_STATUS generated by autoconf version 2.12"
5436fc65
C
5879 exit 0 ;;
5880 -help | --help | --hel | --he | --h)
5881 echo "\$ac_cs_usage"; exit 0 ;;
5882 *) echo "\$ac_cs_usage"; exit 1 ;;
5883 esac
5884done
5885
5886ac_given_srcdir=$srcdir
5887ac_given_INSTALL="$INSTALL"
5888
0cb7d01d 5889trap 'rm -fr `echo "Makefile .gdbinit:gdbinit.in config.h:config.in" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
1a7b4b7c
DE
5890EOF
5891cat >> $CONFIG_STATUS <<EOF
5436fc65 5892
1a7b4b7c
DE
5893# Protect against being on the right side of a sed subst in config.status.
5894sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
5895 s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
5436fc65
C
5896$ac_vpsub
5897$extrasub
5898s%@CFLAGS@%$CFLAGS%g
5899s%@CPPFLAGS@%$CPPFLAGS%g
5900s%@CXXFLAGS@%$CXXFLAGS%g
5901s%@DEFS@%$DEFS%g
5902s%@LDFLAGS@%$LDFLAGS%g
5903s%@LIBS@%$LIBS%g
5904s%@exec_prefix@%$exec_prefix%g
5905s%@prefix@%$prefix%g
5906s%@program_transform_name@%$program_transform_name%g
1a7b4b7c
DE
5907s%@bindir@%$bindir%g
5908s%@sbindir@%$sbindir%g
5909s%@libexecdir@%$libexecdir%g
5910s%@datadir@%$datadir%g
5911s%@sysconfdir@%$sysconfdir%g
5912s%@sharedstatedir@%$sharedstatedir%g
5913s%@localstatedir@%$localstatedir%g
5914s%@libdir@%$libdir%g
5915s%@includedir@%$includedir%g
5916s%@oldincludedir@%$oldincludedir%g
5917s%@infodir@%$infodir%g
5918s%@mandir@%$mandir%g
5436fc65
C
5919s%@CC@%$CC%g
5920s%@CPP@%$CPP%g
35ce4f08 5921s%@DLLTOOL@%$DLLTOOL%g
5436fc65
C
5922s%@host@%$host%g
5923s%@host_alias@%$host_alias%g
5924s%@host_cpu@%$host_cpu%g
5925s%@host_vendor@%$host_vendor%g
5926s%@host_os@%$host_os%g
0579b53d
GN
5927s%@target@%$target%g
5928s%@target_alias@%$target_alias%g
5929s%@target_cpu@%$target_cpu%g
5930s%@target_vendor@%$target_vendor%g
5931s%@target_os@%$target_os%g
5436fc65
C
5932s%@build@%$build%g
5933s%@build_alias@%$build_alias%g
5934s%@build_cpu@%$build_cpu%g
5935s%@build_vendor@%$build_vendor%g
5936s%@build_os@%$build_os%g
fcfc3c0c
TT
5937s%@SET_MAKE@%$SET_MAKE%g
5938s%@RANLIB@%$RANLIB%g
5939s%@ALLOCA@%$ALLOCA%g
5940s%@USE_NLS@%$USE_NLS%g
5941s%@MSGFMT@%$MSGFMT%g
5942s%@GMSGFMT@%$GMSGFMT%g
5943s%@XGETTEXT@%$XGETTEXT%g
5944s%@USE_INCLUDED_LIBINTL@%$USE_INCLUDED_LIBINTL%g
5945s%@CATALOGS@%$CATALOGS%g
5946s%@CATOBJEXT@%$CATOBJEXT%g
5947s%@DATADIRNAME@%$DATADIRNAME%g
5948s%@GMOFILES@%$GMOFILES%g
5949s%@INSTOBJEXT@%$INSTOBJEXT%g
5950s%@INTLDEPS@%$INTLDEPS%g
5951s%@INTLLIBS@%$INTLLIBS%g
5952s%@INTLOBJS@%$INTLOBJS%g
5953s%@POFILES@%$POFILES%g
5954s%@POSUB@%$POSUB%g
5955s%@INCLUDE_LOCALE_H@%$INCLUDE_LOCALE_H%g
5956s%@GT_NO@%$GT_NO%g
5957s%@GT_YES@%$GT_YES%g
5958s%@MKINSTALLDIRS@%$MKINSTALLDIRS%g
5959s%@l@%$l%g
0579b53d
GN
5960s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
5961s%@INSTALL_DATA@%$INSTALL_DATA%g
d8efbc66 5962s%@AR@%$AR%g
d8efbc66
FF
5963s%@YACC@%$YACC%g
5964s%@AWK@%$AWK%g
4915acad 5965s%@CONFIG_LDFLAGS@%$CONFIG_LDFLAGS%g
0728afad
FF
5966s%@MMALLOC_CFLAGS@%$MMALLOC_CFLAGS%g
5967s%@MMALLOC@%$MMALLOC%g
2476848a 5968s%@ENABLE_IDE@%$ENABLE_IDE%g
c076f1ed
DM
5969s%@FOUNDRY_LIB_BASE@%$FOUNDRY_LIB_BASE%g
5970s%@LIBGUI@%$LIBGUI%g
5971s%@GUI_CFLAGS_X@%$GUI_CFLAGS_X%g
5972s%@IDE_CFLAGS_X@%$IDE_CFLAGS_X%g
5973s%@IDE_X@%$IDE_X%g
5974s%@LIBIDETCL@%$LIBIDETCL%g
5975s%@LIBIDE@%$LIBIDE%g
5976s%@IDE_DEPS@%$IDE_DEPS%g
9b119644
ILT
5977s%@WIN32LIBS@%$WIN32LIBS%g
5978s%@WIN32LDAPP@%$WIN32LDAPP%g
929db6e5 5979s%@WINDRES@%$WINDRES%g
047465fd
TT
5980s%@TCL_VERSION@%$TCL_VERSION%g
5981s%@TCL_MAJOR_VERSION@%$TCL_MAJOR_VERSION%g
5982s%@TCL_MINOR_VERSION@%$TCL_MINOR_VERSION%g
5983s%@TCL_CC@%$TCL_CC%g
5984s%@TCL_DEFS@%$TCL_DEFS%g
5985s%@TCL_SHLIB_CFLAGS@%$TCL_SHLIB_CFLAGS%g
5986s%@TCL_SHLIB_LD@%$TCL_SHLIB_LD%g
5987s%@TCL_SHLIB_LD_LIBS@%$TCL_SHLIB_LD_LIBS%g
5988s%@TCL_SHLIB_SUFFIX@%$TCL_SHLIB_SUFFIX%g
5989s%@TCL_DL_LIBS@%$TCL_DL_LIBS%g
5990s%@TCL_LD_FLAGS@%$TCL_LD_FLAGS%g
5991s%@TCL_LD_SEARCH_FLAGS@%$TCL_LD_SEARCH_FLAGS%g
5992s%@TCL_COMPAT_OBJS@%$TCL_COMPAT_OBJS%g
5993s%@TCL_RANLIB@%$TCL_RANLIB%g
5994s%@TCL_BUILD_LIB_SPEC@%$TCL_BUILD_LIB_SPEC%g
5995s%@TCL_LIB_SPEC@%$TCL_LIB_SPEC%g
5996s%@TCL_LIB_VERSIONS_OK@%$TCL_LIB_VERSIONS_OK%g
5997s%@TK_VERSION@%$TK_VERSION%g
5998s%@TK_DEFS@%$TK_DEFS%g
9b119644 5999s%@TK_BUILD_INCLUDES@%$TK_BUILD_INCLUDES%g
047465fd
TT
6000s%@TK_XINCLUDES@%$TK_XINCLUDES%g
6001s%@TK_XLIBSW@%$TK_XLIBSW%g
6002s%@TK_BUILD_LIB_SPEC@%$TK_BUILD_LIB_SPEC%g
6003s%@TK_LIB_SPEC@%$TK_LIB_SPEC%g
5436fc65 6004s%@TCLHDIR@%$TCLHDIR%g
4e327047 6005s%@TKHDIR@%$TKHDIR%g
2476848a
MH
6006s%@ITCLHDIR@%$ITCLHDIR%g
6007s%@ITCLLIB@%$ITCLLIB%g
6008s%@TIXHDIR@%$TIXHDIR%g
5436fc65 6009s%@ENABLE_GDBTK@%$ENABLE_GDBTK%g
047465fd 6010s%@X_CFLAGS@%$X_CFLAGS%g
a2b63bbd 6011s%@X_LDFLAGS@%$X_LDFLAGS%g
047465fd 6012s%@X_LIBS@%$X_LIBS%g
6bc5b2fa 6013s%@TIXLIB@%$TIXLIB%g
018d76dd 6014s%@TIX_DEPS@%$TIX_DEPS%g
b177bf84 6015s%@GDBTKLIBS@%$GDBTKLIBS%g
5436fc65 6016s%@ENABLE_CFLAGS@%$ENABLE_CFLAGS%g
6c310da8 6017s%@CONFIG_OBS@%$CONFIG_OBS%g
018d76dd 6018s%@CONFIG_DEPS@%$CONFIG_DEPS%g
c7bb1531 6019s%@CONFIG_SRCS@%$CONFIG_SRCS%g
1d5eb137
FF
6020s%@HLDFLAGS@%$HLDFLAGS%g
6021s%@HLDENV@%$HLDENV%g
7c40dd08 6022s%@target_subdir@%$target_subdir%g
5436fc65
C
6023/@host_makefile_frag@/r $host_makefile_frag
6024s%@host_makefile_frag@%%g
6025/@target_makefile_frag@/r $target_makefile_frag
6026s%@target_makefile_frag@%%g
5f107900 6027s%@frags@%$frags%g
99174711 6028s%@LN_S@%$LN_S%g
3fbb8cde 6029s%@EXEEXT@%$EXEEXT%g
5436fc65
C
6030s%@subdirs@%$subdirs%g
6031
6032CEOF
6033EOF
bfde4a67
SG
6034
6035cat >> $CONFIG_STATUS <<\EOF
6036
6037# Split the substitutions into bite-sized pieces for seds with
6038# small command number limits, like on Digital OSF/1 and HP-UX.
6039ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
6040ac_file=1 # Number of current file.
6041ac_beg=1 # First line for current file.
6042ac_end=$ac_max_sed_cmds # Line after last line for current file.
6043ac_more_lines=:
6044ac_sed_cmds=""
6045while $ac_more_lines; do
6046 if test $ac_beg -gt 1; then
6047 sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
6048 else
6049 sed "${ac_end}q" conftest.subs > conftest.s$ac_file
6050 fi
6051 if test ! -s conftest.s$ac_file; then
6052 ac_more_lines=false
6053 rm -f conftest.s$ac_file
6054 else
6055 if test -z "$ac_sed_cmds"; then
6056 ac_sed_cmds="sed -f conftest.s$ac_file"
6057 else
6058 ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
6059 fi
6060 ac_file=`expr $ac_file + 1`
6061 ac_beg=$ac_end
6062 ac_end=`expr $ac_end + $ac_max_sed_cmds`
6063 fi
6064done
6065if test -z "$ac_sed_cmds"; then
6066 ac_sed_cmds=cat
6067fi
6068EOF
6069
5436fc65
C
6070cat >> $CONFIG_STATUS <<EOF
6071
0cb7d01d 6072CONFIG_FILES=\${CONFIG_FILES-"Makefile .gdbinit:gdbinit.in"}
5436fc65
C
6073EOF
6074cat >> $CONFIG_STATUS <<\EOF
6075for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
bfde4a67 6076 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
5436fc65 6077 case "$ac_file" in
bfde4a67 6078 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
5436fc65
C
6079 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
6080 *) ac_file_in="${ac_file}.in" ;;
6081 esac
6082
bfde4a67 6083 # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
5436fc65
C
6084
6085 # Remove last slash and all that follows it. Not all systems have dirname.
6086 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
6087 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
6088 # The file is in a subdirectory.
6089 test ! -d "$ac_dir" && mkdir "$ac_dir"
6090 ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
6091 # A "../" for each directory in $ac_dir_suffix.
6092 ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
6093 else
6094 ac_dir_suffix= ac_dots=
6095 fi
6096
6097 case "$ac_given_srcdir" in
6098 .) srcdir=.
6099 if test -z "$ac_dots"; then top_srcdir=.
6100 else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
6101 /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
6102 *) # Relative path.
6103 srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
6104 top_srcdir="$ac_dots$ac_given_srcdir" ;;
6105 esac
6106
6107 case "$ac_given_INSTALL" in
6108 [/$]*) INSTALL="$ac_given_INSTALL" ;;
6109 *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
6110 esac
bfde4a67 6111
5436fc65
C
6112 echo creating "$ac_file"
6113 rm -f "$ac_file"
6114 configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
6115 case "$ac_file" in
6116 *Makefile*) ac_comsub="1i\\
6117# $configure_input" ;;
6118 *) ac_comsub= ;;
6119 esac
bfde4a67
SG
6120
6121 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
5436fc65
C
6122 sed -e "$ac_comsub
6123s%@configure_input@%$configure_input%g
6124s%@srcdir@%$srcdir%g
6125s%@top_srcdir@%$top_srcdir%g
6126s%@INSTALL@%$INSTALL%g
bfde4a67 6127" $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
5436fc65 6128fi; done
bfde4a67 6129rm -f conftest.s*
5436fc65 6130
db210d08
FF
6131# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
6132# NAME is the cpp macro being defined and VALUE is the value it is being given.
6133#
6134# ac_d sets the value in "#define NAME VALUE" lines.
6135ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)'
6136ac_dB='\([ ][ ]*\)[^ ]*%\1#\2'
6137ac_dC='\3'
6138ac_dD='%g'
6139# ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
6140ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
6141ac_uB='\([ ]\)%\1#\2define\3'
6142ac_uC=' '
6143ac_uD='\4%g'
6144# ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
6145ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
6146ac_eB='$%\1#\2define\3'
6147ac_eC=' '
6148ac_eD='%g'
6149
bfde4a67
SG
6150if test "${CONFIG_HEADERS+set}" != set; then
6151EOF
6152cat >> $CONFIG_STATUS <<EOF
6153 CONFIG_HEADERS="config.h:config.in"
6154EOF
6155cat >> $CONFIG_STATUS <<\EOF
6156fi
db210d08 6157for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
bfde4a67 6158 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
db210d08 6159 case "$ac_file" in
bfde4a67 6160 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
db210d08
FF
6161 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
6162 *) ac_file_in="${ac_file}.in" ;;
6163 esac
6164
6165 echo creating $ac_file
6166
6167 rm -f conftest.frag conftest.in conftest.out
bfde4a67
SG
6168 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
6169 cat $ac_file_inputs > conftest.in
db210d08
FF
6170
6171EOF
6172
6173# Transform confdefs.h into a sed script conftest.vals that substitutes
6174# the proper values into config.h.in to produce config.h. And first:
1a7b4b7c 6175# Protect against being on the right side of a sed subst in config.status.
db210d08
FF
6176# Protect against being in an unquoted here document in config.status.
6177rm -f conftest.vals
6178cat > conftest.hdr <<\EOF
6179s/[\\&%]/\\&/g
6180s%[\\$`]%\\&%g
bc859e63 6181s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
db210d08
FF
6182s%ac_d%ac_u%gp
6183s%ac_u%ac_e%gp
6184EOF
6185sed -n -f conftest.hdr confdefs.h > conftest.vals
6186rm -f conftest.hdr
6187
6188# This sed command replaces #undef with comments. This is necessary, for
6189# example, in the case of _POSIX_SOURCE, which is predefined and required
6190# on some systems where configure will not decide to define it.
6191cat >> conftest.vals <<\EOF
6192s%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
6193EOF
6194
6195# Break up conftest.vals because some shells have a limit on
6196# the size of here documents, and old seds have small limits too.
db210d08
FF
6197
6198rm -f conftest.tail
6199while :
6200do
6201 ac_lines=`grep -c . conftest.vals`
6202 # grep -c gives empty output for an empty file on some AIX systems.
6203 if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
6204 # Write a limited-size here document to conftest.frag.
6205 echo ' cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
6206 sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
6207 echo 'CEOF
6208 sed -f conftest.frag conftest.in > conftest.out
6209 rm -f conftest.in
6210 mv conftest.out conftest.in
6211' >> $CONFIG_STATUS
6212 sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
6213 rm -f conftest.vals
6214 mv conftest.tail conftest.vals
6215done
6216rm -f conftest.vals
6217
6218cat >> $CONFIG_STATUS <<\EOF
6219 rm -f conftest.frag conftest.h
6220 echo "/* $ac_file. Generated automatically by configure. */" > conftest.h
6221 cat conftest.in >> conftest.h
6222 rm -f conftest.in
6223 if cmp -s $ac_file conftest.h 2>/dev/null; then
6224 echo "$ac_file is unchanged"
6225 rm -f conftest.h
6226 else
bc859e63
SG
6227 # Remove last slash and all that follows it. Not all systems have dirname.
6228 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
6229 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
6230 # The file is in a subdirectory.
6231 test ! -d "$ac_dir" && mkdir "$ac_dir"
6232 fi
db210d08
FF
6233 rm -f $ac_file
6234 mv conftest.h $ac_file
6235 fi
6236fi; done
6237
5436fc65
C
6238EOF
6239
6240cat >> $CONFIG_STATUS <<EOF
6241ac_sources="$files"
6242ac_dests="$links"
6243EOF
6244
6245cat >> $CONFIG_STATUS <<\EOF
6246srcdir=$ac_given_srcdir
6247while test -n "$ac_sources"; do
6248 set $ac_dests; ac_dest=$1; shift; ac_dests=$*
6249 set $ac_sources; ac_source=$1; shift; ac_sources=$*
6250
6251 echo "linking $srcdir/$ac_source to $ac_dest"
6252
6253 if test ! -r $srcdir/$ac_source; then
6254 { echo "configure: error: $srcdir/$ac_source: File not found" 1>&2; exit 1; }
6255 fi
6256 rm -f $ac_dest
6257
6258 # Make relative symlinks.
6259 # Remove last slash and all that follows it. Not all systems have dirname.
6260 ac_dest_dir=`echo $ac_dest|sed 's%/[^/][^/]*$%%'`
6261 if test "$ac_dest_dir" != "$ac_dest" && test "$ac_dest_dir" != .; then
6262 # The dest file is in a subdirectory.
6263 test ! -d "$ac_dest_dir" && mkdir "$ac_dest_dir"
6264 ac_dest_dir_suffix="/`echo $ac_dest_dir|sed 's%^\./%%'`"
6265 # A "../" for each directory in $ac_dest_dir_suffix.
6266 ac_dots=`echo $ac_dest_dir_suffix|sed 's%/[^/]*%../%g'`
6267 else
6268 ac_dest_dir_suffix= ac_dots=
6269 fi
6270
6271 case "$srcdir" in
6272 [/$]*) ac_rel_source="$srcdir/$ac_source" ;;
6273 *) ac_rel_source="$ac_dots$srcdir/$ac_source" ;;
6274 esac
6275
6276 # Make a symlink if possible; otherwise try a hard link.
6277 if ln -s $ac_rel_source $ac_dest 2>/dev/null ||
6278 ln $srcdir/$ac_source $ac_dest; then :
6279 else
6280 { echo "configure: error: can not link $ac_dest to $srcdir/$ac_source" 1>&2; exit 1; }
6281 fi
6282done
0a5a1821
C
6283EOF
6284cat >> $CONFIG_STATUS <<EOF
5436fc65 6285
0a5a1821
C
6286gdb_host_cpu=$gdb_host_cpu
6287gdb_target_cpu=$gdb_target_cpu
6288nativefile=$nativefile
6289
6290EOF
6291cat >> $CONFIG_STATUS <<\EOF
5436fc65
C
6292
6293if test "${nativefile}" = ""; then
7bd1f0c5 6294sed -e '/^NATDEPFILES[ ]*=[ ]*/s//# NATDEPFILES=/' \
5436fc65
C
6295 < Makefile > Makefile.tem
6296mv -f Makefile.tem Makefile
6297fi
6298
6299sed -e '/^TM_FILE[ ]*=/s,^TM_FILE[ ]*=[ ]*,&config/'"${gdb_target_cpu}"'/,
6300/^XM_FILE[ ]*=/s,^XM_FILE[ ]*=[ ]*,&config/'"${gdb_host_cpu}"'/,
6301/^NAT_FILE[ ]*=/s,^NAT_FILE[ ]*=[ ]*,&config/'"${gdb_host_cpu}"'/,' <Makefile >Makefile.tmp
6302mv -f Makefile.tmp Makefile
6303
31520669 6304case x$CONFIG_HEADERS in
18ea4416 6305xconfig.h:config.in)
31520669
FF
6306echo > stamp-h ;;
6307esac
6308
5436fc65
C
6309exit 0
6310EOF
6311chmod +x $CONFIG_STATUS
6312rm -fr confdefs* $ac_clean_files
6313test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
6314
6315if test "$no_recursion" != yes; then
6316
6317 # Remove --cache-file and --srcdir arguments so they do not pile up.
6318 ac_sub_configure_args=
6319 ac_prev=
6320 for ac_arg in $ac_configure_args; do
6321 if test -n "$ac_prev"; then
6322 ac_prev=
6323 continue
6324 fi
6325 case "$ac_arg" in
6326 -cache-file | --cache-file | --cache-fil | --cache-fi \
6327 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
6328 ac_prev=cache_file ;;
6329 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
6330 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
6331 ;;
6332 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
6333 ac_prev=srcdir ;;
6334 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
6335 ;;
6336 *) ac_sub_configure_args="$ac_sub_configure_args $ac_arg" ;;
6337 esac
6338 done
6339
6340 for ac_config_dir in $configdirs; do
6341
6342 # Do not complain, so a configure script can configure whichever
6343 # parts of a large source tree are present.
6344 if test ! -d $srcdir/$ac_config_dir; then
6345 continue
6346 fi
6347
6348 echo configuring in $ac_config_dir
6349
6350 case "$srcdir" in
6351 .) ;;
6352 *)
6353 if test -d ./$ac_config_dir || mkdir ./$ac_config_dir; then :;
6354 else
6355 { echo "configure: error: can not create `pwd`/$ac_config_dir" 1>&2; exit 1; }
6356 fi
6357 ;;
6358 esac
6359
6360 ac_popdir=`pwd`
6361 cd $ac_config_dir
6362
bfde4a67
SG
6363 # A "../" for each directory in /$ac_config_dir.
6364 ac_dots=`echo $ac_config_dir|sed -e 's%^\./%%' -e 's%[^/]$%&/%' -e 's%[^/]*/%../%g'`
6365
5436fc65
C
6366 case "$srcdir" in
6367 .) # No --srcdir option. We are building in place.
6368 ac_sub_srcdir=$srcdir ;;
6369 /*) # Absolute path.
6370 ac_sub_srcdir=$srcdir/$ac_config_dir ;;
6371 *) # Relative path.
bfde4a67 6372 ac_sub_srcdir=$ac_dots$srcdir/$ac_config_dir ;;
5436fc65
C
6373 esac
6374
6375 # Check for guested configure; otherwise get Cygnus style configure.
6376 if test -f $ac_sub_srcdir/configure; then
6377 ac_sub_configure=$ac_sub_srcdir/configure
6378 elif test -f $ac_sub_srcdir/configure.in; then
6379 ac_sub_configure=$ac_configure
6380 else
6381 echo "configure: warning: no configuration information is in $ac_config_dir" 1>&2
6382 ac_sub_configure=
6383 fi
6384
6385 # The recursion is here.
6386 if test -n "$ac_sub_configure"; then
6387
6388 # Make the cache file name correct relative to the subdirectory.
5436fc65
C
6389 case "$cache_file" in
6390 /*) ac_sub_cache_file=$cache_file ;;
6391 *) # Relative path.
6392 ac_sub_cache_file="$ac_dots$cache_file" ;;
6393 esac
6394 case "$ac_given_INSTALL" in
6395 [/$]*) INSTALL="$ac_given_INSTALL" ;;
6396 *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
6397 esac
6398
6399 echo "running ${CONFIG_SHELL-/bin/sh} $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_sub_srcdir"
6400 # The eval makes quoting arguments work.
6401 if eval ${CONFIG_SHELL-/bin/sh} $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_sub_srcdir
6402 then :
6403 else
6404 { echo "configure: error: $ac_sub_configure failed for $ac_config_dir" 1>&2; exit 1; }
6405 fi
6406 fi
6407
6408 cd $ac_popdir
6409 done
6410fi
6411
5e711e7f
PS
6412
6413exit 0
b7f3b6d5 6414