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