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