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