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