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