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