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