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