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