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