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