OSDN Git Service

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