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