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