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.
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.
98 # Search path for a program which passes the given test.
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.
110 # Check whether LC_MESSAGES is available in <locale.h>.
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.
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 # Guess values for system-dependent variables and create Makefiles.
136 # Generated automatically using autoconf version 2.12.2
137 # Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
139 # This configure script is free software; the Free Software Foundation
140 # gives unlimited permission to copy, distribute and modify it.
144 ac_default_prefix=/usr/local
145 # Any additions from configure.in:
147 --disable-nls do not use Native Language Support"
149 --with-included-gettext use the GNU gettext library included here"
151 --enable-maintainer-mode Enable developer functionality."
153 --enable-sim-bswap Use Host specific BSWAP instruction."
155 --enable-sim-cflags=opts Extra CFLAGS for use in building simulator"
157 --enable-sim-debug=opts Enable debugging flags"
159 --enable-sim-stdio Specify whether to use stdio for console input/output."
161 --enable-sim-trace=opts Enable tracing flags"
163 --enable-sim-profile=opts Enable profiling flags"
165 --enable-sim-endian=endian Specify target byte endian orientation."
167 --enable-sim-alignment=align Specify strict, nonstrict or forced alignment of memory accesses."
169 --enable-sim-hostendian=end Specify host byte endian orientation."
171 --enable-build-warnings[=LIST] Enable build-time compiler warnings"
173 --enable-sim-reserved-bits Specify whether to check reserved bits in instruction."
175 --enable-sim-bitsize=N Specify target bitsize (32 or 64)."
177 # Initialize some variables set by options.
178 # The variables have the same names as the options, with
179 # dashes changed to underlines.
181 cache_file=./config.cache
190 program_transform_name=s,x,x,
198 bindir='${exec_prefix}/bin'
199 sbindir='${exec_prefix}/sbin'
200 libexecdir='${exec_prefix}/libexec'
201 datadir='${prefix}/share'
202 sysconfdir='${prefix}/etc'
203 sharedstatedir='${prefix}/com'
204 localstatedir='${prefix}/var'
205 libdir='${exec_prefix}/lib'
206 includedir='${prefix}/include'
207 oldincludedir='/usr/include'
208 infodir='${prefix}/info'
209 mandir='${prefix}/man'
211 # Initialize some other variables.
214 SHELL=${CONFIG_SHELL-/bin/sh}
215 # Maximum number of lines to put in a shell here document.
222 # If the previous option needs an argument, assign it.
223 if test -n "$ac_prev"; then
224 eval "$ac_prev=\$ac_option"
230 -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
234 # Accept the important Cygnus configure options, so we can diagnose typos.
238 -bindir | --bindir | --bindi | --bind | --bin | --bi)
240 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
241 bindir="$ac_optarg" ;;
243 -build | --build | --buil | --bui | --bu)
245 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
246 build="$ac_optarg" ;;
248 -cache-file | --cache-file | --cache-fil | --cache-fi \
249 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
250 ac_prev=cache_file ;;
251 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
252 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
253 cache_file="$ac_optarg" ;;
255 -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
257 -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
259 datadir="$ac_optarg" ;;
261 -disable-* | --disable-*)
262 ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
263 # Reject names that are not valid shell variable names.
264 if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
265 { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
267 ac_feature=`echo $ac_feature| sed 's/-/_/g'`
268 eval "enable_${ac_feature}=no" ;;
270 -enable-* | --enable-*)
271 ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
272 # Reject names that are not valid shell variable names.
273 if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
274 { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
276 ac_feature=`echo $ac_feature| sed 's/-/_/g'`
281 eval "enable_${ac_feature}='$ac_optarg'" ;;
283 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
284 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
285 | --exec | --exe | --ex)
286 ac_prev=exec_prefix ;;
287 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
288 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
289 | --exec=* | --exe=* | --ex=*)
290 exec_prefix="$ac_optarg" ;;
292 -gas | --gas | --ga | --g)
293 # Obsolete; use --with-gas.
296 -help | --help | --hel | --he)
297 # Omit some internal or obsolete options to make the list less imposing.
298 # This message is too long to be a string in the A/UX 3.1 sh.
300 Usage: configure [options] [host]
301 Options: [defaults in brackets after descriptions]
303 --cache-file=FILE cache test results in FILE
304 --help print this message
305 --no-create do not create output files
306 --quiet, --silent do not print \`checking...' messages
307 --version print the version of autoconf that created configure
308 Directory and file names:
309 --prefix=PREFIX install architecture-independent files in PREFIX
311 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
313 --bindir=DIR user executables in DIR [EPREFIX/bin]
314 --sbindir=DIR system admin executables in DIR [EPREFIX/sbin]
315 --libexecdir=DIR program executables in DIR [EPREFIX/libexec]
316 --datadir=DIR read-only architecture-independent data in DIR
318 --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc]
319 --sharedstatedir=DIR modifiable architecture-independent data in DIR
321 --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var]
322 --libdir=DIR object code libraries in DIR [EPREFIX/lib]
323 --includedir=DIR C header files in DIR [PREFIX/include]
324 --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include]
325 --infodir=DIR info documentation in DIR [PREFIX/info]
326 --mandir=DIR man documentation in DIR [PREFIX/man]
327 --srcdir=DIR find the sources in DIR [configure dir or ..]
328 --program-prefix=PREFIX prepend PREFIX to installed program names
329 --program-suffix=SUFFIX append SUFFIX to installed program names
330 --program-transform-name=PROGRAM
331 run sed PROGRAM on installed program names
335 --build=BUILD configure for building on BUILD [BUILD=HOST]
336 --host=HOST configure for HOST [guessed]
337 --target=TARGET configure for TARGET [TARGET=HOST]
338 Features and packages:
339 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
340 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
341 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
342 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
343 --x-includes=DIR X include files are in DIR
344 --x-libraries=DIR X library files are in DIR
346 if test -n "$ac_help"; then
347 echo "--enable and --with options recognized:$ac_help"
351 -host | --host | --hos | --ho)
353 -host=* | --host=* | --hos=* | --ho=*)
356 -includedir | --includedir | --includedi | --included | --include \
357 | --includ | --inclu | --incl | --inc)
358 ac_prev=includedir ;;
359 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
360 | --includ=* | --inclu=* | --incl=* | --inc=*)
361 includedir="$ac_optarg" ;;
363 -infodir | --infodir | --infodi | --infod | --info | --inf)
365 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
366 infodir="$ac_optarg" ;;
368 -libdir | --libdir | --libdi | --libd)
370 -libdir=* | --libdir=* | --libdi=* | --libd=*)
371 libdir="$ac_optarg" ;;
373 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
374 | --libexe | --libex | --libe)
375 ac_prev=libexecdir ;;
376 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
377 | --libexe=* | --libex=* | --libe=*)
378 libexecdir="$ac_optarg" ;;
380 -localstatedir | --localstatedir | --localstatedi | --localstated \
381 | --localstate | --localstat | --localsta | --localst \
382 | --locals | --local | --loca | --loc | --lo)
383 ac_prev=localstatedir ;;
384 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
385 | --localstate=* | --localstat=* | --localsta=* | --localst=* \
386 | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
387 localstatedir="$ac_optarg" ;;
389 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
391 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
392 mandir="$ac_optarg" ;;
395 # Obsolete; use --without-fp.
398 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
402 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
403 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
406 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
407 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
408 | --oldin | --oldi | --old | --ol | --o)
409 ac_prev=oldincludedir ;;
410 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
411 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
412 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
413 oldincludedir="$ac_optarg" ;;
415 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
417 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
418 prefix="$ac_optarg" ;;
420 -program-prefix | --program-prefix | --program-prefi | --program-pref \
421 | --program-pre | --program-pr | --program-p)
422 ac_prev=program_prefix ;;
423 -program-prefix=* | --program-prefix=* | --program-prefi=* \
424 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
425 program_prefix="$ac_optarg" ;;
427 -program-suffix | --program-suffix | --program-suffi | --program-suff \
428 | --program-suf | --program-su | --program-s)
429 ac_prev=program_suffix ;;
430 -program-suffix=* | --program-suffix=* | --program-suffi=* \
431 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
432 program_suffix="$ac_optarg" ;;
434 -program-transform-name | --program-transform-name \
435 | --program-transform-nam | --program-transform-na \
436 | --program-transform-n | --program-transform- \
437 | --program-transform | --program-transfor \
438 | --program-transfo | --program-transf \
439 | --program-trans | --program-tran \
440 | --progr-tra | --program-tr | --program-t)
441 ac_prev=program_transform_name ;;
442 -program-transform-name=* | --program-transform-name=* \
443 | --program-transform-nam=* | --program-transform-na=* \
444 | --program-transform-n=* | --program-transform-=* \
445 | --program-transform=* | --program-transfor=* \
446 | --program-transfo=* | --program-transf=* \
447 | --program-trans=* | --program-tran=* \
448 | --progr-tra=* | --program-tr=* | --program-t=*)
449 program_transform_name="$ac_optarg" ;;
451 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
452 | -silent | --silent | --silen | --sile | --sil)
455 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
457 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
459 sbindir="$ac_optarg" ;;
461 -sharedstatedir | --sharedstatedir | --sharedstatedi \
462 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
463 | --sharedst | --shareds | --shared | --share | --shar \
465 ac_prev=sharedstatedir ;;
466 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
467 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
468 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
470 sharedstatedir="$ac_optarg" ;;
472 -site | --site | --sit)
474 -site=* | --site=* | --sit=*)
477 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
479 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
480 srcdir="$ac_optarg" ;;
482 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
483 | --syscon | --sysco | --sysc | --sys | --sy)
484 ac_prev=sysconfdir ;;
485 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
486 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
487 sysconfdir="$ac_optarg" ;;
489 -target | --target | --targe | --targ | --tar | --ta | --t)
491 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
492 target="$ac_optarg" ;;
494 -v | -verbose | --verbose | --verbos | --verbo | --verb)
497 -version | --version | --versio | --versi | --vers)
498 echo "configure generated by autoconf version 2.12.2"
502 ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
503 # Reject names that are not valid shell variable names.
504 if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
505 { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
507 ac_package=`echo $ac_package| sed 's/-/_/g'`
512 eval "with_${ac_package}='$ac_optarg'" ;;
514 -without-* | --without-*)
515 ac_package=`echo $ac_option|sed -e 's/-*without-//'`
516 # Reject names that are not valid shell variable names.
517 if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
518 { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
520 ac_package=`echo $ac_package| sed 's/-/_/g'`
521 eval "with_${ac_package}=no" ;;
524 # Obsolete; use --with-x.
527 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
528 | --x-incl | --x-inc | --x-in | --x-i)
529 ac_prev=x_includes ;;
530 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
531 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
532 x_includes="$ac_optarg" ;;
534 -x-libraries | --x-libraries | --x-librarie | --x-librari \
535 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
536 ac_prev=x_libraries ;;
537 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
538 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
539 x_libraries="$ac_optarg" ;;
541 -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
545 if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
546 echo "configure: warning: $ac_option: invalid host type" 1>&2
548 if test "x$nonopt" != xNONE; then
549 { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
557 if test -n "$ac_prev"; then
558 { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
561 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
563 # File descriptor usage:
566 # 2 errors and warnings
567 # 3 some systems may open it to /dev/tty
568 # 4 used on the Kubota Titan
569 # 6 checking for... messages and results
570 # 5 compiler messages saved in config.log
571 if test "$silent" = yes; then
579 This file contains any messages produced by compilers while
580 running configure, to aid debugging if configure makes a mistake.
583 # Strip out --no-create and --no-recursion so they do not pile up.
584 # Also quote any args containing shell metacharacters.
589 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
590 | --no-cr | --no-c) ;;
591 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
592 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
593 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
594 ac_configure_args="$ac_configure_args '$ac_arg'" ;;
595 *) ac_configure_args="$ac_configure_args $ac_arg" ;;
600 # Only set these to C if already set. These must not be set unconditionally
601 # because not all systems understand e.g. LANG=C (notably SCO).
602 # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
603 # Non-C LC_CTYPE values break the ctype check.
604 if test "${LANG+set}" = set; then LANG=C; export LANG; fi
605 if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
606 if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
607 if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi
609 # confdefs.h avoids OS command line length limits that DEFS can exceed.
610 rm -rf conftest* confdefs.h
611 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
614 # A filename unique to this package, relative to the directory that
615 # configure is in, which we can look for to find out if srcdir is correct.
616 ac_unique_file=Makefile.in
618 # Find the source files, if location was not specified.
619 if test -z "$srcdir"; then
620 ac_srcdir_defaulted=yes
621 # Try the directory containing this script, then its parent.
623 ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
624 test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
626 if test ! -r $srcdir/$ac_unique_file; then
630 ac_srcdir_defaulted=no
632 if test ! -r $srcdir/$ac_unique_file; then
633 if test "$ac_srcdir_defaulted" = yes; then
634 { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
636 { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
639 srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
641 # Prefer explicitly selected file to automatically selected ones.
642 if test -z "$CONFIG_SITE"; then
643 if test "x$prefix" != xNONE; then
644 CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
646 CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
649 for ac_site_file in $CONFIG_SITE; do
650 if test -r "$ac_site_file"; then
651 echo "loading site script $ac_site_file"
656 if test -r "$cache_file"; then
657 echo "loading cache $cache_file"
660 echo "creating cache $cache_file"
665 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
666 ac_cpp='$CPP $CPPFLAGS'
667 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
668 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
669 cross_compiling=$ac_cv_prog_cc_cross
673 if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
675 if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
682 ac_n= ac_c='\c' ac_t=
687 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
688 echo "configure:689: checking how to run the C preprocessor" >&5
689 # On Suns, sometimes $CPP names a directory.
690 if test -n "$CPP" && test -d "$CPP"; then
693 if test -z "$CPP"; then
694 if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
695 echo $ac_n "(cached) $ac_c" 1>&6
697 # This must be in double quotes, not single quotes, because CPP may get
698 # substituted into the Makefile and "${CC-cc}" will confuse make.
700 # On the NeXT, cc -E runs the code through the compiler's parser,
701 # not just through cpp.
702 cat > conftest.$ac_ext <<EOF
703 #line 704 "configure"
704 #include "confdefs.h"
708 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
709 { (eval echo configure:710: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
710 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
711 if test -z "$ac_err"; then
715 echo "configure: failed program was:" >&5
716 cat conftest.$ac_ext >&5
718 CPP="${CC-cc} -E -traditional-cpp"
719 cat > conftest.$ac_ext <<EOF
720 #line 721 "configure"
721 #include "confdefs.h"
725 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
726 { (eval echo configure:727: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
727 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
728 if test -z "$ac_err"; then
732 echo "configure: failed program was:" >&5
733 cat conftest.$ac_ext >&5
735 CPP="${CC-cc} -nologo -E"
736 cat > conftest.$ac_ext <<EOF
737 #line 738 "configure"
738 #include "confdefs.h"
742 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
743 { (eval echo configure:744: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
744 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
745 if test -z "$ac_err"; then
749 echo "configure: failed program was:" >&5
750 cat conftest.$ac_ext >&5
759 ac_cv_prog_CPP="$CPP"
761 CPP="$ac_cv_prog_CPP"
763 ac_cv_prog_CPP="$CPP"
765 echo "$ac_t""$CPP" 1>&6
767 echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
768 echo "configure:769: checking whether ${MAKE-make} sets \${MAKE}" >&5
769 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
770 if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
771 echo $ac_n "(cached) $ac_c" 1>&6
773 cat > conftestmake <<\EOF
775 @echo 'ac_maketemp="${MAKE}"'
777 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
778 eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
779 if test -n "$ac_maketemp"; then
780 eval ac_cv_prog_make_${ac_make}_set=yes
782 eval ac_cv_prog_make_${ac_make}_set=no
786 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
787 echo "$ac_t""yes" 1>&6
790 echo "$ac_t""no" 1>&6
791 SET_MAKE="MAKE=${MAKE-make}"
794 echo $ac_n "checking for POSIXized ISC""... $ac_c" 1>&6
795 echo "configure:796: checking for POSIXized ISC" >&5
796 if test -d /etc/conf/kconfig.d &&
797 grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1
799 echo "$ac_t""yes" 1>&6
800 ISC=yes # If later tests want to check for ISC.
801 cat >> confdefs.h <<\EOF
802 #define _POSIX_SOURCE 1
805 if test "$GCC" = yes; then
811 echo "$ac_t""no" 1>&6
815 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
816 echo "configure:817: checking for ANSI C header files" >&5
817 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
818 echo $ac_n "(cached) $ac_c" 1>&6
820 cat > conftest.$ac_ext <<EOF
821 #line 822 "configure"
822 #include "confdefs.h"
828 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
829 { (eval echo configure:830: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
830 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
831 if test -z "$ac_err"; then
833 ac_cv_header_stdc=yes
836 echo "configure: failed program was:" >&5
837 cat conftest.$ac_ext >&5
843 if test $ac_cv_header_stdc = yes; then
844 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
845 cat > conftest.$ac_ext <<EOF
846 #line 847 "configure"
847 #include "confdefs.h"
850 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
851 egrep "memchr" >/dev/null 2>&1; then
861 if test $ac_cv_header_stdc = yes; then
862 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
863 cat > conftest.$ac_ext <<EOF
864 #line 865 "configure"
865 #include "confdefs.h"
868 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
869 egrep "free" >/dev/null 2>&1; then
879 if test $ac_cv_header_stdc = yes; then
880 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
881 if test "$cross_compiling" = yes; then
884 cat > conftest.$ac_ext <<EOF
885 #line 886 "configure"
886 #include "confdefs.h"
888 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
889 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
890 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
891 int main () { int i; for (i = 0; i < 256; i++)
892 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
896 if { (eval echo configure:897: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
900 echo "configure: failed program was:" >&5
901 cat conftest.$ac_ext >&5
911 echo "$ac_t""$ac_cv_header_stdc" 1>&6
912 if test $ac_cv_header_stdc = yes; then
913 cat >> confdefs.h <<\EOF
914 #define STDC_HEADERS 1
919 echo $ac_n "checking for working const""... $ac_c" 1>&6
920 echo "configure:921: checking for working const" >&5
921 if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
922 echo $ac_n "(cached) $ac_c" 1>&6
924 cat > conftest.$ac_ext <<EOF
925 #line 926 "configure"
926 #include "confdefs.h"
930 /* Ultrix mips cc rejects this. */
931 typedef int charset[2]; const charset x;
932 /* SunOS 4.1.1 cc rejects this. */
933 char const *const *ccp;
935 /* NEC SVR4.0.2 mips cc rejects this. */
936 struct point {int x, y;};
937 static struct point const zero = {0,0};
938 /* AIX XL C 1.02.0.0 rejects this.
939 It does not let you subtract one const X* pointer from another in an arm
940 of an if-expression whose if-part is not a constant expression */
941 const char *g = "string";
942 ccp = &g + (g ? g-g : 0);
943 /* HPUX 7.0 cc rejects these. */
946 ccp = (char const *const *) p;
947 { /* SCO 3.2v4 cc rejects this. */
949 char const *s = 0 ? (char *) 0 : (char const *) 0;
953 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
955 const int *foo = &x[0];
958 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
959 typedef const int *iptr;
963 { /* AIX XL C 1.02.0.0 rejects this saying
964 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
965 struct s { int j; const int *ap[3]; };
966 struct s *b; b->j = 5;
968 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
974 if { (eval echo configure:975: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
978 echo "configure: failed program was:" >&5
979 cat conftest.$ac_ext >&5
986 echo "$ac_t""$ac_cv_c_const" 1>&6
987 if test $ac_cv_c_const = no; then
988 cat >> confdefs.h <<\EOF
994 echo $ac_n "checking for inline""... $ac_c" 1>&6
995 echo "configure:996: checking for inline" >&5
996 if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then
997 echo $ac_n "(cached) $ac_c" 1>&6
1000 for ac_kw in inline __inline__ __inline; do
1001 cat > conftest.$ac_ext <<EOF
1002 #line 1003 "configure"
1003 #include "confdefs.h"
1009 if { (eval echo configure:1010: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1011 ac_cv_c_inline=$ac_kw; break
1013 echo "configure: failed program was:" >&5
1014 cat conftest.$ac_ext >&5
1021 echo "$ac_t""$ac_cv_c_inline" 1>&6
1022 case "$ac_cv_c_inline" in
1024 no) cat >> confdefs.h <<\EOF
1028 *) cat >> confdefs.h <<EOF
1029 #define inline $ac_cv_c_inline
1034 echo $ac_n "checking for off_t""... $ac_c" 1>&6
1035 echo "configure:1036: checking for off_t" >&5
1036 if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then
1037 echo $ac_n "(cached) $ac_c" 1>&6
1039 cat > conftest.$ac_ext <<EOF
1040 #line 1041 "configure"
1041 #include "confdefs.h"
1042 #include <sys/types.h>
1048 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1049 egrep "off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
1051 ac_cv_type_off_t=yes
1059 echo "$ac_t""$ac_cv_type_off_t" 1>&6
1060 if test $ac_cv_type_off_t = no; then
1061 cat >> confdefs.h <<\EOF
1067 echo $ac_n "checking for size_t""... $ac_c" 1>&6
1068 echo "configure:1069: checking for size_t" >&5
1069 if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
1070 echo $ac_n "(cached) $ac_c" 1>&6
1072 cat > conftest.$ac_ext <<EOF
1073 #line 1074 "configure"
1074 #include "confdefs.h"
1075 #include <sys/types.h>
1081 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1082 egrep "size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
1084 ac_cv_type_size_t=yes
1087 ac_cv_type_size_t=no
1092 echo "$ac_t""$ac_cv_type_size_t" 1>&6
1093 if test $ac_cv_type_size_t = no; then
1094 cat >> confdefs.h <<\EOF
1095 #define size_t unsigned
1100 # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
1101 # for constant arguments. Useless!
1102 echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6
1103 echo "configure:1104: checking for working alloca.h" >&5
1104 if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then
1105 echo $ac_n "(cached) $ac_c" 1>&6
1107 cat > conftest.$ac_ext <<EOF
1108 #line 1109 "configure"
1109 #include "confdefs.h"
1112 char *p = alloca(2 * sizeof(int));
1115 if { (eval echo configure:1116: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1117 ac_cv_header_alloca_h=yes
1119 echo "configure: failed program was:" >&5
1120 cat conftest.$ac_ext >&5
1122 ac_cv_header_alloca_h=no
1127 echo "$ac_t""$ac_cv_header_alloca_h" 1>&6
1128 if test $ac_cv_header_alloca_h = yes; then
1129 cat >> confdefs.h <<\EOF
1130 #define HAVE_ALLOCA_H 1
1135 echo $ac_n "checking for alloca""... $ac_c" 1>&6
1136 echo "configure:1137: checking for alloca" >&5
1137 if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then
1138 echo $ac_n "(cached) $ac_c" 1>&6
1140 cat > conftest.$ac_ext <<EOF
1141 #line 1142 "configure"
1142 #include "confdefs.h"
1145 # define alloca __builtin_alloca
1148 # include <malloc.h>
1149 # define alloca _alloca
1152 # include <alloca.h>
1157 # ifndef alloca /* predefined by HP cc +Olibcalls */
1166 char *p = (char *) alloca(1);
1169 if { (eval echo configure:1170: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1171 ac_cv_func_alloca_works=yes
1173 echo "configure: failed program was:" >&5
1174 cat conftest.$ac_ext >&5
1176 ac_cv_func_alloca_works=no
1181 echo "$ac_t""$ac_cv_func_alloca_works" 1>&6
1182 if test $ac_cv_func_alloca_works = yes; then
1183 cat >> confdefs.h <<\EOF
1184 #define HAVE_ALLOCA 1
1189 if test $ac_cv_func_alloca_works = no; then
1190 # The SVR3 libPW and SVR4 libucb both contain incompatible functions
1191 # that cause trouble. Some versions do not even contain alloca or
1192 # contain a buggy version. If you still want to use their alloca,
1193 # use ar to extract alloca.o from them instead of compiling alloca.c.
1194 ALLOCA=alloca.${ac_objext}
1195 cat >> confdefs.h <<\EOF
1200 echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
1201 echo "configure:1202: checking whether alloca needs Cray hooks" >&5
1202 if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then
1203 echo $ac_n "(cached) $ac_c" 1>&6
1205 cat > conftest.$ac_ext <<EOF
1206 #line 1207 "configure"
1207 #include "confdefs.h"
1208 #if defined(CRAY) && ! defined(CRAY2)
1215 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1216 egrep "webecray" >/dev/null 2>&1; then
1227 echo "$ac_t""$ac_cv_os_cray" 1>&6
1228 if test $ac_cv_os_cray = yes; then
1229 for ac_func in _getb67 GETB67 getb67; do
1230 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
1231 echo "configure:1232: checking for $ac_func" >&5
1232 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
1233 echo $ac_n "(cached) $ac_c" 1>&6
1235 cat > conftest.$ac_ext <<EOF
1236 #line 1237 "configure"
1237 #include "confdefs.h"
1238 /* System header to define __stub macros and hopefully few prototypes,
1239 which can conflict with char $ac_func(); below. */
1241 /* Override any gcc2 internal prototype to avoid an error. */
1242 /* We use char because int might match the return type of a gcc2
1243 builtin and then its argument prototype would still apply. */
1248 /* The GNU C library defines this for functions which it implements
1249 to always fail with ENOSYS. Some functions are actually named
1250 something starting with __ and the normal name is an alias. */
1251 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
1259 if { (eval echo configure:1260: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1261 eval "ac_cv_func_$ac_func=yes"
1263 echo "configure: failed program was:" >&5
1264 cat conftest.$ac_ext >&5
1266 eval "ac_cv_func_$ac_func=no"
1271 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
1272 echo "$ac_t""yes" 1>&6
1273 cat >> confdefs.h <<EOF
1274 #define CRAY_STACKSEG_END $ac_func
1279 echo "$ac_t""no" 1>&6
1285 echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
1286 echo "configure:1287: checking stack direction for C alloca" >&5
1287 if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then
1288 echo $ac_n "(cached) $ac_c" 1>&6
1290 if test "$cross_compiling" = yes; then
1291 ac_cv_c_stack_direction=0
1293 cat > conftest.$ac_ext <<EOF
1294 #line 1295 "configure"
1295 #include "confdefs.h"
1296 find_stack_direction ()
1298 static char *addr = 0;
1303 return find_stack_direction ();
1306 return (&dummy > addr) ? 1 : -1;
1310 exit (find_stack_direction() < 0);
1313 if { (eval echo configure:1314: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
1315 ac_cv_c_stack_direction=1
1317 echo "configure: failed program was:" >&5
1318 cat conftest.$ac_ext >&5
1320 ac_cv_c_stack_direction=-1
1327 echo "$ac_t""$ac_cv_c_stack_direction" 1>&6
1328 cat >> confdefs.h <<EOF
1329 #define STACK_DIRECTION $ac_cv_c_stack_direction
1334 for ac_hdr in unistd.h
1336 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
1337 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
1338 echo "configure:1339: checking for $ac_hdr" >&5
1339 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1340 echo $ac_n "(cached) $ac_c" 1>&6
1342 cat > conftest.$ac_ext <<EOF
1343 #line 1344 "configure"
1344 #include "confdefs.h"
1347 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1348 { (eval echo configure:1349: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1349 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1350 if test -z "$ac_err"; then
1352 eval "ac_cv_header_$ac_safe=yes"
1355 echo "configure: failed program was:" >&5
1356 cat conftest.$ac_ext >&5
1358 eval "ac_cv_header_$ac_safe=no"
1362 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1363 echo "$ac_t""yes" 1>&6
1364 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
1365 cat >> confdefs.h <<EOF
1366 #define $ac_tr_hdr 1
1370 echo "$ac_t""no" 1>&6
1374 for ac_func in getpagesize
1376 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
1377 echo "configure:1378: checking for $ac_func" >&5
1378 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
1379 echo $ac_n "(cached) $ac_c" 1>&6
1381 cat > conftest.$ac_ext <<EOF
1382 #line 1383 "configure"
1383 #include "confdefs.h"
1384 /* System header to define __stub macros and hopefully few prototypes,
1385 which can conflict with char $ac_func(); below. */
1387 /* Override any gcc2 internal prototype to avoid an error. */
1388 /* We use char because int might match the return type of a gcc2
1389 builtin and then its argument prototype would still apply. */
1394 /* The GNU C library defines this for functions which it implements
1395 to always fail with ENOSYS. Some functions are actually named
1396 something starting with __ and the normal name is an alias. */
1397 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
1405 if { (eval echo configure:1406: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1407 eval "ac_cv_func_$ac_func=yes"
1409 echo "configure: failed program was:" >&5
1410 cat conftest.$ac_ext >&5
1412 eval "ac_cv_func_$ac_func=no"
1417 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
1418 echo "$ac_t""yes" 1>&6
1419 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
1420 cat >> confdefs.h <<EOF
1421 #define $ac_tr_func 1
1425 echo "$ac_t""no" 1>&6
1429 echo $ac_n "checking for working mmap""... $ac_c" 1>&6
1430 echo "configure:1431: checking for working mmap" >&5
1431 if eval "test \"`echo '$''{'ac_cv_func_mmap_fixed_mapped'+set}'`\" = set"; then
1432 echo $ac_n "(cached) $ac_c" 1>&6
1434 if test "$cross_compiling" = yes; then
1435 ac_cv_func_mmap_fixed_mapped=no
1437 cat > conftest.$ac_ext <<EOF
1438 #line 1439 "configure"
1439 #include "confdefs.h"
1441 /* Thanks to Mike Haertel and Jim Avera for this test.
1442 Here is a matrix of mmap possibilities:
1443 mmap private not fixed
1444 mmap private fixed at somewhere currently unmapped
1445 mmap private fixed at somewhere already mapped
1446 mmap shared not fixed
1447 mmap shared fixed at somewhere currently unmapped
1448 mmap shared fixed at somewhere already mapped
1449 For private mappings, we should verify that changes cannot be read()
1450 back from the file, nor mmap's back from the file at a different
1451 address. (There have been systems where private was not correctly
1452 implemented like the infamous i386 svr4.0, and systems where the
1453 VM page cache was not coherent with the filesystem buffer cache
1454 like early versions of FreeBSD and possibly contemporary NetBSD.)
1455 For shared mappings, we should conversely verify that changes get
1456 propogated back to all the places they're supposed to be.
1458 Grep wants private fixed already mapped.
1459 The main things grep needs to know about mmap are:
1460 * does it exist and is it safe to write into the mmap'd area
1461 * how to use it (BSD variants) */
1462 #include <sys/types.h>
1464 #include <sys/mman.h>
1466 /* This mess was copied from the GNU getpagesize.h. */
1467 #ifndef HAVE_GETPAGESIZE
1468 # ifdef HAVE_UNISTD_H
1469 # include <unistd.h>
1472 /* Assume that all systems that can run configure have sys/param.h. */
1473 # ifndef HAVE_SYS_PARAM_H
1474 # define HAVE_SYS_PARAM_H 1
1477 # ifdef _SC_PAGESIZE
1478 # define getpagesize() sysconf(_SC_PAGESIZE)
1479 # else /* no _SC_PAGESIZE */
1480 # ifdef HAVE_SYS_PARAM_H
1481 # include <sys/param.h>
1482 # ifdef EXEC_PAGESIZE
1483 # define getpagesize() EXEC_PAGESIZE
1484 # else /* no EXEC_PAGESIZE */
1486 # define getpagesize() NBPG * CLSIZE
1489 # endif /* no CLSIZE */
1490 # else /* no NBPG */
1492 # define getpagesize() NBPC
1493 # else /* no NBPC */
1495 # define getpagesize() PAGESIZE
1496 # endif /* PAGESIZE */
1497 # endif /* no NBPC */
1498 # endif /* no NBPG */
1499 # endif /* no EXEC_PAGESIZE */
1500 # else /* no HAVE_SYS_PARAM_H */
1501 # define getpagesize() 8192 /* punt totally */
1502 # endif /* no HAVE_SYS_PARAM_H */
1503 # endif /* no _SC_PAGESIZE */
1505 #endif /* no HAVE_GETPAGESIZE */
1508 extern "C" { void *malloc(unsigned); }
1516 char *data, *data2, *data3;
1520 pagesize = getpagesize();
1523 * First, make a file with some known garbage in it.
1525 data = malloc(pagesize);
1528 for (i = 0; i < pagesize; ++i)
1529 *(data + i) = rand();
1531 fd = creat("conftestmmap", 0600);
1534 if (write(fd, data, pagesize) != pagesize)
1539 * Next, try to mmap the file at a fixed address which
1540 * already has something else allocated at it. If we can,
1541 * also make sure that we see the same garbage.
1543 fd = open("conftestmmap", O_RDWR);
1546 data2 = malloc(2 * pagesize);
1549 data2 += (pagesize - ((int) data2 & (pagesize - 1))) & (pagesize - 1);
1550 if (data2 != mmap(data2, pagesize, PROT_READ | PROT_WRITE,
1551 MAP_PRIVATE | MAP_FIXED, fd, 0L))
1553 for (i = 0; i < pagesize; ++i)
1554 if (*(data + i) != *(data2 + i))
1558 * Finally, make sure that changes to the mapped area
1559 * do not percolate back to the file as seen by read().
1560 * (This is a bug on some variants of i386 svr4.0.)
1562 for (i = 0; i < pagesize; ++i)
1563 *(data2 + i) = *(data2 + i) + 1;
1564 data3 = malloc(pagesize);
1567 if (read(fd, data3, pagesize) != pagesize)
1569 for (i = 0; i < pagesize; ++i)
1570 if (*(data + i) != *(data3 + i))
1573 unlink("conftestmmap");
1578 if { (eval echo configure:1579: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
1580 ac_cv_func_mmap_fixed_mapped=yes
1582 echo "configure: failed program was:" >&5
1583 cat conftest.$ac_ext >&5
1585 ac_cv_func_mmap_fixed_mapped=no
1592 echo "$ac_t""$ac_cv_func_mmap_fixed_mapped" 1>&6
1593 if test $ac_cv_func_mmap_fixed_mapped = yes; then
1594 cat >> confdefs.h <<\EOF
1601 # autoconf.info says this should be called right after AC_INIT.
1605 for ac_dir in `cd $srcdir;pwd`/../.. $srcdir/`cd $srcdir;pwd`/../..; do
1606 if test -f $ac_dir/install-sh; then
1608 ac_install_sh="$ac_aux_dir/install-sh -c"
1610 elif test -f $ac_dir/install.sh; then
1612 ac_install_sh="$ac_aux_dir/install.sh -c"
1616 if test -z "$ac_aux_dir"; then
1617 { echo "configure: error: can not find install-sh or install.sh in `cd $srcdir;pwd`/../.. $srcdir/`cd $srcdir;pwd`/../.." 1>&2; exit 1; }
1619 ac_config_guess=$ac_aux_dir/config.guess
1620 ac_config_sub=$ac_aux_dir/config.sub
1621 ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
1624 # Do some error checking and defaulting for the host and target type.
1626 # configure --host=HOST --target=TARGET --build=BUILD NONOPT
1629 # 1. You are not allowed to specify --host, --target, and nonopt at the
1631 # 2. Host defaults to nonopt.
1632 # 3. If nonopt is not specified, then host defaults to the current host,
1633 # as determined by config.guess.
1634 # 4. Target and build default to nonopt.
1635 # 5. If nonopt is not specified, then target and build default to host.
1637 # The aliases save the names the user supplied, while $host etc.
1638 # will get canonicalized.
1639 case $host---$target---$nonopt in
1640 NONE---*---* | *---NONE---* | *---*---NONE) ;;
1641 *) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;;
1645 # Make sure we can run config.sub.
1646 if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then :
1647 else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
1650 echo $ac_n "checking host system type""... $ac_c" 1>&6
1651 echo "configure:1652: checking host system type" >&5
1654 case "$host_alias" in
1658 if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then :
1659 else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
1661 *) host_alias=$nonopt ;;
1665 host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias`
1666 host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1667 host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1668 host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1669 echo "$ac_t""$host" 1>&6
1671 echo $ac_n "checking target system type""... $ac_c" 1>&6
1672 echo "configure:1673: checking target system type" >&5
1674 target_alias=$target
1675 case "$target_alias" in
1678 NONE) target_alias=$host_alias ;;
1679 *) target_alias=$nonopt ;;
1683 target=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $target_alias`
1684 target_cpu=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1685 target_vendor=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1686 target_os=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1687 echo "$ac_t""$target" 1>&6
1689 echo $ac_n "checking build system type""... $ac_c" 1>&6
1690 echo "configure:1691: checking build system type" >&5
1693 case "$build_alias" in
1696 NONE) build_alias=$host_alias ;;
1697 *) build_alias=$nonopt ;;
1701 build=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $build_alias`
1702 build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1703 build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1704 build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1705 echo "$ac_t""$build" 1>&6
1707 test "$host_alias" != "$target_alias" &&
1708 test "$program_prefix$program_suffix$program_transform_name" = \
1710 program_prefix=${target_alias}-
1712 if test "$program_transform_name" = s,x,x,; then
1713 program_transform_name=
1715 # Double any \ or $. echo might interpret backslashes.
1716 cat <<\EOF_SED > conftestsed
1717 s,\\,\\\\,g; s,\$,$$,g
1719 program_transform_name="`echo $program_transform_name|sed -f conftestsed`"
1722 test "$program_prefix" != NONE &&
1723 program_transform_name="s,^,${program_prefix},; $program_transform_name"
1724 # Use a double $ so make ignores it.
1725 test "$program_suffix" != NONE &&
1726 program_transform_name="s,\$\$,${program_suffix},; $program_transform_name"
1728 # sed with no file args requires a program.
1729 test "$program_transform_name" = "" && program_transform_name="s,x,x,"
1731 # Extract the first word of "gcc", so it can be a program name with args.
1732 set dummy gcc; ac_word=$2
1733 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1734 echo "configure:1735: checking for $ac_word" >&5
1735 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
1736 echo $ac_n "(cached) $ac_c" 1>&6
1738 if test -n "$CC"; then
1739 ac_cv_prog_CC="$CC" # Let the user override the test.
1741 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1742 for ac_dir in $PATH; do
1743 test -z "$ac_dir" && ac_dir=.
1744 if test -f $ac_dir/$ac_word; then
1753 if test -n "$CC"; then
1754 echo "$ac_t""$CC" 1>&6
1756 echo "$ac_t""no" 1>&6
1759 if test -z "$CC"; then
1760 # Extract the first word of "cc", so it can be a program name with args.
1761 set dummy cc; ac_word=$2
1762 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1763 echo "configure:1764: checking for $ac_word" >&5
1764 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
1765 echo $ac_n "(cached) $ac_c" 1>&6
1767 if test -n "$CC"; then
1768 ac_cv_prog_CC="$CC" # Let the user override the test.
1770 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1772 for ac_dir in $PATH; do
1773 test -z "$ac_dir" && ac_dir=.
1774 if test -f $ac_dir/$ac_word; then
1775 if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
1776 ac_prog_rejected=yes
1784 if test $ac_prog_rejected = yes; then
1785 # We found a bogon in the path, so make sure we never use it.
1786 set dummy $ac_cv_prog_CC
1788 if test $# -gt 0; then
1789 # We chose a different compiler from the bogus one.
1790 # However, it has the same basename, so the bogon will be chosen
1791 # first if we set CC to just the basename; use the full file name.
1793 set dummy "$ac_dir/$ac_word" "$@"
1801 if test -n "$CC"; then
1802 echo "$ac_t""$CC" 1>&6
1804 echo "$ac_t""no" 1>&6
1807 if test -z "$CC"; then
1808 case "`uname -s`" in
1810 # Extract the first word of "cl", so it can be a program name with args.
1811 set dummy cl; ac_word=$2
1812 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1813 echo "configure:1814: checking for $ac_word" >&5
1814 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
1815 echo $ac_n "(cached) $ac_c" 1>&6
1817 if test -n "$CC"; then
1818 ac_cv_prog_CC="$CC" # Let the user override the test.
1820 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1821 for ac_dir in $PATH; do
1822 test -z "$ac_dir" && ac_dir=.
1823 if test -f $ac_dir/$ac_word; then
1832 if test -n "$CC"; then
1833 echo "$ac_t""$CC" 1>&6
1835 echo "$ac_t""no" 1>&6
1840 test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
1843 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
1844 echo "configure:1845: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
1847 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
1848 ac_cpp='$CPP $CPPFLAGS'
1849 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
1850 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
1851 cross_compiling=$ac_cv_prog_cc_cross
1853 cat > conftest.$ac_ext <<EOF
1854 #line 1855 "configure"
1855 #include "confdefs.h"
1858 if { (eval echo configure:1859: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1859 ac_cv_prog_cc_works=yes
1860 # If we can't run a trivial program, we are probably using a cross compiler.
1861 if (./conftest; exit) 2>/dev/null; then
1862 ac_cv_prog_cc_cross=no
1864 ac_cv_prog_cc_cross=yes
1867 echo "configure: failed program was:" >&5
1868 cat conftest.$ac_ext >&5
1869 ac_cv_prog_cc_works=no
1873 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
1874 if test $ac_cv_prog_cc_works = no; then
1875 { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
1877 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
1878 echo "configure:1879: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
1879 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
1880 cross_compiling=$ac_cv_prog_cc_cross
1882 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
1883 echo "configure:1884: checking whether we are using GNU C" >&5
1884 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
1885 echo $ac_n "(cached) $ac_c" 1>&6
1887 cat > conftest.c <<EOF
1892 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1893: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
1899 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
1901 if test $ac_cv_prog_gcc = yes; then
1907 ac_test_CFLAGS="${CFLAGS+set}"
1908 ac_save_CFLAGS="$CFLAGS"
1910 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
1911 echo "configure:1912: checking whether ${CC-cc} accepts -g" >&5
1912 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
1913 echo $ac_n "(cached) $ac_c" 1>&6
1915 echo 'void f(){}' > conftest.c
1916 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
1925 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
1926 if test "$ac_test_CFLAGS" = set; then
1927 CFLAGS="$ac_save_CFLAGS"
1928 elif test $ac_cv_prog_cc_g = yes; then
1929 if test "$GCC" = yes; then
1935 if test "$GCC" = yes; then
1942 # Find a good install program. We prefer a C program (faster),
1943 # so one script is as good as another. But avoid the broken or
1944 # incompatible versions:
1945 # SysV /etc/install, /usr/sbin/install
1946 # SunOS /usr/etc/install
1947 # IRIX /sbin/install
1949 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
1950 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
1951 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
1952 # ./install, which can be erroneously created by make from ./install.sh.
1953 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
1954 echo "configure:1955: checking for a BSD compatible install" >&5
1955 if test -z "$INSTALL"; then
1956 if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
1957 echo $ac_n "(cached) $ac_c" 1>&6
1959 IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS=":"
1960 for ac_dir in $PATH; do
1961 # Account for people who put trailing slashes in PATH elements.
1963 /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
1965 # OSF1 and SCO ODT 3.0 have their own names for install.
1966 # Don't use installbsd from OSF since it installs stuff as root
1968 for ac_prog in ginstall scoinst install; do
1969 if test -f $ac_dir/$ac_prog; then
1970 if test $ac_prog = install &&
1971 grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
1972 # AIX install. It has an incompatible calling convention.
1975 ac_cv_path_install="$ac_dir/$ac_prog -c"
1986 if test "${ac_cv_path_install+set}" = set; then
1987 INSTALL="$ac_cv_path_install"
1989 # As a last resort, use the slow shell script. We don't cache a
1990 # path for INSTALL within a source directory, because that will
1991 # break other packages using the cache if that directory is
1992 # removed, or if the path is relative.
1993 INSTALL="$ac_install_sh"
1996 echo "$ac_t""$INSTALL" 1>&6
1998 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
1999 # It thinks the first close brace ends the variable substitution.
2000 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
2002 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
2005 # Put a plausible default for CC_FOR_BUILD in Makefile.
2006 if test "x$cross_compiling" = "xno"; then
2007 CC_FOR_BUILD='$(CC)'
2017 # Extract the first word of "ranlib", so it can be a program name with args.
2018 set dummy ranlib; ac_word=$2
2019 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2020 echo "configure:2021: checking for $ac_word" >&5
2021 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
2022 echo $ac_n "(cached) $ac_c" 1>&6
2024 if test -n "$RANLIB"; then
2025 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
2027 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2028 for ac_dir in $PATH; do
2029 test -z "$ac_dir" && ac_dir=.
2030 if test -f $ac_dir/$ac_word; then
2031 ac_cv_prog_RANLIB="ranlib"
2036 test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
2039 RANLIB="$ac_cv_prog_RANLIB"
2040 if test -n "$RANLIB"; then
2041 echo "$ac_t""$RANLIB" 1>&6
2043 echo "$ac_t""no" 1>&6
2049 for ac_hdr in argz.h limits.h locale.h nl_types.h malloc.h string.h \
2050 unistd.h values.h sys/param.h
2052 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2053 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2054 echo "configure:2055: checking for $ac_hdr" >&5
2055 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2056 echo $ac_n "(cached) $ac_c" 1>&6
2058 cat > conftest.$ac_ext <<EOF
2059 #line 2060 "configure"
2060 #include "confdefs.h"
2063 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2064 { (eval echo configure:2065: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2065 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2066 if test -z "$ac_err"; then
2068 eval "ac_cv_header_$ac_safe=yes"
2071 echo "configure: failed program was:" >&5
2072 cat conftest.$ac_ext >&5
2074 eval "ac_cv_header_$ac_safe=no"
2078 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2079 echo "$ac_t""yes" 1>&6
2080 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2081 cat >> confdefs.h <<EOF
2082 #define $ac_tr_hdr 1
2086 echo "$ac_t""no" 1>&6
2090 for ac_func in getcwd munmap putenv setenv setlocale strchr strcasecmp \
2091 __argz_count __argz_stringify __argz_next
2093 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
2094 echo "configure:2095: checking for $ac_func" >&5
2095 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2096 echo $ac_n "(cached) $ac_c" 1>&6
2098 cat > conftest.$ac_ext <<EOF
2099 #line 2100 "configure"
2100 #include "confdefs.h"
2101 /* System header to define __stub macros and hopefully few prototypes,
2102 which can conflict with char $ac_func(); below. */
2104 /* Override any gcc2 internal prototype to avoid an error. */
2105 /* We use char because int might match the return type of a gcc2
2106 builtin and then its argument prototype would still apply. */
2111 /* The GNU C library defines this for functions which it implements
2112 to always fail with ENOSYS. Some functions are actually named
2113 something starting with __ and the normal name is an alias. */
2114 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
2122 if { (eval echo configure:2123: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2124 eval "ac_cv_func_$ac_func=yes"
2126 echo "configure: failed program was:" >&5
2127 cat conftest.$ac_ext >&5
2129 eval "ac_cv_func_$ac_func=no"
2134 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
2135 echo "$ac_t""yes" 1>&6
2136 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2137 cat >> confdefs.h <<EOF
2138 #define $ac_tr_func 1
2142 echo "$ac_t""no" 1>&6
2147 if test "${ac_cv_func_stpcpy+set}" != "set"; then
2148 for ac_func in stpcpy
2150 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
2151 echo "configure:2152: checking for $ac_func" >&5
2152 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2153 echo $ac_n "(cached) $ac_c" 1>&6
2155 cat > conftest.$ac_ext <<EOF
2156 #line 2157 "configure"
2157 #include "confdefs.h"
2158 /* System header to define __stub macros and hopefully few prototypes,
2159 which can conflict with char $ac_func(); below. */
2161 /* Override any gcc2 internal prototype to avoid an error. */
2162 /* We use char because int might match the return type of a gcc2
2163 builtin and then its argument prototype would still apply. */
2168 /* The GNU C library defines this for functions which it implements
2169 to always fail with ENOSYS. Some functions are actually named
2170 something starting with __ and the normal name is an alias. */
2171 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
2179 if { (eval echo configure:2180: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2181 eval "ac_cv_func_$ac_func=yes"
2183 echo "configure: failed program was:" >&5
2184 cat conftest.$ac_ext >&5
2186 eval "ac_cv_func_$ac_func=no"
2191 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
2192 echo "$ac_t""yes" 1>&6
2193 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2194 cat >> confdefs.h <<EOF
2195 #define $ac_tr_func 1
2199 echo "$ac_t""no" 1>&6
2204 if test "${ac_cv_func_stpcpy}" = "yes"; then
2205 cat >> confdefs.h <<\EOF
2206 #define HAVE_STPCPY 1
2211 if test $ac_cv_header_locale_h = yes; then
2212 echo $ac_n "checking for LC_MESSAGES""... $ac_c" 1>&6
2213 echo "configure:2214: checking for LC_MESSAGES" >&5
2214 if eval "test \"`echo '$''{'am_cv_val_LC_MESSAGES'+set}'`\" = set"; then
2215 echo $ac_n "(cached) $ac_c" 1>&6
2217 cat > conftest.$ac_ext <<EOF
2218 #line 2219 "configure"
2219 #include "confdefs.h"
2225 if { (eval echo configure:2226: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2227 am_cv_val_LC_MESSAGES=yes
2229 echo "configure: failed program was:" >&5
2230 cat conftest.$ac_ext >&5
2232 am_cv_val_LC_MESSAGES=no
2237 echo "$ac_t""$am_cv_val_LC_MESSAGES" 1>&6
2238 if test $am_cv_val_LC_MESSAGES = yes; then
2239 cat >> confdefs.h <<\EOF
2240 #define HAVE_LC_MESSAGES 1
2245 echo $ac_n "checking whether NLS is requested""... $ac_c" 1>&6
2246 echo "configure:2247: checking whether NLS is requested" >&5
2247 # Check whether --enable-nls or --disable-nls was given.
2248 if test "${enable_nls+set}" = set; then
2249 enableval="$enable_nls"
2255 echo "$ac_t""$USE_NLS" 1>&6
2258 USE_INCLUDED_LIBINTL=no
2260 if test "$USE_NLS" = "yes"; then
2261 cat >> confdefs.h <<\EOF
2262 #define ENABLE_NLS 1
2265 echo $ac_n "checking whether included gettext is requested""... $ac_c" 1>&6
2266 echo "configure:2267: checking whether included gettext is requested" >&5
2267 # Check whether --with-included-gettext or --without-included-gettext was given.
2268 if test "${with_included_gettext+set}" = set; then
2269 withval="$with_included_gettext"
2270 nls_cv_force_use_gnu_gettext=$withval
2272 nls_cv_force_use_gnu_gettext=no
2275 echo "$ac_t""$nls_cv_force_use_gnu_gettext" 1>&6
2277 nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext"
2278 if test "$nls_cv_force_use_gnu_gettext" != "yes"; then
2280 nls_cv_header_libgt=
2283 ac_safe=`echo "libintl.h" | sed 'y%./+-%__p_%'`
2284 echo $ac_n "checking for libintl.h""... $ac_c" 1>&6
2285 echo "configure:2286: checking for libintl.h" >&5
2286 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2287 echo $ac_n "(cached) $ac_c" 1>&6
2289 cat > conftest.$ac_ext <<EOF
2290 #line 2291 "configure"
2291 #include "confdefs.h"
2292 #include <libintl.h>
2294 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2295 { (eval echo configure:2296: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2296 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2297 if test -z "$ac_err"; then
2299 eval "ac_cv_header_$ac_safe=yes"
2302 echo "configure: failed program was:" >&5
2303 cat conftest.$ac_ext >&5
2305 eval "ac_cv_header_$ac_safe=no"
2309 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2310 echo "$ac_t""yes" 1>&6
2311 echo $ac_n "checking for gettext in libc""... $ac_c" 1>&6
2312 echo "configure:2313: checking for gettext in libc" >&5
2313 if eval "test \"`echo '$''{'gt_cv_func_gettext_libc'+set}'`\" = set"; then
2314 echo $ac_n "(cached) $ac_c" 1>&6
2316 cat > conftest.$ac_ext <<EOF
2317 #line 2318 "configure"
2318 #include "confdefs.h"
2319 #include <libintl.h>
2321 return (int) gettext ("")
2324 if { (eval echo configure:2325: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2326 gt_cv_func_gettext_libc=yes
2328 echo "configure: failed program was:" >&5
2329 cat conftest.$ac_ext >&5
2331 gt_cv_func_gettext_libc=no
2336 echo "$ac_t""$gt_cv_func_gettext_libc" 1>&6
2338 if test "$gt_cv_func_gettext_libc" != "yes"; then
2339 echo $ac_n "checking for bindtextdomain in -lintl""... $ac_c" 1>&6
2340 echo "configure:2341: checking for bindtextdomain in -lintl" >&5
2341 ac_lib_var=`echo intl'_'bindtextdomain | sed 'y%./+-%__p_%'`
2342 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2343 echo $ac_n "(cached) $ac_c" 1>&6
2345 ac_save_LIBS="$LIBS"
2347 cat > conftest.$ac_ext <<EOF
2348 #line 2349 "configure"
2349 #include "confdefs.h"
2350 /* Override any gcc2 internal prototype to avoid an error. */
2351 /* We use char because int might match the return type of a gcc2
2352 builtin and then its argument prototype would still apply. */
2353 char bindtextdomain();
2359 if { (eval echo configure:2360: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2361 eval "ac_cv_lib_$ac_lib_var=yes"
2363 echo "configure: failed program was:" >&5
2364 cat conftest.$ac_ext >&5
2366 eval "ac_cv_lib_$ac_lib_var=no"
2369 LIBS="$ac_save_LIBS"
2372 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2373 echo "$ac_t""yes" 1>&6
2374 echo $ac_n "checking for gettext in libintl""... $ac_c" 1>&6
2375 echo "configure:2376: checking for gettext in libintl" >&5
2376 if eval "test \"`echo '$''{'gt_cv_func_gettext_libintl'+set}'`\" = set"; then
2377 echo $ac_n "(cached) $ac_c" 1>&6
2379 cat > conftest.$ac_ext <<EOF
2380 #line 2381 "configure"
2381 #include "confdefs.h"
2384 return (int) gettext ("")
2387 if { (eval echo configure:2388: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2389 gt_cv_func_gettext_libintl=yes
2391 echo "configure: failed program was:" >&5
2392 cat conftest.$ac_ext >&5
2394 gt_cv_func_gettext_libintl=no
2399 echo "$ac_t""$gt_cv_func_gettext_libintl" 1>&6
2401 echo "$ac_t""no" 1>&6
2406 if test "$gt_cv_func_gettext_libc" = "yes" \
2407 || test "$gt_cv_func_gettext_libintl" = "yes"; then
2408 cat >> confdefs.h <<\EOF
2409 #define HAVE_GETTEXT 1
2412 # Extract the first word of "msgfmt", so it can be a program name with args.
2413 set dummy msgfmt; ac_word=$2
2414 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2415 echo "configure:2416: checking for $ac_word" >&5
2416 if eval "test \"`echo '$''{'ac_cv_path_MSGFMT'+set}'`\" = set"; then
2417 echo $ac_n "(cached) $ac_c" 1>&6
2421 ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path.
2424 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
2425 for ac_dir in $PATH; do
2426 test -z "$ac_dir" && ac_dir=.
2427 if test -f $ac_dir/$ac_word; then
2428 if test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"; then
2429 ac_cv_path_MSGFMT="$ac_dir/$ac_word"
2435 test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT="no"
2439 MSGFMT="$ac_cv_path_MSGFMT"
2440 if test -n "$MSGFMT"; then
2441 echo "$ac_t""$MSGFMT" 1>&6
2443 echo "$ac_t""no" 1>&6
2445 if test "$MSGFMT" != "no"; then
2446 for ac_func in dcgettext
2448 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
2449 echo "configure:2450: checking for $ac_func" >&5
2450 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2451 echo $ac_n "(cached) $ac_c" 1>&6
2453 cat > conftest.$ac_ext <<EOF
2454 #line 2455 "configure"
2455 #include "confdefs.h"
2456 /* System header to define __stub macros and hopefully few prototypes,
2457 which can conflict with char $ac_func(); below. */
2459 /* Override any gcc2 internal prototype to avoid an error. */
2460 /* We use char because int might match the return type of a gcc2
2461 builtin and then its argument prototype would still apply. */
2466 /* The GNU C library defines this for functions which it implements
2467 to always fail with ENOSYS. Some functions are actually named
2468 something starting with __ and the normal name is an alias. */
2469 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
2477 if { (eval echo configure:2478: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2479 eval "ac_cv_func_$ac_func=yes"
2481 echo "configure: failed program was:" >&5
2482 cat conftest.$ac_ext >&5
2484 eval "ac_cv_func_$ac_func=no"
2489 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
2490 echo "$ac_t""yes" 1>&6
2491 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2492 cat >> confdefs.h <<EOF
2493 #define $ac_tr_func 1
2497 echo "$ac_t""no" 1>&6
2501 # Extract the first word of "gmsgfmt", so it can be a program name with args.
2502 set dummy gmsgfmt; ac_word=$2
2503 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2504 echo "configure:2505: checking for $ac_word" >&5
2505 if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then
2506 echo $ac_n "(cached) $ac_c" 1>&6
2510 ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path.
2513 ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a dos path.
2516 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2517 for ac_dir in $PATH; do
2518 test -z "$ac_dir" && ac_dir=.
2519 if test -f $ac_dir/$ac_word; then
2520 ac_cv_path_GMSGFMT="$ac_dir/$ac_word"
2525 test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT"
2529 GMSGFMT="$ac_cv_path_GMSGFMT"
2530 if test -n "$GMSGFMT"; then
2531 echo "$ac_t""$GMSGFMT" 1>&6
2533 echo "$ac_t""no" 1>&6
2536 # Extract the first word of "xgettext", so it can be a program name with args.
2537 set dummy xgettext; ac_word=$2
2538 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2539 echo "configure:2540: checking for $ac_word" >&5
2540 if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then
2541 echo $ac_n "(cached) $ac_c" 1>&6
2545 ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path.
2548 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
2549 for ac_dir in $PATH; do
2550 test -z "$ac_dir" && ac_dir=.
2551 if test -f $ac_dir/$ac_word; then
2552 if test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"; then
2553 ac_cv_path_XGETTEXT="$ac_dir/$ac_word"
2559 test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":"
2563 XGETTEXT="$ac_cv_path_XGETTEXT"
2564 if test -n "$XGETTEXT"; then
2565 echo "$ac_t""$XGETTEXT" 1>&6
2567 echo "$ac_t""no" 1>&6
2570 cat > conftest.$ac_ext <<EOF
2571 #line 2572 "configure"
2572 #include "confdefs.h"
2575 extern int _nl_msg_cat_cntr;
2576 return _nl_msg_cat_cntr
2579 if { (eval echo configure:2580: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2584 echo "configure: failed program was:" >&5
2585 cat conftest.$ac_ext >&5
2596 echo "$ac_t""no" 1>&6
2601 if test "$CATOBJEXT" = "NONE"; then
2602 nls_cv_use_gnu_gettext=yes
2606 if test "$nls_cv_use_gnu_gettext" = "yes"; then
2607 INTLOBJS="\$(GETTOBJS)"
2608 # Extract the first word of "msgfmt", so it can be a program name with args.
2609 set dummy msgfmt; ac_word=$2
2610 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2611 echo "configure:2612: checking for $ac_word" >&5
2612 if eval "test \"`echo '$''{'ac_cv_path_MSGFMT'+set}'`\" = set"; then
2613 echo $ac_n "(cached) $ac_c" 1>&6
2617 ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path.
2620 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
2621 for ac_dir in $PATH; do
2622 test -z "$ac_dir" && ac_dir=.
2623 if test -f $ac_dir/$ac_word; then
2624 if test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"; then
2625 ac_cv_path_MSGFMT="$ac_dir/$ac_word"
2631 test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT="msgfmt"
2635 MSGFMT="$ac_cv_path_MSGFMT"
2636 if test -n "$MSGFMT"; then
2637 echo "$ac_t""$MSGFMT" 1>&6
2639 echo "$ac_t""no" 1>&6
2642 # Extract the first word of "gmsgfmt", so it can be a program name with args.
2643 set dummy gmsgfmt; ac_word=$2
2644 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2645 echo "configure:2646: checking for $ac_word" >&5
2646 if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then
2647 echo $ac_n "(cached) $ac_c" 1>&6
2651 ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path.
2654 ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a dos path.
2657 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2658 for ac_dir in $PATH; do
2659 test -z "$ac_dir" && ac_dir=.
2660 if test -f $ac_dir/$ac_word; then
2661 ac_cv_path_GMSGFMT="$ac_dir/$ac_word"
2666 test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT"
2670 GMSGFMT="$ac_cv_path_GMSGFMT"
2671 if test -n "$GMSGFMT"; then
2672 echo "$ac_t""$GMSGFMT" 1>&6
2674 echo "$ac_t""no" 1>&6
2677 # Extract the first word of "xgettext", so it can be a program name with args.
2678 set dummy xgettext; ac_word=$2
2679 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2680 echo "configure:2681: checking for $ac_word" >&5
2681 if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then
2682 echo $ac_n "(cached) $ac_c" 1>&6
2686 ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path.
2689 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
2690 for ac_dir in $PATH; do
2691 test -z "$ac_dir" && ac_dir=.
2692 if test -f $ac_dir/$ac_word; then
2693 if test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"; then
2694 ac_cv_path_XGETTEXT="$ac_dir/$ac_word"
2700 test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":"
2704 XGETTEXT="$ac_cv_path_XGETTEXT"
2705 if test -n "$XGETTEXT"; then
2706 echo "$ac_t""$XGETTEXT" 1>&6
2708 echo "$ac_t""no" 1>&6
2712 USE_INCLUDED_LIBINTL=yes
2716 INTLDEPS='$(top_builddir)/../intl/libintl.a'
2718 LIBS=`echo $LIBS | sed -e 's/-lintl//'`
2719 nls_cv_header_intl=libintl.h
2720 nls_cv_header_libgt=libgettext.h
2723 if test "$XGETTEXT" != ":"; then
2724 if $XGETTEXT --omit-header /dev/null 2> /dev/null; then
2727 echo "$ac_t""found xgettext programs is not GNU xgettext; ignore it" 1>&6
2732 # We need to process the po/ directory.
2736 nls_cv_header_intl=libintl.h
2737 nls_cv_header_libgt=libgettext.h
2740 # If this is used in GNU gettext we have to set USE_NLS to `yes'
2741 # because some of the sources are only built for this goal.
2742 if test "$PACKAGE" = gettext; then
2744 USE_INCLUDED_LIBINTL=yes
2747 for lang in $ALL_LINGUAS; do
2748 GMOFILES="$GMOFILES $lang.gmo"
2749 POFILES="$POFILES $lang.po"
2765 if test "x$CATOBJEXT" != "x"; then
2766 if test "x$ALL_LINGUAS" = "x"; then
2769 echo $ac_n "checking for catalogs to be installed""... $ac_c" 1>&6
2770 echo "configure:2771: checking for catalogs to be installed" >&5
2772 for lang in ${LINGUAS=$ALL_LINGUAS}; do
2773 case "$ALL_LINGUAS" in
2774 *$lang*) NEW_LINGUAS="$NEW_LINGUAS $lang" ;;
2777 LINGUAS=$NEW_LINGUAS
2778 echo "$ac_t""$LINGUAS" 1>&6
2781 if test -n "$LINGUAS"; then
2782 for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done
2786 if test $ac_cv_header_locale_h = yes; then
2787 INCLUDE_LOCALE_H="#include <locale.h>"
2790 /* The system does not provide the header <locale.h>. Take care yourself. */"
2794 if test -f $srcdir/po2tbl.sed.in; then
2795 if test "$CATOBJEXT" = ".cat"; then
2796 ac_safe=`echo "linux/version.h" | sed 'y%./+-%__p_%'`
2797 echo $ac_n "checking for linux/version.h""... $ac_c" 1>&6
2798 echo "configure:2799: checking for linux/version.h" >&5
2799 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2800 echo $ac_n "(cached) $ac_c" 1>&6
2802 cat > conftest.$ac_ext <<EOF
2803 #line 2804 "configure"
2804 #include "confdefs.h"
2805 #include <linux/version.h>
2807 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2808 { (eval echo configure:2809: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2809 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2810 if test -z "$ac_err"; then
2812 eval "ac_cv_header_$ac_safe=yes"
2815 echo "configure: failed program was:" >&5
2816 cat conftest.$ac_ext >&5
2818 eval "ac_cv_header_$ac_safe=no"
2822 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2823 echo "$ac_t""yes" 1>&6
2826 echo "$ac_t""no" 1>&6
2831 sed -e '/^#/d' $srcdir/$msgformat-msg.sed > po2msg.sed
2833 sed -e '/^#.*[^\\]$/d' -e '/^#$/d' \
2834 $srcdir/po2tbl.sed.in > po2tbl.sed
2837 if test "$PACKAGE" = "gettext"; then
2847 MKINSTALLDIRS="\$(srcdir)/../../mkinstalldirs"
2853 if test -d $srcdir/po; then
2854 test -d po || mkdir po
2855 if test "x$srcdir" != "x."; then
2856 if test "x`echo $srcdir | sed 's@/.*@@'`" = "x"; then
2857 posrcprefix="$srcdir/"
2859 posrcprefix="../$srcdir/"
2865 sed -e "/^#/d" -e "/^\$/d" -e "s,.*, $posrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \
2866 < $srcdir/po/POTFILES.in > po/POTFILES
2870 # Check for common headers.
2871 # FIXME: Seems to me this can cause problems for i386-windows hosts.
2872 # At one point there were hardcoded AC_DEFINE's if ${host} = i386-*-windows*.
2873 for ac_hdr in stdlib.h string.h strings.h unistd.h time.h
2875 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2876 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2877 echo "configure:2878: checking for $ac_hdr" >&5
2878 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2879 echo $ac_n "(cached) $ac_c" 1>&6
2881 cat > conftest.$ac_ext <<EOF
2882 #line 2883 "configure"
2883 #include "confdefs.h"
2886 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2887 { (eval echo configure:2888: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2888 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2889 if test -z "$ac_err"; then
2891 eval "ac_cv_header_$ac_safe=yes"
2894 echo "configure: failed program was:" >&5
2895 cat conftest.$ac_ext >&5
2897 eval "ac_cv_header_$ac_safe=no"
2901 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2902 echo "$ac_t""yes" 1>&6
2903 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2904 cat >> confdefs.h <<EOF
2905 #define $ac_tr_hdr 1
2909 echo "$ac_t""no" 1>&6
2913 for ac_hdr in sys/time.h sys/resource.h
2915 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2916 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2917 echo "configure:2918: checking for $ac_hdr" >&5
2918 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2919 echo $ac_n "(cached) $ac_c" 1>&6
2921 cat > conftest.$ac_ext <<EOF
2922 #line 2923 "configure"
2923 #include "confdefs.h"
2926 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2927 { (eval echo configure:2928: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2928 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2929 if test -z "$ac_err"; then
2931 eval "ac_cv_header_$ac_safe=yes"
2934 echo "configure: failed program was:" >&5
2935 cat conftest.$ac_ext >&5
2937 eval "ac_cv_header_$ac_safe=no"
2941 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2942 echo "$ac_t""yes" 1>&6
2943 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2944 cat >> confdefs.h <<EOF
2945 #define $ac_tr_hdr 1
2949 echo "$ac_t""no" 1>&6
2953 for ac_hdr in fcntl.h fpu_control.h
2955 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2956 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2957 echo "configure:2958: checking for $ac_hdr" >&5
2958 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2959 echo $ac_n "(cached) $ac_c" 1>&6
2961 cat > conftest.$ac_ext <<EOF
2962 #line 2963 "configure"
2963 #include "confdefs.h"
2966 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2967 { (eval echo configure:2968: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2968 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2969 if test -z "$ac_err"; then
2971 eval "ac_cv_header_$ac_safe=yes"
2974 echo "configure: failed program was:" >&5
2975 cat conftest.$ac_ext >&5
2977 eval "ac_cv_header_$ac_safe=no"
2981 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2982 echo "$ac_t""yes" 1>&6
2983 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2984 cat >> confdefs.h <<EOF
2985 #define $ac_tr_hdr 1
2989 echo "$ac_t""no" 1>&6
2993 for ac_func in getrusage time sigaction __setfpucw
2995 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
2996 echo "configure:2997: checking for $ac_func" >&5
2997 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2998 echo $ac_n "(cached) $ac_c" 1>&6
3000 cat > conftest.$ac_ext <<EOF
3001 #line 3002 "configure"
3002 #include "confdefs.h"
3003 /* System header to define __stub macros and hopefully few prototypes,
3004 which can conflict with char $ac_func(); below. */
3006 /* Override any gcc2 internal prototype to avoid an error. */
3007 /* We use char because int might match the return type of a gcc2
3008 builtin and then its argument prototype would still apply. */
3013 /* The GNU C library defines this for functions which it implements
3014 to always fail with ENOSYS. Some functions are actually named
3015 something starting with __ and the normal name is an alias. */
3016 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3024 if { (eval echo configure:3025: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3026 eval "ac_cv_func_$ac_func=yes"
3028 echo "configure: failed program was:" >&5
3029 cat conftest.$ac_ext >&5
3031 eval "ac_cv_func_$ac_func=no"
3036 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3037 echo "$ac_t""yes" 1>&6
3038 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3039 cat >> confdefs.h <<EOF
3040 #define $ac_tr_func 1
3044 echo "$ac_t""no" 1>&6
3049 # Check for socket libraries
3050 echo $ac_n "checking for bind in -lsocket""... $ac_c" 1>&6
3051 echo "configure:3052: checking for bind in -lsocket" >&5
3052 ac_lib_var=`echo socket'_'bind | sed 'y%./+-%__p_%'`
3053 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3054 echo $ac_n "(cached) $ac_c" 1>&6
3056 ac_save_LIBS="$LIBS"
3057 LIBS="-lsocket $LIBS"
3058 cat > conftest.$ac_ext <<EOF
3059 #line 3060 "configure"
3060 #include "confdefs.h"
3061 /* Override any gcc2 internal prototype to avoid an error. */
3062 /* We use char because int might match the return type of a gcc2
3063 builtin and then its argument prototype would still apply. */
3070 if { (eval echo configure:3071: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3072 eval "ac_cv_lib_$ac_lib_var=yes"
3074 echo "configure: failed program was:" >&5
3075 cat conftest.$ac_ext >&5
3077 eval "ac_cv_lib_$ac_lib_var=no"
3080 LIBS="$ac_save_LIBS"
3083 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3084 echo "$ac_t""yes" 1>&6
3085 ac_tr_lib=HAVE_LIB`echo socket | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3086 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3087 cat >> confdefs.h <<EOF
3088 #define $ac_tr_lib 1
3091 LIBS="-lsocket $LIBS"
3094 echo "$ac_t""no" 1>&6
3097 echo $ac_n "checking for gethostbyname in -lnsl""... $ac_c" 1>&6
3098 echo "configure:3099: checking for gethostbyname in -lnsl" >&5
3099 ac_lib_var=`echo nsl'_'gethostbyname | sed 'y%./+-%__p_%'`
3100 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3101 echo $ac_n "(cached) $ac_c" 1>&6
3103 ac_save_LIBS="$LIBS"
3105 cat > conftest.$ac_ext <<EOF
3106 #line 3107 "configure"
3107 #include "confdefs.h"
3108 /* Override any gcc2 internal prototype to avoid an error. */
3109 /* We use char because int might match the return type of a gcc2
3110 builtin and then its argument prototype would still apply. */
3111 char gethostbyname();
3117 if { (eval echo configure:3118: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3119 eval "ac_cv_lib_$ac_lib_var=yes"
3121 echo "configure: failed program was:" >&5
3122 cat conftest.$ac_ext >&5
3124 eval "ac_cv_lib_$ac_lib_var=no"
3127 LIBS="$ac_save_LIBS"
3130 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3131 echo "$ac_t""yes" 1>&6
3132 ac_tr_lib=HAVE_LIB`echo nsl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3133 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3134 cat >> confdefs.h <<EOF
3135 #define $ac_tr_lib 1
3141 echo "$ac_t""no" 1>&6
3145 . ${srcdir}/../../bfd/configure.host
3149 USE_MAINTAINER_MODE=no
3150 # Check whether --enable-maintainer-mode or --disable-maintainer-mode was given.
3151 if test "${enable_maintainer_mode+set}" = set; then
3152 enableval="$enable_maintainer_mode"
3153 case "${enableval}" in
3154 yes) MAINT="" USE_MAINTAINER_MODE=yes ;;
3156 *) { echo "configure: error: "--enable-maintainer-mode does not take a value"" 1>&2; exit 1; }; MAINT="#" ;;
3158 if test x"$silent" != x"yes" && test x"$MAINT" = x""; then
3159 echo "Setting maintainer mode" 6>&1
3167 # Check whether --enable-sim-bswap or --disable-sim-bswap was given.
3168 if test "${enable_sim_bswap+set}" = set; then
3169 enableval="$enable_sim_bswap"
3170 case "${enableval}" in
3171 yes) sim_bswap="-DWITH_BSWAP=1 -DUSE_BSWAP=1";;
3172 no) sim_bswap="-DWITH_BSWAP=0";;
3173 *) { echo "configure: error: "--enable-sim-bswap does not take a value"" 1>&2; exit 1; }; sim_bswap="";;
3175 if test x"$silent" != x"yes" && test x"$sim_bswap" != x""; then
3176 echo "Setting bswap flags = $sim_bswap" 6>&1
3184 # Check whether --enable-sim-cflags or --disable-sim-cflags was given.
3185 if test "${enable_sim_cflags+set}" = set; then
3186 enableval="$enable_sim_cflags"
3187 case "${enableval}" in
3188 yes) sim_cflags="-O2 -fomit-frame-pointer";;
3189 trace) { echo "configure: error: "Please use --enable-sim-debug instead."" 1>&2; exit 1; }; sim_cflags="";;
3191 *) sim_cflags=`echo "${enableval}" | sed -e "s/,/ /g"`;;
3193 if test x"$silent" != x"yes" && test x"$sim_cflags" != x""; then
3194 echo "Setting sim cflags = $sim_cflags" 6>&1
3202 # Check whether --enable-sim-debug or --disable-sim-debug was given.
3203 if test "${enable_sim_debug+set}" = set; then
3204 enableval="$enable_sim_debug"
3205 case "${enableval}" in
3206 yes) sim_debug="-DDEBUG=7 -DWITH_DEBUG=7";;
3207 no) sim_debug="-DDEBUG=0 -DWITH_DEBUG=0";;
3208 *) sim_debug="-DDEBUG='(${enableval})' -DWITH_DEBUG='(${enableval})'";;
3210 if test x"$silent" != x"yes" && test x"$sim_debug" != x""; then
3211 echo "Setting sim debug = $sim_debug" 6>&1
3219 # Check whether --enable-sim-stdio or --disable-sim-stdio was given.
3220 if test "${enable_sim_stdio+set}" = set; then
3221 enableval="$enable_sim_stdio"
3222 case "${enableval}" in
3223 yes) sim_stdio="-DWITH_STDIO=DO_USE_STDIO";;
3224 no) sim_stdio="-DWITH_STDIO=DONT_USE_STDIO";;
3225 *) { echo "configure: error: "Unknown value $enableval passed to --enable-sim-stdio"" 1>&2; exit 1; }; sim_stdio="";;
3227 if test x"$silent" != x"yes" && test x"$sim_stdio" != x""; then
3228 echo "Setting stdio flags = $sim_stdio" 6>&1
3236 # Check whether --enable-sim-trace or --disable-sim-trace was given.
3237 if test "${enable_sim_trace+set}" = set; then
3238 enableval="$enable_sim_trace"
3239 case "${enableval}" in
3240 yes) sim_trace="-DTRACE=1 -DWITH_TRACE=-1";;
3241 no) sim_trace="-DTRACE=0 -DWITH_TRACE=0";;
3243 sim_trace="-DTRACE='(${enableval})' -DWITH_TRACE='(${enableval})'";;
3246 for x in `echo "$enableval" | sed -e "s/,/ /g"`; do
3247 if test x"$sim_trace" = x; then
3248 sim_trace="-DWITH_TRACE='(TRACE_$x"
3250 sim_trace="${sim_trace}|TRACE_$x"
3253 sim_trace="$sim_trace)'" ;;
3255 if test x"$silent" != x"yes" && test x"$sim_trace" != x""; then
3256 echo "Setting sim trace = $sim_trace" 6>&1
3264 # Check whether --enable-sim-profile or --disable-sim-profile was given.
3265 if test "${enable_sim_profile+set}" = set; then
3266 enableval="$enable_sim_profile"
3267 case "${enableval}" in
3268 yes) sim_profile="-DPROFILE=1 -DWITH_PROFILE=-1";;
3269 no) sim_profile="-DPROFILE=0 -DWITH_PROFILE=0";;
3271 sim_profile="-DPROFILE='(${enableval})' -DWITH_PROFILE='(${enableval})'";;
3274 for x in `echo "$enableval" | sed -e "s/,/ /g"`; do
3275 if test x"$sim_profile" = x; then
3276 sim_profile="-DWITH_PROFILE='(PROFILE_$x"
3278 sim_profile="${sim_profile}|PROFILE_$x"
3281 sim_profile="$sim_profile)'" ;;
3283 if test x"$silent" != x"yes" && test x"$sim_profile" != x""; then
3284 echo "Setting sim profile = $sim_profile" 6>&1
3292 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
3293 echo "configure:3294: checking return type of signal handlers" >&5
3294 if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
3295 echo $ac_n "(cached) $ac_c" 1>&6
3297 cat > conftest.$ac_ext <<EOF
3298 #line 3299 "configure"
3299 #include "confdefs.h"
3300 #include <sys/types.h>
3306 extern "C" void (*signal (int, void (*)(int)))(int);
3308 void (*signal ()) ();
3315 if { (eval echo configure:3316: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3317 ac_cv_type_signal=void
3319 echo "configure: failed program was:" >&5
3320 cat conftest.$ac_ext >&5
3322 ac_cv_type_signal=int
3327 echo "$ac_t""$ac_cv_type_signal" 1>&6
3328 cat >> confdefs.h <<EOF
3329 #define RETSIGTYPE $ac_cv_type_signal
3334 echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
3335 echo "configure:3336: checking for executable suffix" >&5
3336 if eval "test \"`echo '$''{'am_cv_exeext'+set}'`\" = set"; then
3337 echo $ac_n "(cached) $ac_c" 1>&6
3339 if test "$CYGWIN32" = yes; then
3342 cat > am_c_test.c << 'EOF'
3344 /* Nothing needed here */
3347 ${CC-cc} -o am_c_test $CFLAGS $CPPFLAGS $LDFLAGS am_c_test.c $LIBS 1>&5
3348 am_cv_exeext=`ls am_c_test.* | grep -v am_c_test.c | sed -e s/am_c_test//`
3352 test x"${am_cv_exeext}" = x && am_cv_exeext=no
3355 test x"${am_cv_exeext}" != xno && EXEEXT=${am_cv_exeext}
3356 echo "$ac_t""${am_cv_exeext}" 1>&6
3362 sim_link_links=tconfig.h
3363 if test -f ${srcdir}/tconfig.in
3365 sim_link_files=tconfig.in
3367 sim_link_files=../common/tconfig.in
3370 # targ-vals.def points to the libc macro description file.
3372 *-*-*) TARG_VALS_DEF=../common/nltvals.def ;;
3374 sim_link_files="${sim_link_files} ${TARG_VALS_DEF}"
3375 sim_link_links="${sim_link_links} targ-vals.def"
3380 wire_endian="LITTLE_ENDIAN"
3382 # Check whether --enable-sim-endian or --disable-sim-endian was given.
3383 if test "${enable_sim_endian+set}" = set; then
3384 enableval="$enable_sim_endian"
3385 case "${enableval}" in
3386 b*|B*) sim_endian="-DWITH_TARGET_BYTE_ORDER=BIG_ENDIAN";;
3387 l*|L*) sim_endian="-DWITH_TARGET_BYTE_ORDER=LITTLE_ENDIAN";;
3388 yes) if test x"$wire_endian" != x; then
3389 sim_endian="-DWITH_TARGET_BYTE_ORDER=${wire_endian}"
3391 if test x"$default_endian" != x; then
3392 sim_endian="-DWITH_TARGET_BYTE_ORDER=${default_endian}"
3394 echo "No hard-wired endian for target $target" 1>&6
3395 sim_endian="-DWITH_TARGET_BYTE_ORDER=0"
3398 no) if test x"$default_endian" != x; then
3399 sim_endian="-DWITH_DEFAULT_TARGET_BYTE_ORDER=${default_endian}"
3401 if test x"$wire_endian" != x; then
3402 sim_endian="-DWITH_DEFAULT_TARGET_BYTE_ORDER=${wire_endian}"
3404 echo "No default endian for target $target" 1>&6
3405 sim_endian="-DWITH_DEFAULT_TARGET_BYTE_ORDER=0"
3408 *) { echo "configure: error: "Unknown value $enableval for --enable-sim-endian"" 1>&2; exit 1; }; sim_endian="";;
3410 if test x"$silent" != x"yes" && test x"$sim_endian" != x""; then
3411 echo "Setting endian flags = $sim_endian" 6>&1
3414 if test x"$default_endian" != x; then
3415 sim_endian="-DWITH_DEFAULT_TARGET_BYTE_ORDER=${default_endian}"
3417 if test x"$wire_endian" != x; then
3418 sim_endian="-DWITH_TARGET_BYTE_ORDER=${wire_endian}"
3426 default_alignment="NONSTRICT_ALIGNMENT"
3428 # Check whether --enable-sim-alignment or --disable-sim-alignment was given.
3429 if test "${enable_sim_alignment+set}" = set; then
3430 enableval="$enable_sim_alignment"
3431 case "${enableval}" in
3432 strict | STRICT) sim_alignment="-DWITH_ALIGNMENT=STRICT_ALIGNMENT";;
3433 nonstrict | NONSTRICT) sim_alignment="-DWITH_ALIGNMENT=NONSTRICT_ALIGNMENT";;
3434 forced | FORCED) sim_alignment="-DWITH_ALIGNMENT=FORCED_ALIGNMENT";;
3435 yes) if test x"$wire_alignment" != x; then
3436 sim_alignment="-DWITH_ALIGNMENT=${wire_alignment}"
3438 if test x"$default_alignment" != x; then
3439 sim_alignment="-DWITH_ALIGNMENT=${default_alignment}"
3441 echo "No hard-wired alignment for target $target" 1>&6
3442 sim_alignment="-DWITH_ALIGNMENT=0"
3445 no) if test x"$default_alignment" != x; then
3446 sim_alignment="-DWITH_DEFAULT_ALIGNMENT=${default_alignment}"
3448 if test x"$wire_alignment" != x; then
3449 sim_alignment="-DWITH_DEFAULT_ALIGNMENT=${wire_alignment}"
3451 echo "No default alignment for target $target" 1>&6
3452 sim_alignment="-DWITH_DEFAULT_ALIGNMENT=0"
3455 *) { echo "configure: error: "Unknown value $enableval passed to --enable-sim-alignment"" 1>&2; exit 1; }; sim_alignment="";;
3457 if test x"$silent" != x"yes" && test x"$sim_alignment" != x""; then
3458 echo "Setting alignment flags = $sim_alignment" 6>&1
3461 if test x"$default_alignment" != x; then
3462 sim_alignment="-DWITH_DEFAULT_ALIGNMENT=${default_alignment}"
3464 if test x"$wire_alignment" != x; then
3465 sim_alignment="-DWITH_ALIGNMENT=${wire_alignment}"
3473 # Check whether --enable-sim-hostendian or --disable-sim-hostendian was given.
3474 if test "${enable_sim_hostendian+set}" = set; then
3475 enableval="$enable_sim_hostendian"
3476 case "${enableval}" in
3477 no) sim_hostendian="-DWITH_HOST_BYTE_ORDER=0";;
3478 b*|B*) sim_hostendian="-DWITH_HOST_BYTE_ORDER=BIG_ENDIAN";;
3479 l*|L*) sim_hostendian="-DWITH_HOST_BYTE_ORDER=LITTLE_ENDIAN";;
3480 *) { echo "configure: error: "Unknown value $enableval for --enable-sim-hostendian"" 1>&2; exit 1; }; sim_hostendian="";;
3482 if test x"$silent" != x"yes" && test x"$sim_hostendian" != x""; then
3483 echo "Setting hostendian flags = $sim_hostendian" 6>&1
3487 if test "x$cross_compiling" = "xno"; then
3488 echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
3489 echo "configure:3490: checking whether byte ordering is bigendian" >&5
3490 if eval "test \"`echo '$''{'ac_cv_c_bigendian'+set}'`\" = set"; then
3491 echo $ac_n "(cached) $ac_c" 1>&6
3493 ac_cv_c_bigendian=unknown
3494 # See if sys/param.h defines the BYTE_ORDER macro.
3495 cat > conftest.$ac_ext <<EOF
3496 #line 3497 "configure"
3497 #include "confdefs.h"
3498 #include <sys/types.h>
3499 #include <sys/param.h>
3502 #if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
3507 if { (eval echo configure:3508: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3509 # It does; now see whether it defined to BIG_ENDIAN or not.
3510 cat > conftest.$ac_ext <<EOF
3511 #line 3512 "configure"
3512 #include "confdefs.h"
3513 #include <sys/types.h>
3514 #include <sys/param.h>
3517 #if BYTE_ORDER != BIG_ENDIAN
3522 if { (eval echo configure:3523: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3524 ac_cv_c_bigendian=yes
3526 echo "configure: failed program was:" >&5
3527 cat conftest.$ac_ext >&5
3529 ac_cv_c_bigendian=no
3533 echo "configure: failed program was:" >&5
3534 cat conftest.$ac_ext >&5
3537 if test $ac_cv_c_bigendian = unknown; then
3538 if test "$cross_compiling" = yes; then
3539 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
3541 cat > conftest.$ac_ext <<EOF
3542 #line 3543 "configure"
3543 #include "confdefs.h"
3545 /* Are we little or big endian? From Harbison&Steele. */
3549 char c[sizeof (long)];
3552 exit (u.c[sizeof (long) - 1] == 1);
3555 if { (eval echo configure:3556: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
3557 ac_cv_c_bigendian=no
3559 echo "configure: failed program was:" >&5
3560 cat conftest.$ac_ext >&5
3562 ac_cv_c_bigendian=yes
3570 echo "$ac_t""$ac_cv_c_bigendian" 1>&6
3571 if test $ac_cv_c_bigendian = yes; then
3572 cat >> confdefs.h <<\EOF
3573 #define WORDS_BIGENDIAN 1
3578 if test $ac_cv_c_bigendian = yes; then
3579 sim_hostendian="-DWITH_HOST_BYTE_ORDER=BIG_ENDIAN"
3581 sim_hostendian="-DWITH_HOST_BYTE_ORDER=LITTLE_ENDIAN"
3584 sim_hostendian="-DWITH_HOST_BYTE_ORDER=0"
3589 # Check whether --enable-build-warnings or --disable-build-warnings was given.
3590 if test "${enable_build_warnings+set}" = set; then
3591 enableval="$enable_build_warnings"
3592 build_warnings="-Wall -Wpointer-arith -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations"
3593 case "${enableval}" in
3595 no) build_warnings="-w";;
3596 ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"`
3597 build_warnings="${build_warnings} ${t}";;
3598 *,) t=`echo "${enableval}" | sed -e "s/,/ /g"`
3599 build_warnings="${t} ${build_warnings}";;
3600 *) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;;
3602 if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then
3603 echo "Setting warning flags = $build_warnings" 6>&1
3610 default_sim_reserved_bits="1"
3611 # Check whether --enable-sim-reserved-bits or --disable-sim-reserved-bits was given.
3612 if test "${enable_sim_reserved_bits+set}" = set; then
3613 enableval="$enable_sim_reserved_bits"
3614 case "${enableval}" in
3615 yes) sim_reserved_bits="-DWITH_RESERVED_BITS=1";;
3616 no) sim_reserved_bits="-DWITH_RESERVED_BITS=0";;
3617 *) { echo "configure: error: "--enable-sim-reserved-bits does not take a value"" 1>&2; exit 1; }; sim_reserved_bits="";;
3619 if test x"$silent" != x"yes" && test x"$sim_reserved_bits" != x""; then
3620 echo "Setting reserved flags = $sim_reserved_bits" 6>&1
3623 sim_reserved_bits="-DWITH_RESERVED_BITS=${default_sim_reserved_bits}"
3626 wire_word_bitsize="32"
3628 wire_address_bitsize=""
3629 wire_cell_bitsize=""
3630 # Check whether --enable-sim-bitsize or --disable-sim-bitsize was given.
3631 if test "${enable_sim_bitsize+set}" = set; then
3632 enableval="$enable_sim_bitsize"
3634 case "${enableval}" in
3635 64,63 | 64,63,* ) sim_bitsize="-DWITH_TARGET_WORD_BITSIZE=64 -DWITH_TARGET_WORD_MSB=63";;
3636 32,31 | 32,31,* ) sim_bitsize="-DWITH_TARGET_WORD_BITSIZE=32 -DWITH_TARGET_WORD_MSB=31";;
3637 64,0 | 64,0,* ) sim_bitsize="-DWITH_TARGET_WORD_BITSIZE=32 -DWITH_TARGET_WORD_MSB=0";;
3638 32,0 | 64,0,* ) sim_bitsize="-DWITH_TARGET_WORD_BITSIZE=32 -DWITH_TARGET_WORD_MSB=0";;
3639 32) if test x"$wire_word_msb" != x -a x"$wire_word_msb" != x0; then
3640 sim_bitsize="-DWITH_TARGET_WORD_BITSIZE=32 -DWITH_TARGET_WORD_MSB=31"
3642 sim_bitsize="-DWITH_TARGET_WORD_BITSIZE=32 -DWITH_TARGET_WORD_MSB=0"
3644 64) if test x"$wire_word_msb" != x -a x"$wire_word_msb" != x0; then
3645 sim_bitsize="-DWITH_TARGET_WORD_BITSIZE=64 -DWITH_TARGET_WORD_MSB=63"
3647 sim_bitsize="-DWITH_TARGET_WORD_BITSIZE=64 -DWITH_TARGET_WORD_MSB=0"
3649 *) { echo "configure: error: "--enable-sim-bitsize was given $enableval. Expected 32 or 64"" 1>&2; exit 1; } ;;
3652 tmp=`echo "${enableval}" | sed -e "s/^[0-9]*,*[0-9]*,*//"`
3655 x32 | x32,* ) sim_bitsize="${sim_bitsize} -DWITH_TARGET_ADDRESS_BITSIZE=32" ;;
3656 x64 | x64,* ) sim_bitsize="${sim_bitsize} -DWITH_TARGET_ADDRESS_BITSIZE=64" ;;
3657 * ) { echo "configure: error: "--enable-sim-bitsize was given address size $enableval. Expected 32 or 64"" 1>&2; exit 1; } ;;
3660 tmp=`echo "${enableval}" | sed -e "s/^[0-9]*,*[0-9*]*,*[0-9]*,*//"`
3663 x32 | x32,* ) sim_bitsize="${sim_bitsize} -DWITH_TARGET_CELL_BITSIZE=32" ;;
3664 x64 | x64,* ) sim_bitsize="${sim_bitsize} -DWITH_TARGET_CELL_BITSIZE=64" ;;
3665 * ) { echo "configure: error: "--enable-sim-bitsize was given cell size $enableval. Expected 32 or 64"" 1>&2; exit 1; } ;;
3667 if test x"$silent" != x"yes" && test x"$sim_bitsize" != x""; then
3668 echo "Setting bitsize flags = $sim_bitsize" 6>&1
3672 if test x"$wire_word_bitsize" != x; then
3673 sim_bitsize="$sim_bitsize -DWITH_TARGET_WORD_BITSIZE=$wire_word_bitsize"
3675 if test x"$wire_word_msb" != x; then
3676 sim_bitsize="$sim_bitsize -DWITH_TARGET_WORD_MSB=$wire_word_msb"
3678 if test x"$wire_address_bitsize" != x; then
3679 sim_bitsize="$sim_bitsize -DWITH_TARGET_ADDRESS_BITSIZE=$wire_address_bitsize"
3681 if test x"$wire_cell_bitsize" != x; then
3682 sim_bitsize="$sim_bitsize -DWITH_TARGET_CELL_BITSIZE=$wire_cell_bitsize"
3687 for ac_func in time chmod utime fork execve execv chown
3689 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3690 echo "configure:3691: checking for $ac_func" >&5
3691 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3692 echo $ac_n "(cached) $ac_c" 1>&6
3694 cat > conftest.$ac_ext <<EOF
3695 #line 3696 "configure"
3696 #include "confdefs.h"
3697 /* System header to define __stub macros and hopefully few prototypes,
3698 which can conflict with char $ac_func(); below. */
3700 /* Override any gcc2 internal prototype to avoid an error. */
3701 /* We use char because int might match the return type of a gcc2
3702 builtin and then its argument prototype would still apply. */
3707 /* The GNU C library defines this for functions which it implements
3708 to always fail with ENOSYS. Some functions are actually named
3709 something starting with __ and the normal name is an alias. */
3710 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3718 if { (eval echo configure:3719: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3720 eval "ac_cv_func_$ac_func=yes"
3722 echo "configure: failed program was:" >&5
3723 cat conftest.$ac_ext >&5
3725 eval "ac_cv_func_$ac_func=no"
3730 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3731 echo "$ac_t""yes" 1>&6
3732 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3733 cat >> confdefs.h <<EOF
3734 #define $ac_tr_func 1
3738 echo "$ac_t""no" 1>&6
3742 for ac_hdr in unistd.h stdlib.h string.h strings.h utime.h time.h
3744 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
3745 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
3746 echo "configure:3747: checking for $ac_hdr" >&5
3747 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3748 echo $ac_n "(cached) $ac_c" 1>&6
3750 cat > conftest.$ac_ext <<EOF
3751 #line 3752 "configure"
3752 #include "confdefs.h"
3755 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3756 { (eval echo configure:3757: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3757 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3758 if test -z "$ac_err"; then
3760 eval "ac_cv_header_$ac_safe=yes"
3763 echo "configure: failed program was:" >&5
3764 cat conftest.$ac_ext >&5
3766 eval "ac_cv_header_$ac_safe=no"
3770 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3771 echo "$ac_t""yes" 1>&6
3772 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
3773 cat >> confdefs.h <<EOF
3774 #define $ac_tr_hdr 1
3778 echo "$ac_t""no" 1>&6
3786 cat > confcache <<\EOF
3787 # This file is a shell script that caches the results of configure
3788 # tests run on this system so they can be shared between configure
3789 # scripts and configure runs. It is not useful on other systems.
3790 # If it contains results you don't want to keep, you may remove or edit it.
3792 # By default, configure uses ./config.cache as the cache file,
3793 # creating it if it does not exist already. You can give configure
3794 # the --cache-file=FILE option to use a different cache file; that is
3795 # what configure does when it calls configure scripts in
3796 # subdirectories, so they share the cache.
3797 # Giving --cache-file=/dev/null disables caching, for debugging configure.
3798 # config.status only pays attention to the cache file if you give it the
3799 # --recheck option to rerun configure.
3802 # The following way of writing the cache mishandles newlines in values,
3803 # but we know of no workaround that is simple, portable, and efficient.
3804 # So, don't put newlines in cache variables' values.
3805 # Ultrix sh set writes to stderr and can't be redirected directly,
3806 # and sets the high bit in the cache file unless we assign to the vars.
3808 case `(ac_space=' '; set) 2>&1 | grep ac_space` in
3810 # `set' does not quote correctly, so add quotes (double-quote substitution
3811 # turns \\\\ into \\, and sed turns \\ into \).
3813 -e "s/'/'\\\\''/g" \
3814 -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
3817 # `set' quotes correctly as required by POSIX, so do not add quotes.
3818 sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
3821 if cmp -s $cache_file confcache; then
3824 if test -w $cache_file; then
3825 echo "updating cache $cache_file"
3826 cat confcache > $cache_file
3828 echo "not updating unwritable cache $cache_file"
3833 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
3835 test "x$prefix" = xNONE && prefix=$ac_default_prefix
3836 # Let make expand exec_prefix.
3837 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
3839 # Any assignment to VPATH causes Sun make to only execute
3840 # the first set of double-colon rules, so remove it if not needed.
3841 # If there is a colon in the path, we need to keep it.
3842 if test "x$srcdir" = x.; then
3843 ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d'
3846 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
3848 DEFS=-DHAVE_CONFIG_H
3850 # Without the "./", some shells look in PATH for config.status.
3851 : ${CONFIG_STATUS=./config.status}
3853 echo creating $CONFIG_STATUS
3854 rm -f $CONFIG_STATUS
3855 cat > $CONFIG_STATUS <<EOF
3857 # Generated automatically by configure.
3858 # Run this file to recreate the current configuration.
3859 # This directory was configured as follows,
3860 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
3862 # $0 $ac_configure_args
3864 # Compiler output produced by configure, useful for debugging
3865 # configure, is in ./config.log if it exists.
3867 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
3870 case "\$ac_option" in
3871 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
3872 echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
3873 exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
3874 -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
3875 echo "$CONFIG_STATUS generated by autoconf version 2.12.2"
3877 -help | --help | --hel | --he | --h)
3878 echo "\$ac_cs_usage"; exit 0 ;;
3879 *) echo "\$ac_cs_usage"; exit 1 ;;
3883 ac_given_srcdir=$srcdir
3884 ac_given_INSTALL="$INSTALL"
3886 trap 'rm -fr `echo "Makefile.sim:Makefile.in Make-common.sim:../common/Make-common.in .gdbinit:../common/gdbinit.in config.h:config.in" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
3888 cat >> $CONFIG_STATUS <<EOF
3890 # Protect against being on the right side of a sed subst in config.status.
3891 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
3892 s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
3895 s%@sim_environment@%$sim_environment%g
3896 s%@sim_alignment@%$sim_alignment%g
3897 s%@sim_assert@%$sim_assert%g
3898 s%@sim_bitsize@%$sim_bitsize%g
3899 s%@sim_endian@%$sim_endian%g
3900 s%@sim_hostendian@%$sim_hostendian%g
3901 s%@sim_float@%$sim_float%g
3902 s%@sim_scache@%$sim_scache%g
3903 s%@sim_default_model@%$sim_default_model%g
3904 s%@sim_hw_cflags@%$sim_hw_cflags%g
3905 s%@sim_hw_objs@%$sim_hw_objs%g
3906 s%@sim_hw@%$sim_hw%g
3907 s%@sim_inline@%$sim_inline%g
3908 s%@sim_packages@%$sim_packages%g
3909 s%@sim_regparm@%$sim_regparm%g
3910 s%@sim_reserved_bits@%$sim_reserved_bits%g
3911 s%@sim_smp@%$sim_smp%g
3912 s%@sim_stdcall@%$sim_stdcall%g
3913 s%@sim_xor_endian@%$sim_xor_endian%g
3914 s%@build_warnings@%$build_warnings%g
3916 s%@CFLAGS@%$CFLAGS%g
3917 s%@CPPFLAGS@%$CPPFLAGS%g
3918 s%@CXXFLAGS@%$CXXFLAGS%g
3920 s%@LDFLAGS@%$LDFLAGS%g
3922 s%@exec_prefix@%$exec_prefix%g
3923 s%@prefix@%$prefix%g
3924 s%@program_transform_name@%$program_transform_name%g
3925 s%@bindir@%$bindir%g
3926 s%@sbindir@%$sbindir%g
3927 s%@libexecdir@%$libexecdir%g
3928 s%@datadir@%$datadir%g
3929 s%@sysconfdir@%$sysconfdir%g
3930 s%@sharedstatedir@%$sharedstatedir%g
3931 s%@localstatedir@%$localstatedir%g
3932 s%@libdir@%$libdir%g
3933 s%@includedir@%$includedir%g
3934 s%@oldincludedir@%$oldincludedir%g
3935 s%@infodir@%$infodir%g
3936 s%@mandir@%$mandir%g
3938 s%@host_alias@%$host_alias%g
3939 s%@host_cpu@%$host_cpu%g
3940 s%@host_vendor@%$host_vendor%g
3941 s%@host_os@%$host_os%g
3942 s%@target@%$target%g
3943 s%@target_alias@%$target_alias%g
3944 s%@target_cpu@%$target_cpu%g
3945 s%@target_vendor@%$target_vendor%g
3946 s%@target_os@%$target_os%g
3948 s%@build_alias@%$build_alias%g
3949 s%@build_cpu@%$build_cpu%g
3950 s%@build_vendor@%$build_vendor%g
3951 s%@build_os@%$build_os%g
3953 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
3954 s%@INSTALL_DATA@%$INSTALL_DATA%g
3955 s%@CC_FOR_BUILD@%$CC_FOR_BUILD%g
3956 s%@HDEFINES@%$HDEFINES%g
3958 s%@RANLIB@%$RANLIB%g
3959 s%@SET_MAKE@%$SET_MAKE%g
3961 s%@ALLOCA@%$ALLOCA%g
3962 s%@USE_NLS@%$USE_NLS%g
3963 s%@MSGFMT@%$MSGFMT%g
3964 s%@GMSGFMT@%$GMSGFMT%g
3965 s%@XGETTEXT@%$XGETTEXT%g
3966 s%@USE_INCLUDED_LIBINTL@%$USE_INCLUDED_LIBINTL%g
3967 s%@CATALOGS@%$CATALOGS%g
3968 s%@CATOBJEXT@%$CATOBJEXT%g
3969 s%@DATADIRNAME@%$DATADIRNAME%g
3970 s%@GMOFILES@%$GMOFILES%g
3971 s%@INSTOBJEXT@%$INSTOBJEXT%g
3972 s%@INTLDEPS@%$INTLDEPS%g
3973 s%@INTLLIBS@%$INTLLIBS%g
3974 s%@INTLOBJS@%$INTLOBJS%g
3975 s%@POFILES@%$POFILES%g
3977 s%@INCLUDE_LOCALE_H@%$INCLUDE_LOCALE_H%g
3979 s%@GT_YES@%$GT_YES%g
3980 s%@MKINSTALLDIRS@%$MKINSTALLDIRS%g
3983 s%@sim_bswap@%$sim_bswap%g
3984 s%@sim_cflags@%$sim_cflags%g
3985 s%@sim_debug@%$sim_debug%g
3986 s%@sim_stdio@%$sim_stdio%g
3987 s%@sim_trace@%$sim_trace%g
3988 s%@sim_profile@%$sim_profile%g
3989 s%@EXEEXT@%$EXEEXT%g
3994 cat >> $CONFIG_STATUS <<\EOF
3996 # Split the substitutions into bite-sized pieces for seds with
3997 # small command number limits, like on Digital OSF/1 and HP-UX.
3998 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
3999 ac_file=1 # Number of current file.
4000 ac_beg=1 # First line for current file.
4001 ac_end=$ac_max_sed_cmds # Line after last line for current file.
4004 while $ac_more_lines; do
4005 if test $ac_beg -gt 1; then
4006 sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
4008 sed "${ac_end}q" conftest.subs > conftest.s$ac_file
4010 if test ! -s conftest.s$ac_file; then
4012 rm -f conftest.s$ac_file
4014 if test -z "$ac_sed_cmds"; then
4015 ac_sed_cmds="sed -f conftest.s$ac_file"
4017 ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
4019 ac_file=`expr $ac_file + 1`
4021 ac_end=`expr $ac_end + $ac_max_sed_cmds`
4024 if test -z "$ac_sed_cmds"; then
4029 cat >> $CONFIG_STATUS <<EOF
4031 CONFIG_FILES=\${CONFIG_FILES-"Makefile.sim:Makefile.in Make-common.sim:../common/Make-common.in .gdbinit:../common/gdbinit.in"}
4033 cat >> $CONFIG_STATUS <<\EOF
4034 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
4035 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
4037 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
4038 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
4039 *) ac_file_in="${ac_file}.in" ;;
4042 # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
4044 # Remove last slash and all that follows it. Not all systems have dirname.
4045 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
4046 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
4047 # The file is in a subdirectory.
4048 test ! -d "$ac_dir" && mkdir "$ac_dir"
4049 ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
4050 # A "../" for each directory in $ac_dir_suffix.
4051 ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
4053 ac_dir_suffix= ac_dots=
4056 case "$ac_given_srcdir" in
4058 if test -z "$ac_dots"; then top_srcdir=.
4059 else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
4060 /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
4062 srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
4063 top_srcdir="$ac_dots$ac_given_srcdir" ;;
4066 case "$ac_given_INSTALL" in
4067 [/$]*) INSTALL="$ac_given_INSTALL" ;;
4068 *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
4071 echo creating "$ac_file"
4073 configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
4075 *Makefile*) ac_comsub="1i\\
4076 # $configure_input" ;;
4080 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
4082 s%@configure_input@%$configure_input%g
4083 s%@srcdir@%$srcdir%g
4084 s%@top_srcdir@%$top_srcdir%g
4085 s%@INSTALL@%$INSTALL%g
4086 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
4090 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
4091 # NAME is the cpp macro being defined and VALUE is the value it is being given.
4093 # ac_d sets the value in "#define NAME VALUE" lines.
4094 ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)'
4095 ac_dB='\([ ][ ]*\)[^ ]*%\1#\2'
4098 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
4099 ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
4100 ac_uB='\([ ]\)%\1#\2define\3'
4103 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
4104 ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
4105 ac_eB='$%\1#\2define\3'
4109 if test "${CONFIG_HEADERS+set}" != set; then
4111 cat >> $CONFIG_STATUS <<EOF
4112 CONFIG_HEADERS="config.h:config.in"
4114 cat >> $CONFIG_STATUS <<\EOF
4116 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
4117 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
4119 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
4120 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
4121 *) ac_file_in="${ac_file}.in" ;;
4124 echo creating $ac_file
4126 rm -f conftest.frag conftest.in conftest.out
4127 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
4128 cat $ac_file_inputs > conftest.in
4132 # Transform confdefs.h into a sed script conftest.vals that substitutes
4133 # the proper values into config.h.in to produce config.h. And first:
4134 # Protect against being on the right side of a sed subst in config.status.
4135 # Protect against being in an unquoted here document in config.status.
4137 cat > conftest.hdr <<\EOF
4140 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
4144 sed -n -f conftest.hdr confdefs.h > conftest.vals
4147 # This sed command replaces #undef with comments. This is necessary, for
4148 # example, in the case of _POSIX_SOURCE, which is predefined and required
4149 # on some systems where configure will not decide to define it.
4150 cat >> conftest.vals <<\EOF
4151 s%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
4154 # Break up conftest.vals because some shells have a limit on
4155 # the size of here documents, and old seds have small limits too.
4160 ac_lines=`grep -c . conftest.vals`
4161 # grep -c gives empty output for an empty file on some AIX systems.
4162 if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
4163 # Write a limited-size here document to conftest.frag.
4164 echo ' cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
4165 sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
4167 sed -f conftest.frag conftest.in > conftest.out
4169 mv conftest.out conftest.in
4171 sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
4173 mv conftest.tail conftest.vals
4177 cat >> $CONFIG_STATUS <<\EOF
4178 rm -f conftest.frag conftest.h
4179 echo "/* $ac_file. Generated automatically by configure. */" > conftest.h
4180 cat conftest.in >> conftest.h
4182 if cmp -s $ac_file conftest.h 2>/dev/null; then
4183 echo "$ac_file is unchanged"
4186 # Remove last slash and all that follows it. Not all systems have dirname.
4187 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
4188 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
4189 # The file is in a subdirectory.
4190 test ! -d "$ac_dir" && mkdir "$ac_dir"
4193 mv conftest.h $ac_file
4199 cat >> $CONFIG_STATUS <<EOF
4200 ac_sources="$sim_link_files"
4201 ac_dests="$sim_link_links"
4204 cat >> $CONFIG_STATUS <<\EOF
4205 srcdir=$ac_given_srcdir
4206 while test -n "$ac_sources"; do
4207 set $ac_dests; ac_dest=$1; shift; ac_dests=$*
4208 set $ac_sources; ac_source=$1; shift; ac_sources=$*
4210 echo "linking $srcdir/$ac_source to $ac_dest"
4212 if test ! -r $srcdir/$ac_source; then
4213 { echo "configure: error: $srcdir/$ac_source: File not found" 1>&2; exit 1; }
4217 # Make relative symlinks.
4218 # Remove last slash and all that follows it. Not all systems have dirname.
4219 ac_dest_dir=`echo $ac_dest|sed 's%/[^/][^/]*$%%'`
4220 if test "$ac_dest_dir" != "$ac_dest" && test "$ac_dest_dir" != .; then
4221 # The dest file is in a subdirectory.
4222 test ! -d "$ac_dest_dir" && mkdir "$ac_dest_dir"
4223 ac_dest_dir_suffix="/`echo $ac_dest_dir|sed 's%^\./%%'`"
4224 # A "../" for each directory in $ac_dest_dir_suffix.
4225 ac_dots=`echo $ac_dest_dir_suffix|sed 's%/[^/]*%../%g'`
4227 ac_dest_dir_suffix= ac_dots=
4231 [/$]*) ac_rel_source="$srcdir/$ac_source" ;;
4232 *) ac_rel_source="$ac_dots$srcdir/$ac_source" ;;
4235 # Make a symlink if possible; otherwise try a hard link.
4236 if ln -s $ac_rel_source $ac_dest 2>/dev/null ||
4237 ln $srcdir/$ac_source $ac_dest; then :
4239 { echo "configure: error: can not link $ac_dest to $srcdir/$ac_source" 1>&2; exit 1; }
4243 cat >> $CONFIG_STATUS <<EOF
4246 cat >> $CONFIG_STATUS <<\EOF
4247 case "x$CONFIG_FILES" in
4249 echo "Merging Makefile.sim+Make-common.sim into Makefile ..."
4250 rm -f Makesim1.tmp Makesim2.tmp Makefile
4251 sed -n -e '/^## COMMON_PRE_/,/^## End COMMON_PRE_/ p' <Make-common.sim >Makesim1.tmp
4252 sed -n -e '/^## COMMON_POST_/,/^## End COMMON_POST_/ p' <Make-common.sim >Makesim2.tmp
4253 sed -e '/^## COMMON_PRE_/ r Makesim1.tmp' \
4254 -e '/^## COMMON_POST_/ r Makesim2.tmp' \
4255 <Makefile.sim >Makefile
4256 rm -f Makefile.sim Make-common.sim Makesim1.tmp Makesim2.tmp
4259 case "x$CONFIG_HEADERS" in xconfig.h:config.in) echo > stamp-h ;; esac
4263 chmod +x $CONFIG_STATUS
4264 rm -fr confdefs* $ac_clean_files
4265 test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1