]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blame - sim/ppc/configure
import gdb-1999-05-10
[thirdparty/binutils-gdb.git] / sim / ppc / configure
CommitLineData
c906108c
SS
1#! /bin/sh
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45sim_inline="-DDEFAULT_INLINE=0"
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81# This file is derived from `gettext.m4'. The difference is that the
82# included macros assume Cygnus-style source and build trees.
83
84# Macro to add for using GNU gettext.
85# Ulrich Drepper <drepper@cygnus.com>, 1995.
86#
87# This file file be copied and used freely without restrictions. It can
88# be used in projects which are not available under the GNU Public License
89# but which still want to provide support for the GNU gettext functionality.
90# Please note that the actual code is *not* freely available.
91
92# serial 3
93
94
95
96
97
98# Search path for a program which passes the given test.
99# Ulrich Drepper <drepper@cygnus.com>, 1996.
100#
101# This file file be copied and used freely without restrictions. It can
102# be used in projects which are not available under the GNU Public License
103# but which still want to provide support for the GNU gettext functionality.
104# Please note that the actual code is *not* freely available.
105
106# serial 1
107
108
109
110# Check whether LC_MESSAGES is available in <locale.h>.
111# Ulrich Drepper <drepper@cygnus.com>, 1995.
112#
113# This file file be copied and used freely without restrictions. It can
114# be used in projects which are not available under the GNU Public License
115# but which still want to provide support for the GNU gettext functionality.
116# Please note that the actual code is *not* freely available.
117
118# serial 1
119
120
121
c906108c
SS
122
123
124
125# Guess values for system-dependent variables and create Makefiles.
cd0fc7c3 126# Generated automatically using autoconf version 2.13
c906108c
SS
127# Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
128#
129# This configure script is free software; the Free Software Foundation
130# gives unlimited permission to copy, distribute and modify it.
131
132# Defaults:
133ac_help=
134ac_default_prefix=/usr/local
135# Any additions from configure.in:
136ac_help="$ac_help
137 --disable-nls do not use Native Language Support"
138ac_help="$ac_help
139 --with-included-gettext use the GNU gettext library included here"
140ac_help="$ac_help
141 --enable-sim-alignment=align Specify strict or nonstrict alignment."
142ac_help="$ac_help
143 --enable-sim-assert Specify whether to perform random assertions."
144ac_help="$ac_help
145 --enable-sim-bitsize=n Specify target bitsize (32 or 64)."
146ac_help="$ac_help
147 --enable-sim-bswap Use the BSWAP instruction on Intel 486s and Pentiums."
148ac_help="$ac_help
149 --enable-sim-cflags=opts Extra CFLAGS for use in building simulator"
150ac_help="$ac_help
151 --enable-sim-config=file Override default config file"
152ac_help="$ac_help
153 --enable-sim-decode-mechanism=which Specify the instruction decode mechanism."
154ac_help="$ac_help
155 --enable-sim-default-model=which Specify default PowerPC to model."
156ac_help="$ac_help
157 --enable-sim-duplicate Expand (duplicate) semantic functions."
158ac_help="$ac_help
159 --enable-sim-endian=endian Specify target byte endian orientation."
160ac_help="$ac_help
161 --enable-sim-env=env Specify target environment (operating, virtual, user)."
162ac_help="$ac_help
163 --enable-sim-filter=rule Specify filter rules."
164ac_help="$ac_help
165 --enable-sim-float Specify whether to use host floating point or simulate."
166ac_help="$ac_help
167 --enable-sim-hardware=list Specify the hardware to be included in the build."
168ac_help="$ac_help
169 --enable-sim-hostbitsize=32|64 Specify host bitsize (32 or 64)."
170ac_help="$ac_help
171 --enable-sim-hostendian=end Specify host byte endian orientation."
172ac_help="$ac_help
173 --enable-sim-icache=size Specify instruction-decode cache size and type."
174ac_help="$ac_help
175 --enable-sim-inline=inlines Specify which functions should be inlined."
176ac_help="$ac_help
177 --enable-sim-jump Jump between semantic code (instead of call/return)."
178ac_help="$ac_help
179 --enable-sim-line-nr=opts Generate extra CPP code that references source rather than generated code"
180ac_help="$ac_help
181 --enable-sim-model=which Specify PowerPC to model."
182ac_help="$ac_help
183 --enable-sim-model-issue Specify whether to simulate model specific actions"
184ac_help="$ac_help
185 --enable-sim-monitor=mon Specify whether to enable monitoring events."
186ac_help="$ac_help
187 --enable-sim-opcode=which Override default opcode lookup."
188ac_help="$ac_help
189 --enable-sim-packages=list Specify the packages to be included in the build."
190ac_help="$ac_help
191 --enable-sim-regparm=nr-parm Pass parameters in registers instead of on the stack - x86/GCC specific."
192ac_help="$ac_help
193 --enable-sim-reserved-bits Specify whether to check reserved bits in instruction."
194ac_help="$ac_help
195 --enable-sim-smp=n Specify number of processors to configure for."
196ac_help="$ac_help
197 --enable-sim-stdcall=type Use an alternative function call/return mechanism - x86/GCC specific."
198ac_help="$ac_help
199 --enable-sim-stdio Specify whether to use stdio for console input/output."
200ac_help="$ac_help
201 --enable-sim-switch Use a switch instead of a table for instruction call."
202ac_help="$ac_help
203 --enable-sim-timebase Specify whether the PPC timebase is supported."
204ac_help="$ac_help
205 --enable-sim-trace Specify whether tracing is supported."
206ac_help="$ac_help
207 --enable-sim-warnings=opts Extra CFLAGS for turning on compiler warnings except for idecode.o, semantics.o and psim.o"
208ac_help="$ac_help
209 --enable-sim-xor-endian=n Specify number bytes involved in PowerPC XOR bi-endian mode (default 8)."
210
211# Initialize some variables set by options.
212# The variables have the same names as the options, with
213# dashes changed to underlines.
214build=NONE
215cache_file=./config.cache
216exec_prefix=NONE
217host=NONE
218no_create=
219nonopt=NONE
220no_recursion=
221prefix=NONE
222program_prefix=NONE
223program_suffix=NONE
224program_transform_name=s,x,x,
225silent=
226site=
cd0fc7c3 227sitefile=
c906108c
SS
228srcdir=
229target=NONE
230verbose=
231x_includes=NONE
232x_libraries=NONE
233bindir='${exec_prefix}/bin'
234sbindir='${exec_prefix}/sbin'
235libexecdir='${exec_prefix}/libexec'
236datadir='${prefix}/share'
237sysconfdir='${prefix}/etc'
238sharedstatedir='${prefix}/com'
239localstatedir='${prefix}/var'
240libdir='${exec_prefix}/lib'
241includedir='${prefix}/include'
242oldincludedir='/usr/include'
243infodir='${prefix}/info'
244mandir='${prefix}/man'
245
246# Initialize some other variables.
247subdirs=
248MFLAGS= MAKEFLAGS=
249SHELL=${CONFIG_SHELL-/bin/sh}
250# Maximum number of lines to put in a shell here document.
251ac_max_here_lines=12
252
253ac_prev=
254for ac_option
255do
256
257 # If the previous option needs an argument, assign it.
258 if test -n "$ac_prev"; then
259 eval "$ac_prev=\$ac_option"
260 ac_prev=
261 continue
262 fi
263
264 case "$ac_option" in
265 -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
266 *) ac_optarg= ;;
267 esac
268
269 # Accept the important Cygnus configure options, so we can diagnose typos.
270
271 case "$ac_option" in
272
273 -bindir | --bindir | --bindi | --bind | --bin | --bi)
274 ac_prev=bindir ;;
275 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
276 bindir="$ac_optarg" ;;
277
278 -build | --build | --buil | --bui | --bu)
279 ac_prev=build ;;
280 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
281 build="$ac_optarg" ;;
282
283 -cache-file | --cache-file | --cache-fil | --cache-fi \
284 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
285 ac_prev=cache_file ;;
286 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
287 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
288 cache_file="$ac_optarg" ;;
289
290 -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
291 ac_prev=datadir ;;
292 -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
293 | --da=*)
294 datadir="$ac_optarg" ;;
295
296 -disable-* | --disable-*)
297 ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
298 # Reject names that are not valid shell variable names.
299 if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
300 { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
301 fi
302 ac_feature=`echo $ac_feature| sed 's/-/_/g'`
303 eval "enable_${ac_feature}=no" ;;
304
305 -enable-* | --enable-*)
306 ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
307 # Reject names that are not valid shell variable names.
308 if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
309 { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
310 fi
311 ac_feature=`echo $ac_feature| sed 's/-/_/g'`
312 case "$ac_option" in
313 *=*) ;;
314 *) ac_optarg=yes ;;
315 esac
316 eval "enable_${ac_feature}='$ac_optarg'" ;;
317
318 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
319 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
320 | --exec | --exe | --ex)
321 ac_prev=exec_prefix ;;
322 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
323 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
324 | --exec=* | --exe=* | --ex=*)
325 exec_prefix="$ac_optarg" ;;
326
327 -gas | --gas | --ga | --g)
328 # Obsolete; use --with-gas.
329 with_gas=yes ;;
330
331 -help | --help | --hel | --he)
332 # Omit some internal or obsolete options to make the list less imposing.
333 # This message is too long to be a string in the A/UX 3.1 sh.
334 cat << EOF
335Usage: configure [options] [host]
336Options: [defaults in brackets after descriptions]
337Configuration:
338 --cache-file=FILE cache test results in FILE
339 --help print this message
340 --no-create do not create output files
341 --quiet, --silent do not print \`checking...' messages
cd0fc7c3 342 --site-file=FILE use FILE as the site file
c906108c
SS
343 --version print the version of autoconf that created configure
344Directory and file names:
345 --prefix=PREFIX install architecture-independent files in PREFIX
346 [$ac_default_prefix]
347 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
348 [same as prefix]
349 --bindir=DIR user executables in DIR [EPREFIX/bin]
350 --sbindir=DIR system admin executables in DIR [EPREFIX/sbin]
351 --libexecdir=DIR program executables in DIR [EPREFIX/libexec]
352 --datadir=DIR read-only architecture-independent data in DIR
353 [PREFIX/share]
354 --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc]
355 --sharedstatedir=DIR modifiable architecture-independent data in DIR
356 [PREFIX/com]
357 --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var]
358 --libdir=DIR object code libraries in DIR [EPREFIX/lib]
359 --includedir=DIR C header files in DIR [PREFIX/include]
360 --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include]
361 --infodir=DIR info documentation in DIR [PREFIX/info]
362 --mandir=DIR man documentation in DIR [PREFIX/man]
363 --srcdir=DIR find the sources in DIR [configure dir or ..]
364 --program-prefix=PREFIX prepend PREFIX to installed program names
365 --program-suffix=SUFFIX append SUFFIX to installed program names
366 --program-transform-name=PROGRAM
367 run sed PROGRAM on installed program names
368EOF
369 cat << EOF
370Host type:
371 --build=BUILD configure for building on BUILD [BUILD=HOST]
372 --host=HOST configure for HOST [guessed]
373 --target=TARGET configure for TARGET [TARGET=HOST]
374Features and packages:
375 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
376 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
377 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
378 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
379 --x-includes=DIR X include files are in DIR
380 --x-libraries=DIR X library files are in DIR
381EOF
382 if test -n "$ac_help"; then
383 echo "--enable and --with options recognized:$ac_help"
384 fi
385 exit 0 ;;
386
387 -host | --host | --hos | --ho)
388 ac_prev=host ;;
389 -host=* | --host=* | --hos=* | --ho=*)
390 host="$ac_optarg" ;;
391
392 -includedir | --includedir | --includedi | --included | --include \
393 | --includ | --inclu | --incl | --inc)
394 ac_prev=includedir ;;
395 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
396 | --includ=* | --inclu=* | --incl=* | --inc=*)
397 includedir="$ac_optarg" ;;
398
399 -infodir | --infodir | --infodi | --infod | --info | --inf)
400 ac_prev=infodir ;;
401 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
402 infodir="$ac_optarg" ;;
403
404 -libdir | --libdir | --libdi | --libd)
405 ac_prev=libdir ;;
406 -libdir=* | --libdir=* | --libdi=* | --libd=*)
407 libdir="$ac_optarg" ;;
408
409 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
410 | --libexe | --libex | --libe)
411 ac_prev=libexecdir ;;
412 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
413 | --libexe=* | --libex=* | --libe=*)
414 libexecdir="$ac_optarg" ;;
415
416 -localstatedir | --localstatedir | --localstatedi | --localstated \
417 | --localstate | --localstat | --localsta | --localst \
418 | --locals | --local | --loca | --loc | --lo)
419 ac_prev=localstatedir ;;
420 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
421 | --localstate=* | --localstat=* | --localsta=* | --localst=* \
422 | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
423 localstatedir="$ac_optarg" ;;
424
425 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
426 ac_prev=mandir ;;
427 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
428 mandir="$ac_optarg" ;;
429
430 -nfp | --nfp | --nf)
431 # Obsolete; use --without-fp.
432 with_fp=no ;;
433
434 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
435 | --no-cr | --no-c)
436 no_create=yes ;;
437
438 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
439 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
440 no_recursion=yes ;;
441
442 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
443 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
444 | --oldin | --oldi | --old | --ol | --o)
445 ac_prev=oldincludedir ;;
446 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
447 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
448 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
449 oldincludedir="$ac_optarg" ;;
450
451 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
452 ac_prev=prefix ;;
453 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
454 prefix="$ac_optarg" ;;
455
456 -program-prefix | --program-prefix | --program-prefi | --program-pref \
457 | --program-pre | --program-pr | --program-p)
458 ac_prev=program_prefix ;;
459 -program-prefix=* | --program-prefix=* | --program-prefi=* \
460 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
461 program_prefix="$ac_optarg" ;;
462
463 -program-suffix | --program-suffix | --program-suffi | --program-suff \
464 | --program-suf | --program-su | --program-s)
465 ac_prev=program_suffix ;;
466 -program-suffix=* | --program-suffix=* | --program-suffi=* \
467 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
468 program_suffix="$ac_optarg" ;;
469
470 -program-transform-name | --program-transform-name \
471 | --program-transform-nam | --program-transform-na \
472 | --program-transform-n | --program-transform- \
473 | --program-transform | --program-transfor \
474 | --program-transfo | --program-transf \
475 | --program-trans | --program-tran \
476 | --progr-tra | --program-tr | --program-t)
477 ac_prev=program_transform_name ;;
478 -program-transform-name=* | --program-transform-name=* \
479 | --program-transform-nam=* | --program-transform-na=* \
480 | --program-transform-n=* | --program-transform-=* \
481 | --program-transform=* | --program-transfor=* \
482 | --program-transfo=* | --program-transf=* \
483 | --program-trans=* | --program-tran=* \
484 | --progr-tra=* | --program-tr=* | --program-t=*)
485 program_transform_name="$ac_optarg" ;;
486
487 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
488 | -silent | --silent | --silen | --sile | --sil)
489 silent=yes ;;
490
491 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
492 ac_prev=sbindir ;;
493 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
494 | --sbi=* | --sb=*)
495 sbindir="$ac_optarg" ;;
496
497 -sharedstatedir | --sharedstatedir | --sharedstatedi \
498 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
499 | --sharedst | --shareds | --shared | --share | --shar \
500 | --sha | --sh)
501 ac_prev=sharedstatedir ;;
502 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
503 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
504 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
505 | --sha=* | --sh=*)
506 sharedstatedir="$ac_optarg" ;;
507
508 -site | --site | --sit)
509 ac_prev=site ;;
510 -site=* | --site=* | --sit=*)
511 site="$ac_optarg" ;;
512
cd0fc7c3
SS
513 -site-file | --site-file | --site-fil | --site-fi | --site-f)
514 ac_prev=sitefile ;;
515 -site-file=* | --site-file=* | --site-fil=* | --site-fi=* | --site-f=*)
516 sitefile="$ac_optarg" ;;
517
c906108c
SS
518 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
519 ac_prev=srcdir ;;
520 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
521 srcdir="$ac_optarg" ;;
522
523 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
524 | --syscon | --sysco | --sysc | --sys | --sy)
525 ac_prev=sysconfdir ;;
526 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
527 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
528 sysconfdir="$ac_optarg" ;;
529
530 -target | --target | --targe | --targ | --tar | --ta | --t)
531 ac_prev=target ;;
532 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
533 target="$ac_optarg" ;;
534
535 -v | -verbose | --verbose | --verbos | --verbo | --verb)
536 verbose=yes ;;
537
538 -version | --version | --versio | --versi | --vers)
cd0fc7c3 539 echo "configure generated by autoconf version 2.13"
c906108c
SS
540 exit 0 ;;
541
542 -with-* | --with-*)
543 ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
544 # Reject names that are not valid shell variable names.
545 if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
546 { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
547 fi
548 ac_package=`echo $ac_package| sed 's/-/_/g'`
549 case "$ac_option" in
550 *=*) ;;
551 *) ac_optarg=yes ;;
552 esac
553 eval "with_${ac_package}='$ac_optarg'" ;;
554
555 -without-* | --without-*)
556 ac_package=`echo $ac_option|sed -e 's/-*without-//'`
557 # Reject names that are not valid shell variable names.
558 if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
559 { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
560 fi
561 ac_package=`echo $ac_package| sed 's/-/_/g'`
562 eval "with_${ac_package}=no" ;;
563
564 --x)
565 # Obsolete; use --with-x.
566 with_x=yes ;;
567
568 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
569 | --x-incl | --x-inc | --x-in | --x-i)
570 ac_prev=x_includes ;;
571 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
572 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
573 x_includes="$ac_optarg" ;;
574
575 -x-libraries | --x-libraries | --x-librarie | --x-librari \
576 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
577 ac_prev=x_libraries ;;
578 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
579 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
580 x_libraries="$ac_optarg" ;;
581
582 -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
583 ;;
584
585 *)
586 if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
587 echo "configure: warning: $ac_option: invalid host type" 1>&2
588 fi
589 if test "x$nonopt" != xNONE; then
590 { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
591 fi
592 nonopt="$ac_option"
593 ;;
594
595 esac
596done
597
598if test -n "$ac_prev"; then
599 { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
600fi
601
602trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
603
604# File descriptor usage:
605# 0 standard input
606# 1 file creation
607# 2 errors and warnings
608# 3 some systems may open it to /dev/tty
609# 4 used on the Kubota Titan
610# 6 checking for... messages and results
611# 5 compiler messages saved in config.log
612if test "$silent" = yes; then
613 exec 6>/dev/null
614else
615 exec 6>&1
616fi
617exec 5>./config.log
618
619echo "\
620This file contains any messages produced by compilers while
621running configure, to aid debugging if configure makes a mistake.
622" 1>&5
623
624# Strip out --no-create and --no-recursion so they do not pile up.
625# Also quote any args containing shell metacharacters.
626ac_configure_args=
627for ac_arg
628do
629 case "$ac_arg" in
630 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
631 | --no-cr | --no-c) ;;
632 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
633 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
634 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
635 ac_configure_args="$ac_configure_args '$ac_arg'" ;;
636 *) ac_configure_args="$ac_configure_args $ac_arg" ;;
637 esac
638done
639
640# NLS nuisances.
641# Only set these to C if already set. These must not be set unconditionally
642# because not all systems understand e.g. LANG=C (notably SCO).
643# Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
644# Non-C LC_CTYPE values break the ctype check.
645if test "${LANG+set}" = set; then LANG=C; export LANG; fi
646if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
647if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
648if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi
649
650# confdefs.h avoids OS command line length limits that DEFS can exceed.
651rm -rf conftest* confdefs.h
652# AIX cpp loses on an empty file, so make sure it contains at least a newline.
653echo > confdefs.h
654
655# A filename unique to this package, relative to the directory that
656# configure is in, which we can look for to find out if srcdir is correct.
657ac_unique_file=Makefile.in
658
659# Find the source files, if location was not specified.
660if test -z "$srcdir"; then
661 ac_srcdir_defaulted=yes
662 # Try the directory containing this script, then its parent.
663 ac_prog=$0
664 ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
665 test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
666 srcdir=$ac_confdir
667 if test ! -r $srcdir/$ac_unique_file; then
668 srcdir=..
669 fi
670else
671 ac_srcdir_defaulted=no
672fi
673if test ! -r $srcdir/$ac_unique_file; then
674 if test "$ac_srcdir_defaulted" = yes; then
675 { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
676 else
677 { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
678 fi
679fi
680srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
681
682# Prefer explicitly selected file to automatically selected ones.
cd0fc7c3
SS
683if test -z "$sitefile"; then
684 if test -z "$CONFIG_SITE"; then
685 if test "x$prefix" != xNONE; then
686 CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
687 else
688 CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
689 fi
c906108c 690 fi
cd0fc7c3
SS
691else
692 CONFIG_SITE="$sitefile"
c906108c
SS
693fi
694for ac_site_file in $CONFIG_SITE; do
695 if test -r "$ac_site_file"; then
696 echo "loading site script $ac_site_file"
697 . "$ac_site_file"
698 fi
699done
700
701if test -r "$cache_file"; then
702 echo "loading cache $cache_file"
703 . $cache_file
704else
705 echo "creating cache $cache_file"
706 > $cache_file
707fi
708
709ac_ext=c
710# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
711ac_cpp='$CPP $CPPFLAGS'
712ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
713ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
714cross_compiling=$ac_cv_prog_cc_cross
715
716ac_exeext=
717ac_objext=o
718if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
719 # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
720 if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
721 ac_n= ac_c='
722' ac_t=' '
723 else
724 ac_n=-n ac_c= ac_t=
725 fi
726else
727 ac_n= ac_c='\c' ac_t=
728fi
729
730
731
732ac_aux_dir=
733for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
734 if test -f $ac_dir/install-sh; then
735 ac_aux_dir=$ac_dir
736 ac_install_sh="$ac_aux_dir/install-sh -c"
737 break
738 elif test -f $ac_dir/install.sh; then
739 ac_aux_dir=$ac_dir
740 ac_install_sh="$ac_aux_dir/install.sh -c"
741 break
742 fi
743done
744if test -z "$ac_aux_dir"; then
745 { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; }
746fi
747ac_config_guess=$ac_aux_dir/config.guess
748ac_config_sub=$ac_aux_dir/config.sub
749ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
750
751# Find a good install program. We prefer a C program (faster),
752# so one script is as good as another. But avoid the broken or
753# incompatible versions:
754# SysV /etc/install, /usr/sbin/install
755# SunOS /usr/etc/install
756# IRIX /sbin/install
757# AIX /bin/install
758# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
759# AFS /usr/afsws/bin/install, which mishandles nonexistent args
760# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
761# ./install, which can be erroneously created by make from ./install.sh.
762echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
cd0fc7c3 763echo "configure:764: checking for a BSD compatible install" >&5
c906108c
SS
764if test -z "$INSTALL"; then
765if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
766 echo $ac_n "(cached) $ac_c" 1>&6
767else
768 IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS=":"
769 for ac_dir in $PATH; do
770 # Account for people who put trailing slashes in PATH elements.
771 case "$ac_dir/" in
772 /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
773 *)
774 # OSF1 and SCO ODT 3.0 have their own names for install.
775 # Don't use installbsd from OSF since it installs stuff as root
776 # by default.
777 for ac_prog in ginstall scoinst install; do
778 if test -f $ac_dir/$ac_prog; then
779 if test $ac_prog = install &&
780 grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
781 # AIX install. It has an incompatible calling convention.
782 :
783 else
784 ac_cv_path_install="$ac_dir/$ac_prog -c"
785 break 2
786 fi
787 fi
788 done
789 ;;
790 esac
791 done
792 IFS="$ac_save_IFS"
793
794fi
795 if test "${ac_cv_path_install+set}" = set; then
796 INSTALL="$ac_cv_path_install"
797 else
798 # As a last resort, use the slow shell script. We don't cache a
799 # path for INSTALL within a source directory, because that will
800 # break other packages using the cache if that directory is
801 # removed, or if the path is relative.
802 INSTALL="$ac_install_sh"
803 fi
804fi
805echo "$ac_t""$INSTALL" 1>&6
806
807# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
808# It thinks the first close brace ends the variable substitution.
809test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
810
cd0fc7c3
SS
811test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
812
c906108c
SS
813test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
814
815# Extract the first word of "gcc", so it can be a program name with args.
816set dummy gcc; ac_word=$2
817echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
cd0fc7c3 818echo "configure:819: checking for $ac_word" >&5
c906108c
SS
819if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
820 echo $ac_n "(cached) $ac_c" 1>&6
821else
822 if test -n "$CC"; then
823 ac_cv_prog_CC="$CC" # Let the user override the test.
824else
825 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
cd0fc7c3
SS
826 ac_dummy="$PATH"
827 for ac_dir in $ac_dummy; do
c906108c
SS
828 test -z "$ac_dir" && ac_dir=.
829 if test -f $ac_dir/$ac_word; then
830 ac_cv_prog_CC="gcc"
831 break
832 fi
833 done
834 IFS="$ac_save_ifs"
835fi
836fi
837CC="$ac_cv_prog_CC"
838if test -n "$CC"; then
839 echo "$ac_t""$CC" 1>&6
840else
841 echo "$ac_t""no" 1>&6
842fi
843
844if test -z "$CC"; then
845 # Extract the first word of "cc", so it can be a program name with args.
846set dummy cc; ac_word=$2
847echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
cd0fc7c3 848echo "configure:849: checking for $ac_word" >&5
c906108c
SS
849if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
850 echo $ac_n "(cached) $ac_c" 1>&6
851else
852 if test -n "$CC"; then
853 ac_cv_prog_CC="$CC" # Let the user override the test.
854else
855 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
856 ac_prog_rejected=no
cd0fc7c3
SS
857 ac_dummy="$PATH"
858 for ac_dir in $ac_dummy; do
c906108c
SS
859 test -z "$ac_dir" && ac_dir=.
860 if test -f $ac_dir/$ac_word; then
861 if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
862 ac_prog_rejected=yes
863 continue
864 fi
865 ac_cv_prog_CC="cc"
866 break
867 fi
868 done
869 IFS="$ac_save_ifs"
870if test $ac_prog_rejected = yes; then
871 # We found a bogon in the path, so make sure we never use it.
872 set dummy $ac_cv_prog_CC
873 shift
874 if test $# -gt 0; then
875 # We chose a different compiler from the bogus one.
876 # However, it has the same basename, so the bogon will be chosen
877 # first if we set CC to just the basename; use the full file name.
878 shift
879 set dummy "$ac_dir/$ac_word" "$@"
880 shift
881 ac_cv_prog_CC="$@"
882 fi
883fi
884fi
885fi
886CC="$ac_cv_prog_CC"
887if test -n "$CC"; then
888 echo "$ac_t""$CC" 1>&6
889else
890 echo "$ac_t""no" 1>&6
891fi
892
893 if test -z "$CC"; then
894 case "`uname -s`" in
895 *win32* | *WIN32*)
896 # Extract the first word of "cl", so it can be a program name with args.
897set dummy cl; ac_word=$2
898echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
cd0fc7c3 899echo "configure:900: checking for $ac_word" >&5
c906108c
SS
900if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
901 echo $ac_n "(cached) $ac_c" 1>&6
902else
903 if test -n "$CC"; then
904 ac_cv_prog_CC="$CC" # Let the user override the test.
905else
906 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
cd0fc7c3
SS
907 ac_dummy="$PATH"
908 for ac_dir in $ac_dummy; do
c906108c
SS
909 test -z "$ac_dir" && ac_dir=.
910 if test -f $ac_dir/$ac_word; then
911 ac_cv_prog_CC="cl"
912 break
913 fi
914 done
915 IFS="$ac_save_ifs"
916fi
917fi
918CC="$ac_cv_prog_CC"
919if test -n "$CC"; then
920 echo "$ac_t""$CC" 1>&6
921else
922 echo "$ac_t""no" 1>&6
923fi
924 ;;
925 esac
926 fi
927 test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
928fi
929
930echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
cd0fc7c3 931echo "configure:932: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
c906108c
SS
932
933ac_ext=c
934# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
935ac_cpp='$CPP $CPPFLAGS'
936ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
937ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
938cross_compiling=$ac_cv_prog_cc_cross
939
cd0fc7c3
SS
940cat > conftest.$ac_ext << EOF
941
942#line 943 "configure"
c906108c 943#include "confdefs.h"
cd0fc7c3 944
c906108c
SS
945main(){return(0);}
946EOF
cd0fc7c3 947if { (eval echo configure:948: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c
SS
948 ac_cv_prog_cc_works=yes
949 # If we can't run a trivial program, we are probably using a cross compiler.
950 if (./conftest; exit) 2>/dev/null; then
951 ac_cv_prog_cc_cross=no
952 else
953 ac_cv_prog_cc_cross=yes
954 fi
955else
956 echo "configure: failed program was:" >&5
957 cat conftest.$ac_ext >&5
958 ac_cv_prog_cc_works=no
959fi
960rm -fr conftest*
cd0fc7c3
SS
961ac_ext=c
962# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
963ac_cpp='$CPP $CPPFLAGS'
964ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
965ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
966cross_compiling=$ac_cv_prog_cc_cross
c906108c
SS
967
968echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
969if test $ac_cv_prog_cc_works = no; then
970 { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
971fi
972echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
cd0fc7c3 973echo "configure:974: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
c906108c
SS
974echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
975cross_compiling=$ac_cv_prog_cc_cross
976
977echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
cd0fc7c3 978echo "configure:979: checking whether we are using GNU C" >&5
c906108c
SS
979if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
980 echo $ac_n "(cached) $ac_c" 1>&6
981else
982 cat > conftest.c <<EOF
983#ifdef __GNUC__
984 yes;
985#endif
986EOF
cd0fc7c3 987if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:988: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
c906108c
SS
988 ac_cv_prog_gcc=yes
989else
990 ac_cv_prog_gcc=no
991fi
992fi
993
994echo "$ac_t""$ac_cv_prog_gcc" 1>&6
995
996if test $ac_cv_prog_gcc = yes; then
997 GCC=yes
998else
999 GCC=
1000fi
1001
1002ac_test_CFLAGS="${CFLAGS+set}"
1003ac_save_CFLAGS="$CFLAGS"
1004CFLAGS=
1005echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
cd0fc7c3 1006echo "configure:1007: checking whether ${CC-cc} accepts -g" >&5
c906108c
SS
1007if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
1008 echo $ac_n "(cached) $ac_c" 1>&6
1009else
1010 echo 'void f(){}' > conftest.c
1011if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
1012 ac_cv_prog_cc_g=yes
1013else
1014 ac_cv_prog_cc_g=no
1015fi
1016rm -f conftest*
1017
1018fi
1019
1020echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
1021if test "$ac_test_CFLAGS" = set; then
1022 CFLAGS="$ac_save_CFLAGS"
1023elif test $ac_cv_prog_cc_g = yes; then
1024 if test "$GCC" = yes; then
1025 CFLAGS="-g -O2"
1026 else
1027 CFLAGS="-g"
1028 fi
1029else
1030 if test "$GCC" = yes; then
1031 CFLAGS="-O2"
1032 else
1033 CFLAGS=
1034 fi
1035fi
1036
1037
1038# Put a plausible default for CC_FOR_BUILD in Makefile.
1039if test "x$cross_compiling" = "xno"; then
1040 CC_FOR_BUILD='$(CC)'
1041else
1042 CC_FOR_BUILD=gcc
1043fi
1044
1045ALL_LINGUAS=
1046echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
cd0fc7c3 1047echo "configure:1048: checking how to run the C preprocessor" >&5
c906108c
SS
1048# On Suns, sometimes $CPP names a directory.
1049if test -n "$CPP" && test -d "$CPP"; then
1050 CPP=
1051fi
1052if test -z "$CPP"; then
1053if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
1054 echo $ac_n "(cached) $ac_c" 1>&6
1055else
1056 # This must be in double quotes, not single quotes, because CPP may get
1057 # substituted into the Makefile and "${CC-cc}" will confuse make.
1058 CPP="${CC-cc} -E"
1059 # On the NeXT, cc -E runs the code through the compiler's parser,
1060 # not just through cpp.
1061 cat > conftest.$ac_ext <<EOF
cd0fc7c3 1062#line 1063 "configure"
c906108c
SS
1063#include "confdefs.h"
1064#include <assert.h>
1065Syntax Error
1066EOF
1067ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
cd0fc7c3 1068{ (eval echo configure:1069: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
c906108c
SS
1069ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1070if test -z "$ac_err"; then
1071 :
1072else
1073 echo "$ac_err" >&5
1074 echo "configure: failed program was:" >&5
1075 cat conftest.$ac_ext >&5
1076 rm -rf conftest*
1077 CPP="${CC-cc} -E -traditional-cpp"
1078 cat > conftest.$ac_ext <<EOF
cd0fc7c3 1079#line 1080 "configure"
c906108c
SS
1080#include "confdefs.h"
1081#include <assert.h>
1082Syntax Error
1083EOF
1084ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
cd0fc7c3 1085{ (eval echo configure:1086: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
c906108c
SS
1086ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1087if test -z "$ac_err"; then
1088 :
1089else
1090 echo "$ac_err" >&5
1091 echo "configure: failed program was:" >&5
1092 cat conftest.$ac_ext >&5
1093 rm -rf conftest*
1094 CPP="${CC-cc} -nologo -E"
1095 cat > conftest.$ac_ext <<EOF
cd0fc7c3 1096#line 1097 "configure"
c906108c
SS
1097#include "confdefs.h"
1098#include <assert.h>
1099Syntax Error
1100EOF
1101ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
cd0fc7c3 1102{ (eval echo configure:1103: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
c906108c
SS
1103ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1104if test -z "$ac_err"; then
1105 :
1106else
1107 echo "$ac_err" >&5
1108 echo "configure: failed program was:" >&5
1109 cat conftest.$ac_ext >&5
1110 rm -rf conftest*
1111 CPP=/lib/cpp
1112fi
1113rm -f conftest*
1114fi
1115rm -f conftest*
1116fi
1117rm -f conftest*
1118 ac_cv_prog_CPP="$CPP"
1119fi
1120 CPP="$ac_cv_prog_CPP"
1121else
1122 ac_cv_prog_CPP="$CPP"
1123fi
1124echo "$ac_t""$CPP" 1>&6
1125
1126echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
cd0fc7c3 1127echo "configure:1128: checking whether ${MAKE-make} sets \${MAKE}" >&5
c906108c
SS
1128set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
1129if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
1130 echo $ac_n "(cached) $ac_c" 1>&6
1131else
1132 cat > conftestmake <<\EOF
1133all:
1134 @echo 'ac_maketemp="${MAKE}"'
1135EOF
1136# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
1137eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
1138if test -n "$ac_maketemp"; then
1139 eval ac_cv_prog_make_${ac_make}_set=yes
1140else
1141 eval ac_cv_prog_make_${ac_make}_set=no
1142fi
1143rm -f conftestmake
1144fi
1145if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
1146 echo "$ac_t""yes" 1>&6
1147 SET_MAKE=
1148else
1149 echo "$ac_t""no" 1>&6
1150 SET_MAKE="MAKE=${MAKE-make}"
1151fi
1152
1153# Extract the first word of "ranlib", so it can be a program name with args.
1154set dummy ranlib; ac_word=$2
1155echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
cd0fc7c3 1156echo "configure:1157: checking for $ac_word" >&5
c906108c
SS
1157if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
1158 echo $ac_n "(cached) $ac_c" 1>&6
1159else
1160 if test -n "$RANLIB"; then
1161 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
1162else
1163 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
cd0fc7c3
SS
1164 ac_dummy="$PATH"
1165 for ac_dir in $ac_dummy; do
c906108c
SS
1166 test -z "$ac_dir" && ac_dir=.
1167 if test -f $ac_dir/$ac_word; then
1168 ac_cv_prog_RANLIB="ranlib"
1169 break
1170 fi
1171 done
1172 IFS="$ac_save_ifs"
1173 test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
1174fi
1175fi
1176RANLIB="$ac_cv_prog_RANLIB"
1177if test -n "$RANLIB"; then
1178 echo "$ac_t""$RANLIB" 1>&6
1179else
1180 echo "$ac_t""no" 1>&6
1181fi
1182
1183echo $ac_n "checking for POSIXized ISC""... $ac_c" 1>&6
cd0fc7c3 1184echo "configure:1185: checking for POSIXized ISC" >&5
c906108c
SS
1185if test -d /etc/conf/kconfig.d &&
1186 grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1
1187then
1188 echo "$ac_t""yes" 1>&6
1189 ISC=yes # If later tests want to check for ISC.
1190 cat >> confdefs.h <<\EOF
1191#define _POSIX_SOURCE 1
1192EOF
1193
1194 if test "$GCC" = yes; then
1195 CC="$CC -posix"
1196 else
1197 CC="$CC -Xp"
1198 fi
1199else
1200 echo "$ac_t""no" 1>&6
1201 ISC=
1202fi
1203
1204echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
cd0fc7c3 1205echo "configure:1206: checking for ANSI C header files" >&5
c906108c
SS
1206if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
1207 echo $ac_n "(cached) $ac_c" 1>&6
1208else
1209 cat > conftest.$ac_ext <<EOF
cd0fc7c3 1210#line 1211 "configure"
c906108c
SS
1211#include "confdefs.h"
1212#include <stdlib.h>
1213#include <stdarg.h>
1214#include <string.h>
1215#include <float.h>
1216EOF
1217ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
cd0fc7c3 1218{ (eval echo configure:1219: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
c906108c
SS
1219ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1220if test -z "$ac_err"; then
1221 rm -rf conftest*
1222 ac_cv_header_stdc=yes
1223else
1224 echo "$ac_err" >&5
1225 echo "configure: failed program was:" >&5
1226 cat conftest.$ac_ext >&5
1227 rm -rf conftest*
1228 ac_cv_header_stdc=no
1229fi
1230rm -f conftest*
1231
1232if test $ac_cv_header_stdc = yes; then
1233 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
1234cat > conftest.$ac_ext <<EOF
cd0fc7c3 1235#line 1236 "configure"
c906108c
SS
1236#include "confdefs.h"
1237#include <string.h>
1238EOF
1239if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1240 egrep "memchr" >/dev/null 2>&1; then
1241 :
1242else
1243 rm -rf conftest*
1244 ac_cv_header_stdc=no
1245fi
1246rm -f conftest*
1247
1248fi
1249
1250if test $ac_cv_header_stdc = yes; then
1251 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
1252cat > conftest.$ac_ext <<EOF
cd0fc7c3 1253#line 1254 "configure"
c906108c
SS
1254#include "confdefs.h"
1255#include <stdlib.h>
1256EOF
1257if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1258 egrep "free" >/dev/null 2>&1; then
1259 :
1260else
1261 rm -rf conftest*
1262 ac_cv_header_stdc=no
1263fi
1264rm -f conftest*
1265
1266fi
1267
1268if test $ac_cv_header_stdc = yes; then
1269 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
1270if test "$cross_compiling" = yes; then
1271 :
1272else
1273 cat > conftest.$ac_ext <<EOF
cd0fc7c3 1274#line 1275 "configure"
c906108c
SS
1275#include "confdefs.h"
1276#include <ctype.h>
1277#define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
1278#define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
1279#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
1280int main () { int i; for (i = 0; i < 256; i++)
1281if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
1282exit (0); }
1283
1284EOF
cd0fc7c3 1285if { (eval echo configure:1286: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
c906108c
SS
1286then
1287 :
1288else
1289 echo "configure: failed program was:" >&5
1290 cat conftest.$ac_ext >&5
1291 rm -fr conftest*
1292 ac_cv_header_stdc=no
1293fi
1294rm -fr conftest*
1295fi
1296
1297fi
1298fi
1299
1300echo "$ac_t""$ac_cv_header_stdc" 1>&6
1301if test $ac_cv_header_stdc = yes; then
1302 cat >> confdefs.h <<\EOF
1303#define STDC_HEADERS 1
1304EOF
1305
1306fi
1307
1308echo $ac_n "checking for working const""... $ac_c" 1>&6
cd0fc7c3 1309echo "configure:1310: checking for working const" >&5
c906108c
SS
1310if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
1311 echo $ac_n "(cached) $ac_c" 1>&6
1312else
1313 cat > conftest.$ac_ext <<EOF
cd0fc7c3 1314#line 1315 "configure"
c906108c
SS
1315#include "confdefs.h"
1316
1317int main() {
1318
1319/* Ultrix mips cc rejects this. */
1320typedef int charset[2]; const charset x;
1321/* SunOS 4.1.1 cc rejects this. */
1322char const *const *ccp;
1323char **p;
1324/* NEC SVR4.0.2 mips cc rejects this. */
1325struct point {int x, y;};
1326static struct point const zero = {0,0};
1327/* AIX XL C 1.02.0.0 rejects this.
1328 It does not let you subtract one const X* pointer from another in an arm
1329 of an if-expression whose if-part is not a constant expression */
1330const char *g = "string";
1331ccp = &g + (g ? g-g : 0);
1332/* HPUX 7.0 cc rejects these. */
1333++ccp;
1334p = (char**) ccp;
1335ccp = (char const *const *) p;
1336{ /* SCO 3.2v4 cc rejects this. */
1337 char *t;
1338 char const *s = 0 ? (char *) 0 : (char const *) 0;
1339
1340 *t++ = 0;
1341}
1342{ /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
1343 int x[] = {25, 17};
1344 const int *foo = &x[0];
1345 ++foo;
1346}
1347{ /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
1348 typedef const int *iptr;
1349 iptr p = 0;
1350 ++p;
1351}
1352{ /* AIX XL C 1.02.0.0 rejects this saying
1353 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
1354 struct s { int j; const int *ap[3]; };
1355 struct s *b; b->j = 5;
1356}
1357{ /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
1358 const int foo = 10;
1359}
1360
1361; return 0; }
1362EOF
cd0fc7c3 1363if { (eval echo configure:1364: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c
SS
1364 rm -rf conftest*
1365 ac_cv_c_const=yes
1366else
1367 echo "configure: failed program was:" >&5
1368 cat conftest.$ac_ext >&5
1369 rm -rf conftest*
1370 ac_cv_c_const=no
1371fi
1372rm -f conftest*
1373fi
1374
1375echo "$ac_t""$ac_cv_c_const" 1>&6
1376if test $ac_cv_c_const = no; then
1377 cat >> confdefs.h <<\EOF
1378#define const
1379EOF
1380
1381fi
1382
1383echo $ac_n "checking for inline""... $ac_c" 1>&6
cd0fc7c3 1384echo "configure:1385: checking for inline" >&5
c906108c
SS
1385if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then
1386 echo $ac_n "(cached) $ac_c" 1>&6
1387else
1388 ac_cv_c_inline=no
1389for ac_kw in inline __inline__ __inline; do
1390 cat > conftest.$ac_ext <<EOF
cd0fc7c3 1391#line 1392 "configure"
c906108c
SS
1392#include "confdefs.h"
1393
1394int main() {
1395} $ac_kw foo() {
1396; return 0; }
1397EOF
cd0fc7c3 1398if { (eval echo configure:1399: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c
SS
1399 rm -rf conftest*
1400 ac_cv_c_inline=$ac_kw; break
1401else
1402 echo "configure: failed program was:" >&5
1403 cat conftest.$ac_ext >&5
1404fi
1405rm -f conftest*
1406done
1407
1408fi
1409
1410echo "$ac_t""$ac_cv_c_inline" 1>&6
1411case "$ac_cv_c_inline" in
1412 inline | yes) ;;
1413 no) cat >> confdefs.h <<\EOF
1414#define inline
1415EOF
1416 ;;
1417 *) cat >> confdefs.h <<EOF
1418#define inline $ac_cv_c_inline
1419EOF
1420 ;;
1421esac
1422
1423echo $ac_n "checking for off_t""... $ac_c" 1>&6
cd0fc7c3 1424echo "configure:1425: checking for off_t" >&5
c906108c
SS
1425if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then
1426 echo $ac_n "(cached) $ac_c" 1>&6
1427else
1428 cat > conftest.$ac_ext <<EOF
cd0fc7c3 1429#line 1430 "configure"
c906108c
SS
1430#include "confdefs.h"
1431#include <sys/types.h>
1432#if STDC_HEADERS
1433#include <stdlib.h>
1434#include <stddef.h>
1435#endif
1436EOF
1437if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
cd0fc7c3 1438 egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
c906108c
SS
1439 rm -rf conftest*
1440 ac_cv_type_off_t=yes
1441else
1442 rm -rf conftest*
1443 ac_cv_type_off_t=no
1444fi
1445rm -f conftest*
1446
1447fi
1448echo "$ac_t""$ac_cv_type_off_t" 1>&6
1449if test $ac_cv_type_off_t = no; then
1450 cat >> confdefs.h <<\EOF
1451#define off_t long
1452EOF
1453
1454fi
1455
1456echo $ac_n "checking for size_t""... $ac_c" 1>&6
cd0fc7c3 1457echo "configure:1458: checking for size_t" >&5
c906108c
SS
1458if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
1459 echo $ac_n "(cached) $ac_c" 1>&6
1460else
1461 cat > conftest.$ac_ext <<EOF
cd0fc7c3 1462#line 1463 "configure"
c906108c
SS
1463#include "confdefs.h"
1464#include <sys/types.h>
1465#if STDC_HEADERS
1466#include <stdlib.h>
1467#include <stddef.h>
1468#endif
1469EOF
1470if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
cd0fc7c3 1471 egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
c906108c
SS
1472 rm -rf conftest*
1473 ac_cv_type_size_t=yes
1474else
1475 rm -rf conftest*
1476 ac_cv_type_size_t=no
1477fi
1478rm -f conftest*
1479
1480fi
1481echo "$ac_t""$ac_cv_type_size_t" 1>&6
1482if test $ac_cv_type_size_t = no; then
1483 cat >> confdefs.h <<\EOF
1484#define size_t unsigned
1485EOF
1486
1487fi
1488
1489# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
1490# for constant arguments. Useless!
1491echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6
cd0fc7c3 1492echo "configure:1493: checking for working alloca.h" >&5
c906108c
SS
1493if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then
1494 echo $ac_n "(cached) $ac_c" 1>&6
1495else
1496 cat > conftest.$ac_ext <<EOF
cd0fc7c3 1497#line 1498 "configure"
c906108c
SS
1498#include "confdefs.h"
1499#include <alloca.h>
1500int main() {
1501char *p = alloca(2 * sizeof(int));
1502; return 0; }
1503EOF
cd0fc7c3 1504if { (eval echo configure:1505: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c
SS
1505 rm -rf conftest*
1506 ac_cv_header_alloca_h=yes
1507else
1508 echo "configure: failed program was:" >&5
1509 cat conftest.$ac_ext >&5
1510 rm -rf conftest*
1511 ac_cv_header_alloca_h=no
1512fi
1513rm -f conftest*
1514fi
1515
1516echo "$ac_t""$ac_cv_header_alloca_h" 1>&6
1517if test $ac_cv_header_alloca_h = yes; then
1518 cat >> confdefs.h <<\EOF
1519#define HAVE_ALLOCA_H 1
1520EOF
1521
1522fi
1523
1524echo $ac_n "checking for alloca""... $ac_c" 1>&6
cd0fc7c3 1525echo "configure:1526: checking for alloca" >&5
c906108c
SS
1526if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then
1527 echo $ac_n "(cached) $ac_c" 1>&6
1528else
1529 cat > conftest.$ac_ext <<EOF
cd0fc7c3 1530#line 1531 "configure"
c906108c
SS
1531#include "confdefs.h"
1532
1533#ifdef __GNUC__
1534# define alloca __builtin_alloca
1535#else
1536# ifdef _MSC_VER
1537# include <malloc.h>
1538# define alloca _alloca
1539# else
1540# if HAVE_ALLOCA_H
1541# include <alloca.h>
1542# else
1543# ifdef _AIX
1544 #pragma alloca
1545# else
1546# ifndef alloca /* predefined by HP cc +Olibcalls */
1547char *alloca ();
1548# endif
1549# endif
1550# endif
1551# endif
1552#endif
1553
1554int main() {
1555char *p = (char *) alloca(1);
1556; return 0; }
1557EOF
cd0fc7c3 1558if { (eval echo configure:1559: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c
SS
1559 rm -rf conftest*
1560 ac_cv_func_alloca_works=yes
1561else
1562 echo "configure: failed program was:" >&5
1563 cat conftest.$ac_ext >&5
1564 rm -rf conftest*
1565 ac_cv_func_alloca_works=no
1566fi
1567rm -f conftest*
1568fi
1569
1570echo "$ac_t""$ac_cv_func_alloca_works" 1>&6
1571if test $ac_cv_func_alloca_works = yes; then
1572 cat >> confdefs.h <<\EOF
1573#define HAVE_ALLOCA 1
1574EOF
1575
1576fi
1577
1578if test $ac_cv_func_alloca_works = no; then
1579 # The SVR3 libPW and SVR4 libucb both contain incompatible functions
1580 # that cause trouble. Some versions do not even contain alloca or
1581 # contain a buggy version. If you still want to use their alloca,
1582 # use ar to extract alloca.o from them instead of compiling alloca.c.
1583 ALLOCA=alloca.${ac_objext}
1584 cat >> confdefs.h <<\EOF
1585#define C_ALLOCA 1
1586EOF
1587
1588
1589echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
cd0fc7c3 1590echo "configure:1591: checking whether alloca needs Cray hooks" >&5
c906108c
SS
1591if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then
1592 echo $ac_n "(cached) $ac_c" 1>&6
1593else
1594 cat > conftest.$ac_ext <<EOF
cd0fc7c3 1595#line 1596 "configure"
c906108c
SS
1596#include "confdefs.h"
1597#if defined(CRAY) && ! defined(CRAY2)
1598webecray
1599#else
1600wenotbecray
1601#endif
1602
1603EOF
1604if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1605 egrep "webecray" >/dev/null 2>&1; then
1606 rm -rf conftest*
1607 ac_cv_os_cray=yes
1608else
1609 rm -rf conftest*
1610 ac_cv_os_cray=no
1611fi
1612rm -f conftest*
1613
1614fi
1615
1616echo "$ac_t""$ac_cv_os_cray" 1>&6
1617if test $ac_cv_os_cray = yes; then
1618for ac_func in _getb67 GETB67 getb67; do
1619 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
cd0fc7c3 1620echo "configure:1621: checking for $ac_func" >&5
c906108c
SS
1621if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
1622 echo $ac_n "(cached) $ac_c" 1>&6
1623else
1624 cat > conftest.$ac_ext <<EOF
cd0fc7c3 1625#line 1626 "configure"
c906108c
SS
1626#include "confdefs.h"
1627/* System header to define __stub macros and hopefully few prototypes,
1628 which can conflict with char $ac_func(); below. */
1629#include <assert.h>
1630/* Override any gcc2 internal prototype to avoid an error. */
1631/* We use char because int might match the return type of a gcc2
1632 builtin and then its argument prototype would still apply. */
1633char $ac_func();
1634
1635int main() {
1636
1637/* The GNU C library defines this for functions which it implements
1638 to always fail with ENOSYS. Some functions are actually named
1639 something starting with __ and the normal name is an alias. */
1640#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
1641choke me
1642#else
1643$ac_func();
1644#endif
1645
1646; return 0; }
1647EOF
cd0fc7c3 1648if { (eval echo configure:1649: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c
SS
1649 rm -rf conftest*
1650 eval "ac_cv_func_$ac_func=yes"
1651else
1652 echo "configure: failed program was:" >&5
1653 cat conftest.$ac_ext >&5
1654 rm -rf conftest*
1655 eval "ac_cv_func_$ac_func=no"
1656fi
1657rm -f conftest*
1658fi
1659
1660if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
1661 echo "$ac_t""yes" 1>&6
1662 cat >> confdefs.h <<EOF
1663#define CRAY_STACKSEG_END $ac_func
1664EOF
1665
1666 break
1667else
1668 echo "$ac_t""no" 1>&6
1669fi
1670
1671done
1672fi
1673
1674echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
cd0fc7c3 1675echo "configure:1676: checking stack direction for C alloca" >&5
c906108c
SS
1676if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then
1677 echo $ac_n "(cached) $ac_c" 1>&6
1678else
1679 if test "$cross_compiling" = yes; then
1680 ac_cv_c_stack_direction=0
1681else
1682 cat > conftest.$ac_ext <<EOF
cd0fc7c3 1683#line 1684 "configure"
c906108c
SS
1684#include "confdefs.h"
1685find_stack_direction ()
1686{
1687 static char *addr = 0;
1688 auto char dummy;
1689 if (addr == 0)
1690 {
1691 addr = &dummy;
1692 return find_stack_direction ();
1693 }
1694 else
1695 return (&dummy > addr) ? 1 : -1;
1696}
1697main ()
1698{
1699 exit (find_stack_direction() < 0);
1700}
1701EOF
cd0fc7c3 1702if { (eval echo configure:1703: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
c906108c
SS
1703then
1704 ac_cv_c_stack_direction=1
1705else
1706 echo "configure: failed program was:" >&5
1707 cat conftest.$ac_ext >&5
1708 rm -fr conftest*
1709 ac_cv_c_stack_direction=-1
1710fi
1711rm -fr conftest*
1712fi
1713
1714fi
1715
1716echo "$ac_t""$ac_cv_c_stack_direction" 1>&6
1717cat >> confdefs.h <<EOF
1718#define STACK_DIRECTION $ac_cv_c_stack_direction
1719EOF
1720
1721fi
1722
1723for ac_hdr in unistd.h
1724do
1725ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
1726echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
cd0fc7c3 1727echo "configure:1728: checking for $ac_hdr" >&5
c906108c
SS
1728if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1729 echo $ac_n "(cached) $ac_c" 1>&6
1730else
1731 cat > conftest.$ac_ext <<EOF
cd0fc7c3 1732#line 1733 "configure"
c906108c
SS
1733#include "confdefs.h"
1734#include <$ac_hdr>
1735EOF
1736ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
cd0fc7c3 1737{ (eval echo configure:1738: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
c906108c
SS
1738ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1739if test -z "$ac_err"; then
1740 rm -rf conftest*
1741 eval "ac_cv_header_$ac_safe=yes"
1742else
1743 echo "$ac_err" >&5
1744 echo "configure: failed program was:" >&5
1745 cat conftest.$ac_ext >&5
1746 rm -rf conftest*
1747 eval "ac_cv_header_$ac_safe=no"
1748fi
1749rm -f conftest*
1750fi
1751if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1752 echo "$ac_t""yes" 1>&6
1753 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
1754 cat >> confdefs.h <<EOF
1755#define $ac_tr_hdr 1
1756EOF
1757
1758else
1759 echo "$ac_t""no" 1>&6
1760fi
1761done
1762
1763for ac_func in getpagesize
1764do
1765echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
cd0fc7c3 1766echo "configure:1767: checking for $ac_func" >&5
c906108c
SS
1767if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
1768 echo $ac_n "(cached) $ac_c" 1>&6
1769else
1770 cat > conftest.$ac_ext <<EOF
cd0fc7c3 1771#line 1772 "configure"
c906108c
SS
1772#include "confdefs.h"
1773/* System header to define __stub macros and hopefully few prototypes,
1774 which can conflict with char $ac_func(); below. */
1775#include <assert.h>
1776/* Override any gcc2 internal prototype to avoid an error. */
1777/* We use char because int might match the return type of a gcc2
1778 builtin and then its argument prototype would still apply. */
1779char $ac_func();
1780
1781int main() {
1782
1783/* The GNU C library defines this for functions which it implements
1784 to always fail with ENOSYS. Some functions are actually named
1785 something starting with __ and the normal name is an alias. */
1786#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
1787choke me
1788#else
1789$ac_func();
1790#endif
1791
1792; return 0; }
1793EOF
cd0fc7c3 1794if { (eval echo configure:1795: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c
SS
1795 rm -rf conftest*
1796 eval "ac_cv_func_$ac_func=yes"
1797else
1798 echo "configure: failed program was:" >&5
1799 cat conftest.$ac_ext >&5
1800 rm -rf conftest*
1801 eval "ac_cv_func_$ac_func=no"
1802fi
1803rm -f conftest*
1804fi
1805
1806if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
1807 echo "$ac_t""yes" 1>&6
1808 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
1809 cat >> confdefs.h <<EOF
1810#define $ac_tr_func 1
1811EOF
1812
1813else
1814 echo "$ac_t""no" 1>&6
1815fi
1816done
1817
1818echo $ac_n "checking for working mmap""... $ac_c" 1>&6
cd0fc7c3 1819echo "configure:1820: checking for working mmap" >&5
c906108c
SS
1820if eval "test \"`echo '$''{'ac_cv_func_mmap_fixed_mapped'+set}'`\" = set"; then
1821 echo $ac_n "(cached) $ac_c" 1>&6
1822else
1823 if test "$cross_compiling" = yes; then
1824 ac_cv_func_mmap_fixed_mapped=no
1825else
1826 cat > conftest.$ac_ext <<EOF
cd0fc7c3 1827#line 1828 "configure"
c906108c
SS
1828#include "confdefs.h"
1829
1830/* Thanks to Mike Haertel and Jim Avera for this test.
1831 Here is a matrix of mmap possibilities:
1832 mmap private not fixed
1833 mmap private fixed at somewhere currently unmapped
1834 mmap private fixed at somewhere already mapped
1835 mmap shared not fixed
1836 mmap shared fixed at somewhere currently unmapped
1837 mmap shared fixed at somewhere already mapped
1838 For private mappings, we should verify that changes cannot be read()
1839 back from the file, nor mmap's back from the file at a different
1840 address. (There have been systems where private was not correctly
1841 implemented like the infamous i386 svr4.0, and systems where the
1842 VM page cache was not coherent with the filesystem buffer cache
1843 like early versions of FreeBSD and possibly contemporary NetBSD.)
1844 For shared mappings, we should conversely verify that changes get
1845 propogated back to all the places they're supposed to be.
1846
1847 Grep wants private fixed already mapped.
1848 The main things grep needs to know about mmap are:
1849 * does it exist and is it safe to write into the mmap'd area
1850 * how to use it (BSD variants) */
1851#include <sys/types.h>
1852#include <fcntl.h>
1853#include <sys/mman.h>
1854
1855/* This mess was copied from the GNU getpagesize.h. */
1856#ifndef HAVE_GETPAGESIZE
1857# ifdef HAVE_UNISTD_H
1858# include <unistd.h>
1859# endif
1860
1861/* Assume that all systems that can run configure have sys/param.h. */
1862# ifndef HAVE_SYS_PARAM_H
1863# define HAVE_SYS_PARAM_H 1
1864# endif
1865
1866# ifdef _SC_PAGESIZE
1867# define getpagesize() sysconf(_SC_PAGESIZE)
1868# else /* no _SC_PAGESIZE */
1869# ifdef HAVE_SYS_PARAM_H
1870# include <sys/param.h>
1871# ifdef EXEC_PAGESIZE
1872# define getpagesize() EXEC_PAGESIZE
1873# else /* no EXEC_PAGESIZE */
1874# ifdef NBPG
1875# define getpagesize() NBPG * CLSIZE
1876# ifndef CLSIZE
1877# define CLSIZE 1
1878# endif /* no CLSIZE */
1879# else /* no NBPG */
1880# ifdef NBPC
1881# define getpagesize() NBPC
1882# else /* no NBPC */
1883# ifdef PAGESIZE
1884# define getpagesize() PAGESIZE
1885# endif /* PAGESIZE */
1886# endif /* no NBPC */
1887# endif /* no NBPG */
1888# endif /* no EXEC_PAGESIZE */
1889# else /* no HAVE_SYS_PARAM_H */
1890# define getpagesize() 8192 /* punt totally */
1891# endif /* no HAVE_SYS_PARAM_H */
1892# endif /* no _SC_PAGESIZE */
1893
1894#endif /* no HAVE_GETPAGESIZE */
1895
1896#ifdef __cplusplus
1897extern "C" { void *malloc(unsigned); }
1898#else
1899char *malloc();
1900#endif
1901
1902int
1903main()
1904{
1905 char *data, *data2, *data3;
1906 int i, pagesize;
1907 int fd;
1908
1909 pagesize = getpagesize();
1910
1911 /*
1912 * First, make a file with some known garbage in it.
1913 */
1914 data = malloc(pagesize);
1915 if (!data)
1916 exit(1);
1917 for (i = 0; i < pagesize; ++i)
1918 *(data + i) = rand();
1919 umask(0);
1920 fd = creat("conftestmmap", 0600);
1921 if (fd < 0)
1922 exit(1);
1923 if (write(fd, data, pagesize) != pagesize)
1924 exit(1);
1925 close(fd);
1926
1927 /*
1928 * Next, try to mmap the file at a fixed address which
1929 * already has something else allocated at it. If we can,
1930 * also make sure that we see the same garbage.
1931 */
1932 fd = open("conftestmmap", O_RDWR);
1933 if (fd < 0)
1934 exit(1);
1935 data2 = malloc(2 * pagesize);
1936 if (!data2)
1937 exit(1);
1938 data2 += (pagesize - ((int) data2 & (pagesize - 1))) & (pagesize - 1);
1939 if (data2 != mmap(data2, pagesize, PROT_READ | PROT_WRITE,
1940 MAP_PRIVATE | MAP_FIXED, fd, 0L))
1941 exit(1);
1942 for (i = 0; i < pagesize; ++i)
1943 if (*(data + i) != *(data2 + i))
1944 exit(1);
1945
1946 /*
1947 * Finally, make sure that changes to the mapped area
1948 * do not percolate back to the file as seen by read().
1949 * (This is a bug on some variants of i386 svr4.0.)
1950 */
1951 for (i = 0; i < pagesize; ++i)
1952 *(data2 + i) = *(data2 + i) + 1;
1953 data3 = malloc(pagesize);
1954 if (!data3)
1955 exit(1);
1956 if (read(fd, data3, pagesize) != pagesize)
1957 exit(1);
1958 for (i = 0; i < pagesize; ++i)
1959 if (*(data + i) != *(data3 + i))
1960 exit(1);
1961 close(fd);
1962 unlink("conftestmmap");
1963 exit(0);
1964}
1965
1966EOF
cd0fc7c3 1967if { (eval echo configure:1968: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
c906108c
SS
1968then
1969 ac_cv_func_mmap_fixed_mapped=yes
1970else
1971 echo "configure: failed program was:" >&5
1972 cat conftest.$ac_ext >&5
1973 rm -fr conftest*
1974 ac_cv_func_mmap_fixed_mapped=no
1975fi
1976rm -fr conftest*
1977fi
1978
1979fi
1980
1981echo "$ac_t""$ac_cv_func_mmap_fixed_mapped" 1>&6
1982if test $ac_cv_func_mmap_fixed_mapped = yes; then
1983 cat >> confdefs.h <<\EOF
1984#define HAVE_MMAP 1
1985EOF
1986
1987fi
1988
1989
1990 for ac_hdr in argz.h limits.h locale.h nl_types.h malloc.h string.h \
1991unistd.h values.h sys/param.h
1992do
1993ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
1994echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
cd0fc7c3 1995echo "configure:1996: checking for $ac_hdr" >&5
c906108c
SS
1996if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1997 echo $ac_n "(cached) $ac_c" 1>&6
1998else
1999 cat > conftest.$ac_ext <<EOF
cd0fc7c3 2000#line 2001 "configure"
c906108c
SS
2001#include "confdefs.h"
2002#include <$ac_hdr>
2003EOF
2004ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
cd0fc7c3 2005{ (eval echo configure:2006: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
c906108c
SS
2006ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2007if test -z "$ac_err"; then
2008 rm -rf conftest*
2009 eval "ac_cv_header_$ac_safe=yes"
2010else
2011 echo "$ac_err" >&5
2012 echo "configure: failed program was:" >&5
2013 cat conftest.$ac_ext >&5
2014 rm -rf conftest*
2015 eval "ac_cv_header_$ac_safe=no"
2016fi
2017rm -f conftest*
2018fi
2019if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2020 echo "$ac_t""yes" 1>&6
2021 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2022 cat >> confdefs.h <<EOF
2023#define $ac_tr_hdr 1
2024EOF
2025
2026else
2027 echo "$ac_t""no" 1>&6
2028fi
2029done
2030
2031 for ac_func in getcwd munmap putenv setenv setlocale strchr strcasecmp \
2032__argz_count __argz_stringify __argz_next
2033do
2034echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
cd0fc7c3 2035echo "configure:2036: checking for $ac_func" >&5
c906108c
SS
2036if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2037 echo $ac_n "(cached) $ac_c" 1>&6
2038else
2039 cat > conftest.$ac_ext <<EOF
cd0fc7c3 2040#line 2041 "configure"
c906108c
SS
2041#include "confdefs.h"
2042/* System header to define __stub macros and hopefully few prototypes,
2043 which can conflict with char $ac_func(); below. */
2044#include <assert.h>
2045/* Override any gcc2 internal prototype to avoid an error. */
2046/* We use char because int might match the return type of a gcc2
2047 builtin and then its argument prototype would still apply. */
2048char $ac_func();
2049
2050int main() {
2051
2052/* The GNU C library defines this for functions which it implements
2053 to always fail with ENOSYS. Some functions are actually named
2054 something starting with __ and the normal name is an alias. */
2055#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
2056choke me
2057#else
2058$ac_func();
2059#endif
2060
2061; return 0; }
2062EOF
cd0fc7c3 2063if { (eval echo configure:2064: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c
SS
2064 rm -rf conftest*
2065 eval "ac_cv_func_$ac_func=yes"
2066else
2067 echo "configure: failed program was:" >&5
2068 cat conftest.$ac_ext >&5
2069 rm -rf conftest*
2070 eval "ac_cv_func_$ac_func=no"
2071fi
2072rm -f conftest*
2073fi
2074
2075if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
2076 echo "$ac_t""yes" 1>&6
2077 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2078 cat >> confdefs.h <<EOF
2079#define $ac_tr_func 1
2080EOF
2081
2082else
2083 echo "$ac_t""no" 1>&6
2084fi
2085done
2086
2087
2088 if test "${ac_cv_func_stpcpy+set}" != "set"; then
2089 for ac_func in stpcpy
2090do
2091echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
cd0fc7c3 2092echo "configure:2093: checking for $ac_func" >&5
c906108c
SS
2093if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2094 echo $ac_n "(cached) $ac_c" 1>&6
2095else
2096 cat > conftest.$ac_ext <<EOF
cd0fc7c3 2097#line 2098 "configure"
c906108c
SS
2098#include "confdefs.h"
2099/* System header to define __stub macros and hopefully few prototypes,
2100 which can conflict with char $ac_func(); below. */
2101#include <assert.h>
2102/* Override any gcc2 internal prototype to avoid an error. */
2103/* We use char because int might match the return type of a gcc2
2104 builtin and then its argument prototype would still apply. */
2105char $ac_func();
2106
2107int main() {
2108
2109/* The GNU C library defines this for functions which it implements
2110 to always fail with ENOSYS. Some functions are actually named
2111 something starting with __ and the normal name is an alias. */
2112#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
2113choke me
2114#else
2115$ac_func();
2116#endif
2117
2118; return 0; }
2119EOF
cd0fc7c3 2120if { (eval echo configure:2121: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c
SS
2121 rm -rf conftest*
2122 eval "ac_cv_func_$ac_func=yes"
2123else
2124 echo "configure: failed program was:" >&5
2125 cat conftest.$ac_ext >&5
2126 rm -rf conftest*
2127 eval "ac_cv_func_$ac_func=no"
2128fi
2129rm -f conftest*
2130fi
2131
2132if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
2133 echo "$ac_t""yes" 1>&6
2134 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2135 cat >> confdefs.h <<EOF
2136#define $ac_tr_func 1
2137EOF
2138
2139else
2140 echo "$ac_t""no" 1>&6
2141fi
2142done
2143
2144 fi
2145 if test "${ac_cv_func_stpcpy}" = "yes"; then
2146 cat >> confdefs.h <<\EOF
2147#define HAVE_STPCPY 1
2148EOF
2149
2150 fi
2151
2152 if test $ac_cv_header_locale_h = yes; then
2153 echo $ac_n "checking for LC_MESSAGES""... $ac_c" 1>&6
cd0fc7c3 2154echo "configure:2155: checking for LC_MESSAGES" >&5
c906108c
SS
2155if eval "test \"`echo '$''{'am_cv_val_LC_MESSAGES'+set}'`\" = set"; then
2156 echo $ac_n "(cached) $ac_c" 1>&6
2157else
2158 cat > conftest.$ac_ext <<EOF
cd0fc7c3 2159#line 2160 "configure"
c906108c
SS
2160#include "confdefs.h"
2161#include <locale.h>
2162int main() {
2163return LC_MESSAGES
2164; return 0; }
2165EOF
cd0fc7c3 2166if { (eval echo configure:2167: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c
SS
2167 rm -rf conftest*
2168 am_cv_val_LC_MESSAGES=yes
2169else
2170 echo "configure: failed program was:" >&5
2171 cat conftest.$ac_ext >&5
2172 rm -rf conftest*
2173 am_cv_val_LC_MESSAGES=no
2174fi
2175rm -f conftest*
2176fi
2177
2178echo "$ac_t""$am_cv_val_LC_MESSAGES" 1>&6
2179 if test $am_cv_val_LC_MESSAGES = yes; then
2180 cat >> confdefs.h <<\EOF
2181#define HAVE_LC_MESSAGES 1
2182EOF
2183
2184 fi
2185 fi
2186 echo $ac_n "checking whether NLS is requested""... $ac_c" 1>&6
cd0fc7c3 2187echo "configure:2188: checking whether NLS is requested" >&5
c906108c
SS
2188 # Check whether --enable-nls or --disable-nls was given.
2189if test "${enable_nls+set}" = set; then
2190 enableval="$enable_nls"
2191 USE_NLS=$enableval
2192else
2193 USE_NLS=yes
2194fi
2195
2196 echo "$ac_t""$USE_NLS" 1>&6
2197
2198
2199 USE_INCLUDED_LIBINTL=no
2200
2201 if test "$USE_NLS" = "yes"; then
2202 cat >> confdefs.h <<\EOF
2203#define ENABLE_NLS 1
2204EOF
2205
2206 echo $ac_n "checking whether included gettext is requested""... $ac_c" 1>&6
cd0fc7c3 2207echo "configure:2208: checking whether included gettext is requested" >&5
c906108c
SS
2208 # Check whether --with-included-gettext or --without-included-gettext was given.
2209if test "${with_included_gettext+set}" = set; then
2210 withval="$with_included_gettext"
2211 nls_cv_force_use_gnu_gettext=$withval
2212else
2213 nls_cv_force_use_gnu_gettext=no
2214fi
2215
2216 echo "$ac_t""$nls_cv_force_use_gnu_gettext" 1>&6
2217
2218 nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext"
2219 if test "$nls_cv_force_use_gnu_gettext" != "yes"; then
2220 nls_cv_header_intl=
2221 nls_cv_header_libgt=
2222 CATOBJEXT=NONE
2223
2224 ac_safe=`echo "libintl.h" | sed 'y%./+-%__p_%'`
2225echo $ac_n "checking for libintl.h""... $ac_c" 1>&6
cd0fc7c3 2226echo "configure:2227: checking for libintl.h" >&5
c906108c
SS
2227if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2228 echo $ac_n "(cached) $ac_c" 1>&6
2229else
2230 cat > conftest.$ac_ext <<EOF
cd0fc7c3 2231#line 2232 "configure"
c906108c
SS
2232#include "confdefs.h"
2233#include <libintl.h>
2234EOF
2235ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
cd0fc7c3 2236{ (eval echo configure:2237: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
c906108c
SS
2237ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2238if test -z "$ac_err"; then
2239 rm -rf conftest*
2240 eval "ac_cv_header_$ac_safe=yes"
2241else
2242 echo "$ac_err" >&5
2243 echo "configure: failed program was:" >&5
2244 cat conftest.$ac_ext >&5
2245 rm -rf conftest*
2246 eval "ac_cv_header_$ac_safe=no"
2247fi
2248rm -f conftest*
2249fi
2250if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2251 echo "$ac_t""yes" 1>&6
2252 echo $ac_n "checking for gettext in libc""... $ac_c" 1>&6
cd0fc7c3 2253echo "configure:2254: checking for gettext in libc" >&5
c906108c
SS
2254if eval "test \"`echo '$''{'gt_cv_func_gettext_libc'+set}'`\" = set"; then
2255 echo $ac_n "(cached) $ac_c" 1>&6
2256else
2257 cat > conftest.$ac_ext <<EOF
cd0fc7c3 2258#line 2259 "configure"
c906108c
SS
2259#include "confdefs.h"
2260#include <libintl.h>
2261int main() {
2262return (int) gettext ("")
2263; return 0; }
2264EOF
cd0fc7c3 2265if { (eval echo configure:2266: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c
SS
2266 rm -rf conftest*
2267 gt_cv_func_gettext_libc=yes
2268else
2269 echo "configure: failed program was:" >&5
2270 cat conftest.$ac_ext >&5
2271 rm -rf conftest*
2272 gt_cv_func_gettext_libc=no
2273fi
2274rm -f conftest*
2275fi
2276
2277echo "$ac_t""$gt_cv_func_gettext_libc" 1>&6
2278
2279 if test "$gt_cv_func_gettext_libc" != "yes"; then
2280 echo $ac_n "checking for bindtextdomain in -lintl""... $ac_c" 1>&6
cd0fc7c3 2281echo "configure:2282: checking for bindtextdomain in -lintl" >&5
c906108c
SS
2282ac_lib_var=`echo intl'_'bindtextdomain | sed 'y%./+-%__p_%'`
2283if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2284 echo $ac_n "(cached) $ac_c" 1>&6
2285else
2286 ac_save_LIBS="$LIBS"
2287LIBS="-lintl $LIBS"
2288cat > conftest.$ac_ext <<EOF
cd0fc7c3 2289#line 2290 "configure"
c906108c
SS
2290#include "confdefs.h"
2291/* Override any gcc2 internal prototype to avoid an error. */
2292/* We use char because int might match the return type of a gcc2
2293 builtin and then its argument prototype would still apply. */
2294char bindtextdomain();
2295
2296int main() {
2297bindtextdomain()
2298; return 0; }
2299EOF
cd0fc7c3 2300if { (eval echo configure:2301: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c
SS
2301 rm -rf conftest*
2302 eval "ac_cv_lib_$ac_lib_var=yes"
2303else
2304 echo "configure: failed program was:" >&5
2305 cat conftest.$ac_ext >&5
2306 rm -rf conftest*
2307 eval "ac_cv_lib_$ac_lib_var=no"
2308fi
2309rm -f conftest*
2310LIBS="$ac_save_LIBS"
2311
2312fi
2313if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2314 echo "$ac_t""yes" 1>&6
2315 echo $ac_n "checking for gettext in libintl""... $ac_c" 1>&6
cd0fc7c3 2316echo "configure:2317: checking for gettext in libintl" >&5
c906108c
SS
2317if eval "test \"`echo '$''{'gt_cv_func_gettext_libintl'+set}'`\" = set"; then
2318 echo $ac_n "(cached) $ac_c" 1>&6
2319else
2320 cat > conftest.$ac_ext <<EOF
cd0fc7c3 2321#line 2322 "configure"
c906108c
SS
2322#include "confdefs.h"
2323
2324int main() {
2325return (int) gettext ("")
2326; return 0; }
2327EOF
cd0fc7c3 2328if { (eval echo configure:2329: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c
SS
2329 rm -rf conftest*
2330 gt_cv_func_gettext_libintl=yes
2331else
2332 echo "configure: failed program was:" >&5
2333 cat conftest.$ac_ext >&5
2334 rm -rf conftest*
2335 gt_cv_func_gettext_libintl=no
2336fi
2337rm -f conftest*
2338fi
2339
2340echo "$ac_t""$gt_cv_func_gettext_libintl" 1>&6
2341else
2342 echo "$ac_t""no" 1>&6
2343fi
2344
2345 fi
2346
2347 if test "$gt_cv_func_gettext_libc" = "yes" \
2348 || test "$gt_cv_func_gettext_libintl" = "yes"; then
2349 cat >> confdefs.h <<\EOF
2350#define HAVE_GETTEXT 1
2351EOF
2352
2353 # Extract the first word of "msgfmt", so it can be a program name with args.
2354set dummy msgfmt; ac_word=$2
2355echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
cd0fc7c3 2356echo "configure:2357: checking for $ac_word" >&5
c906108c
SS
2357if eval "test \"`echo '$''{'ac_cv_path_MSGFMT'+set}'`\" = set"; then
2358 echo $ac_n "(cached) $ac_c" 1>&6
2359else
2360 case "$MSGFMT" in
2361 /*)
2362 ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path.
2363 ;;
2364 *)
2365 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
2366 for ac_dir in $PATH; do
2367 test -z "$ac_dir" && ac_dir=.
2368 if test -f $ac_dir/$ac_word; then
2369 if test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"; then
2370 ac_cv_path_MSGFMT="$ac_dir/$ac_word"
2371 break
2372 fi
2373 fi
2374 done
2375 IFS="$ac_save_ifs"
2376 test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT="no"
2377 ;;
2378esac
2379fi
2380MSGFMT="$ac_cv_path_MSGFMT"
2381if test -n "$MSGFMT"; then
2382 echo "$ac_t""$MSGFMT" 1>&6
2383else
2384 echo "$ac_t""no" 1>&6
2385fi
2386 if test "$MSGFMT" != "no"; then
2387 for ac_func in dcgettext
2388do
2389echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
cd0fc7c3 2390echo "configure:2391: checking for $ac_func" >&5
c906108c
SS
2391if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2392 echo $ac_n "(cached) $ac_c" 1>&6
2393else
2394 cat > conftest.$ac_ext <<EOF
cd0fc7c3 2395#line 2396 "configure"
c906108c
SS
2396#include "confdefs.h"
2397/* System header to define __stub macros and hopefully few prototypes,
2398 which can conflict with char $ac_func(); below. */
2399#include <assert.h>
2400/* Override any gcc2 internal prototype to avoid an error. */
2401/* We use char because int might match the return type of a gcc2
2402 builtin and then its argument prototype would still apply. */
2403char $ac_func();
2404
2405int main() {
2406
2407/* The GNU C library defines this for functions which it implements
2408 to always fail with ENOSYS. Some functions are actually named
2409 something starting with __ and the normal name is an alias. */
2410#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
2411choke me
2412#else
2413$ac_func();
2414#endif
2415
2416; return 0; }
2417EOF
cd0fc7c3 2418if { (eval echo configure:2419: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c
SS
2419 rm -rf conftest*
2420 eval "ac_cv_func_$ac_func=yes"
2421else
2422 echo "configure: failed program was:" >&5
2423 cat conftest.$ac_ext >&5
2424 rm -rf conftest*
2425 eval "ac_cv_func_$ac_func=no"
2426fi
2427rm -f conftest*
2428fi
2429
2430if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
2431 echo "$ac_t""yes" 1>&6
2432 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2433 cat >> confdefs.h <<EOF
2434#define $ac_tr_func 1
2435EOF
2436
2437else
2438 echo "$ac_t""no" 1>&6
2439fi
2440done
2441
2442 # Extract the first word of "gmsgfmt", so it can be a program name with args.
2443set dummy gmsgfmt; ac_word=$2
2444echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
cd0fc7c3 2445echo "configure:2446: checking for $ac_word" >&5
c906108c
SS
2446if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then
2447 echo $ac_n "(cached) $ac_c" 1>&6
2448else
2449 case "$GMSGFMT" in
2450 /*)
2451 ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path.
2452 ;;
2453 ?:/*)
2454 ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a dos path.
2455 ;;
2456 *)
2457 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
cd0fc7c3
SS
2458 ac_dummy="$PATH"
2459 for ac_dir in $ac_dummy; do
c906108c
SS
2460 test -z "$ac_dir" && ac_dir=.
2461 if test -f $ac_dir/$ac_word; then
2462 ac_cv_path_GMSGFMT="$ac_dir/$ac_word"
2463 break
2464 fi
2465 done
2466 IFS="$ac_save_ifs"
2467 test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT"
2468 ;;
2469esac
2470fi
2471GMSGFMT="$ac_cv_path_GMSGFMT"
2472if test -n "$GMSGFMT"; then
2473 echo "$ac_t""$GMSGFMT" 1>&6
2474else
2475 echo "$ac_t""no" 1>&6
2476fi
2477
2478 # Extract the first word of "xgettext", so it can be a program name with args.
2479set dummy xgettext; ac_word=$2
2480echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
cd0fc7c3 2481echo "configure:2482: checking for $ac_word" >&5
c906108c
SS
2482if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then
2483 echo $ac_n "(cached) $ac_c" 1>&6
2484else
2485 case "$XGETTEXT" in
2486 /*)
2487 ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path.
2488 ;;
2489 *)
2490 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
2491 for ac_dir in $PATH; do
2492 test -z "$ac_dir" && ac_dir=.
2493 if test -f $ac_dir/$ac_word; then
2494 if test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"; then
2495 ac_cv_path_XGETTEXT="$ac_dir/$ac_word"
2496 break
2497 fi
2498 fi
2499 done
2500 IFS="$ac_save_ifs"
2501 test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":"
2502 ;;
2503esac
2504fi
2505XGETTEXT="$ac_cv_path_XGETTEXT"
2506if test -n "$XGETTEXT"; then
2507 echo "$ac_t""$XGETTEXT" 1>&6
2508else
2509 echo "$ac_t""no" 1>&6
2510fi
2511
2512 cat > conftest.$ac_ext <<EOF
cd0fc7c3 2513#line 2514 "configure"
c906108c
SS
2514#include "confdefs.h"
2515
2516int main() {
2517extern int _nl_msg_cat_cntr;
2518 return _nl_msg_cat_cntr
2519; return 0; }
2520EOF
cd0fc7c3 2521if { (eval echo configure:2522: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c
SS
2522 rm -rf conftest*
2523 CATOBJEXT=.gmo
2524 DATADIRNAME=share
2525else
2526 echo "configure: failed program was:" >&5
2527 cat conftest.$ac_ext >&5
2528 rm -rf conftest*
2529 CATOBJEXT=.mo
2530 DATADIRNAME=lib
2531fi
2532rm -f conftest*
2533 INSTOBJEXT=.mo
2534 fi
2535 fi
2536
2537else
2538 echo "$ac_t""no" 1>&6
2539fi
2540
2541
2542
2543 if test "$CATOBJEXT" = "NONE"; then
2544 nls_cv_use_gnu_gettext=yes
2545 fi
2546 fi
2547
2548 if test "$nls_cv_use_gnu_gettext" = "yes"; then
2549 INTLOBJS="\$(GETTOBJS)"
2550 # Extract the first word of "msgfmt", so it can be a program name with args.
2551set dummy msgfmt; ac_word=$2
2552echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
cd0fc7c3 2553echo "configure:2554: checking for $ac_word" >&5
c906108c
SS
2554if eval "test \"`echo '$''{'ac_cv_path_MSGFMT'+set}'`\" = set"; then
2555 echo $ac_n "(cached) $ac_c" 1>&6
2556else
2557 case "$MSGFMT" in
2558 /*)
2559 ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path.
2560 ;;
2561 *)
2562 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
2563 for ac_dir in $PATH; do
2564 test -z "$ac_dir" && ac_dir=.
2565 if test -f $ac_dir/$ac_word; then
2566 if test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"; then
2567 ac_cv_path_MSGFMT="$ac_dir/$ac_word"
2568 break
2569 fi
2570 fi
2571 done
2572 IFS="$ac_save_ifs"
2573 test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT="msgfmt"
2574 ;;
2575esac
2576fi
2577MSGFMT="$ac_cv_path_MSGFMT"
2578if test -n "$MSGFMT"; then
2579 echo "$ac_t""$MSGFMT" 1>&6
2580else
2581 echo "$ac_t""no" 1>&6
2582fi
2583
2584 # Extract the first word of "gmsgfmt", so it can be a program name with args.
2585set dummy gmsgfmt; ac_word=$2
2586echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
cd0fc7c3 2587echo "configure:2588: checking for $ac_word" >&5
c906108c
SS
2588if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then
2589 echo $ac_n "(cached) $ac_c" 1>&6
2590else
2591 case "$GMSGFMT" in
2592 /*)
2593 ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path.
2594 ;;
2595 ?:/*)
2596 ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a dos path.
2597 ;;
2598 *)
2599 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
cd0fc7c3
SS
2600 ac_dummy="$PATH"
2601 for ac_dir in $ac_dummy; do
c906108c
SS
2602 test -z "$ac_dir" && ac_dir=.
2603 if test -f $ac_dir/$ac_word; then
2604 ac_cv_path_GMSGFMT="$ac_dir/$ac_word"
2605 break
2606 fi
2607 done
2608 IFS="$ac_save_ifs"
2609 test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT"
2610 ;;
2611esac
2612fi
2613GMSGFMT="$ac_cv_path_GMSGFMT"
2614if test -n "$GMSGFMT"; then
2615 echo "$ac_t""$GMSGFMT" 1>&6
2616else
2617 echo "$ac_t""no" 1>&6
2618fi
2619
2620 # Extract the first word of "xgettext", so it can be a program name with args.
2621set dummy xgettext; ac_word=$2
2622echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
cd0fc7c3 2623echo "configure:2624: checking for $ac_word" >&5
c906108c
SS
2624if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then
2625 echo $ac_n "(cached) $ac_c" 1>&6
2626else
2627 case "$XGETTEXT" in
2628 /*)
2629 ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path.
2630 ;;
2631 *)
2632 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
2633 for ac_dir in $PATH; do
2634 test -z "$ac_dir" && ac_dir=.
2635 if test -f $ac_dir/$ac_word; then
2636 if test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"; then
2637 ac_cv_path_XGETTEXT="$ac_dir/$ac_word"
2638 break
2639 fi
2640 fi
2641 done
2642 IFS="$ac_save_ifs"
2643 test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":"
2644 ;;
2645esac
2646fi
2647XGETTEXT="$ac_cv_path_XGETTEXT"
2648if test -n "$XGETTEXT"; then
2649 echo "$ac_t""$XGETTEXT" 1>&6
2650else
2651 echo "$ac_t""no" 1>&6
2652fi
2653
2654
2655 USE_INCLUDED_LIBINTL=yes
2656 CATOBJEXT=.gmo
2657 INSTOBJEXT=.mo
2658 DATADIRNAME=share
2659 INTLDEPS='$(top_builddir)/../intl/libintl.a'
2660 INTLLIBS=$INTLDEPS
2661 LIBS=`echo $LIBS | sed -e 's/-lintl//'`
2662 nls_cv_header_intl=libintl.h
2663 nls_cv_header_libgt=libgettext.h
2664 fi
2665
2666 if test "$XGETTEXT" != ":"; then
2667 if $XGETTEXT --omit-header /dev/null 2> /dev/null; then
2668 : ;
2669 else
2670 echo "$ac_t""found xgettext programs is not GNU xgettext; ignore it" 1>&6
2671 XGETTEXT=":"
2672 fi
2673 fi
2674
2675 # We need to process the po/ directory.
2676 POSUB=po
2677 else
2678 DATADIRNAME=share
2679 nls_cv_header_intl=libintl.h
2680 nls_cv_header_libgt=libgettext.h
2681 fi
2682
2683 # If this is used in GNU gettext we have to set USE_NLS to `yes'
2684 # because some of the sources are only built for this goal.
2685 if test "$PACKAGE" = gettext; then
2686 USE_NLS=yes
2687 USE_INCLUDED_LIBINTL=yes
2688 fi
2689
2690 for lang in $ALL_LINGUAS; do
2691 GMOFILES="$GMOFILES $lang.gmo"
2692 POFILES="$POFILES $lang.po"
2693 done
2694
2695
2696
2697
2698
2699
2700
2701
2702
2703
2704
2705
2706
2707
2708 if test "x$CATOBJEXT" != "x"; then
2709 if test "x$ALL_LINGUAS" = "x"; then
2710 LINGUAS=
2711 else
2712 echo $ac_n "checking for catalogs to be installed""... $ac_c" 1>&6
cd0fc7c3 2713echo "configure:2714: checking for catalogs to be installed" >&5
c906108c
SS
2714 NEW_LINGUAS=
2715 for lang in ${LINGUAS=$ALL_LINGUAS}; do
2716 case "$ALL_LINGUAS" in
2717 *$lang*) NEW_LINGUAS="$NEW_LINGUAS $lang" ;;
2718 esac
2719 done
2720 LINGUAS=$NEW_LINGUAS
2721 echo "$ac_t""$LINGUAS" 1>&6
2722 fi
2723
2724 if test -n "$LINGUAS"; then
2725 for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done
2726 fi
2727 fi
2728
2729 if test $ac_cv_header_locale_h = yes; then
2730 INCLUDE_LOCALE_H="#include <locale.h>"
2731 else
2732 INCLUDE_LOCALE_H="\
2733/* The system does not provide the header <locale.h>. Take care yourself. */"
2734 fi
2735
2736
2737 if test -f $srcdir/po2tbl.sed.in; then
2738 if test "$CATOBJEXT" = ".cat"; then
2739 ac_safe=`echo "linux/version.h" | sed 'y%./+-%__p_%'`
2740echo $ac_n "checking for linux/version.h""... $ac_c" 1>&6
cd0fc7c3 2741echo "configure:2742: checking for linux/version.h" >&5
c906108c
SS
2742if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2743 echo $ac_n "(cached) $ac_c" 1>&6
2744else
2745 cat > conftest.$ac_ext <<EOF
cd0fc7c3 2746#line 2747 "configure"
c906108c
SS
2747#include "confdefs.h"
2748#include <linux/version.h>
2749EOF
2750ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
cd0fc7c3 2751{ (eval echo configure:2752: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
c906108c
SS
2752ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2753if test -z "$ac_err"; then
2754 rm -rf conftest*
2755 eval "ac_cv_header_$ac_safe=yes"
2756else
2757 echo "$ac_err" >&5
2758 echo "configure: failed program was:" >&5
2759 cat conftest.$ac_ext >&5
2760 rm -rf conftest*
2761 eval "ac_cv_header_$ac_safe=no"
2762fi
2763rm -f conftest*
2764fi
2765if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2766 echo "$ac_t""yes" 1>&6
2767 msgformat=linux
2768else
2769 echo "$ac_t""no" 1>&6
2770msgformat=xopen
2771fi
2772
2773
2774 sed -e '/^#/d' $srcdir/$msgformat-msg.sed > po2msg.sed
2775 fi
2776 sed -e '/^#.*[^\\]$/d' -e '/^#$/d' \
2777 $srcdir/po2tbl.sed.in > po2tbl.sed
2778 fi
2779
2780 if test "$PACKAGE" = "gettext"; then
2781 GT_NO="#NO#"
2782 GT_YES=
2783 else
2784 GT_NO=
2785 GT_YES="#YES#"
2786 fi
2787
2788
2789
2790 MKINSTALLDIRS="\$(srcdir)/../../mkinstalldirs"
2791
2792
2793 l=
2794
2795
2796 if test -d $srcdir/po; then
2797 test -d po || mkdir po
2798 if test "x$srcdir" != "x."; then
2799 if test "x`echo $srcdir | sed 's@/.*@@'`" = "x"; then
2800 posrcprefix="$srcdir/"
2801 else
2802 posrcprefix="../$srcdir/"
2803 fi
2804 else
2805 posrcprefix="../"
2806 fi
2807 rm -f po/POTFILES
2808 sed -e "/^#/d" -e "/^\$/d" -e "s,.*, $posrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \
2809 < $srcdir/po/POTFILES.in > po/POTFILES
2810 fi
2811
2812
2813
2814# Check whether --enable-sim-alignment or --disable-sim-alignment was given.
2815if test "${enable_sim_alignment+set}" = set; then
2816 enableval="$enable_sim_alignment"
2817 case "${enableval}" in
2818 yes | strict | STRICT) sim_alignment="-DWITH_ALIGNMENT=STRICT_ALIGNMENT";;
2819 no | nonstrict | NONSTRICT) sim_alignment="-DWITH_ALIGNMENT=NONSTRICT_ALIGNMENT";;
2820 0 | default | DEFAULT) sim_alignment="-DWITH_ALIGNMENT=0";;
2821 *) { echo "configure: error: "Unknown value $enableval passed to --enable-sim-alignment"" 1>&2; exit 1; }; sim_alignment="";;
2822esac
2823if test x"$silent" != x"yes" && test x"$sim_alignment" != x""; then
2824 echo "Setting alignment flags = $sim_alignment" 6>&1
2825fi
2826else
2827 sim_alignment=""
2828fi
2829
2830
2831# Check whether --enable-sim-assert or --disable-sim-assert was given.
2832if test "${enable_sim_assert+set}" = set; then
2833 enableval="$enable_sim_assert"
2834 case "${enableval}" in
2835 yes) sim_assert="-DWITH_ASSERT=1";;
2836 no) sim_assert="-DWITH_ASSERT=0";;
2837 *) { echo "configure: error: "--enable-sim-assert does not take a value"" 1>&2; exit 1; }; sim_assert="";;
2838esac
2839if test x"$silent" != x"yes" && test x"$sim_assert" != x""; then
2840 echo "Setting assert flags = $sim_assert" 6>&1
2841fi
2842else
2843 sim_assert=""
2844fi
2845
2846
2847# Check whether --enable-sim-bitsize or --disable-sim-bitsize was given.
2848if test "${enable_sim_bitsize+set}" = set; then
2849 enableval="$enable_sim_bitsize"
2850 case "${enableval}" in
2851 32|64) sim_bitsize="-DWITH_TARGET_WORD_BITSIZE=$enableval";;
2852 *) { echo "configure: error: "--enable-sim-bitsize was given $enableval. Expected 32 or 64"" 1>&2; exit 1; }; sim_bitsize="";;
2853esac
2854if test x"$silent" != x"yes" && test x"$sim_bitsize" != x""; then
2855 echo "Setting bitsize flags = $sim_bitsize" 6>&1
2856fi
2857else
2858 sim_bitsize=""
2859fi
2860
2861
2862# Check whether --enable-sim-bswap or --disable-sim-bswap was given.
2863if test "${enable_sim_bswap+set}" = set; then
2864 enableval="$enable_sim_bswap"
2865 case "${enableval}" in
2866 yes) sim_bswap="-DWITH_BSWAP=1";;
2867 no) sim_bswap="-DWITH_BSWAP=0";;
2868 *) { echo "configure: error: "--enable-sim-bswap does not take a value"" 1>&2; exit 1; }; sim_bswap="";;
2869esac
2870if test x"$silent" != x"yes" && test x"$sim_bswap" != x""; then
2871 echo "Setting bswap flags = $sim_bswap" 6>&1
2872fi
2873else
2874 sim_bswap=""
2875fi
2876
2877
2878# Check whether --enable-sim-cflags or --disable-sim-cflags was given.
2879if test "${enable_sim_cflags+set}" = set; then
2880 enableval="$enable_sim_cflags"
2881 case "${enableval}" in
2882 yes) sim_cflags="-O2 -fomit-frame-pointer";;
2883 no) sim_cflags="";;
2884 *) sim_cflags=`echo "${enableval}" | sed -e "s/,/ /g"`;;
2885esac
2886if test x"$silent" != x"yes" && test x"$sim_cflags" != x""; then
2887 echo "Setting sim cflags = $sim_cflags" 6>&1
2888fi
2889else
2890 sim_cflags=""
2891fi
2892
2893
2894# Check whether --enable-sim-config or --disable-sim-config was given.
2895if test "${enable_sim_config+set}" = set; then
2896 enableval="$enable_sim_config"
2897 case "${enableval}" in
2898 yes|no) { echo "configure: error: "No value supplied for --enable-sim-config=file"" 1>&2; exit 1; };;
2899 *) if test -f "${srcdir}/${enableval}"; then
2900 sim_config="${enableval}";
2901 elif test -f "${srcdir}/${enableval}-config.h"; then
2902 sim_config="${enableval}-config.h"
2903 else
2904 { echo "configure: error: "Config file $enableval was not found"" 1>&2; exit 1; };
2905 sim_config=std-config.h
2906 fi;;
2907esac
2908if test x"$silent" != x"yes" && test x"$sim_config" != x""; then
2909 echo "Setting config flags = $sim_config" 6>&1
2910fi
2911else
2912 sim_config="std-config.h"
2913if test x"$silent" != x"yes"; then
2914 echo "Setting config flags = $sim_config" 6>&1
2915fi
2916fi
2917
2918
2919# Check whether --enable-sim-decode-mechanism or --disable-sim-decode-mechanism was given.
2920if test "${enable_sim_decode_mechanism+set}" = set; then
2921 enableval="$enable_sim_decode_mechanism"
2922 case "${enableval}" in
2923 yes|no) { echo "configure: error: "No value supplied for --enable-sim-decode-mechanism=file"" 1>&2; exit 1; };;
2924 array|switch|padded-switch|goto-switch) sim_decode_mechanism="-T ${enableval}";;
2925 *) { echo "configure: error: "File $enableval is not an opcode rules file"" 1>&2; exit 1; };
2926 sim_decode_mechanism="switch";;
2927esac
2928if test x"$silent" != x"yes" && test x"$sim_decode_mechanism" != x""; then
2929 echo "Setting decode mechanism flags = $sim_decode_mechanism" 6>&1
2930fi
2931else
2932 sim_decode_mechanism=""
2933if test x"$silent" != x"yes"; then
2934 echo "Setting decode mechanism flags = $sim_decode_mechanism"
2935fi
2936fi
2937
2938
2939# Check whether --enable-sim-default-model or --disable-sim-default-model was given.
2940if test "${enable_sim_default_model+set}" = set; then
2941 enableval="$enable_sim_default_model"
2942 case "${enableval}" in
2943 yes|no) { echo "configure: error: "No value supplied for --enable-sim-default-model=model"" 1>&2; exit 1; };;
2944 *) sim_default_model="-DWITH_DEFAULT_MODEL=${enableval}";;
2945esac
2946if test x"$silent" != x"yes" && test x"$sim_default_model" != x""; then
2947 echo "Setting default-model flags = $sim_default_model" 6>&1
2948fi
2949else
2950 sim_default_model=""
2951fi
2952
2953
2954# Check whether --enable-sim-duplicate or --disable-sim-duplicate was given.
2955if test "${enable_sim_duplicate+set}" = set; then
2956 enableval="$enable_sim_duplicate"
2957 case "${enableval}" in
2958 yes) sim_dup="-E";;
2959 no) sim_dup="";;
2960 *) { echo "configure: error: "--enable-sim-duplicate does not take a value"" 1>&2; exit 1; }; sim_dup="";;
2961esac
2962if test x"$silent" != x"yes" && test x"$sim_dup" != x""; then
2963 echo "Setting duplicate flags = $sim_dup" 6>&1
2964fi
2965else
2966 sim_dup="-E"
2967if test x"$silent" != x"yes"; then
2968 echo "Setting duplicate flags = $sim_dup" 6>&1
2969fi
2970fi
2971
2972
2973# Check whether --enable-sim-endian or --disable-sim-endian was given.
2974if test "${enable_sim_endian+set}" = set; then
2975 enableval="$enable_sim_endian"
2976 case "${enableval}" in
2977 yes) case "$target" in
2978 *powerpc-*) sim_endian="-DWITH_TARGET_BYTE_ORDER=BIG_ENDIAN";;
2979 *powerpcle-*) sim_endian="-DWITH_TARGET_BYTE_ORDER=LITTLE_ENDIAN";;
2980 *) echo "Unknown target $target" 1>&6; sim_endian="-DWITH_TARGET_BYTE_ORDER=0";;
2981 esac;;
2982 no) sim_endian="-DWITH_TARGET_BYTE_ORDER=0";;
2983 b*|B*) sim_endian="-DWITH_TARGET_BYTE_ORDER=BIG_ENDIAN";;
2984 l*|L*) sim_endian="-DWITH_TARGET_BYTE_ORDER=LITTLE_ENDIAN";;
2985 *) { echo "configure: error: "Unknown value $enableval for --enable-sim-endian"" 1>&2; exit 1; }; sim_endian="";;
2986esac
2987if test x"$silent" != x"yes" && test x"$sim_endian" != x""; then
2988 echo "Setting endian flags = $sim_endian" 6>&1
2989fi
2990else
2991 sim_endian=""
2992fi
2993
2994
2995# Check whether --enable-sim-env or --disable-sim-env was given.
2996if test "${enable_sim_env+set}" = set; then
2997 enableval="$enable_sim_env"
2998 case "${enableval}" in
2999 operating | os | oea) sim_env="-DWITH_ENVIRONMENT=OPERATING_ENVIRONMENT";;
3000 virtual | vea) sim_env="-DWITH_ENVIRONMENT=VIRTUAL_ENVIRONMENT";;
3001 user | uea) sim_env="-DWITH_ENVIRONMENT=USER_ENVIRONMENT";;
3002 no) sim_env="-DWITH_ENVIRONMENT=0";;
3003 *) { echo "configure: error: "Unknown value $enableval passed to --enable-sim-env"" 1>&2; exit 1; }; sim_env="";;
3004esac
3005if test x"$silent" != x"yes" && test x"$sim_env" != x""; then
3006 echo "Setting env flags = $sim_env" 6>&1
3007fi
3008else
3009 sim_env=""
3010fi
3011
3012
3013# Check whether --enable-sim-filter or --disable-sim-filter was given.
3014if test "${enable_sim_filter+set}" = set; then
3015 enableval="$enable_sim_filter"
3016 case "${enableval}" in
3017 yes) { echo "configure: error: "--enable-sim-filter must be specified with a rule to filter or no"" 1>&2; exit 1; }; sim_filter="";;
3018 no) sim_filter="";;
3019 *) sim_filter="-F $enableval";;
3020esac
3021if test x"$silent" != x"yes" && test x"$sim_filter" != x""; then
3022 echo "Setting filter flags = $sim_filter" 6>&1
3023fi
3024else
3025 sim_filter="-F 32,f,o"
3026if test x"$silent" != x"yes"; then
3027 echo "Setting filter flags = $sim_filter" 6>&1
3028fi
3029fi
3030
3031
3032# Check whether --enable-sim-float or --disable-sim-float was given.
3033if test "${enable_sim_float+set}" = set; then
3034 enableval="$enable_sim_float"
3035 case "${enableval}" in
3036 yes | hard) sim_float="-DWITH_FLOATING_POINT=HARD_FLOATING_POINT";;
3037 no | soft) sim_float="-DWITH_FLOATING_POINT=SOFT_FLOATING_POINT";;
3038 *) { echo "configure: error: "Unknown value $enableval passed to --enable-sim-float"" 1>&2; exit 1; }; sim_float="";;
3039esac
3040if test x"$silent" != x"yes" && test x"$sim_float" != x""; then
3041 echo "Setting float flags = $sim_float" 6>&1
3042fi
3043else
3044 sim_float=""
3045fi
3046
3047
3048# Check whether --enable-sim-hardware or --disable-sim-hardware was given.
3049if test "${enable_sim_hardware+set}" = set; then
3050 enableval="$enable_sim_hardware"
3051 hardware="cpu,memory,nvram,iobus,htab,disk,trace,register,vm,init,core,pal,com,eeprom,opic,glue,phb,ide"
3052case "${enableval}" in
3053 yes) ;;
3054 no) { echo "configure: error: "List of hardware must be specified for --enable-sim-hardware"" 1>&2; exit 1; }; hardware="";;
3055 ,*) hardware="${hardware}${enableval}";;
3056 *,) hardware="${enableval}${hardware}";;
3057 *) hardware="${enableval}"'';;
3058esac
3059sim_hw_src=`echo $hardware | sed -e 's/,/.c hw_/g' -e 's/^/hw_/' -e s'/$/.c/'`
3060sim_hw_obj=`echo $sim_hw_src | sed -e 's/\.c/.o/g'`
3061if test x"$silent" != x"yes" && test x"$hardware" != x""; then
3062 echo "Setting hardware to $sim_hw_src, $sim_hw_obj"
3063fi
3064else
3065 hardware="cpu,memory,nvram,iobus,htab,disk,trace,register,vm,init,core,pal,com,eeprom,opic,glue,phb,ide"
3066sim_hw_src=`echo $hardware | sed -e 's/,/.c hw_/g' -e 's/^/hw_/' -e s'/$/.c/'`
3067sim_hw_obj=`echo $sim_hw_src | sed -e 's/\.c/.o/g'`
3068if test x"$silent" != x"yes"; then
3069 echo "Setting hardware to $sim_hw_src, $sim_hw_obj"
3070fi
3071fi
3072
3073
3074# Check whether --enable-sim-hostbitsize or --disable-sim-hostbitsize was given.
3075if test "${enable_sim_hostbitsize+set}" = set; then
3076 enableval="$enable_sim_hostbitsize"
3077 case "${enableval}" in
3078 32|64) sim_hostbitsize="-DWITH_HOST_WORD_BITSIZE=$enableval";;
3079 *) { echo "configure: error: "--enable-sim-hostbitsize was given $enableval. Expected 32 or 64"" 1>&2; exit 1; }; sim_hostbitsize="";;
3080esac
3081if test x"$silent" != x"yes" && test x"$sim_hostbitsize" != x""; then
3082 echo "Setting hostbitsize flags = $sim_hostbitsize" 6>&1
3083fi
3084else
3085 sim_hostbitsize=""
3086fi
3087
3088
3089# Check whether --enable-sim-hostendian or --disable-sim-hostendian was given.
3090if test "${enable_sim_hostendian+set}" = set; then
3091 enableval="$enable_sim_hostendian"
3092 case "${enableval}" in
3093 no) sim_hostendian="-DWITH_HOST_BYTE_ORDER=0";;
3094 b*|B*) sim_hostendian="-DWITH_HOST_BYTE_ORDER=BIG_ENDIAN";;
3095 l*|L*) sim_hostendian="-DWITH_HOST_BYTE_ORDER=LITTLE_ENDIAN";;
3096 *) { echo "configure: error: "Unknown value $enableval for --enable-sim-hostendian"" 1>&2; exit 1; }; sim_hostendian="";;
3097esac
3098if test x"$silent" != x"yes" && test x"$sim_hostendian" != x""; then
3099 echo "Setting hostendian flags = $sim_hostendian" 6>&1
3100fi
3101else
3102
3103if test "x$cross_compiling" = "xno"; then
3104 echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
cd0fc7c3 3105echo "configure:3106: checking whether byte ordering is bigendian" >&5
c906108c
SS
3106if eval "test \"`echo '$''{'ac_cv_c_bigendian'+set}'`\" = set"; then
3107 echo $ac_n "(cached) $ac_c" 1>&6
3108else
3109 ac_cv_c_bigendian=unknown
3110# See if sys/param.h defines the BYTE_ORDER macro.
3111cat > conftest.$ac_ext <<EOF
cd0fc7c3 3112#line 3113 "configure"
c906108c
SS
3113#include "confdefs.h"
3114#include <sys/types.h>
3115#include <sys/param.h>
3116int main() {
3117
3118#if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
3119 bogus endian macros
3120#endif
3121; return 0; }
3122EOF
cd0fc7c3 3123if { (eval echo configure:3124: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c
SS
3124 rm -rf conftest*
3125 # It does; now see whether it defined to BIG_ENDIAN or not.
3126cat > conftest.$ac_ext <<EOF
cd0fc7c3 3127#line 3128 "configure"
c906108c
SS
3128#include "confdefs.h"
3129#include <sys/types.h>
3130#include <sys/param.h>
3131int main() {
3132
3133#if BYTE_ORDER != BIG_ENDIAN
3134 not big endian
3135#endif
3136; return 0; }
3137EOF
cd0fc7c3 3138if { (eval echo configure:3139: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c
SS
3139 rm -rf conftest*
3140 ac_cv_c_bigendian=yes
3141else
3142 echo "configure: failed program was:" >&5
3143 cat conftest.$ac_ext >&5
3144 rm -rf conftest*
3145 ac_cv_c_bigendian=no
3146fi
3147rm -f conftest*
3148else
3149 echo "configure: failed program was:" >&5
3150 cat conftest.$ac_ext >&5
3151fi
3152rm -f conftest*
3153if test $ac_cv_c_bigendian = unknown; then
3154if test "$cross_compiling" = yes; then
3155 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
3156else
3157 cat > conftest.$ac_ext <<EOF
cd0fc7c3 3158#line 3159 "configure"
c906108c
SS
3159#include "confdefs.h"
3160main () {
3161 /* Are we little or big endian? From Harbison&Steele. */
3162 union
3163 {
3164 long l;
3165 char c[sizeof (long)];
3166 } u;
3167 u.l = 1;
3168 exit (u.c[sizeof (long) - 1] == 1);
3169}
3170EOF
cd0fc7c3 3171if { (eval echo configure:3172: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
c906108c
SS
3172then
3173 ac_cv_c_bigendian=no
3174else
3175 echo "configure: failed program was:" >&5
3176 cat conftest.$ac_ext >&5
3177 rm -fr conftest*
3178 ac_cv_c_bigendian=yes
3179fi
3180rm -fr conftest*
3181fi
3182
3183fi
3184fi
3185
3186echo "$ac_t""$ac_cv_c_bigendian" 1>&6
3187if test $ac_cv_c_bigendian = yes; then
3188 cat >> confdefs.h <<\EOF
3189#define WORDS_BIGENDIAN 1
3190EOF
3191
3192fi
3193
3194 if test $ac_cv_c_bigendian = yes; then
3195 sim_hostendian="-DWITH_HOST_BYTE_ORDER=BIG_ENDIAN"
3196 else
3197 sim_hostendian="-DWITH_HOST_BYTE_ORDER=LITTLE_ENDIAN"
3198 fi
3199else
3200 sim_hostendian="-DWITH_HOST_BYTE_ORDER=0"
3201fi
3202fi
3203
3204
3205# Check whether --enable-sim-icache or --disable-sim-icache was given.
3206if test "${enable_sim_icache+set}" = set; then
3207 enableval="$enable_sim_icache"
3208 icache="-R"
3209 case "${enableval}" in
3210 yes) icache="1024"; sim_icache="-I $icache";;
3211 no) sim_icache="-R";;
3212 *) icache=1024
3213 sim_icache="-"
3214 for x in `echo "${enableval}" | sed -e "s/,/ /g"`; do
3215 case "$x" in
3216 define) sim_icache="${sim_icache}R";;
3217 semantic) sim_icache="${sim_icache}C";;
3218 insn) sim_icache="${sim_icache}S";;
3219 0*|1*|2*|3*|4*|5*|6*|7*|8*|9*) icache=$x;;
3220 *) { echo "configure: error: "Unknown value $x for --enable-sim-icache"" 1>&2; exit 1; }; sim_icache="";;
3221 esac
3222 done
3223 sim_icache="${sim_icache}I $icache";;
3224esac
3225if test x"$silent" != x"yes" && test x"$icache" != x""; then
3226 echo "Setting instruction cache size to $icache ($sim_icache)"
3227fi
3228else
3229 sim_icache="-CSRI 1024"
3230if test x"$silent" != x"yes"; then
3231 echo "Setting instruction cache size to 1024 ($sim_icache)"
3232fi
3233fi
3234
3235
3236# Check whether --enable-sim-inline or --disable-sim-inline was given.
3237if test "${enable_sim_inline+set}" = set; then
3238 enableval="$enable_sim_inline"
3239 sim_inline=""
3240case "$enableval" in
3241 no) sim_inline="-DDEFAULT_INLINE=0";;
3242 0) sim_inline="-DDEFAULT_INLINE=0";;
3243 yes | 2) sim_inline="-DDEFAULT_INLINE=ALL_INLINE";;
3244 1) sim_inline="-DDEFAULT_INLINE=INLINE_LOCALS";;
3245 *) for x in `echo "$enableval" | sed -e "s/,/ /g"`; do
3246 new_flag=""
3247 case "$x" in
3248 *_INLINE=*) new_flag="-D$x";;
3249 *=*) new_flag=`echo "$x" | sed -e "s/=/_INLINE=/" -e "s/^/-D/"`;;
3250 *_INLINE) new_flag="-D$x=ALL_INLINE";;
3251 *) new_flag="-D$x""_INLINE=ALL_INLINE";;
3252 esac
3253 if test x"$sim_inline" = x""; then
3254 sim_inline="$new_flag"
3255 else
3256 sim_inline="$sim_inline $new_flag"
3257 fi
3258 done;;
3259esac
3260if test x"$silent" != x"yes" && test x"$sim_inline" != x""; then
3261 echo "Setting inline flags = $sim_inline" 6>&1
3262fi
3263else
3264 if test x"$GCC" != ""; then
3265 sim_inline="-DDEFAULT_INLINE=INLINE_LOCALS"
3266 if test x"$silent" != x"yes"; then
3267 echo "Setting inline flags = $sim_inline" 6>&1
3268 fi
3269else
3270 sim_inline=""
3271fi
3272fi
3273
3274
3275# Check whether --enable-sim-jump or --disable-sim-jump was given.
3276if test "${enable_sim_jump+set}" = set; then
3277 enableval="$enable_sim_jump"
3278 case "${enableval}" in
3279 yes) sim_jump="-J";;
3280 no) sim_jump="";;
3281 *) { echo "configure: error: "--enable-sim-jump does not take a value"" 1>&2; exit 1; }; sim_jump="";;
3282esac
3283if test x"$silent" != x"yes" && test x"$sim_jump" != x""; then
3284 echo "Setting jump flag = $sim_jump" 6>&1
3285fi
3286else
3287 sim_jump=""
3288if test x"$silent" != x"yes"; then
3289 echo "Setting jump flag = $sim_jump" 6>&1
3290fi
3291fi
3292
3293
3294# Check whether --enable-sim-line-nr or --disable-sim-line-nr was given.
3295if test "${enable_sim_line_nr+set}" = set; then
3296 enableval="$enable_sim_line_nr"
3297 case "${enableval}" in
3298 yes) sim_line_nr="";;
3299 no) sim_line_nr="-L";;
3300 *) { echo "configure: error: "--enable-sim-line-nr does not take a value"" 1>&2; exit 1; }; sim_line_nr="";;
3301esac
3302if test x"$silent" != x"yes" && test x"$sim_line_nr" != x""; then
3303 echo "Setting warning flags = $sim_line_nr" 6>&1
3304fi
3305else
3306 sim_line_nr=""
3307fi
3308
3309
3310# Check whether --enable-sim-model or --disable-sim-model was given.
3311if test "${enable_sim_model+set}" = set; then
3312 enableval="$enable_sim_model"
3313 case "${enableval}" in
3314 yes|no) { echo "configure: error: "No value supplied for --enable-sim-model=model"" 1>&2; exit 1; };;
3315 *) sim_model="-DWITH_MODEL=${enableval}";;
3316esac
3317if test x"$silent" != x"yes" && test x"$sim_model" != x""; then
3318 echo "Setting model flags = $sim_model" 6>&1
3319fi
3320else
3321 sim_model=""
3322fi
3323
3324
3325# Check whether --enable-sim-model-issue or --disable-sim-model-issue was given.
3326if test "${enable_sim_model_issue+set}" = set; then
3327 enableval="$enable_sim_model_issue"
3328 case "${enableval}" in
3329 yes) sim_model_issue="-DWITH_MODEL_ISSUE=MODEL_ISSUE_PROCESS";;
3330 no) sim_model_issue="-DWITH_MODEL_ISSUE=MODEL_ISSUE_IGNORE";;
3331 *) { echo "configure: error: "--enable-sim-model-issue does not take a value"" 1>&2; exit 1; }; sim_model_issue="";;
3332esac
3333if test x"$silent" != x"yes"; then
3334 echo "Setting model-issue flags = $sim_model_issue" 6>&1
3335fi
3336else
3337 sim_model_issue=""
3338fi
3339
3340
3341# Check whether --enable-sim-monitor or --disable-sim-monitor was given.
3342if test "${enable_sim_monitor+set}" = set; then
3343 enableval="$enable_sim_monitor"
3344 case "${enableval}" in
3345 yes) sim_monitor="-DWITH_MON='MONITOR_INSTRUCTION_ISSUE | MONITOR_LOAD_STORE_UNIT'";;
3346 no) sim_monitor="-DWITH_MON=0";;
3347 instruction) sim_monitor="-DWITH_MON=MONITOR_INSTRUCTION_ISSUE";;
3348 memory) sim_monitor="-DWITH_MON=MONITOR_LOAD_STORE_UNIT";;
3349 *) { echo "configure: error: "Unknown value $enableval passed to --enable-sim-mon"" 1>&2; exit 1; }; sim_env="";;
3350esac
3351if test x"$silent" != x"yes" && test x"$sim_monitor" != x""; then
3352 echo "Setting monitor flags = $sim_monitor" 6>&1
3353fi
3354else
3355 sim_monitor=""
3356fi
3357
3358
3359# Check whether --enable-sim-opcode or --disable-sim-opcode was given.
3360if test "${enable_sim_opcode+set}" = set; then
3361 enableval="$enable_sim_opcode"
3362 case "${enableval}" in
3363 yes|no) { echo "configure: error: "No value supplied for --enable-sim-opcode=file"" 1>&2; exit 1; };;
3364 *) if test -f "${srcdir}/${enableval}"; then
3365 sim_opcode="${enableval}"
3366 elif test -f "${srcdir}/dc-${enableval}"; then
3367 sim_opcode="dc-${enableval}"
3368 else
3369 { echo "configure: error: "File $enableval is not an opcode rules file"" 1>&2; exit 1; };
3370 sim_opcode="dc-complex"
3371 fi;;
3372esac
3373if test x"$silent" != x"yes" && test x"$sim_opcode" != x""; then
3374 echo "Setting opcode flags = $sim_opcode" 6>&1
3375fi
3376else
3377 sim_opcode="dc-complex"
3378if test x"$silent" != x"yes"; then
3379 echo "Setting opcode flags = $sim_opcode"
3380fi
3381fi
3382
3383
3384# Check whether --enable-sim-packages or --disable-sim-packages was given.
3385if test "${enable_sim_packages+set}" = set; then
3386 enableval="$enable_sim_packages"
3387 packages=disklabel
3388case "${enableval}" in
3389 yes) ;;
3390 no) { echo "configure: error: "List of packages must be specified for --enable-sim-packages"" 1>&2; exit 1; }; packages="";;
3391 ,*) packages="${packages}${enableval}";;
3392 *,) packages="${enableval}${packages}";;
3393 *) packages="${enableval}"'';;
3394esac
3395sim_pk_src=`echo $packages | sed -e 's/,/.c pk_/g' -e 's/^/pk_/' -e 's/$/.c/'`
3396sim_pk_obj=`echo $sim_pk_src | sed -e 's/\.c/.o/g'`
3397if test x"$silent" != x"yes" && test x"$packages" != x""; then
3398 echo "Setting packages to $sim_pk_src, $sim_pk_obj"
3399fi
3400else
3401 packages=disklabel
3402sim_pk_src=`echo $packages | sed -e 's/,/.c pk_/g' -e 's/^/pk_/' -e 's/$/.c/'`
3403sim_pk_obj=`echo $sim_pk_src | sed -e 's/\.c/.o/g'`
3404if test x"$silent" != x"yes"; then
3405 echo "Setting packages to $sim_pk_src, $sim_pk_obj"
3406fi
3407fi
3408
3409
3410# Check whether --enable-sim-regparm or --disable-sim-regparm was given.
3411if test "${enable_sim_regparm+set}" = set; then
3412 enableval="$enable_sim_regparm"
3413 case "${enableval}" in
3414 0*|1*|2*|3*|4*|5*|6*|7*|8*|9*) sim_regparm="-DWITH_REGPARM=${enableval}";;
3415 no) sim_regparm="" ;;
3416 yes) sim_regparm="-DWITH_REGPARM=3";;
3417 *) { echo "configure: error: "Unknown value $enableval for --enable-sim-regparm"" 1>&2; exit 1; }; sim_regparm="";;
3418esac
3419if test x"$silent" != x"yes" && test x"$sim_regparm" != x""; then
3420 echo "Setting regparm flags = $sim_regparm" 6>&1
3421fi
3422else
3423 sim_regparm=""
3424fi
3425
3426
3427# Check whether --enable-sim-reserved-bits or --disable-sim-reserved-bits was given.
3428if test "${enable_sim_reserved_bits+set}" = set; then
3429 enableval="$enable_sim_reserved_bits"
3430 case "${enableval}" in
3431 yes) sim_reserved="-DWITH_RESERVED_BITS=1";;
3432 no) sim_reserved="-DWITH_RESERVED_BITS=0";;
3433 *) { echo "configure: error: "--enable-sim-reserved-bits does not take a value"" 1>&2; exit 1; }; sim_reserved="";;
3434esac
3435if test x"$silent" != x"yes" && test x"$sim_reserved" != x""; then
3436 echo "Setting reserved flags = $sim_reserved" 6>&1
3437fi
3438else
3439 sim_reserved=""
3440fi
3441
3442
3443# Check whether --enable-sim-smp or --disable-sim-smp was given.
3444if test "${enable_sim_smp+set}" = set; then
3445 enableval="$enable_sim_smp"
3446 case "${enableval}" in
3447 yes) sim_smp="-DWITH_SMP=5" ; sim_igen_smp="-N 5";;
3448 no) sim_smp="-DWITH_SMP=0" ; sim_igen_smp="-N 0";;
3449 *) sim_smp="-DWITH_SMP=$enableval" ; sim_igen_smp="-N $enableval";;
3450esac
3451if test x"$silent" != x"yes" && test x"$sim_smp" != x""; then
3452 echo "Setting smp flags = $sim_smp" 6>&1
3453fi
3454else
3455 sim_smp="-DWITH_SMP=5" ; sim_igen_smp="-N 5"
3456if test x"$silent" != x"yes"; then
3457 echo "Setting smp flags = $sim_smp" 6>&1
3458fi
3459fi
3460
3461
3462# Check whether --enable-sim-stdcall or --disable-sim-stdcall was given.
3463if test "${enable_sim_stdcall+set}" = set; then
3464 enableval="$enable_sim_stdcall"
3465 case "${enableval}" in
3466 no) sim_stdcall="" ;;
3467 std*) sim_stdcall="-DWITH_STDCALL=1";;
3468 yes) sim_stdcall="-DWITH_STDCALL=1";;
3469 *) { echo "configure: error: "Unknown value $enableval for --enable-sim-stdcall"" 1>&2; exit 1; }; sim_stdcall="";;
3470esac
3471if test x"$silent" != x"yes" && test x"$sim_stdcall" != x""; then
3472 echo "Setting function call flags = $sim_stdcall" 6>&1
3473fi
3474else
3475 sim_stdcall=""
3476fi
3477
3478
3479# Check whether --enable-sim-stdio or --disable-sim-stdio was given.
3480if test "${enable_sim_stdio+set}" = set; then
3481 enableval="$enable_sim_stdio"
3482 case "${enableval}" in
3483 yes) sim_stdio="-DWITH_STDIO=DO_USE_STDIO";;
3484 no) sim_stdio="-DWITH_STDIO=DONT_USE_STDIO";;
3485 *) { echo "configure: error: "Unknown value $enableval passed to --enable-sim-stdio"" 1>&2; exit 1; }; sim_stdio="";;
3486esac
3487if test x"$silent" != x"yes" && test x"$sim_stdio" != x""; then
3488 echo "Setting stdio flags = $sim_stdio" 6>&1
3489fi
3490else
3491 sim_stdio=""
3492fi
3493
3494
3495# Check whether --enable-sim-switch or --disable-sim-switch was given.
3496if test "${enable_sim_switch+set}" = set; then
3497 enableval="$enable_sim_switch"
3498 case "${enableval}" in
3499 yes) sim_switch="-s";;
3500 no) sim_switch="";;
3501 *) { echo "configure: error: "--enable-sim-switch does not take a value"" 1>&2; exit 1; }; sim_switch="";;
3502esac
3503if test x"$silent" != x"yes" && test x"$sim_switch" != x""; then
3504 echo "Setting switch flags = $sim_switch" 6>&1
3505fi
3506else
3507 sim_switch="";
3508if test x"$silent" != x"yes"; then
3509 echo "Setting switch flags = $sim_switch" 6>&1
3510fi
3511fi
3512
3513
3514# Check whether --enable-sim-timebase or --disable-sim-timebase was given.
3515if test "${enable_sim_timebase+set}" = set; then
3516 enableval="$enable_sim_timebase"
3517 case "${enableval}" in
3518 yes) sim_timebase="-DWITH_TIME_BASE=1";;
3519 no) sim_timebase="-DWITH_TIME_BASE=0";;
3520 *) { echo "configure: error: "--enable-sim-timebase does not take a value"" 1>&2; exit 1; }; sim_timebase="";;
3521esac
3522if test x"$silent" != x"yes" && test x"$sim_timebase" != x""; then
3523 echo "Setting timebase flags = $sim_timebase" 6>&1
3524fi
3525else
3526 sim_timebase=""
3527fi
3528
3529
3530# Check whether --enable-sim-trace or --disable-sim-trace was given.
3531if test "${enable_sim_trace+set}" = set; then
3532 enableval="$enable_sim_trace"
3533 case "${enableval}" in
3534 yes) sim_trace="-DWITH_TRACE=1";;
3535 no) sim_trace="-DWITH_TRACE=0";;
3536 *) { echo "configure: error: "--enable-sim-trace does not take a value"" 1>&2; exit 1; }; sim_trace="";;
3537esac
3538if test x"$silent" != x"yes" && test x"$sim_trace" != x""; then
3539 echo "Setting trace flags = $sim_trace" 6>&1
3540fi
3541else
3542 sim_trace=""
3543fi
3544
3545
3546# Check whether --enable-sim-warnings or --disable-sim-warnings was given.
3547if test "${enable_sim_warnings+set}" = set; then
3548 enableval="$enable_sim_warnings"
3549 case "${enableval}" in
3550 yes) sim_warnings="-Werror -Wall -Wpointer-arith -Wmissing-prototypes -Wmissing-declarations ";;
3551 no) sim_warnings="-w";;
3552 *) sim_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;;
3553esac
3554if test x"$silent" != x"yes" && test x"$sim_warnings" != x""; then
3555 echo "Setting warning flags = $sim_warnings" 6>&1
3556fi
3557else
3558 sim_warnings=""
3559fi
3560
3561
3562# Check whether --enable-sim-xor-endian or --disable-sim-xor-endian was given.
3563if test "${enable_sim_xor_endian+set}" = set; then
3564 enableval="$enable_sim_xor_endian"
3565 case "${enableval}" in
3566 yes) sim_xor_endian="-DWITH_XOR_ENDIAN=8";;
3567 no) sim_xor_endian="-DWITH_XOR_ENDIAN=0";;
3568 *) sim_xor_endian="-DWITH_XOR_ENDIAN=$enableval";;
3569esac
3570if test x"$silent" != x"yes" && test x"$sim_xor_endian" != x""; then
3571 echo "Setting xor-endian flag = $sim_xor_endian" 6>&1
3572fi
3573else
3574 sim_xor_endian=""
3575fi
3576
3577
3578ac_aux_dir=
3579for ac_dir in `cd $srcdir;pwd`/../.. $srcdir/`cd $srcdir;pwd`/../..; do
3580 if test -f $ac_dir/install-sh; then
3581 ac_aux_dir=$ac_dir
3582 ac_install_sh="$ac_aux_dir/install-sh -c"
3583 break
3584 elif test -f $ac_dir/install.sh; then
3585 ac_aux_dir=$ac_dir
3586 ac_install_sh="$ac_aux_dir/install.sh -c"
3587 break
3588 fi
3589done
3590if test -z "$ac_aux_dir"; then
3591 { echo "configure: error: can not find install-sh or install.sh in `cd $srcdir;pwd`/../.. $srcdir/`cd $srcdir;pwd`/../.." 1>&2; exit 1; }
3592fi
3593ac_config_guess=$ac_aux_dir/config.guess
3594ac_config_sub=$ac_aux_dir/config.sub
3595ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
3596
3597
3598# Do some error checking and defaulting for the host and target type.
3599# The inputs are:
3600# configure --host=HOST --target=TARGET --build=BUILD NONOPT
3601#
3602# The rules are:
3603# 1. You are not allowed to specify --host, --target, and nonopt at the
3604# same time.
3605# 2. Host defaults to nonopt.
3606# 3. If nonopt is not specified, then host defaults to the current host,
3607# as determined by config.guess.
3608# 4. Target and build default to nonopt.
3609# 5. If nonopt is not specified, then target and build default to host.
3610
3611# The aliases save the names the user supplied, while $host etc.
3612# will get canonicalized.
3613case $host---$target---$nonopt in
3614NONE---*---* | *---NONE---* | *---*---NONE) ;;
3615*) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;;
3616esac
3617
3618
3619# Make sure we can run config.sub.
3620if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then :
3621else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
3622fi
3623
3624echo $ac_n "checking host system type""... $ac_c" 1>&6
cd0fc7c3 3625echo "configure:3626: checking host system type" >&5
c906108c
SS
3626
3627host_alias=$host
3628case "$host_alias" in
3629NONE)
3630 case $nonopt in
3631 NONE)
3632 if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then :
3633 else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
3634 fi ;;
3635 *) host_alias=$nonopt ;;
3636 esac ;;
3637esac
3638
3639host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias`
3640host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
3641host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
3642host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
3643echo "$ac_t""$host" 1>&6
3644
3645echo $ac_n "checking target system type""... $ac_c" 1>&6
cd0fc7c3 3646echo "configure:3647: checking target system type" >&5
c906108c
SS
3647
3648target_alias=$target
3649case "$target_alias" in
3650NONE)
3651 case $nonopt in
3652 NONE) target_alias=$host_alias ;;
3653 *) target_alias=$nonopt ;;
3654 esac ;;
3655esac
3656
3657target=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $target_alias`
3658target_cpu=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
3659target_vendor=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
3660target_os=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
3661echo "$ac_t""$target" 1>&6
3662
3663echo $ac_n "checking build system type""... $ac_c" 1>&6
cd0fc7c3 3664echo "configure:3665: checking build system type" >&5
c906108c
SS
3665
3666build_alias=$build
3667case "$build_alias" in
3668NONE)
3669 case $nonopt in
3670 NONE) build_alias=$host_alias ;;
3671 *) build_alias=$nonopt ;;
3672 esac ;;
3673esac
3674
3675build=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $build_alias`
3676build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
3677build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
3678build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
3679echo "$ac_t""$build" 1>&6
3680
3681test "$host_alias" != "$target_alias" &&
3682 test "$program_prefix$program_suffix$program_transform_name" = \
3683 NONENONEs,x,x, &&
3684 program_prefix=${target_alias}-
3685
3686if test "$program_transform_name" = s,x,x,; then
3687 program_transform_name=
3688else
3689 # Double any \ or $. echo might interpret backslashes.
3690 cat <<\EOF_SED > conftestsed
3691s,\\,\\\\,g; s,\$,$$,g
3692EOF_SED
3693 program_transform_name="`echo $program_transform_name|sed -f conftestsed`"
3694 rm -f conftestsed
3695fi
3696test "$program_prefix" != NONE &&
3697 program_transform_name="s,^,${program_prefix},; $program_transform_name"
3698# Use a double $ so make ignores it.
3699test "$program_suffix" != NONE &&
3700 program_transform_name="s,\$\$,${program_suffix},; $program_transform_name"
3701
3702# sed with no file args requires a program.
3703test "$program_transform_name" = "" && program_transform_name="s,x,x,"
3704
3705
3706. ${srcdir}/../../bfd/configure.host
3707
3708
3709
3710echo $ac_n "checking for st_blksize in struct stat""... $ac_c" 1>&6
cd0fc7c3 3711echo "configure:3712: checking for st_blksize in struct stat" >&5
c906108c
SS
3712if eval "test \"`echo '$''{'ac_cv_struct_st_blksize'+set}'`\" = set"; then
3713 echo $ac_n "(cached) $ac_c" 1>&6
3714else
3715 cat > conftest.$ac_ext <<EOF
cd0fc7c3 3716#line 3717 "configure"
c906108c
SS
3717#include "confdefs.h"
3718#include <sys/types.h>
3719#include <sys/stat.h>
3720int main() {
3721struct stat s; s.st_blksize;
3722; return 0; }
3723EOF
cd0fc7c3 3724if { (eval echo configure:3725: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c
SS
3725 rm -rf conftest*
3726 ac_cv_struct_st_blksize=yes
3727else
3728 echo "configure: failed program was:" >&5
3729 cat conftest.$ac_ext >&5
3730 rm -rf conftest*
3731 ac_cv_struct_st_blksize=no
3732fi
3733rm -f conftest*
3734fi
3735
3736echo "$ac_t""$ac_cv_struct_st_blksize" 1>&6
3737if test $ac_cv_struct_st_blksize = yes; then
3738 cat >> confdefs.h <<\EOF
3739#define HAVE_ST_BLKSIZE 1
3740EOF
3741
3742fi
3743
3744echo $ac_n "checking for st_blocks in struct stat""... $ac_c" 1>&6
cd0fc7c3 3745echo "configure:3746: checking for st_blocks in struct stat" >&5
c906108c
SS
3746if eval "test \"`echo '$''{'ac_cv_struct_st_blocks'+set}'`\" = set"; then
3747 echo $ac_n "(cached) $ac_c" 1>&6
3748else
3749 cat > conftest.$ac_ext <<EOF
cd0fc7c3 3750#line 3751 "configure"
c906108c
SS
3751#include "confdefs.h"
3752#include <sys/types.h>
3753#include <sys/stat.h>
3754int main() {
3755struct stat s; s.st_blocks;
3756; return 0; }
3757EOF
cd0fc7c3 3758if { (eval echo configure:3759: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c
SS
3759 rm -rf conftest*
3760 ac_cv_struct_st_blocks=yes
3761else
3762 echo "configure: failed program was:" >&5
3763 cat conftest.$ac_ext >&5
3764 rm -rf conftest*
3765 ac_cv_struct_st_blocks=no
3766fi
3767rm -f conftest*
3768fi
3769
3770echo "$ac_t""$ac_cv_struct_st_blocks" 1>&6
3771if test $ac_cv_struct_st_blocks = yes; then
3772 cat >> confdefs.h <<\EOF
3773#define HAVE_ST_BLOCKS 1
3774EOF
3775
3776else
3777 LIBOBJS="$LIBOBJS fileblocks.${ac_objext}"
3778fi
3779
3780echo $ac_n "checking for st_rdev in struct stat""... $ac_c" 1>&6
cd0fc7c3 3781echo "configure:3782: checking for st_rdev in struct stat" >&5
c906108c
SS
3782if eval "test \"`echo '$''{'ac_cv_struct_st_rdev'+set}'`\" = set"; then
3783 echo $ac_n "(cached) $ac_c" 1>&6
3784else
3785 cat > conftest.$ac_ext <<EOF
cd0fc7c3 3786#line 3787 "configure"
c906108c
SS
3787#include "confdefs.h"
3788#include <sys/types.h>
3789#include <sys/stat.h>
3790int main() {
3791struct stat s; s.st_rdev;
3792; return 0; }
3793EOF
cd0fc7c3 3794if { (eval echo configure:3795: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c
SS
3795 rm -rf conftest*
3796 ac_cv_struct_st_rdev=yes
3797else
3798 echo "configure: failed program was:" >&5
3799 cat conftest.$ac_ext >&5
3800 rm -rf conftest*
3801 ac_cv_struct_st_rdev=no
3802fi
3803rm -f conftest*
3804fi
3805
3806echo "$ac_t""$ac_cv_struct_st_rdev" 1>&6
3807if test $ac_cv_struct_st_rdev = yes; then
3808 cat >> confdefs.h <<\EOF
3809#define HAVE_ST_RDEV 1
3810EOF
3811
3812fi
3813
3814echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6
cd0fc7c3 3815echo "configure:3816: checking whether struct tm is in sys/time.h or time.h" >&5
c906108c
SS
3816if eval "test \"`echo '$''{'ac_cv_struct_tm'+set}'`\" = set"; then
3817 echo $ac_n "(cached) $ac_c" 1>&6
3818else
3819 cat > conftest.$ac_ext <<EOF
cd0fc7c3 3820#line 3821 "configure"
c906108c
SS
3821#include "confdefs.h"
3822#include <sys/types.h>
3823#include <time.h>
3824int main() {
3825struct tm *tp; tp->tm_sec;
3826; return 0; }
3827EOF
cd0fc7c3 3828if { (eval echo configure:3829: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c
SS
3829 rm -rf conftest*
3830 ac_cv_struct_tm=time.h
3831else
3832 echo "configure: failed program was:" >&5
3833 cat conftest.$ac_ext >&5
3834 rm -rf conftest*
3835 ac_cv_struct_tm=sys/time.h
3836fi
3837rm -f conftest*
3838fi
3839
3840echo "$ac_t""$ac_cv_struct_tm" 1>&6
3841if test $ac_cv_struct_tm = sys/time.h; then
3842 cat >> confdefs.h <<\EOF
3843#define TM_IN_SYS_TIME 1
3844EOF
3845
3846fi
3847
3848echo $ac_n "checking for tm_zone in struct tm""... $ac_c" 1>&6
cd0fc7c3 3849echo "configure:3850: checking for tm_zone in struct tm" >&5
c906108c
SS
3850if eval "test \"`echo '$''{'ac_cv_struct_tm_zone'+set}'`\" = set"; then
3851 echo $ac_n "(cached) $ac_c" 1>&6
3852else
3853 cat > conftest.$ac_ext <<EOF
cd0fc7c3 3854#line 3855 "configure"
c906108c
SS
3855#include "confdefs.h"
3856#include <sys/types.h>
3857#include <$ac_cv_struct_tm>
3858int main() {
3859struct tm tm; tm.tm_zone;
3860; return 0; }
3861EOF
cd0fc7c3 3862if { (eval echo configure:3863: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c
SS
3863 rm -rf conftest*
3864 ac_cv_struct_tm_zone=yes
3865else
3866 echo "configure: failed program was:" >&5
3867 cat conftest.$ac_ext >&5
3868 rm -rf conftest*
3869 ac_cv_struct_tm_zone=no
3870fi
3871rm -f conftest*
3872fi
3873
3874echo "$ac_t""$ac_cv_struct_tm_zone" 1>&6
3875if test "$ac_cv_struct_tm_zone" = yes; then
3876 cat >> confdefs.h <<\EOF
3877#define HAVE_TM_ZONE 1
3878EOF
3879
3880else
3881 echo $ac_n "checking for tzname""... $ac_c" 1>&6
cd0fc7c3 3882echo "configure:3883: checking for tzname" >&5
c906108c
SS
3883if eval "test \"`echo '$''{'ac_cv_var_tzname'+set}'`\" = set"; then
3884 echo $ac_n "(cached) $ac_c" 1>&6
3885else
3886 cat > conftest.$ac_ext <<EOF
cd0fc7c3 3887#line 3888 "configure"
c906108c
SS
3888#include "confdefs.h"
3889#include <time.h>
3890#ifndef tzname /* For SGI. */
3891extern char *tzname[]; /* RS6000 and others reject char **tzname. */
3892#endif
3893int main() {
3894atoi(*tzname);
3895; return 0; }
3896EOF
cd0fc7c3 3897if { (eval echo configure:3898: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c
SS
3898 rm -rf conftest*
3899 ac_cv_var_tzname=yes
3900else
3901 echo "configure: failed program was:" >&5
3902 cat conftest.$ac_ext >&5
3903 rm -rf conftest*
3904 ac_cv_var_tzname=no
3905fi
3906rm -f conftest*
3907fi
3908
3909echo "$ac_t""$ac_cv_var_tzname" 1>&6
3910 if test $ac_cv_var_tzname = yes; then
3911 cat >> confdefs.h <<\EOF
3912#define HAVE_TZNAME 1
3913EOF
3914
3915 fi
3916fi
3917
3918
3919echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
cd0fc7c3 3920echo "configure:3921: checking for uid_t in sys/types.h" >&5
c906108c
SS
3921if eval "test \"`echo '$''{'ac_cv_type_uid_t'+set}'`\" = set"; then
3922 echo $ac_n "(cached) $ac_c" 1>&6
3923else
3924 cat > conftest.$ac_ext <<EOF
cd0fc7c3 3925#line 3926 "configure"
c906108c
SS
3926#include "confdefs.h"
3927#include <sys/types.h>
3928EOF
3929if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3930 egrep "uid_t" >/dev/null 2>&1; then
3931 rm -rf conftest*
3932 ac_cv_type_uid_t=yes
3933else
3934 rm -rf conftest*
3935 ac_cv_type_uid_t=no
3936fi
3937rm -f conftest*
3938
3939fi
3940
3941echo "$ac_t""$ac_cv_type_uid_t" 1>&6
3942if test $ac_cv_type_uid_t = no; then
3943 cat >> confdefs.h <<\EOF
3944#define uid_t int
3945EOF
3946
3947 cat >> confdefs.h <<\EOF
3948#define gid_t int
3949EOF
3950
3951fi
3952
3953echo $ac_n "checking type of array argument to getgroups""... $ac_c" 1>&6
cd0fc7c3 3954echo "configure:3955: checking type of array argument to getgroups" >&5
c906108c
SS
3955if eval "test \"`echo '$''{'ac_cv_type_getgroups'+set}'`\" = set"; then
3956 echo $ac_n "(cached) $ac_c" 1>&6
3957else
3958 if test "$cross_compiling" = yes; then
3959 ac_cv_type_getgroups=cross
3960else
3961 cat > conftest.$ac_ext <<EOF
cd0fc7c3 3962#line 3963 "configure"
c906108c
SS
3963#include "confdefs.h"
3964
3965/* Thanks to Mike Rendell for this test. */
3966#include <sys/types.h>
3967#define NGID 256
3968#undef MAX
3969#define MAX(x, y) ((x) > (y) ? (x) : (y))
3970main()
3971{
3972 gid_t gidset[NGID];
3973 int i, n;
3974 union { gid_t gval; long lval; } val;
3975
3976 val.lval = -1;
3977 for (i = 0; i < NGID; i++)
3978 gidset[i] = val.gval;
3979 n = getgroups (sizeof (gidset) / MAX (sizeof (int), sizeof (gid_t)) - 1,
3980 gidset);
3981 /* Exit non-zero if getgroups seems to require an array of ints. This
3982 happens when gid_t is short but getgroups modifies an array of ints. */
3983 exit ((n > 0 && gidset[n] != val.gval) ? 1 : 0);
3984}
3985
3986EOF
cd0fc7c3 3987if { (eval echo configure:3988: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
c906108c
SS
3988then
3989 ac_cv_type_getgroups=gid_t
3990else
3991 echo "configure: failed program was:" >&5
3992 cat conftest.$ac_ext >&5
3993 rm -fr conftest*
3994 ac_cv_type_getgroups=int
3995fi
3996rm -fr conftest*
3997fi
3998
3999if test $ac_cv_type_getgroups = cross; then
4000 cat > conftest.$ac_ext <<EOF
cd0fc7c3 4001#line 4002 "configure"
c906108c
SS
4002#include "confdefs.h"
4003#include <unistd.h>
4004EOF
4005if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4006 egrep "getgroups.*int.*gid_t" >/dev/null 2>&1; then
4007 rm -rf conftest*
4008 ac_cv_type_getgroups=gid_t
4009else
4010 rm -rf conftest*
4011 ac_cv_type_getgroups=int
4012fi
4013rm -f conftest*
4014
4015fi
4016fi
4017
4018echo "$ac_t""$ac_cv_type_getgroups" 1>&6
4019cat >> confdefs.h <<EOF
4020#define GETGROUPS_T $ac_cv_type_getgroups
4021EOF
4022
4023
4024echo $ac_n "checking for mode_t""... $ac_c" 1>&6
cd0fc7c3 4025echo "configure:4026: checking for mode_t" >&5
c906108c
SS
4026if eval "test \"`echo '$''{'ac_cv_type_mode_t'+set}'`\" = set"; then
4027 echo $ac_n "(cached) $ac_c" 1>&6
4028else
4029 cat > conftest.$ac_ext <<EOF
cd0fc7c3 4030#line 4031 "configure"
c906108c
SS
4031#include "confdefs.h"
4032#include <sys/types.h>
4033#if STDC_HEADERS
4034#include <stdlib.h>
4035#include <stddef.h>
4036#endif
4037EOF
4038if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
cd0fc7c3 4039 egrep "(^|[^a-zA-Z_0-9])mode_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
c906108c
SS
4040 rm -rf conftest*
4041 ac_cv_type_mode_t=yes
4042else
4043 rm -rf conftest*
4044 ac_cv_type_mode_t=no
4045fi
4046rm -f conftest*
4047
4048fi
4049echo "$ac_t""$ac_cv_type_mode_t" 1>&6
4050if test $ac_cv_type_mode_t = no; then
4051 cat >> confdefs.h <<\EOF
4052#define mode_t int
4053EOF
4054
4055fi
4056
4057echo $ac_n "checking for off_t""... $ac_c" 1>&6
cd0fc7c3 4058echo "configure:4059: checking for off_t" >&5
c906108c
SS
4059if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then
4060 echo $ac_n "(cached) $ac_c" 1>&6
4061else
4062 cat > conftest.$ac_ext <<EOF
cd0fc7c3 4063#line 4064 "configure"
c906108c
SS
4064#include "confdefs.h"
4065#include <sys/types.h>
4066#if STDC_HEADERS
4067#include <stdlib.h>
4068#include <stddef.h>
4069#endif
4070EOF
4071if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
cd0fc7c3 4072 egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
c906108c
SS
4073 rm -rf conftest*
4074 ac_cv_type_off_t=yes
4075else
4076 rm -rf conftest*
4077 ac_cv_type_off_t=no
4078fi
4079rm -f conftest*
4080
4081fi
4082echo "$ac_t""$ac_cv_type_off_t" 1>&6
4083if test $ac_cv_type_off_t = no; then
4084 cat >> confdefs.h <<\EOF
4085#define off_t long
4086EOF
4087
4088fi
4089
4090echo $ac_n "checking for pid_t""... $ac_c" 1>&6
cd0fc7c3 4091echo "configure:4092: checking for pid_t" >&5
c906108c
SS
4092if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then
4093 echo $ac_n "(cached) $ac_c" 1>&6
4094else
4095 cat > conftest.$ac_ext <<EOF
cd0fc7c3 4096#line 4097 "configure"
c906108c
SS
4097#include "confdefs.h"
4098#include <sys/types.h>
4099#if STDC_HEADERS
4100#include <stdlib.h>
4101#include <stddef.h>
4102#endif
4103EOF
4104if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
cd0fc7c3 4105 egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
c906108c
SS
4106 rm -rf conftest*
4107 ac_cv_type_pid_t=yes
4108else
4109 rm -rf conftest*
4110 ac_cv_type_pid_t=no
4111fi
4112rm -f conftest*
4113
4114fi
4115echo "$ac_t""$ac_cv_type_pid_t" 1>&6
4116if test $ac_cv_type_pid_t = no; then
4117 cat >> confdefs.h <<\EOF
4118#define pid_t int
4119EOF
4120
4121fi
4122
4123echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
cd0fc7c3 4124echo "configure:4125: checking return type of signal handlers" >&5
c906108c
SS
4125if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
4126 echo $ac_n "(cached) $ac_c" 1>&6
4127else
4128 cat > conftest.$ac_ext <<EOF
cd0fc7c3 4129#line 4130 "configure"
c906108c
SS
4130#include "confdefs.h"
4131#include <sys/types.h>
4132#include <signal.h>
4133#ifdef signal
4134#undef signal
4135#endif
4136#ifdef __cplusplus
4137extern "C" void (*signal (int, void (*)(int)))(int);
4138#else
4139void (*signal ()) ();
4140#endif
4141
4142int main() {
4143int i;
4144; return 0; }
4145EOF
cd0fc7c3 4146if { (eval echo configure:4147: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c
SS
4147 rm -rf conftest*
4148 ac_cv_type_signal=void
4149else
4150 echo "configure: failed program was:" >&5
4151 cat conftest.$ac_ext >&5
4152 rm -rf conftest*
4153 ac_cv_type_signal=int
4154fi
4155rm -f conftest*
4156fi
4157
4158echo "$ac_t""$ac_cv_type_signal" 1>&6
4159cat >> confdefs.h <<EOF
4160#define RETSIGTYPE $ac_cv_type_signal
4161EOF
4162
4163
4164echo $ac_n "checking for size_t""... $ac_c" 1>&6
cd0fc7c3 4165echo "configure:4166: checking for size_t" >&5
c906108c
SS
4166if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
4167 echo $ac_n "(cached) $ac_c" 1>&6
4168else
4169 cat > conftest.$ac_ext <<EOF
cd0fc7c3 4170#line 4171 "configure"
c906108c
SS
4171#include "confdefs.h"
4172#include <sys/types.h>
4173#if STDC_HEADERS
4174#include <stdlib.h>
4175#include <stddef.h>
4176#endif
4177EOF
4178if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
cd0fc7c3 4179 egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
c906108c
SS
4180 rm -rf conftest*
4181 ac_cv_type_size_t=yes
4182else
4183 rm -rf conftest*
4184 ac_cv_type_size_t=no
4185fi
4186rm -f conftest*
4187
4188fi
4189echo "$ac_t""$ac_cv_type_size_t" 1>&6
4190if test $ac_cv_type_size_t = no; then
4191 cat >> confdefs.h <<\EOF
4192#define size_t unsigned
4193EOF
4194
4195fi
4196
4197echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
cd0fc7c3 4198echo "configure:4199: checking for uid_t in sys/types.h" >&5
c906108c
SS
4199if eval "test \"`echo '$''{'ac_cv_type_uid_t'+set}'`\" = set"; then
4200 echo $ac_n "(cached) $ac_c" 1>&6
4201else
4202 cat > conftest.$ac_ext <<EOF
cd0fc7c3 4203#line 4204 "configure"
c906108c
SS
4204#include "confdefs.h"
4205#include <sys/types.h>
4206EOF
4207if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4208 egrep "uid_t" >/dev/null 2>&1; then
4209 rm -rf conftest*
4210 ac_cv_type_uid_t=yes
4211else
4212 rm -rf conftest*
4213 ac_cv_type_uid_t=no
4214fi
4215rm -f conftest*
4216
4217fi
4218
4219echo "$ac_t""$ac_cv_type_uid_t" 1>&6
4220if test $ac_cv_type_uid_t = no; then
4221 cat >> confdefs.h <<\EOF
4222#define uid_t int
4223EOF
4224
4225 cat >> confdefs.h <<\EOF
4226#define gid_t int
4227EOF
4228
4229fi
4230
4231
4232for ac_func in access cfgetispeed cfgetospeed cfsetispeed cfsetospeed chdir chmod chown dup dup2 fchmod fchown fcntl fstat fstatfs getdirentries getegid geteuid getgid getpid getppid getrusage gettimeofday getuid ioctl kill link lseek lstat mkdir pipe readlink rmdir setreuid setregid stat sigprocmask stat symlink tcgetattr tcsetattr tcsendbreak tcdrain tcflush tcflow tcgetpgrp tcsetpgrp time umask unlink
4233do
4234echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
cd0fc7c3 4235echo "configure:4236: checking for $ac_func" >&5
c906108c
SS
4236if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4237 echo $ac_n "(cached) $ac_c" 1>&6
4238else
4239 cat > conftest.$ac_ext <<EOF
cd0fc7c3 4240#line 4241 "configure"
c906108c
SS
4241#include "confdefs.h"
4242/* System header to define __stub macros and hopefully few prototypes,
4243 which can conflict with char $ac_func(); below. */
4244#include <assert.h>
4245/* Override any gcc2 internal prototype to avoid an error. */
4246/* We use char because int might match the return type of a gcc2
4247 builtin and then its argument prototype would still apply. */
4248char $ac_func();
4249
4250int main() {
4251
4252/* The GNU C library defines this for functions which it implements
4253 to always fail with ENOSYS. Some functions are actually named
4254 something starting with __ and the normal name is an alias. */
4255#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4256choke me
4257#else
4258$ac_func();
4259#endif
4260
4261; return 0; }
4262EOF
cd0fc7c3 4263if { (eval echo configure:4264: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c
SS
4264 rm -rf conftest*
4265 eval "ac_cv_func_$ac_func=yes"
4266else
4267 echo "configure: failed program was:" >&5
4268 cat conftest.$ac_ext >&5
4269 rm -rf conftest*
4270 eval "ac_cv_func_$ac_func=no"
4271fi
4272rm -f conftest*
4273fi
4274
4275if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4276 echo "$ac_t""yes" 1>&6
4277 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4278 cat >> confdefs.h <<EOF
4279#define $ac_tr_func 1
4280EOF
4281
4282else
4283 echo "$ac_t""no" 1>&6
4284fi
4285done
4286
4287
4288for ac_hdr in fcntl.h stdlib.h string.h strings.h sys/ioctl.h sys/param.h sys/resource.h sys/stat.h sys/termio.h sys/termios.h sys/time.h sys/times.h sys/types.h time.h unistd.h
4289do
4290ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4291echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
cd0fc7c3 4292echo "configure:4293: checking for $ac_hdr" >&5
c906108c
SS
4293if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4294 echo $ac_n "(cached) $ac_c" 1>&6
4295else
4296 cat > conftest.$ac_ext <<EOF
cd0fc7c3 4297#line 4298 "configure"
c906108c
SS
4298#include "confdefs.h"
4299#include <$ac_hdr>
4300EOF
4301ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
cd0fc7c3 4302{ (eval echo configure:4303: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
c906108c
SS
4303ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4304if test -z "$ac_err"; then
4305 rm -rf conftest*
4306 eval "ac_cv_header_$ac_safe=yes"
4307else
4308 echo "$ac_err" >&5
4309 echo "configure: failed program was:" >&5
4310 cat conftest.$ac_ext >&5
4311 rm -rf conftest*
4312 eval "ac_cv_header_$ac_safe=no"
4313fi
4314rm -f conftest*
4315fi
4316if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4317 echo "$ac_t""yes" 1>&6
4318 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4319 cat >> confdefs.h <<EOF
4320#define $ac_tr_hdr 1
4321EOF
4322
4323else
4324 echo "$ac_t""no" 1>&6
4325fi
4326done
4327
4328ac_header_dirent=no
4329for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
4330do
4331ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4332echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
cd0fc7c3 4333echo "configure:4334: checking for $ac_hdr that defines DIR" >&5
c906108c
SS
4334if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then
4335 echo $ac_n "(cached) $ac_c" 1>&6
4336else
4337 cat > conftest.$ac_ext <<EOF
cd0fc7c3 4338#line 4339 "configure"
c906108c
SS
4339#include "confdefs.h"
4340#include <sys/types.h>
4341#include <$ac_hdr>
4342int main() {
4343DIR *dirp = 0;
4344; return 0; }
4345EOF
cd0fc7c3 4346if { (eval echo configure:4347: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c
SS
4347 rm -rf conftest*
4348 eval "ac_cv_header_dirent_$ac_safe=yes"
4349else
4350 echo "configure: failed program was:" >&5
4351 cat conftest.$ac_ext >&5
4352 rm -rf conftest*
4353 eval "ac_cv_header_dirent_$ac_safe=no"
4354fi
4355rm -f conftest*
4356fi
4357if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then
4358 echo "$ac_t""yes" 1>&6
4359 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4360 cat >> confdefs.h <<EOF
4361#define $ac_tr_hdr 1
4362EOF
4363 ac_header_dirent=$ac_hdr; break
4364else
4365 echo "$ac_t""no" 1>&6
4366fi
4367done
4368# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
4369if test $ac_header_dirent = dirent.h; then
4370echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
cd0fc7c3 4371echo "configure:4372: checking for opendir in -ldir" >&5
c906108c
SS
4372ac_lib_var=`echo dir'_'opendir | sed 'y%./+-%__p_%'`
4373if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4374 echo $ac_n "(cached) $ac_c" 1>&6
4375else
4376 ac_save_LIBS="$LIBS"
4377LIBS="-ldir $LIBS"
4378cat > conftest.$ac_ext <<EOF
cd0fc7c3 4379#line 4380 "configure"
c906108c
SS
4380#include "confdefs.h"
4381/* Override any gcc2 internal prototype to avoid an error. */
4382/* We use char because int might match the return type of a gcc2
4383 builtin and then its argument prototype would still apply. */
4384char opendir();
4385
4386int main() {
4387opendir()
4388; return 0; }
4389EOF
cd0fc7c3 4390if { (eval echo configure:4391: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c
SS
4391 rm -rf conftest*
4392 eval "ac_cv_lib_$ac_lib_var=yes"
4393else
4394 echo "configure: failed program was:" >&5
4395 cat conftest.$ac_ext >&5
4396 rm -rf conftest*
4397 eval "ac_cv_lib_$ac_lib_var=no"
4398fi
4399rm -f conftest*
4400LIBS="$ac_save_LIBS"
4401
4402fi
4403if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4404 echo "$ac_t""yes" 1>&6
4405 LIBS="$LIBS -ldir"
4406else
4407 echo "$ac_t""no" 1>&6
4408fi
4409
4410else
4411echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
cd0fc7c3 4412echo "configure:4413: checking for opendir in -lx" >&5
c906108c
SS
4413ac_lib_var=`echo x'_'opendir | sed 'y%./+-%__p_%'`
4414if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4415 echo $ac_n "(cached) $ac_c" 1>&6
4416else
4417 ac_save_LIBS="$LIBS"
4418LIBS="-lx $LIBS"
4419cat > conftest.$ac_ext <<EOF
cd0fc7c3 4420#line 4421 "configure"
c906108c
SS
4421#include "confdefs.h"
4422/* Override any gcc2 internal prototype to avoid an error. */
4423/* We use char because int might match the return type of a gcc2
4424 builtin and then its argument prototype would still apply. */
4425char opendir();
4426
4427int main() {
4428opendir()
4429; return 0; }
4430EOF
cd0fc7c3 4431if { (eval echo configure:4432: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c
SS
4432 rm -rf conftest*
4433 eval "ac_cv_lib_$ac_lib_var=yes"
4434else
4435 echo "configure: failed program was:" >&5
4436 cat conftest.$ac_ext >&5
4437 rm -rf conftest*
4438 eval "ac_cv_lib_$ac_lib_var=no"
4439fi
4440rm -f conftest*
4441LIBS="$ac_save_LIBS"
4442
4443fi
4444if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4445 echo "$ac_t""yes" 1>&6
4446 LIBS="$LIBS -lx"
4447else
4448 echo "$ac_t""no" 1>&6
4449fi
4450
4451fi
4452
4453
4454sim_termio=""
4455echo $ac_n "checking for struct termios""... $ac_c" 1>&6
cd0fc7c3 4456echo "configure:4457: checking for struct termios" >&5
c906108c
SS
4457if eval "test \"`echo '$''{'ac_cv_termios_struct'+set}'`\" = set"; then
4458 echo $ac_n "(cached) $ac_c" 1>&6
4459else
4460 cat > conftest.$ac_ext <<EOF
cd0fc7c3 4461#line 4462 "configure"
c906108c
SS
4462#include "confdefs.h"
4463#include <sys/types.h>
4464#include <sys/termios.h>
4465int main() {
4466static struct termios x;
4467 x.c_iflag = 0;
4468 x.c_oflag = 0;
4469 x.c_cflag = 0;
4470 x.c_lflag = 0;
4471 x.c_cc[NCCS] = 0;
4472; return 0; }
4473EOF
cd0fc7c3 4474if { (eval echo configure:4475: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c
SS
4475 rm -rf conftest*
4476 ac_cv_termios_struct=yes
4477else
4478 echo "configure: failed program was:" >&5
4479 cat conftest.$ac_ext >&5
4480 rm -rf conftest*
4481 ac_cv_termios_struct=no
4482fi
4483rm -f conftest*
4484fi
4485
4486echo "$ac_t""$ac_cv_termios_struct" 1>&6
4487if test $ac_cv_termios_struct = yes; then
4488 sim_termio="$sim_termio -DHAVE_TERMIOS_STRUCTURE"
4489fi
4490
4491if test "$ac_cv_termios_struct" = "yes"; then
4492 echo $ac_n "checking for c_line field in struct termios""... $ac_c" 1>&6
cd0fc7c3 4493echo "configure:4494: checking for c_line field in struct termios" >&5
c906108c
SS
4494 if eval "test \"`echo '$''{'ac_cv_termios_cline'+set}'`\" = set"; then
4495 echo $ac_n "(cached) $ac_c" 1>&6
4496else
4497 cat > conftest.$ac_ext <<EOF
cd0fc7c3 4498#line 4499 "configure"
c906108c
SS
4499#include "confdefs.h"
4500#include <sys/types.h>
4501#include <sys/termios.h>
4502int main() {
4503static struct termios x; x.c_line = 0;
4504; return 0; }
4505EOF
cd0fc7c3 4506if { (eval echo configure:4507: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c
SS
4507 rm -rf conftest*
4508 ac_cv_termios_cline=yes
4509else
4510 echo "configure: failed program was:" >&5
4511 cat conftest.$ac_ext >&5
4512 rm -rf conftest*
4513 ac_cv_termios_cline=no
4514fi
4515rm -f conftest*
4516fi
4517
4518
4519 echo "$ac_t""$ac_cv_termios_cline" 1>&6
4520 if test $ac_cv_termios_cline = yes; then
4521 sim_termio="$sim_termio -DHAVE_TERMIOS_CLINE"
4522 fi
4523else
4524 ac_cv_termios_cline=no
4525fi
4526
4527if test "$ac_cv_termios_struct" != "yes"; then
4528 echo $ac_n "checking for struct termio""... $ac_c" 1>&6
cd0fc7c3 4529echo "configure:4530: checking for struct termio" >&5
c906108c
SS
4530 if eval "test \"`echo '$''{'ac_cv_termio_struct'+set}'`\" = set"; then
4531 echo $ac_n "(cached) $ac_c" 1>&6
4532else
4533 cat > conftest.$ac_ext <<EOF
cd0fc7c3 4534#line 4535 "configure"
c906108c
SS
4535#include "confdefs.h"
4536#include <sys/types.h>
4537#include <sys/termio.h>
4538int main() {
4539static struct termio x;
4540 x.c_iflag = 0;
4541 x.c_oflag = 0;
4542 x.c_cflag = 0;
4543 x.c_lflag = 0;
4544 x.c_cc[NCC] = 0;
4545; return 0; }
4546EOF
cd0fc7c3 4547if { (eval echo configure:4548: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c
SS
4548 rm -rf conftest*
4549 ac_cv_termio_struct=yes
4550else
4551 echo "configure: failed program was:" >&5
4552 cat conftest.$ac_ext >&5
4553 rm -rf conftest*
4554 ac_cv_termio_struct=no
4555fi
4556rm -f conftest*
4557fi
4558
4559 echo "$ac_t""$ac_cv_termio_struct" 1>&6
4560 if test $ac_cv_termio_struct = yes; then
4561 sim_termio="$sim_termio -DHAVE_TERMIO_STRUCTURE"
4562 fi
4563else
4564 ac_cv_termio_struct=no
4565fi
4566
4567if test "$ac_cv_termio_struct" = "yes"; then
4568 echo $ac_n "checking for c_line field in struct termio""... $ac_c" 1>&6
cd0fc7c3 4569echo "configure:4570: checking for c_line field in struct termio" >&5
c906108c
SS
4570 if eval "test \"`echo '$''{'ac_cv_termio_cline'+set}'`\" = set"; then
4571 echo $ac_n "(cached) $ac_c" 1>&6
4572else
4573 cat > conftest.$ac_ext <<EOF
cd0fc7c3 4574#line 4575 "configure"
c906108c
SS
4575#include "confdefs.h"
4576#include <sys/types.h>
4577#include <sys/termio.h>
4578int main() {
4579static struct termio x; x.c_line = 0;
4580; return 0; }
4581EOF
cd0fc7c3 4582if { (eval echo configure:4583: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c
SS
4583 rm -rf conftest*
4584 ac_cv_termio_cline=yes
4585else
4586 echo "configure: failed program was:" >&5
4587 cat conftest.$ac_ext >&5
4588 rm -rf conftest*
4589 ac_cv_termio_cline=no
4590fi
4591rm -f conftest*
4592fi
4593
4594
4595 echo "$ac_t""$ac_cv_termio_cline" 1>&6
4596 if test $ac_cv_termio_cline = yes; then
4597 sim_termio="$sim_termio -DHAVE_TERMIO_CLINE"
4598 fi
4599else
4600 ac_cv_termio_cline=no
4601fi
4602
4603sim_devzero=""
4604echo $ac_n "checking for /dev/zero""... $ac_c" 1>&6
cd0fc7c3 4605echo "configure:4606: checking for /dev/zero" >&5
c906108c
SS
4606if eval "test \"`echo '$''{'ac_cv_devzero'+set}'`\" = set"; then
4607 echo $ac_n "(cached) $ac_c" 1>&6
4608else
4609 if test "$cross_compiling" = yes; then
4610 ac_cv_devzero=no
4611else
4612 cat > conftest.$ac_ext <<EOF
cd0fc7c3 4613#line 4614 "configure"
c906108c
SS
4614#include "confdefs.h"
4615#include <fcntl.h>
4616main () {
4617 char buf[2048];
4618 int i;
4619 int fd = open ("/dev/zero", O_RDONLY);
4620 if (fd < 0)
4621 return 1;
4622 for (i = 0; i < sizeof (buf); i++)
4623 buf[i] = 1;
4624 if (read (fd, buf, sizeof (buf)) != sizeof (buf))
4625 return 1;
4626 for (i = 0; i < sizeof (buf); i++)
4627 if (buf[i])
4628 return 1;
4629 return 0;
4630}
4631EOF
cd0fc7c3 4632if { (eval echo configure:4633: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
c906108c
SS
4633then
4634 ac_cv_devzero=yes
4635else
4636 echo "configure: failed program was:" >&5
4637 cat conftest.$ac_ext >&5
4638 rm -fr conftest*
4639 ac_cv_devzero=no
4640fi
4641rm -fr conftest*
4642fi
4643
4644fi
4645
4646echo "$ac_t""$ac_cv_devzero" 1>&6
4647if test $ac_cv_devzero = yes; then
4648 sim_devzero="-DHAVE_DEVZERO"
4649else
4650 sim_devzero=""
4651fi
4652
4653echo $ac_n "checking for common simulator directory""... $ac_c" 1>&6
cd0fc7c3 4654echo "configure:4655: checking for common simulator directory" >&5
c906108c
SS
4655if test -f "${srcdir}/../common/callback.c"; then
4656 echo "$ac_t""yes" 1>&6
4657 sim_callback="callback.o targ-map.o"
4658 sim_targ_vals="targ-vals.h targ-map.c targ-vals.def"
4659else
4660 echo "$ac_t""no" 1>&6
4661 sim_callback=""
4662 sim_targ_vals=""
4663fi
4664
cd0fc7c3
SS
4665echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
4666echo "configure:4667: checking for Cygwin environment" >&5
4667if eval "test \"`echo '$''{'ac_cv_cygwin'+set}'`\" = set"; then
c906108c
SS
4668 echo $ac_n "(cached) $ac_c" 1>&6
4669else
cd0fc7c3
SS
4670 cat > conftest.$ac_ext <<EOF
4671#line 4672 "configure"
4672#include "confdefs.h"
4673
4674int main() {
4675
4676#ifndef __CYGWIN__
4677#define __CYGWIN__ __CYGWIN32__
4678#endif
4679return __CYGWIN__;
4680; return 0; }
4681EOF
4682if { (eval echo configure:4683: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4683 rm -rf conftest*
4684 ac_cv_cygwin=yes
c906108c 4685else
cd0fc7c3
SS
4686 echo "configure: failed program was:" >&5
4687 cat conftest.$ac_ext >&5
4688 rm -rf conftest*
4689 ac_cv_cygwin=no
4690fi
4691rm -f conftest*
4692rm -f conftest*
4693fi
4694
4695echo "$ac_t""$ac_cv_cygwin" 1>&6
4696CYGWIN=
4697test "$ac_cv_cygwin" = yes && CYGWIN=yes
4698echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
4699echo "configure:4700: checking for mingw32 environment" >&5
4700if eval "test \"`echo '$''{'ac_cv_mingw32'+set}'`\" = set"; then
4701 echo $ac_n "(cached) $ac_c" 1>&6
4702else
4703 cat > conftest.$ac_ext <<EOF
4704#line 4705 "configure"
4705#include "confdefs.h"
4706
c906108c 4707int main() {
cd0fc7c3
SS
4708return __MINGW32__;
4709; return 0; }
c906108c 4710EOF
cd0fc7c3
SS
4711if { (eval echo configure:4712: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4712 rm -rf conftest*
4713 ac_cv_mingw32=yes
4714else
4715 echo "configure: failed program was:" >&5
4716 cat conftest.$ac_ext >&5
4717 rm -rf conftest*
4718 ac_cv_mingw32=no
c906108c 4719fi
cd0fc7c3
SS
4720rm -f conftest*
4721rm -f conftest*
4722fi
4723
4724echo "$ac_t""$ac_cv_mingw32" 1>&6
4725MINGW32=
4726test "$ac_cv_mingw32" = yes && MINGW32=yes
c906108c 4727
cd0fc7c3
SS
4728
4729echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
4730echo "configure:4731: checking for executable suffix" >&5
4731if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then
4732 echo $ac_n "(cached) $ac_c" 1>&6
4733else
4734 if test "$CYGWIN" = yes || test "$MINGW32" = yes; then
4735 ac_cv_exeext=.exe
4736else
4737 rm -f conftest*
4738 echo 'int main () { return 0; }' > conftest.$ac_ext
4739 ac_cv_exeext=
4740 if { (eval echo configure:4741: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
4741 for file in conftest.*; do
4742 case $file in
4743 *.c | *.o | *.obj | *.ilk | *.pdb) ;;
4744 *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
4745 esac
4746 done
4747 else
4748 { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
4749 fi
4750 rm -f conftest*
4751 test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
4752fi
c906108c 4753fi
cd0fc7c3 4754
c906108c 4755EXEEXT=""
cd0fc7c3
SS
4756test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
4757echo "$ac_t""${ac_cv_exeext}" 1>&6
4758ac_exeext=$EXEEXT
c906108c
SS
4759
4760
4761
4762
4763
4764AR=${AR-ar}
4765
4766# Extract the first word of "ranlib", so it can be a program name with args.
4767set dummy ranlib; ac_word=$2
4768echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
cd0fc7c3 4769echo "configure:4770: checking for $ac_word" >&5
c906108c
SS
4770if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
4771 echo $ac_n "(cached) $ac_c" 1>&6
4772else
4773 if test -n "$RANLIB"; then
4774 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
4775else
4776 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
cd0fc7c3
SS
4777 ac_dummy="$PATH"
4778 for ac_dir in $ac_dummy; do
c906108c
SS
4779 test -z "$ac_dir" && ac_dir=.
4780 if test -f $ac_dir/$ac_word; then
4781 ac_cv_prog_RANLIB="ranlib"
4782 break
4783 fi
4784 done
4785 IFS="$ac_save_ifs"
4786 test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
4787fi
4788fi
4789RANLIB="$ac_cv_prog_RANLIB"
4790if test -n "$RANLIB"; then
4791 echo "$ac_t""$RANLIB" 1>&6
4792else
4793 echo "$ac_t""no" 1>&6
4794fi
4795
4796
4797
4798
4799
4800
4801
4802
4803
4804
4805
4806
4807
4808
4809
4810
4811
4812
4813
4814
4815
4816
4817
4818
4819
4820
4821
4822
4823
4824
4825
4826
4827
4828
4829
4830
4831
4832
4833
4834
4835
4836
4837
4838
4839trap '' 1 2 15
4840cat > confcache <<\EOF
4841# This file is a shell script that caches the results of configure
4842# tests run on this system so they can be shared between configure
4843# scripts and configure runs. It is not useful on other systems.
4844# If it contains results you don't want to keep, you may remove or edit it.
4845#
4846# By default, configure uses ./config.cache as the cache file,
4847# creating it if it does not exist already. You can give configure
4848# the --cache-file=FILE option to use a different cache file; that is
4849# what configure does when it calls configure scripts in
4850# subdirectories, so they share the cache.
4851# Giving --cache-file=/dev/null disables caching, for debugging configure.
4852# config.status only pays attention to the cache file if you give it the
4853# --recheck option to rerun configure.
4854#
4855EOF
4856# The following way of writing the cache mishandles newlines in values,
4857# but we know of no workaround that is simple, portable, and efficient.
4858# So, don't put newlines in cache variables' values.
4859# Ultrix sh set writes to stderr and can't be redirected directly,
4860# and sets the high bit in the cache file unless we assign to the vars.
4861(set) 2>&1 |
cd0fc7c3 4862 case `(ac_space=' '; set | grep ac_space) 2>&1` in
c906108c
SS
4863 *ac_space=\ *)
4864 # `set' does not quote correctly, so add quotes (double-quote substitution
4865 # turns \\\\ into \\, and sed turns \\ into \).
4866 sed -n \
4867 -e "s/'/'\\\\''/g" \
4868 -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
4869 ;;
4870 *)
4871 # `set' quotes correctly as required by POSIX, so do not add quotes.
4872 sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
4873 ;;
4874 esac >> confcache
4875if cmp -s $cache_file confcache; then
4876 :
4877else
4878 if test -w $cache_file; then
4879 echo "updating cache $cache_file"
4880 cat confcache > $cache_file
4881 else
4882 echo "not updating unwritable cache $cache_file"
4883 fi
4884fi
4885rm -f confcache
4886
4887trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
4888
4889test "x$prefix" = xNONE && prefix=$ac_default_prefix
4890# Let make expand exec_prefix.
4891test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
4892
4893# Any assignment to VPATH causes Sun make to only execute
4894# the first set of double-colon rules, so remove it if not needed.
4895# If there is a colon in the path, we need to keep it.
4896if test "x$srcdir" = x.; then
4897 ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d'
4898fi
4899
4900trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
4901
4902DEFS=-DHAVE_CONFIG_H
4903
4904# Without the "./", some shells look in PATH for config.status.
4905: ${CONFIG_STATUS=./config.status}
4906
4907echo creating $CONFIG_STATUS
4908rm -f $CONFIG_STATUS
4909cat > $CONFIG_STATUS <<EOF
4910#! /bin/sh
4911# Generated automatically by configure.
4912# Run this file to recreate the current configuration.
4913# This directory was configured as follows,
4914# on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
4915#
4916# $0 $ac_configure_args
4917#
4918# Compiler output produced by configure, useful for debugging
4919# configure, is in ./config.log if it exists.
4920
4921ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
4922for ac_option
4923do
4924 case "\$ac_option" in
4925 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
4926 echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
4927 exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
4928 -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
cd0fc7c3 4929 echo "$CONFIG_STATUS generated by autoconf version 2.13"
c906108c
SS
4930 exit 0 ;;
4931 -help | --help | --hel | --he | --h)
4932 echo "\$ac_cs_usage"; exit 0 ;;
4933 *) echo "\$ac_cs_usage"; exit 1 ;;
4934 esac
4935done
4936
4937ac_given_srcdir=$srcdir
4938ac_given_INSTALL="$INSTALL"
4939
4940trap 'rm -fr `echo "Makefile config.h:config.in" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
4941EOF
4942cat >> $CONFIG_STATUS <<EOF
4943
4944# Protect against being on the right side of a sed subst in config.status.
4945sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
4946 s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
4947$ac_vpsub
4948$extrasub
4949s%@sim_environment@%$sim_environment%g
4950s%@sim_alignment@%$sim_alignment%g
4951s%@sim_assert@%$sim_assert%g
4952s%@sim_bitsize@%$sim_bitsize%g
4953s%@sim_endian@%$sim_endian%g
4954s%@sim_hostendian@%$sim_hostendian%g
4955s%@sim_float@%$sim_float%g
4956s%@sim_scache@%$sim_scache%g
4957s%@sim_default_model@%$sim_default_model%g
4958s%@sim_hw_cflags@%$sim_hw_cflags%g
4959s%@sim_hw_objs@%$sim_hw_objs%g
4960s%@sim_hw@%$sim_hw%g
4961s%@sim_inline@%$sim_inline%g
4962s%@sim_packages@%$sim_packages%g
4963s%@sim_regparm@%$sim_regparm%g
4964s%@sim_reserved_bits@%$sim_reserved_bits%g
4965s%@sim_smp@%$sim_smp%g
4966s%@sim_stdcall@%$sim_stdcall%g
4967s%@sim_xor_endian@%$sim_xor_endian%g
4968s%@build_warnings@%$build_warnings%g
4969s%@SHELL@%$SHELL%g
4970s%@CFLAGS@%$CFLAGS%g
4971s%@CPPFLAGS@%$CPPFLAGS%g
4972s%@CXXFLAGS@%$CXXFLAGS%g
cd0fc7c3 4973s%@FFLAGS@%$FFLAGS%g
c906108c
SS
4974s%@DEFS@%$DEFS%g
4975s%@LDFLAGS@%$LDFLAGS%g
4976s%@LIBS@%$LIBS%g
4977s%@exec_prefix@%$exec_prefix%g
4978s%@prefix@%$prefix%g
4979s%@program_transform_name@%$program_transform_name%g
4980s%@bindir@%$bindir%g
4981s%@sbindir@%$sbindir%g
4982s%@libexecdir@%$libexecdir%g
4983s%@datadir@%$datadir%g
4984s%@sysconfdir@%$sysconfdir%g
4985s%@sharedstatedir@%$sharedstatedir%g
4986s%@localstatedir@%$localstatedir%g
4987s%@libdir@%$libdir%g
4988s%@includedir@%$includedir%g
4989s%@oldincludedir@%$oldincludedir%g
4990s%@infodir@%$infodir%g
4991s%@mandir@%$mandir%g
4992s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
cd0fc7c3 4993s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
c906108c
SS
4994s%@INSTALL_DATA@%$INSTALL_DATA%g
4995s%@CC@%$CC%g
4996s%@SET_MAKE@%$SET_MAKE%g
4997s%@RANLIB@%$RANLIB%g
4998s%@CPP@%$CPP%g
4999s%@ALLOCA@%$ALLOCA%g
5000s%@USE_NLS@%$USE_NLS%g
5001s%@MSGFMT@%$MSGFMT%g
5002s%@GMSGFMT@%$GMSGFMT%g
5003s%@XGETTEXT@%$XGETTEXT%g
5004s%@USE_INCLUDED_LIBINTL@%$USE_INCLUDED_LIBINTL%g
5005s%@CATALOGS@%$CATALOGS%g
5006s%@CATOBJEXT@%$CATOBJEXT%g
5007s%@DATADIRNAME@%$DATADIRNAME%g
5008s%@GMOFILES@%$GMOFILES%g
5009s%@INSTOBJEXT@%$INSTOBJEXT%g
5010s%@INTLDEPS@%$INTLDEPS%g
5011s%@INTLLIBS@%$INTLLIBS%g
5012s%@INTLOBJS@%$INTLOBJS%g
5013s%@POFILES@%$POFILES%g
5014s%@POSUB@%$POSUB%g
5015s%@INCLUDE_LOCALE_H@%$INCLUDE_LOCALE_H%g
5016s%@GT_NO@%$GT_NO%g
5017s%@GT_YES@%$GT_YES%g
5018s%@MKINSTALLDIRS@%$MKINSTALLDIRS%g
5019s%@l@%$l%g
5020s%@host@%$host%g
5021s%@host_alias@%$host_alias%g
5022s%@host_cpu@%$host_cpu%g
5023s%@host_vendor@%$host_vendor%g
5024s%@host_os@%$host_os%g
5025s%@target@%$target%g
5026s%@target_alias@%$target_alias%g
5027s%@target_cpu@%$target_cpu%g
5028s%@target_vendor@%$target_vendor%g
5029s%@target_os@%$target_os%g
5030s%@build@%$build%g
5031s%@build_alias@%$build_alias%g
5032s%@build_cpu@%$build_cpu%g
5033s%@build_vendor@%$build_vendor%g
5034s%@build_os@%$build_os%g
5035s%@LIBOBJS@%$LIBOBJS%g
5036s%@EXEEXT@%$EXEEXT%g
5037s%@CC_FOR_BUILD@%$CC_FOR_BUILD%g
5038s%@HDEFINES@%$HDEFINES%g
5039s%@AR@%$AR%g
5040s%@sim_cflags@%$sim_cflags%g
5041s%@sim_warnings@%$sim_warnings%g
5042s%@sim_line_nr@%$sim_line_nr%g
5043s%@sim_config@%$sim_config%g
5044s%@sim_opcode@%$sim_opcode%g
5045s%@sim_switch@%$sim_switch%g
5046s%@sim_dup@%$sim_dup%g
5047s%@sim_decode_mechanism@%$sim_decode_mechanism%g
5048s%@sim_jump@%$sim_jump%g
5049s%@sim_filter@%$sim_filter%g
5050s%@sim_icache@%$sim_icache%g
5051s%@sim_hw_src@%$sim_hw_src%g
5052s%@sim_hw_obj@%$sim_hw_obj%g
5053s%@sim_pk_src@%$sim_pk_src%g
5054s%@sim_pk_obj@%$sim_pk_obj%g
5055s%@sim_bswap@%$sim_bswap%g
5056s%@sim_igen_smp@%$sim_igen_smp%g
5057s%@sim_hostbitsize@%$sim_hostbitsize%g
5058s%@sim_env@%$sim_env%g
5059s%@sim_timebase@%$sim_timebase%g
5060s%@sim_trace@%$sim_trace%g
5061s%@sim_reserved@%$sim_reserved%g
5062s%@sim_monitor@%$sim_monitor%g
5063s%@sim_model@%$sim_model%g
5064s%@sim_model_issue@%$sim_model_issue%g
5065s%@sim_stdio@%$sim_stdio%g
5066s%@sim_termio@%$sim_termio%g
5067s%@sim_devzero@%$sim_devzero%g
5068s%@sim_callback@%$sim_callback%g
5069s%@sim_targ_vals@%$sim_targ_vals%g
5070
5071CEOF
5072EOF
5073
5074cat >> $CONFIG_STATUS <<\EOF
5075
5076# Split the substitutions into bite-sized pieces for seds with
5077# small command number limits, like on Digital OSF/1 and HP-UX.
5078ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
5079ac_file=1 # Number of current file.
5080ac_beg=1 # First line for current file.
5081ac_end=$ac_max_sed_cmds # Line after last line for current file.
5082ac_more_lines=:
5083ac_sed_cmds=""
5084while $ac_more_lines; do
5085 if test $ac_beg -gt 1; then
5086 sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
5087 else
5088 sed "${ac_end}q" conftest.subs > conftest.s$ac_file
5089 fi
5090 if test ! -s conftest.s$ac_file; then
5091 ac_more_lines=false
5092 rm -f conftest.s$ac_file
5093 else
5094 if test -z "$ac_sed_cmds"; then
5095 ac_sed_cmds="sed -f conftest.s$ac_file"
5096 else
5097 ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
5098 fi
5099 ac_file=`expr $ac_file + 1`
5100 ac_beg=$ac_end
5101 ac_end=`expr $ac_end + $ac_max_sed_cmds`
5102 fi
5103done
5104if test -z "$ac_sed_cmds"; then
5105 ac_sed_cmds=cat
5106fi
5107EOF
5108
5109cat >> $CONFIG_STATUS <<EOF
5110
5111CONFIG_FILES=\${CONFIG_FILES-"Makefile"}
5112EOF
5113cat >> $CONFIG_STATUS <<\EOF
5114for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
5115 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
5116 case "$ac_file" in
5117 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
5118 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
5119 *) ac_file_in="${ac_file}.in" ;;
5120 esac
5121
5122 # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
5123
5124 # Remove last slash and all that follows it. Not all systems have dirname.
5125 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
5126 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
5127 # The file is in a subdirectory.
5128 test ! -d "$ac_dir" && mkdir "$ac_dir"
5129 ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
5130 # A "../" for each directory in $ac_dir_suffix.
5131 ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
5132 else
5133 ac_dir_suffix= ac_dots=
5134 fi
5135
5136 case "$ac_given_srcdir" in
5137 .) srcdir=.
5138 if test -z "$ac_dots"; then top_srcdir=.
5139 else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
5140 /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
5141 *) # Relative path.
5142 srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
5143 top_srcdir="$ac_dots$ac_given_srcdir" ;;
5144 esac
5145
5146 case "$ac_given_INSTALL" in
5147 [/$]*) INSTALL="$ac_given_INSTALL" ;;
5148 *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
5149 esac
5150
5151 echo creating "$ac_file"
5152 rm -f "$ac_file"
5153 configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
5154 case "$ac_file" in
5155 *Makefile*) ac_comsub="1i\\
5156# $configure_input" ;;
5157 *) ac_comsub= ;;
5158 esac
5159
5160 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
5161 sed -e "$ac_comsub
5162s%@configure_input@%$configure_input%g
5163s%@srcdir@%$srcdir%g
5164s%@top_srcdir@%$top_srcdir%g
5165s%@INSTALL@%$INSTALL%g
5166" $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
5167fi; done
5168rm -f conftest.s*
5169
5170# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
5171# NAME is the cpp macro being defined and VALUE is the value it is being given.
5172#
5173# ac_d sets the value in "#define NAME VALUE" lines.
5174ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)'
5175ac_dB='\([ ][ ]*\)[^ ]*%\1#\2'
5176ac_dC='\3'
5177ac_dD='%g'
5178# ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
5179ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
5180ac_uB='\([ ]\)%\1#\2define\3'
5181ac_uC=' '
5182ac_uD='\4%g'
5183# ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
5184ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
5185ac_eB='$%\1#\2define\3'
5186ac_eC=' '
5187ac_eD='%g'
5188
5189if test "${CONFIG_HEADERS+set}" != set; then
5190EOF
5191cat >> $CONFIG_STATUS <<EOF
5192 CONFIG_HEADERS="config.h:config.in"
5193EOF
5194cat >> $CONFIG_STATUS <<\EOF
5195fi
5196for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
5197 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
5198 case "$ac_file" in
5199 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
5200 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
5201 *) ac_file_in="${ac_file}.in" ;;
5202 esac
5203
5204 echo creating $ac_file
5205
5206 rm -f conftest.frag conftest.in conftest.out
5207 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
5208 cat $ac_file_inputs > conftest.in
5209
5210EOF
5211
5212# Transform confdefs.h into a sed script conftest.vals that substitutes
5213# the proper values into config.h.in to produce config.h. And first:
5214# Protect against being on the right side of a sed subst in config.status.
5215# Protect against being in an unquoted here document in config.status.
5216rm -f conftest.vals
5217cat > conftest.hdr <<\EOF
5218s/[\\&%]/\\&/g
5219s%[\\$`]%\\&%g
5220s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
5221s%ac_d%ac_u%gp
5222s%ac_u%ac_e%gp
5223EOF
5224sed -n -f conftest.hdr confdefs.h > conftest.vals
5225rm -f conftest.hdr
5226
5227# This sed command replaces #undef with comments. This is necessary, for
5228# example, in the case of _POSIX_SOURCE, which is predefined and required
5229# on some systems where configure will not decide to define it.
5230cat >> conftest.vals <<\EOF
5231s%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
5232EOF
5233
5234# Break up conftest.vals because some shells have a limit on
5235# the size of here documents, and old seds have small limits too.
5236
5237rm -f conftest.tail
5238while :
5239do
5240 ac_lines=`grep -c . conftest.vals`
5241 # grep -c gives empty output for an empty file on some AIX systems.
5242 if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
5243 # Write a limited-size here document to conftest.frag.
5244 echo ' cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
5245 sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
5246 echo 'CEOF
5247 sed -f conftest.frag conftest.in > conftest.out
5248 rm -f conftest.in
5249 mv conftest.out conftest.in
5250' >> $CONFIG_STATUS
5251 sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
5252 rm -f conftest.vals
5253 mv conftest.tail conftest.vals
5254done
5255rm -f conftest.vals
5256
5257cat >> $CONFIG_STATUS <<\EOF
5258 rm -f conftest.frag conftest.h
5259 echo "/* $ac_file. Generated automatically by configure. */" > conftest.h
5260 cat conftest.in >> conftest.h
5261 rm -f conftest.in
5262 if cmp -s $ac_file conftest.h 2>/dev/null; then
5263 echo "$ac_file is unchanged"
5264 rm -f conftest.h
5265 else
5266 # Remove last slash and all that follows it. Not all systems have dirname.
5267 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
5268 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
5269 # The file is in a subdirectory.
5270 test ! -d "$ac_dir" && mkdir "$ac_dir"
5271 fi
5272 rm -f $ac_file
5273 mv conftest.h $ac_file
5274 fi
5275fi; done
5276
5277EOF
5278cat >> $CONFIG_STATUS <<EOF
5279
5280EOF
5281cat >> $CONFIG_STATUS <<\EOF
5282case x$CONFIG_HEADERS in xconfig.h:config.in) echo > stamp-h ;; esac
5283exit 0
5284EOF
5285chmod +x $CONFIG_STATUS
5286rm -fr confdefs* $ac_clean_files
5287test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
5288