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