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