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.
125 # Guess values for system-dependent variables and create Makefiles.
126 # Generated automatically using autoconf version 2.13
127 # Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
129 # This configure script is free software; the Free Software Foundation
130 # gives unlimited permission to copy, distribute and modify it.
134 ac_default_prefix=/usr/local
135 # Any additions from configure.in:
137 --disable-nls do not use Native Language Support"
139 --with-included-gettext use the GNU gettext library included here"
141 --enable-maintainer-mode Enable developer functionality."
143 --enable-sim-bswap Use Host specific BSWAP instruction."
145 --enable-sim-cflags=opts Extra CFLAGS for use in building simulator"
147 --enable-sim-debug=opts Enable debugging flags"
149 --enable-sim-stdio Specify whether to use stdio for console input/output."
151 --enable-sim-trace=opts Enable tracing flags"
153 --enable-sim-profile=opts Enable profiling flags"
155 --enable-sim-endian=endian Specify target byte endian orientation."
157 --enable-sim-alignment=align Specify strict, nonstrict or forced alignment of memory accesses."
159 --enable-sim-hostendian=end Specify host byte endian orientation."
161 --enable-sim-scache=size Specify simulator execution cache size."
163 --enable-sim-default-model=model Specify default model to simulate."
165 --enable-sim-environment=environment Specify mixed, user, virtual or operating environment."
167 --enable-sim-inline=inlines Specify which functions should be inlined."
169 --enable-cgen-maint[=DIR] build cgen generated files"
171 # Initialize some variables set by options.
172 # The variables have the same names as the options, with
173 # dashes changed to underlines.
175 cache_file=./config.cache
184 program_transform_name=s,x,x,
193 bindir='${exec_prefix}/bin'
194 sbindir='${exec_prefix}/sbin'
195 libexecdir='${exec_prefix}/libexec'
196 datadir='${prefix}/share'
197 sysconfdir='${prefix}/etc'
198 sharedstatedir='${prefix}/com'
199 localstatedir='${prefix}/var'
200 libdir='${exec_prefix}/lib'
201 includedir='${prefix}/include'
202 oldincludedir='/usr/include'
203 infodir='${prefix}/info'
204 mandir='${prefix}/man'
206 # Initialize some other variables.
209 SHELL=${CONFIG_SHELL-/bin/sh}
210 # Maximum number of lines to put in a shell here document.
217 # If the previous option needs an argument, assign it.
218 if test -n "$ac_prev"; then
219 eval "$ac_prev=\$ac_option"
225 -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
229 # Accept the important Cygnus configure options, so we can diagnose typos.
233 -bindir | --bindir | --bindi | --bind | --bin | --bi)
235 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
236 bindir="$ac_optarg" ;;
238 -build | --build | --buil | --bui | --bu)
240 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
241 build="$ac_optarg" ;;
243 -cache-file | --cache-file | --cache-fil | --cache-fi \
244 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
245 ac_prev=cache_file ;;
246 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
247 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
248 cache_file="$ac_optarg" ;;
250 -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
252 -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
254 datadir="$ac_optarg" ;;
256 -disable-* | --disable-*)
257 ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
258 # Reject names that are not valid shell variable names.
259 if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
260 { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
262 ac_feature=`echo $ac_feature| sed 's/-/_/g'`
263 eval "enable_${ac_feature}=no" ;;
265 -enable-* | --enable-*)
266 ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
267 # Reject names that are not valid shell variable names.
268 if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
269 { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
271 ac_feature=`echo $ac_feature| sed 's/-/_/g'`
276 eval "enable_${ac_feature}='$ac_optarg'" ;;
278 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
279 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
280 | --exec | --exe | --ex)
281 ac_prev=exec_prefix ;;
282 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
283 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
284 | --exec=* | --exe=* | --ex=*)
285 exec_prefix="$ac_optarg" ;;
287 -gas | --gas | --ga | --g)
288 # Obsolete; use --with-gas.
291 -help | --help | --hel | --he)
292 # Omit some internal or obsolete options to make the list less imposing.
293 # This message is too long to be a string in the A/UX 3.1 sh.
295 Usage: configure [options] [host]
296 Options: [defaults in brackets after descriptions]
298 --cache-file=FILE cache test results in FILE
299 --help print this message
300 --no-create do not create output files
301 --quiet, --silent do not print \`checking...' messages
302 --site-file=FILE use FILE as the site file
303 --version print the version of autoconf that created configure
304 Directory and file names:
305 --prefix=PREFIX install architecture-independent files in PREFIX
307 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
309 --bindir=DIR user executables in DIR [EPREFIX/bin]
310 --sbindir=DIR system admin executables in DIR [EPREFIX/sbin]
311 --libexecdir=DIR program executables in DIR [EPREFIX/libexec]
312 --datadir=DIR read-only architecture-independent data in DIR
314 --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc]
315 --sharedstatedir=DIR modifiable architecture-independent data in DIR
317 --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var]
318 --libdir=DIR object code libraries in DIR [EPREFIX/lib]
319 --includedir=DIR C header files in DIR [PREFIX/include]
320 --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include]
321 --infodir=DIR info documentation in DIR [PREFIX/info]
322 --mandir=DIR man documentation in DIR [PREFIX/man]
323 --srcdir=DIR find the sources in DIR [configure dir or ..]
324 --program-prefix=PREFIX prepend PREFIX to installed program names
325 --program-suffix=SUFFIX append SUFFIX to installed program names
326 --program-transform-name=PROGRAM
327 run sed PROGRAM on installed program names
331 --build=BUILD configure for building on BUILD [BUILD=HOST]
332 --host=HOST configure for HOST [guessed]
333 --target=TARGET configure for TARGET [TARGET=HOST]
334 Features and packages:
335 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
336 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
337 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
338 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
339 --x-includes=DIR X include files are in DIR
340 --x-libraries=DIR X library files are in DIR
342 if test -n "$ac_help"; then
343 echo "--enable and --with options recognized:$ac_help"
347 -host | --host | --hos | --ho)
349 -host=* | --host=* | --hos=* | --ho=*)
352 -includedir | --includedir | --includedi | --included | --include \
353 | --includ | --inclu | --incl | --inc)
354 ac_prev=includedir ;;
355 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
356 | --includ=* | --inclu=* | --incl=* | --inc=*)
357 includedir="$ac_optarg" ;;
359 -infodir | --infodir | --infodi | --infod | --info | --inf)
361 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
362 infodir="$ac_optarg" ;;
364 -libdir | --libdir | --libdi | --libd)
366 -libdir=* | --libdir=* | --libdi=* | --libd=*)
367 libdir="$ac_optarg" ;;
369 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
370 | --libexe | --libex | --libe)
371 ac_prev=libexecdir ;;
372 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
373 | --libexe=* | --libex=* | --libe=*)
374 libexecdir="$ac_optarg" ;;
376 -localstatedir | --localstatedir | --localstatedi | --localstated \
377 | --localstate | --localstat | --localsta | --localst \
378 | --locals | --local | --loca | --loc | --lo)
379 ac_prev=localstatedir ;;
380 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
381 | --localstate=* | --localstat=* | --localsta=* | --localst=* \
382 | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
383 localstatedir="$ac_optarg" ;;
385 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
387 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
388 mandir="$ac_optarg" ;;
391 # Obsolete; use --without-fp.
394 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
398 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
399 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
402 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
403 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
404 | --oldin | --oldi | --old | --ol | --o)
405 ac_prev=oldincludedir ;;
406 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
407 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
408 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
409 oldincludedir="$ac_optarg" ;;
411 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
413 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
414 prefix="$ac_optarg" ;;
416 -program-prefix | --program-prefix | --program-prefi | --program-pref \
417 | --program-pre | --program-pr | --program-p)
418 ac_prev=program_prefix ;;
419 -program-prefix=* | --program-prefix=* | --program-prefi=* \
420 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
421 program_prefix="$ac_optarg" ;;
423 -program-suffix | --program-suffix | --program-suffi | --program-suff \
424 | --program-suf | --program-su | --program-s)
425 ac_prev=program_suffix ;;
426 -program-suffix=* | --program-suffix=* | --program-suffi=* \
427 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
428 program_suffix="$ac_optarg" ;;
430 -program-transform-name | --program-transform-name \
431 | --program-transform-nam | --program-transform-na \
432 | --program-transform-n | --program-transform- \
433 | --program-transform | --program-transfor \
434 | --program-transfo | --program-transf \
435 | --program-trans | --program-tran \
436 | --progr-tra | --program-tr | --program-t)
437 ac_prev=program_transform_name ;;
438 -program-transform-name=* | --program-transform-name=* \
439 | --program-transform-nam=* | --program-transform-na=* \
440 | --program-transform-n=* | --program-transform-=* \
441 | --program-transform=* | --program-transfor=* \
442 | --program-transfo=* | --program-transf=* \
443 | --program-trans=* | --program-tran=* \
444 | --progr-tra=* | --program-tr=* | --program-t=*)
445 program_transform_name="$ac_optarg" ;;
447 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
448 | -silent | --silent | --silen | --sile | --sil)
451 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
453 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
455 sbindir="$ac_optarg" ;;
457 -sharedstatedir | --sharedstatedir | --sharedstatedi \
458 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
459 | --sharedst | --shareds | --shared | --share | --shar \
461 ac_prev=sharedstatedir ;;
462 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
463 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
464 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
466 sharedstatedir="$ac_optarg" ;;
468 -site | --site | --sit)
470 -site=* | --site=* | --sit=*)
473 -site-file | --site-file | --site-fil | --site-fi | --site-f)
475 -site-file=* | --site-file=* | --site-fil=* | --site-fi=* | --site-f=*)
476 sitefile="$ac_optarg" ;;
478 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
480 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
481 srcdir="$ac_optarg" ;;
483 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
484 | --syscon | --sysco | --sysc | --sys | --sy)
485 ac_prev=sysconfdir ;;
486 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
487 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
488 sysconfdir="$ac_optarg" ;;
490 -target | --target | --targe | --targ | --tar | --ta | --t)
492 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
493 target="$ac_optarg" ;;
495 -v | -verbose | --verbose | --verbos | --verbo | --verb)
498 -version | --version | --versio | --versi | --vers)
499 echo "configure generated by autoconf version 2.13"
503 ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
504 # Reject names that are not valid shell variable names.
505 if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
506 { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
508 ac_package=`echo $ac_package| sed 's/-/_/g'`
513 eval "with_${ac_package}='$ac_optarg'" ;;
515 -without-* | --without-*)
516 ac_package=`echo $ac_option|sed -e 's/-*without-//'`
517 # Reject names that are not valid shell variable names.
518 if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
519 { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
521 ac_package=`echo $ac_package| sed 's/-/_/g'`
522 eval "with_${ac_package}=no" ;;
525 # Obsolete; use --with-x.
528 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
529 | --x-incl | --x-inc | --x-in | --x-i)
530 ac_prev=x_includes ;;
531 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
532 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
533 x_includes="$ac_optarg" ;;
535 -x-libraries | --x-libraries | --x-librarie | --x-librari \
536 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
537 ac_prev=x_libraries ;;
538 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
539 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
540 x_libraries="$ac_optarg" ;;
542 -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
546 if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
547 echo "configure: warning: $ac_option: invalid host type" 1>&2
549 if test "x$nonopt" != xNONE; then
550 { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
558 if test -n "$ac_prev"; then
559 { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
562 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
564 # File descriptor usage:
567 # 2 errors and warnings
568 # 3 some systems may open it to /dev/tty
569 # 4 used on the Kubota Titan
570 # 6 checking for... messages and results
571 # 5 compiler messages saved in config.log
572 if test "$silent" = yes; then
580 This file contains any messages produced by compilers while
581 running configure, to aid debugging if configure makes a mistake.
584 # Strip out --no-create and --no-recursion so they do not pile up.
585 # Also quote any args containing shell metacharacters.
590 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
591 | --no-cr | --no-c) ;;
592 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
593 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
594 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
595 ac_configure_args="$ac_configure_args '$ac_arg'" ;;
596 *) ac_configure_args="$ac_configure_args $ac_arg" ;;
601 # Only set these to C if already set. These must not be set unconditionally
602 # because not all systems understand e.g. LANG=C (notably SCO).
603 # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
604 # Non-C LC_CTYPE values break the ctype check.
605 if test "${LANG+set}" = set; then LANG=C; export LANG; fi
606 if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
607 if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
608 if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi
610 # confdefs.h avoids OS command line length limits that DEFS can exceed.
611 rm -rf conftest* confdefs.h
612 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
615 # A filename unique to this package, relative to the directory that
616 # configure is in, which we can look for to find out if srcdir is correct.
617 ac_unique_file=Makefile.in
619 # Find the source files, if location was not specified.
620 if test -z "$srcdir"; then
621 ac_srcdir_defaulted=yes
622 # Try the directory containing this script, then its parent.
624 ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
625 test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
627 if test ! -r $srcdir/$ac_unique_file; then
631 ac_srcdir_defaulted=no
633 if test ! -r $srcdir/$ac_unique_file; then
634 if test "$ac_srcdir_defaulted" = yes; then
635 { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
637 { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
640 srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
642 # Prefer explicitly selected file to automatically selected ones.
643 if test -z "$sitefile"; then
644 if test -z "$CONFIG_SITE"; then
645 if test "x$prefix" != xNONE; then
646 CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
648 CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
652 CONFIG_SITE="$sitefile"
654 for ac_site_file in $CONFIG_SITE; do
655 if test -r "$ac_site_file"; then
656 echo "loading site script $ac_site_file"
661 if test -r "$cache_file"; then
662 echo "loading cache $cache_file"
665 echo "creating cache $cache_file"
670 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
671 ac_cpp='$CPP $CPPFLAGS'
672 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
673 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
674 cross_compiling=$ac_cv_prog_cc_cross
678 if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
680 if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
687 ac_n= ac_c='\c' ac_t=
692 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
693 echo "configure:694: checking how to run the C preprocessor" >&5
694 # On Suns, sometimes $CPP names a directory.
695 if test -n "$CPP" && test -d "$CPP"; then
698 if test -z "$CPP"; then
699 if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
700 echo $ac_n "(cached) $ac_c" 1>&6
702 # This must be in double quotes, not single quotes, because CPP may get
703 # substituted into the Makefile and "${CC-cc}" will confuse make.
705 # On the NeXT, cc -E runs the code through the compiler's parser,
706 # not just through cpp.
707 cat > conftest.$ac_ext <<EOF
708 #line 709 "configure"
709 #include "confdefs.h"
713 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
714 { (eval echo configure:715: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
715 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
716 if test -z "$ac_err"; then
720 echo "configure: failed program was:" >&5
721 cat conftest.$ac_ext >&5
723 CPP="${CC-cc} -E -traditional-cpp"
724 cat > conftest.$ac_ext <<EOF
725 #line 726 "configure"
726 #include "confdefs.h"
730 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
731 { (eval echo configure:732: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
732 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
733 if test -z "$ac_err"; then
737 echo "configure: failed program was:" >&5
738 cat conftest.$ac_ext >&5
740 CPP="${CC-cc} -nologo -E"
741 cat > conftest.$ac_ext <<EOF
742 #line 743 "configure"
743 #include "confdefs.h"
747 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
748 { (eval echo configure:749: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
749 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
750 if test -z "$ac_err"; then
754 echo "configure: failed program was:" >&5
755 cat conftest.$ac_ext >&5
764 ac_cv_prog_CPP="$CPP"
766 CPP="$ac_cv_prog_CPP"
768 ac_cv_prog_CPP="$CPP"
770 echo "$ac_t""$CPP" 1>&6
772 echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
773 echo "configure:774: checking whether ${MAKE-make} sets \${MAKE}" >&5
774 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
775 if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
776 echo $ac_n "(cached) $ac_c" 1>&6
778 cat > conftestmake <<\EOF
780 @echo 'ac_maketemp="${MAKE}"'
782 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
783 eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
784 if test -n "$ac_maketemp"; then
785 eval ac_cv_prog_make_${ac_make}_set=yes
787 eval ac_cv_prog_make_${ac_make}_set=no
791 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
792 echo "$ac_t""yes" 1>&6
795 echo "$ac_t""no" 1>&6
796 SET_MAKE="MAKE=${MAKE-make}"
799 echo $ac_n "checking for POSIXized ISC""... $ac_c" 1>&6
800 echo "configure:801: checking for POSIXized ISC" >&5
801 if test -d /etc/conf/kconfig.d &&
802 grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1
804 echo "$ac_t""yes" 1>&6
805 ISC=yes # If later tests want to check for ISC.
806 cat >> confdefs.h <<\EOF
807 #define _POSIX_SOURCE 1
810 if test "$GCC" = yes; then
816 echo "$ac_t""no" 1>&6
820 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
821 echo "configure:822: checking for ANSI C header files" >&5
822 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
823 echo $ac_n "(cached) $ac_c" 1>&6
825 cat > conftest.$ac_ext <<EOF
826 #line 827 "configure"
827 #include "confdefs.h"
833 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
834 { (eval echo configure:835: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
835 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
836 if test -z "$ac_err"; then
838 ac_cv_header_stdc=yes
841 echo "configure: failed program was:" >&5
842 cat conftest.$ac_ext >&5
848 if test $ac_cv_header_stdc = yes; then
849 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
850 cat > conftest.$ac_ext <<EOF
851 #line 852 "configure"
852 #include "confdefs.h"
855 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
856 egrep "memchr" >/dev/null 2>&1; then
866 if test $ac_cv_header_stdc = yes; then
867 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
868 cat > conftest.$ac_ext <<EOF
869 #line 870 "configure"
870 #include "confdefs.h"
873 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
874 egrep "free" >/dev/null 2>&1; then
884 if test $ac_cv_header_stdc = yes; then
885 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
886 if test "$cross_compiling" = yes; then
889 cat > conftest.$ac_ext <<EOF
890 #line 891 "configure"
891 #include "confdefs.h"
893 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
894 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
895 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
896 int main () { int i; for (i = 0; i < 256; i++)
897 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
901 if { (eval echo configure:902: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
905 echo "configure: failed program was:" >&5
906 cat conftest.$ac_ext >&5
916 echo "$ac_t""$ac_cv_header_stdc" 1>&6
917 if test $ac_cv_header_stdc = yes; then
918 cat >> confdefs.h <<\EOF
919 #define STDC_HEADERS 1
924 echo $ac_n "checking for working const""... $ac_c" 1>&6
925 echo "configure:926: checking for working const" >&5
926 if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
927 echo $ac_n "(cached) $ac_c" 1>&6
929 cat > conftest.$ac_ext <<EOF
930 #line 931 "configure"
931 #include "confdefs.h"
935 /* Ultrix mips cc rejects this. */
936 typedef int charset[2]; const charset x;
937 /* SunOS 4.1.1 cc rejects this. */
938 char const *const *ccp;
940 /* NEC SVR4.0.2 mips cc rejects this. */
941 struct point {int x, y;};
942 static struct point const zero = {0,0};
943 /* AIX XL C 1.02.0.0 rejects this.
944 It does not let you subtract one const X* pointer from another in an arm
945 of an if-expression whose if-part is not a constant expression */
946 const char *g = "string";
947 ccp = &g + (g ? g-g : 0);
948 /* HPUX 7.0 cc rejects these. */
951 ccp = (char const *const *) p;
952 { /* SCO 3.2v4 cc rejects this. */
954 char const *s = 0 ? (char *) 0 : (char const *) 0;
958 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
960 const int *foo = &x[0];
963 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
964 typedef const int *iptr;
968 { /* AIX XL C 1.02.0.0 rejects this saying
969 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
970 struct s { int j; const int *ap[3]; };
971 struct s *b; b->j = 5;
973 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
979 if { (eval echo configure:980: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
983 echo "configure: failed program was:" >&5
984 cat conftest.$ac_ext >&5
991 echo "$ac_t""$ac_cv_c_const" 1>&6
992 if test $ac_cv_c_const = no; then
993 cat >> confdefs.h <<\EOF
999 echo $ac_n "checking for inline""... $ac_c" 1>&6
1000 echo "configure:1001: checking for inline" >&5
1001 if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then
1002 echo $ac_n "(cached) $ac_c" 1>&6
1005 for ac_kw in inline __inline__ __inline; do
1006 cat > conftest.$ac_ext <<EOF
1007 #line 1008 "configure"
1008 #include "confdefs.h"
1014 if { (eval echo configure:1015: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1016 ac_cv_c_inline=$ac_kw; break
1018 echo "configure: failed program was:" >&5
1019 cat conftest.$ac_ext >&5
1026 echo "$ac_t""$ac_cv_c_inline" 1>&6
1027 case "$ac_cv_c_inline" in
1029 no) cat >> confdefs.h <<\EOF
1033 *) cat >> confdefs.h <<EOF
1034 #define inline $ac_cv_c_inline
1039 echo $ac_n "checking for off_t""... $ac_c" 1>&6
1040 echo "configure:1041: checking for off_t" >&5
1041 if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then
1042 echo $ac_n "(cached) $ac_c" 1>&6
1044 cat > conftest.$ac_ext <<EOF
1045 #line 1046 "configure"
1046 #include "confdefs.h"
1047 #include <sys/types.h>
1053 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1054 egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
1056 ac_cv_type_off_t=yes
1064 echo "$ac_t""$ac_cv_type_off_t" 1>&6
1065 if test $ac_cv_type_off_t = no; then
1066 cat >> confdefs.h <<\EOF
1072 echo $ac_n "checking for size_t""... $ac_c" 1>&6
1073 echo "configure:1074: checking for size_t" >&5
1074 if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
1075 echo $ac_n "(cached) $ac_c" 1>&6
1077 cat > conftest.$ac_ext <<EOF
1078 #line 1079 "configure"
1079 #include "confdefs.h"
1080 #include <sys/types.h>
1086 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1087 egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
1089 ac_cv_type_size_t=yes
1092 ac_cv_type_size_t=no
1097 echo "$ac_t""$ac_cv_type_size_t" 1>&6
1098 if test $ac_cv_type_size_t = no; then
1099 cat >> confdefs.h <<\EOF
1100 #define size_t unsigned
1105 # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
1106 # for constant arguments. Useless!
1107 echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6
1108 echo "configure:1109: checking for working alloca.h" >&5
1109 if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then
1110 echo $ac_n "(cached) $ac_c" 1>&6
1112 cat > conftest.$ac_ext <<EOF
1113 #line 1114 "configure"
1114 #include "confdefs.h"
1117 char *p = alloca(2 * sizeof(int));
1120 if { (eval echo configure:1121: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1122 ac_cv_header_alloca_h=yes
1124 echo "configure: failed program was:" >&5
1125 cat conftest.$ac_ext >&5
1127 ac_cv_header_alloca_h=no
1132 echo "$ac_t""$ac_cv_header_alloca_h" 1>&6
1133 if test $ac_cv_header_alloca_h = yes; then
1134 cat >> confdefs.h <<\EOF
1135 #define HAVE_ALLOCA_H 1
1140 echo $ac_n "checking for alloca""... $ac_c" 1>&6
1141 echo "configure:1142: checking for alloca" >&5
1142 if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then
1143 echo $ac_n "(cached) $ac_c" 1>&6
1145 cat > conftest.$ac_ext <<EOF
1146 #line 1147 "configure"
1147 #include "confdefs.h"
1150 # define alloca __builtin_alloca
1153 # include <malloc.h>
1154 # define alloca _alloca
1157 # include <alloca.h>
1162 # ifndef alloca /* predefined by HP cc +Olibcalls */
1171 char *p = (char *) alloca(1);
1174 if { (eval echo configure:1175: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1176 ac_cv_func_alloca_works=yes
1178 echo "configure: failed program was:" >&5
1179 cat conftest.$ac_ext >&5
1181 ac_cv_func_alloca_works=no
1186 echo "$ac_t""$ac_cv_func_alloca_works" 1>&6
1187 if test $ac_cv_func_alloca_works = yes; then
1188 cat >> confdefs.h <<\EOF
1189 #define HAVE_ALLOCA 1
1194 if test $ac_cv_func_alloca_works = no; then
1195 # The SVR3 libPW and SVR4 libucb both contain incompatible functions
1196 # that cause trouble. Some versions do not even contain alloca or
1197 # contain a buggy version. If you still want to use their alloca,
1198 # use ar to extract alloca.o from them instead of compiling alloca.c.
1199 ALLOCA=alloca.${ac_objext}
1200 cat >> confdefs.h <<\EOF
1205 echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
1206 echo "configure:1207: checking whether alloca needs Cray hooks" >&5
1207 if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then
1208 echo $ac_n "(cached) $ac_c" 1>&6
1210 cat > conftest.$ac_ext <<EOF
1211 #line 1212 "configure"
1212 #include "confdefs.h"
1213 #if defined(CRAY) && ! defined(CRAY2)
1220 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1221 egrep "webecray" >/dev/null 2>&1; then
1232 echo "$ac_t""$ac_cv_os_cray" 1>&6
1233 if test $ac_cv_os_cray = yes; then
1234 for ac_func in _getb67 GETB67 getb67; do
1235 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
1236 echo "configure:1237: checking for $ac_func" >&5
1237 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
1238 echo $ac_n "(cached) $ac_c" 1>&6
1240 cat > conftest.$ac_ext <<EOF
1241 #line 1242 "configure"
1242 #include "confdefs.h"
1243 /* System header to define __stub macros and hopefully few prototypes,
1244 which can conflict with char $ac_func(); below. */
1246 /* Override any gcc2 internal prototype to avoid an error. */
1247 /* We use char because int might match the return type of a gcc2
1248 builtin and then its argument prototype would still apply. */
1253 /* The GNU C library defines this for functions which it implements
1254 to always fail with ENOSYS. Some functions are actually named
1255 something starting with __ and the normal name is an alias. */
1256 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
1264 if { (eval echo configure:1265: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1266 eval "ac_cv_func_$ac_func=yes"
1268 echo "configure: failed program was:" >&5
1269 cat conftest.$ac_ext >&5
1271 eval "ac_cv_func_$ac_func=no"
1276 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
1277 echo "$ac_t""yes" 1>&6
1278 cat >> confdefs.h <<EOF
1279 #define CRAY_STACKSEG_END $ac_func
1284 echo "$ac_t""no" 1>&6
1290 echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
1291 echo "configure:1292: checking stack direction for C alloca" >&5
1292 if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then
1293 echo $ac_n "(cached) $ac_c" 1>&6
1295 if test "$cross_compiling" = yes; then
1296 ac_cv_c_stack_direction=0
1298 cat > conftest.$ac_ext <<EOF
1299 #line 1300 "configure"
1300 #include "confdefs.h"
1301 find_stack_direction ()
1303 static char *addr = 0;
1308 return find_stack_direction ();
1311 return (&dummy > addr) ? 1 : -1;
1315 exit (find_stack_direction() < 0);
1318 if { (eval echo configure:1319: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
1320 ac_cv_c_stack_direction=1
1322 echo "configure: failed program was:" >&5
1323 cat conftest.$ac_ext >&5
1325 ac_cv_c_stack_direction=-1
1332 echo "$ac_t""$ac_cv_c_stack_direction" 1>&6
1333 cat >> confdefs.h <<EOF
1334 #define STACK_DIRECTION $ac_cv_c_stack_direction
1339 for ac_hdr in unistd.h
1341 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
1342 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
1343 echo "configure:1344: checking for $ac_hdr" >&5
1344 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1345 echo $ac_n "(cached) $ac_c" 1>&6
1347 cat > conftest.$ac_ext <<EOF
1348 #line 1349 "configure"
1349 #include "confdefs.h"
1352 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1353 { (eval echo configure:1354: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1354 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1355 if test -z "$ac_err"; then
1357 eval "ac_cv_header_$ac_safe=yes"
1360 echo "configure: failed program was:" >&5
1361 cat conftest.$ac_ext >&5
1363 eval "ac_cv_header_$ac_safe=no"
1367 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1368 echo "$ac_t""yes" 1>&6
1369 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
1370 cat >> confdefs.h <<EOF
1371 #define $ac_tr_hdr 1
1375 echo "$ac_t""no" 1>&6
1379 for ac_func in getpagesize
1381 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
1382 echo "configure:1383: checking for $ac_func" >&5
1383 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
1384 echo $ac_n "(cached) $ac_c" 1>&6
1386 cat > conftest.$ac_ext <<EOF
1387 #line 1388 "configure"
1388 #include "confdefs.h"
1389 /* System header to define __stub macros and hopefully few prototypes,
1390 which can conflict with char $ac_func(); below. */
1392 /* Override any gcc2 internal prototype to avoid an error. */
1393 /* We use char because int might match the return type of a gcc2
1394 builtin and then its argument prototype would still apply. */
1399 /* The GNU C library defines this for functions which it implements
1400 to always fail with ENOSYS. Some functions are actually named
1401 something starting with __ and the normal name is an alias. */
1402 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
1410 if { (eval echo configure:1411: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1412 eval "ac_cv_func_$ac_func=yes"
1414 echo "configure: failed program was:" >&5
1415 cat conftest.$ac_ext >&5
1417 eval "ac_cv_func_$ac_func=no"
1422 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
1423 echo "$ac_t""yes" 1>&6
1424 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
1425 cat >> confdefs.h <<EOF
1426 #define $ac_tr_func 1
1430 echo "$ac_t""no" 1>&6
1434 echo $ac_n "checking for working mmap""... $ac_c" 1>&6
1435 echo "configure:1436: checking for working mmap" >&5
1436 if eval "test \"`echo '$''{'ac_cv_func_mmap_fixed_mapped'+set}'`\" = set"; then
1437 echo $ac_n "(cached) $ac_c" 1>&6
1439 if test "$cross_compiling" = yes; then
1440 ac_cv_func_mmap_fixed_mapped=no
1442 cat > conftest.$ac_ext <<EOF
1443 #line 1444 "configure"
1444 #include "confdefs.h"
1446 /* Thanks to Mike Haertel and Jim Avera for this test.
1447 Here is a matrix of mmap possibilities:
1448 mmap private not fixed
1449 mmap private fixed at somewhere currently unmapped
1450 mmap private fixed at somewhere already mapped
1451 mmap shared not fixed
1452 mmap shared fixed at somewhere currently unmapped
1453 mmap shared fixed at somewhere already mapped
1454 For private mappings, we should verify that changes cannot be read()
1455 back from the file, nor mmap's back from the file at a different
1456 address. (There have been systems where private was not correctly
1457 implemented like the infamous i386 svr4.0, and systems where the
1458 VM page cache was not coherent with the filesystem buffer cache
1459 like early versions of FreeBSD and possibly contemporary NetBSD.)
1460 For shared mappings, we should conversely verify that changes get
1461 propogated back to all the places they're supposed to be.
1463 Grep wants private fixed already mapped.
1464 The main things grep needs to know about mmap are:
1465 * does it exist and is it safe to write into the mmap'd area
1466 * how to use it (BSD variants) */
1467 #include <sys/types.h>
1469 #include <sys/mman.h>
1471 /* This mess was copied from the GNU getpagesize.h. */
1472 #ifndef HAVE_GETPAGESIZE
1473 # ifdef HAVE_UNISTD_H
1474 # include <unistd.h>
1477 /* Assume that all systems that can run configure have sys/param.h. */
1478 # ifndef HAVE_SYS_PARAM_H
1479 # define HAVE_SYS_PARAM_H 1
1482 # ifdef _SC_PAGESIZE
1483 # define getpagesize() sysconf(_SC_PAGESIZE)
1484 # else /* no _SC_PAGESIZE */
1485 # ifdef HAVE_SYS_PARAM_H
1486 # include <sys/param.h>
1487 # ifdef EXEC_PAGESIZE
1488 # define getpagesize() EXEC_PAGESIZE
1489 # else /* no EXEC_PAGESIZE */
1491 # define getpagesize() NBPG * CLSIZE
1494 # endif /* no CLSIZE */
1495 # else /* no NBPG */
1497 # define getpagesize() NBPC
1498 # else /* no NBPC */
1500 # define getpagesize() PAGESIZE
1501 # endif /* PAGESIZE */
1502 # endif /* no NBPC */
1503 # endif /* no NBPG */
1504 # endif /* no EXEC_PAGESIZE */
1505 # else /* no HAVE_SYS_PARAM_H */
1506 # define getpagesize() 8192 /* punt totally */
1507 # endif /* no HAVE_SYS_PARAM_H */
1508 # endif /* no _SC_PAGESIZE */
1510 #endif /* no HAVE_GETPAGESIZE */
1513 extern "C" { void *malloc(unsigned); }
1521 char *data, *data2, *data3;
1525 pagesize = getpagesize();
1528 * First, make a file with some known garbage in it.
1530 data = malloc(pagesize);
1533 for (i = 0; i < pagesize; ++i)
1534 *(data + i) = rand();
1536 fd = creat("conftestmmap", 0600);
1539 if (write(fd, data, pagesize) != pagesize)
1544 * Next, try to mmap the file at a fixed address which
1545 * already has something else allocated at it. If we can,
1546 * also make sure that we see the same garbage.
1548 fd = open("conftestmmap", O_RDWR);
1551 data2 = malloc(2 * pagesize);
1554 data2 += (pagesize - ((int) data2 & (pagesize - 1))) & (pagesize - 1);
1555 if (data2 != mmap(data2, pagesize, PROT_READ | PROT_WRITE,
1556 MAP_PRIVATE | MAP_FIXED, fd, 0L))
1558 for (i = 0; i < pagesize; ++i)
1559 if (*(data + i) != *(data2 + i))
1563 * Finally, make sure that changes to the mapped area
1564 * do not percolate back to the file as seen by read().
1565 * (This is a bug on some variants of i386 svr4.0.)
1567 for (i = 0; i < pagesize; ++i)
1568 *(data2 + i) = *(data2 + i) + 1;
1569 data3 = malloc(pagesize);
1572 if (read(fd, data3, pagesize) != pagesize)
1574 for (i = 0; i < pagesize; ++i)
1575 if (*(data + i) != *(data3 + i))
1578 unlink("conftestmmap");
1583 if { (eval echo configure:1584: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
1585 ac_cv_func_mmap_fixed_mapped=yes
1587 echo "configure: failed program was:" >&5
1588 cat conftest.$ac_ext >&5
1590 ac_cv_func_mmap_fixed_mapped=no
1597 echo "$ac_t""$ac_cv_func_mmap_fixed_mapped" 1>&6
1598 if test $ac_cv_func_mmap_fixed_mapped = yes; then
1599 cat >> confdefs.h <<\EOF
1605 echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
1606 echo "configure:1607: checking for Cygwin environment" >&5
1607 if eval "test \"`echo '$''{'ac_cv_cygwin'+set}'`\" = set"; then
1608 echo $ac_n "(cached) $ac_c" 1>&6
1610 cat > conftest.$ac_ext <<EOF
1611 #line 1612 "configure"
1612 #include "confdefs.h"
1617 #define __CYGWIN__ __CYGWIN32__
1622 if { (eval echo configure:1623: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1626 echo "configure: failed program was:" >&5
1627 cat conftest.$ac_ext >&5
1635 echo "$ac_t""$ac_cv_cygwin" 1>&6
1637 test "$ac_cv_cygwin" = yes && CYGWIN=yes
1638 echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
1639 echo "configure:1640: checking for mingw32 environment" >&5
1640 if eval "test \"`echo '$''{'ac_cv_mingw32'+set}'`\" = set"; then
1641 echo $ac_n "(cached) $ac_c" 1>&6
1643 cat > conftest.$ac_ext <<EOF
1644 #line 1645 "configure"
1645 #include "confdefs.h"
1651 if { (eval echo configure:1652: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1655 echo "configure: failed program was:" >&5
1656 cat conftest.$ac_ext >&5
1664 echo "$ac_t""$ac_cv_mingw32" 1>&6
1666 test "$ac_cv_mingw32" = yes && MINGW32=yes
1668 # autoconf.info says this should be called right after AC_INIT.
1672 for ac_dir in `cd $srcdir;pwd`/../.. $srcdir/`cd $srcdir;pwd`/../..; do
1673 if test -f $ac_dir/install-sh; then
1675 ac_install_sh="$ac_aux_dir/install-sh -c"
1677 elif test -f $ac_dir/install.sh; then
1679 ac_install_sh="$ac_aux_dir/install.sh -c"
1683 if test -z "$ac_aux_dir"; then
1684 { echo "configure: error: can not find install-sh or install.sh in `cd $srcdir;pwd`/../.. $srcdir/`cd $srcdir;pwd`/../.." 1>&2; exit 1; }
1686 ac_config_guess=$ac_aux_dir/config.guess
1687 ac_config_sub=$ac_aux_dir/config.sub
1688 ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
1691 # Do some error checking and defaulting for the host and target type.
1693 # configure --host=HOST --target=TARGET --build=BUILD NONOPT
1696 # 1. You are not allowed to specify --host, --target, and nonopt at the
1698 # 2. Host defaults to nonopt.
1699 # 3. If nonopt is not specified, then host defaults to the current host,
1700 # as determined by config.guess.
1701 # 4. Target and build default to nonopt.
1702 # 5. If nonopt is not specified, then target and build default to host.
1704 # The aliases save the names the user supplied, while $host etc.
1705 # will get canonicalized.
1706 case $host---$target---$nonopt in
1707 NONE---*---* | *---NONE---* | *---*---NONE) ;;
1708 *) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;;
1712 # Make sure we can run config.sub.
1713 if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then :
1714 else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
1717 echo $ac_n "checking host system type""... $ac_c" 1>&6
1718 echo "configure:1719: checking host system type" >&5
1721 case "$host_alias" in
1725 if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then :
1726 else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
1728 *) host_alias=$nonopt ;;
1732 host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias`
1733 host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1734 host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1735 host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1736 echo "$ac_t""$host" 1>&6
1738 echo $ac_n "checking target system type""... $ac_c" 1>&6
1739 echo "configure:1740: checking target system type" >&5
1741 target_alias=$target
1742 case "$target_alias" in
1745 NONE) target_alias=$host_alias ;;
1746 *) target_alias=$nonopt ;;
1750 target=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $target_alias`
1751 target_cpu=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1752 target_vendor=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1753 target_os=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1754 echo "$ac_t""$target" 1>&6
1756 echo $ac_n "checking build system type""... $ac_c" 1>&6
1757 echo "configure:1758: checking build system type" >&5
1760 case "$build_alias" in
1763 NONE) build_alias=$host_alias ;;
1764 *) build_alias=$nonopt ;;
1768 build=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $build_alias`
1769 build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1770 build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1771 build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1772 echo "$ac_t""$build" 1>&6
1774 test "$host_alias" != "$target_alias" &&
1775 test "$program_prefix$program_suffix$program_transform_name" = \
1777 program_prefix=${target_alias}-
1779 if test "$program_transform_name" = s,x,x,; then
1780 program_transform_name=
1782 # Double any \ or $. echo might interpret backslashes.
1783 cat <<\EOF_SED > conftestsed
1784 s,\\,\\\\,g; s,\$,$$,g
1786 program_transform_name="`echo $program_transform_name|sed -f conftestsed`"
1789 test "$program_prefix" != NONE &&
1790 program_transform_name="s,^,${program_prefix},; $program_transform_name"
1791 # Use a double $ so make ignores it.
1792 test "$program_suffix" != NONE &&
1793 program_transform_name="s,\$\$,${program_suffix},; $program_transform_name"
1795 # sed with no file args requires a program.
1796 test "$program_transform_name" = "" && program_transform_name="s,x,x,"
1798 # Extract the first word of "gcc", so it can be a program name with args.
1799 set dummy gcc; ac_word=$2
1800 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1801 echo "configure:1802: checking for $ac_word" >&5
1802 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
1803 echo $ac_n "(cached) $ac_c" 1>&6
1805 if test -n "$CC"; then
1806 ac_cv_prog_CC="$CC" # Let the user override the test.
1808 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1810 for ac_dir in $ac_dummy; do
1811 test -z "$ac_dir" && ac_dir=.
1812 if test -f $ac_dir/$ac_word; then
1821 if test -n "$CC"; then
1822 echo "$ac_t""$CC" 1>&6
1824 echo "$ac_t""no" 1>&6
1827 if test -z "$CC"; then
1828 # Extract the first word of "cc", so it can be a program name with args.
1829 set dummy cc; ac_word=$2
1830 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1831 echo "configure:1832: checking for $ac_word" >&5
1832 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
1833 echo $ac_n "(cached) $ac_c" 1>&6
1835 if test -n "$CC"; then
1836 ac_cv_prog_CC="$CC" # Let the user override the test.
1838 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1841 for ac_dir in $ac_dummy; do
1842 test -z "$ac_dir" && ac_dir=.
1843 if test -f $ac_dir/$ac_word; then
1844 if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
1845 ac_prog_rejected=yes
1853 if test $ac_prog_rejected = yes; then
1854 # We found a bogon in the path, so make sure we never use it.
1855 set dummy $ac_cv_prog_CC
1857 if test $# -gt 0; then
1858 # We chose a different compiler from the bogus one.
1859 # However, it has the same basename, so the bogon will be chosen
1860 # first if we set CC to just the basename; use the full file name.
1862 set dummy "$ac_dir/$ac_word" "$@"
1870 if test -n "$CC"; then
1871 echo "$ac_t""$CC" 1>&6
1873 echo "$ac_t""no" 1>&6
1876 if test -z "$CC"; then
1877 case "`uname -s`" in
1879 # Extract the first word of "cl", so it can be a program name with args.
1880 set dummy cl; ac_word=$2
1881 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1882 echo "configure:1883: checking for $ac_word" >&5
1883 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
1884 echo $ac_n "(cached) $ac_c" 1>&6
1886 if test -n "$CC"; then
1887 ac_cv_prog_CC="$CC" # Let the user override the test.
1889 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1891 for ac_dir in $ac_dummy; do
1892 test -z "$ac_dir" && ac_dir=.
1893 if test -f $ac_dir/$ac_word; then
1902 if test -n "$CC"; then
1903 echo "$ac_t""$CC" 1>&6
1905 echo "$ac_t""no" 1>&6
1910 test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
1913 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
1914 echo "configure:1915: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
1917 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
1918 ac_cpp='$CPP $CPPFLAGS'
1919 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
1920 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
1921 cross_compiling=$ac_cv_prog_cc_cross
1923 cat > conftest.$ac_ext << EOF
1925 #line 1926 "configure"
1926 #include "confdefs.h"
1930 if { (eval echo configure:1931: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1931 ac_cv_prog_cc_works=yes
1932 # If we can't run a trivial program, we are probably using a cross compiler.
1933 if (./conftest; exit) 2>/dev/null; then
1934 ac_cv_prog_cc_cross=no
1936 ac_cv_prog_cc_cross=yes
1939 echo "configure: failed program was:" >&5
1940 cat conftest.$ac_ext >&5
1941 ac_cv_prog_cc_works=no
1945 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
1946 ac_cpp='$CPP $CPPFLAGS'
1947 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
1948 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
1949 cross_compiling=$ac_cv_prog_cc_cross
1951 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
1952 if test $ac_cv_prog_cc_works = no; then
1953 { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
1955 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
1956 echo "configure:1957: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
1957 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
1958 cross_compiling=$ac_cv_prog_cc_cross
1960 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
1961 echo "configure:1962: checking whether we are using GNU C" >&5
1962 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
1963 echo $ac_n "(cached) $ac_c" 1>&6
1965 cat > conftest.c <<EOF
1970 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1971: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
1977 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
1979 if test $ac_cv_prog_gcc = yes; then
1985 ac_test_CFLAGS="${CFLAGS+set}"
1986 ac_save_CFLAGS="$CFLAGS"
1988 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
1989 echo "configure:1990: checking whether ${CC-cc} accepts -g" >&5
1990 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
1991 echo $ac_n "(cached) $ac_c" 1>&6
1993 echo 'void f(){}' > conftest.c
1994 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
2003 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
2004 if test "$ac_test_CFLAGS" = set; then
2005 CFLAGS="$ac_save_CFLAGS"
2006 elif test $ac_cv_prog_cc_g = yes; then
2007 if test "$GCC" = yes; then
2013 if test "$GCC" = yes; then
2020 # Find a good install program. We prefer a C program (faster),
2021 # so one script is as good as another. But avoid the broken or
2022 # incompatible versions:
2023 # SysV /etc/install, /usr/sbin/install
2024 # SunOS /usr/etc/install
2025 # IRIX /sbin/install
2027 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
2028 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
2029 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
2030 # ./install, which can be erroneously created by make from ./install.sh.
2031 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
2032 echo "configure:2033: checking for a BSD compatible install" >&5
2033 if test -z "$INSTALL"; then
2034 if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
2035 echo $ac_n "(cached) $ac_c" 1>&6
2037 IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS=":"
2038 for ac_dir in $PATH; do
2039 # Account for people who put trailing slashes in PATH elements.
2041 /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
2043 # OSF1 and SCO ODT 3.0 have their own names for install.
2044 # Don't use installbsd from OSF since it installs stuff as root
2046 for ac_prog in ginstall scoinst install; do
2047 if test -f $ac_dir/$ac_prog; then
2048 if test $ac_prog = install &&
2049 grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
2050 # AIX install. It has an incompatible calling convention.
2053 ac_cv_path_install="$ac_dir/$ac_prog -c"
2064 if test "${ac_cv_path_install+set}" = set; then
2065 INSTALL="$ac_cv_path_install"
2067 # As a last resort, use the slow shell script. We don't cache a
2068 # path for INSTALL within a source directory, because that will
2069 # break other packages using the cache if that directory is
2070 # removed, or if the path is relative.
2071 INSTALL="$ac_install_sh"
2074 echo "$ac_t""$INSTALL" 1>&6
2076 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
2077 # It thinks the first close brace ends the variable substitution.
2078 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
2080 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
2082 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
2085 # Put a plausible default for CC_FOR_BUILD in Makefile.
2086 if test "x$cross_compiling" = "xno"; then
2087 CC_FOR_BUILD='$(CC)'
2097 # Extract the first word of "ranlib", so it can be a program name with args.
2098 set dummy ranlib; ac_word=$2
2099 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2100 echo "configure:2101: checking for $ac_word" >&5
2101 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
2102 echo $ac_n "(cached) $ac_c" 1>&6
2104 if test -n "$RANLIB"; then
2105 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
2107 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2109 for ac_dir in $ac_dummy; do
2110 test -z "$ac_dir" && ac_dir=.
2111 if test -f $ac_dir/$ac_word; then
2112 ac_cv_prog_RANLIB="ranlib"
2117 test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
2120 RANLIB="$ac_cv_prog_RANLIB"
2121 if test -n "$RANLIB"; then
2122 echo "$ac_t""$RANLIB" 1>&6
2124 echo "$ac_t""no" 1>&6
2130 for ac_hdr in argz.h limits.h locale.h nl_types.h malloc.h string.h \
2131 unistd.h values.h sys/param.h
2133 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2134 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2135 echo "configure:2136: checking for $ac_hdr" >&5
2136 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2137 echo $ac_n "(cached) $ac_c" 1>&6
2139 cat > conftest.$ac_ext <<EOF
2140 #line 2141 "configure"
2141 #include "confdefs.h"
2144 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2145 { (eval echo configure:2146: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2146 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2147 if test -z "$ac_err"; then
2149 eval "ac_cv_header_$ac_safe=yes"
2152 echo "configure: failed program was:" >&5
2153 cat conftest.$ac_ext >&5
2155 eval "ac_cv_header_$ac_safe=no"
2159 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2160 echo "$ac_t""yes" 1>&6
2161 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2162 cat >> confdefs.h <<EOF
2163 #define $ac_tr_hdr 1
2167 echo "$ac_t""no" 1>&6
2171 for ac_func in getcwd munmap putenv setenv setlocale strchr strcasecmp \
2172 __argz_count __argz_stringify __argz_next
2174 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
2175 echo "configure:2176: checking for $ac_func" >&5
2176 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2177 echo $ac_n "(cached) $ac_c" 1>&6
2179 cat > conftest.$ac_ext <<EOF
2180 #line 2181 "configure"
2181 #include "confdefs.h"
2182 /* System header to define __stub macros and hopefully few prototypes,
2183 which can conflict with char $ac_func(); below. */
2185 /* Override any gcc2 internal prototype to avoid an error. */
2186 /* We use char because int might match the return type of a gcc2
2187 builtin and then its argument prototype would still apply. */
2192 /* The GNU C library defines this for functions which it implements
2193 to always fail with ENOSYS. Some functions are actually named
2194 something starting with __ and the normal name is an alias. */
2195 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
2203 if { (eval echo configure:2204: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2205 eval "ac_cv_func_$ac_func=yes"
2207 echo "configure: failed program was:" >&5
2208 cat conftest.$ac_ext >&5
2210 eval "ac_cv_func_$ac_func=no"
2215 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
2216 echo "$ac_t""yes" 1>&6
2217 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2218 cat >> confdefs.h <<EOF
2219 #define $ac_tr_func 1
2223 echo "$ac_t""no" 1>&6
2228 if test "${ac_cv_func_stpcpy+set}" != "set"; then
2229 for ac_func in stpcpy
2231 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
2232 echo "configure:2233: checking for $ac_func" >&5
2233 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2234 echo $ac_n "(cached) $ac_c" 1>&6
2236 cat > conftest.$ac_ext <<EOF
2237 #line 2238 "configure"
2238 #include "confdefs.h"
2239 /* System header to define __stub macros and hopefully few prototypes,
2240 which can conflict with char $ac_func(); below. */
2242 /* Override any gcc2 internal prototype to avoid an error. */
2243 /* We use char because int might match the return type of a gcc2
2244 builtin and then its argument prototype would still apply. */
2249 /* The GNU C library defines this for functions which it implements
2250 to always fail with ENOSYS. Some functions are actually named
2251 something starting with __ and the normal name is an alias. */
2252 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
2260 if { (eval echo configure:2261: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2262 eval "ac_cv_func_$ac_func=yes"
2264 echo "configure: failed program was:" >&5
2265 cat conftest.$ac_ext >&5
2267 eval "ac_cv_func_$ac_func=no"
2272 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
2273 echo "$ac_t""yes" 1>&6
2274 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2275 cat >> confdefs.h <<EOF
2276 #define $ac_tr_func 1
2280 echo "$ac_t""no" 1>&6
2285 if test "${ac_cv_func_stpcpy}" = "yes"; then
2286 cat >> confdefs.h <<\EOF
2287 #define HAVE_STPCPY 1
2292 if test $ac_cv_header_locale_h = yes; then
2293 echo $ac_n "checking for LC_MESSAGES""... $ac_c" 1>&6
2294 echo "configure:2295: checking for LC_MESSAGES" >&5
2295 if eval "test \"`echo '$''{'am_cv_val_LC_MESSAGES'+set}'`\" = set"; then
2296 echo $ac_n "(cached) $ac_c" 1>&6
2298 cat > conftest.$ac_ext <<EOF
2299 #line 2300 "configure"
2300 #include "confdefs.h"
2306 if { (eval echo configure:2307: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2308 am_cv_val_LC_MESSAGES=yes
2310 echo "configure: failed program was:" >&5
2311 cat conftest.$ac_ext >&5
2313 am_cv_val_LC_MESSAGES=no
2318 echo "$ac_t""$am_cv_val_LC_MESSAGES" 1>&6
2319 if test $am_cv_val_LC_MESSAGES = yes; then
2320 cat >> confdefs.h <<\EOF
2321 #define HAVE_LC_MESSAGES 1
2326 echo $ac_n "checking whether NLS is requested""... $ac_c" 1>&6
2327 echo "configure:2328: checking whether NLS is requested" >&5
2328 # Check whether --enable-nls or --disable-nls was given.
2329 if test "${enable_nls+set}" = set; then
2330 enableval="$enable_nls"
2336 echo "$ac_t""$USE_NLS" 1>&6
2339 USE_INCLUDED_LIBINTL=no
2341 if test "$USE_NLS" = "yes"; then
2342 cat >> confdefs.h <<\EOF
2343 #define ENABLE_NLS 1
2346 echo $ac_n "checking whether included gettext is requested""... $ac_c" 1>&6
2347 echo "configure:2348: checking whether included gettext is requested" >&5
2348 # Check whether --with-included-gettext or --without-included-gettext was given.
2349 if test "${with_included_gettext+set}" = set; then
2350 withval="$with_included_gettext"
2351 nls_cv_force_use_gnu_gettext=$withval
2353 nls_cv_force_use_gnu_gettext=no
2356 echo "$ac_t""$nls_cv_force_use_gnu_gettext" 1>&6
2358 nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext"
2359 if test "$nls_cv_force_use_gnu_gettext" != "yes"; then
2361 nls_cv_header_libgt=
2364 ac_safe=`echo "libintl.h" | sed 'y%./+-%__p_%'`
2365 echo $ac_n "checking for libintl.h""... $ac_c" 1>&6
2366 echo "configure:2367: checking for libintl.h" >&5
2367 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2368 echo $ac_n "(cached) $ac_c" 1>&6
2370 cat > conftest.$ac_ext <<EOF
2371 #line 2372 "configure"
2372 #include "confdefs.h"
2373 #include <libintl.h>
2375 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2376 { (eval echo configure:2377: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2377 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2378 if test -z "$ac_err"; then
2380 eval "ac_cv_header_$ac_safe=yes"
2383 echo "configure: failed program was:" >&5
2384 cat conftest.$ac_ext >&5
2386 eval "ac_cv_header_$ac_safe=no"
2390 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2391 echo "$ac_t""yes" 1>&6
2392 echo $ac_n "checking for gettext in libc""... $ac_c" 1>&6
2393 echo "configure:2394: checking for gettext in libc" >&5
2394 if eval "test \"`echo '$''{'gt_cv_func_gettext_libc'+set}'`\" = set"; then
2395 echo $ac_n "(cached) $ac_c" 1>&6
2397 cat > conftest.$ac_ext <<EOF
2398 #line 2399 "configure"
2399 #include "confdefs.h"
2400 #include <libintl.h>
2402 return (int) gettext ("")
2405 if { (eval echo configure:2406: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2407 gt_cv_func_gettext_libc=yes
2409 echo "configure: failed program was:" >&5
2410 cat conftest.$ac_ext >&5
2412 gt_cv_func_gettext_libc=no
2417 echo "$ac_t""$gt_cv_func_gettext_libc" 1>&6
2419 if test "$gt_cv_func_gettext_libc" != "yes"; then
2420 echo $ac_n "checking for bindtextdomain in -lintl""... $ac_c" 1>&6
2421 echo "configure:2422: checking for bindtextdomain in -lintl" >&5
2422 ac_lib_var=`echo intl'_'bindtextdomain | sed 'y%./+-%__p_%'`
2423 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2424 echo $ac_n "(cached) $ac_c" 1>&6
2426 ac_save_LIBS="$LIBS"
2428 cat > conftest.$ac_ext <<EOF
2429 #line 2430 "configure"
2430 #include "confdefs.h"
2431 /* Override any gcc2 internal prototype to avoid an error. */
2432 /* We use char because int might match the return type of a gcc2
2433 builtin and then its argument prototype would still apply. */
2434 char bindtextdomain();
2440 if { (eval echo configure:2441: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2442 eval "ac_cv_lib_$ac_lib_var=yes"
2444 echo "configure: failed program was:" >&5
2445 cat conftest.$ac_ext >&5
2447 eval "ac_cv_lib_$ac_lib_var=no"
2450 LIBS="$ac_save_LIBS"
2453 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2454 echo "$ac_t""yes" 1>&6
2455 echo $ac_n "checking for gettext in libintl""... $ac_c" 1>&6
2456 echo "configure:2457: checking for gettext in libintl" >&5
2457 if eval "test \"`echo '$''{'gt_cv_func_gettext_libintl'+set}'`\" = set"; then
2458 echo $ac_n "(cached) $ac_c" 1>&6
2460 cat > conftest.$ac_ext <<EOF
2461 #line 2462 "configure"
2462 #include "confdefs.h"
2465 return (int) gettext ("")
2468 if { (eval echo configure:2469: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2470 gt_cv_func_gettext_libintl=yes
2472 echo "configure: failed program was:" >&5
2473 cat conftest.$ac_ext >&5
2475 gt_cv_func_gettext_libintl=no
2480 echo "$ac_t""$gt_cv_func_gettext_libintl" 1>&6
2482 echo "$ac_t""no" 1>&6
2487 if test "$gt_cv_func_gettext_libc" = "yes" \
2488 || test "$gt_cv_func_gettext_libintl" = "yes"; then
2489 cat >> confdefs.h <<\EOF
2490 #define HAVE_GETTEXT 1
2493 # Extract the first word of "msgfmt", so it can be a program name with args.
2494 set dummy msgfmt; ac_word=$2
2495 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2496 echo "configure:2497: checking for $ac_word" >&5
2497 if eval "test \"`echo '$''{'ac_cv_path_MSGFMT'+set}'`\" = set"; then
2498 echo $ac_n "(cached) $ac_c" 1>&6
2502 ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path.
2505 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
2506 for ac_dir in $PATH; do
2507 test -z "$ac_dir" && ac_dir=.
2508 if test -f $ac_dir/$ac_word; then
2509 if test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"; then
2510 ac_cv_path_MSGFMT="$ac_dir/$ac_word"
2516 test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT="no"
2520 MSGFMT="$ac_cv_path_MSGFMT"
2521 if test -n "$MSGFMT"; then
2522 echo "$ac_t""$MSGFMT" 1>&6
2524 echo "$ac_t""no" 1>&6
2526 if test "$MSGFMT" != "no"; then
2527 for ac_func in dcgettext
2529 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
2530 echo "configure:2531: checking for $ac_func" >&5
2531 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2532 echo $ac_n "(cached) $ac_c" 1>&6
2534 cat > conftest.$ac_ext <<EOF
2535 #line 2536 "configure"
2536 #include "confdefs.h"
2537 /* System header to define __stub macros and hopefully few prototypes,
2538 which can conflict with char $ac_func(); below. */
2540 /* Override any gcc2 internal prototype to avoid an error. */
2541 /* We use char because int might match the return type of a gcc2
2542 builtin and then its argument prototype would still apply. */
2547 /* The GNU C library defines this for functions which it implements
2548 to always fail with ENOSYS. Some functions are actually named
2549 something starting with __ and the normal name is an alias. */
2550 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
2558 if { (eval echo configure:2559: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2560 eval "ac_cv_func_$ac_func=yes"
2562 echo "configure: failed program was:" >&5
2563 cat conftest.$ac_ext >&5
2565 eval "ac_cv_func_$ac_func=no"
2570 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
2571 echo "$ac_t""yes" 1>&6
2572 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2573 cat >> confdefs.h <<EOF
2574 #define $ac_tr_func 1
2578 echo "$ac_t""no" 1>&6
2582 # Extract the first word of "gmsgfmt", so it can be a program name with args.
2583 set dummy gmsgfmt; ac_word=$2
2584 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2585 echo "configure:2586: checking for $ac_word" >&5
2586 if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then
2587 echo $ac_n "(cached) $ac_c" 1>&6
2591 ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path.
2594 ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a dos path.
2597 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2599 for ac_dir in $ac_dummy; do
2600 test -z "$ac_dir" && ac_dir=.
2601 if test -f $ac_dir/$ac_word; then
2602 ac_cv_path_GMSGFMT="$ac_dir/$ac_word"
2607 test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT"
2611 GMSGFMT="$ac_cv_path_GMSGFMT"
2612 if test -n "$GMSGFMT"; then
2613 echo "$ac_t""$GMSGFMT" 1>&6
2615 echo "$ac_t""no" 1>&6
2618 # Extract the first word of "xgettext", so it can be a program name with args.
2619 set dummy xgettext; ac_word=$2
2620 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2621 echo "configure:2622: checking for $ac_word" >&5
2622 if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then
2623 echo $ac_n "(cached) $ac_c" 1>&6
2627 ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path.
2630 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
2631 for ac_dir in $PATH; do
2632 test -z "$ac_dir" && ac_dir=.
2633 if test -f $ac_dir/$ac_word; then
2634 if test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"; then
2635 ac_cv_path_XGETTEXT="$ac_dir/$ac_word"
2641 test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":"
2645 XGETTEXT="$ac_cv_path_XGETTEXT"
2646 if test -n "$XGETTEXT"; then
2647 echo "$ac_t""$XGETTEXT" 1>&6
2649 echo "$ac_t""no" 1>&6
2652 cat > conftest.$ac_ext <<EOF
2653 #line 2654 "configure"
2654 #include "confdefs.h"
2657 extern int _nl_msg_cat_cntr;
2658 return _nl_msg_cat_cntr
2661 if { (eval echo configure:2662: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2666 echo "configure: failed program was:" >&5
2667 cat conftest.$ac_ext >&5
2678 echo "$ac_t""no" 1>&6
2683 if test "$CATOBJEXT" = "NONE"; then
2684 nls_cv_use_gnu_gettext=yes
2688 if test "$nls_cv_use_gnu_gettext" = "yes"; then
2689 INTLOBJS="\$(GETTOBJS)"
2690 # Extract the first word of "msgfmt", so it can be a program name with args.
2691 set dummy msgfmt; ac_word=$2
2692 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2693 echo "configure:2694: checking for $ac_word" >&5
2694 if eval "test \"`echo '$''{'ac_cv_path_MSGFMT'+set}'`\" = set"; then
2695 echo $ac_n "(cached) $ac_c" 1>&6
2699 ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path.
2702 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
2703 for ac_dir in $PATH; do
2704 test -z "$ac_dir" && ac_dir=.
2705 if test -f $ac_dir/$ac_word; then
2706 if test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"; then
2707 ac_cv_path_MSGFMT="$ac_dir/$ac_word"
2713 test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT="msgfmt"
2717 MSGFMT="$ac_cv_path_MSGFMT"
2718 if test -n "$MSGFMT"; then
2719 echo "$ac_t""$MSGFMT" 1>&6
2721 echo "$ac_t""no" 1>&6
2724 # Extract the first word of "gmsgfmt", so it can be a program name with args.
2725 set dummy gmsgfmt; ac_word=$2
2726 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2727 echo "configure:2728: checking for $ac_word" >&5
2728 if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then
2729 echo $ac_n "(cached) $ac_c" 1>&6
2733 ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path.
2736 ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a dos path.
2739 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2741 for ac_dir in $ac_dummy; do
2742 test -z "$ac_dir" && ac_dir=.
2743 if test -f $ac_dir/$ac_word; then
2744 ac_cv_path_GMSGFMT="$ac_dir/$ac_word"
2749 test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT"
2753 GMSGFMT="$ac_cv_path_GMSGFMT"
2754 if test -n "$GMSGFMT"; then
2755 echo "$ac_t""$GMSGFMT" 1>&6
2757 echo "$ac_t""no" 1>&6
2760 # Extract the first word of "xgettext", so it can be a program name with args.
2761 set dummy xgettext; ac_word=$2
2762 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2763 echo "configure:2764: checking for $ac_word" >&5
2764 if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then
2765 echo $ac_n "(cached) $ac_c" 1>&6
2769 ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path.
2772 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
2773 for ac_dir in $PATH; do
2774 test -z "$ac_dir" && ac_dir=.
2775 if test -f $ac_dir/$ac_word; then
2776 if test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"; then
2777 ac_cv_path_XGETTEXT="$ac_dir/$ac_word"
2783 test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":"
2787 XGETTEXT="$ac_cv_path_XGETTEXT"
2788 if test -n "$XGETTEXT"; then
2789 echo "$ac_t""$XGETTEXT" 1>&6
2791 echo "$ac_t""no" 1>&6
2795 USE_INCLUDED_LIBINTL=yes
2799 INTLDEPS='$(top_builddir)/../intl/libintl.a'
2801 LIBS=`echo $LIBS | sed -e 's/-lintl//'`
2802 nls_cv_header_intl=libintl.h
2803 nls_cv_header_libgt=libgettext.h
2806 if test "$XGETTEXT" != ":"; then
2807 if $XGETTEXT --omit-header /dev/null 2> /dev/null; then
2810 echo "$ac_t""found xgettext programs is not GNU xgettext; ignore it" 1>&6
2815 # We need to process the po/ directory.
2819 nls_cv_header_intl=libintl.h
2820 nls_cv_header_libgt=libgettext.h
2823 # If this is used in GNU gettext we have to set USE_NLS to `yes'
2824 # because some of the sources are only built for this goal.
2825 if test "$PACKAGE" = gettext; then
2827 USE_INCLUDED_LIBINTL=yes
2830 for lang in $ALL_LINGUAS; do
2831 GMOFILES="$GMOFILES $lang.gmo"
2832 POFILES="$POFILES $lang.po"
2848 if test "x$CATOBJEXT" != "x"; then
2849 if test "x$ALL_LINGUAS" = "x"; then
2852 echo $ac_n "checking for catalogs to be installed""... $ac_c" 1>&6
2853 echo "configure:2854: checking for catalogs to be installed" >&5
2855 for lang in ${LINGUAS=$ALL_LINGUAS}; do
2856 case "$ALL_LINGUAS" in
2857 *$lang*) NEW_LINGUAS="$NEW_LINGUAS $lang" ;;
2860 LINGUAS=$NEW_LINGUAS
2861 echo "$ac_t""$LINGUAS" 1>&6
2864 if test -n "$LINGUAS"; then
2865 for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done
2869 if test $ac_cv_header_locale_h = yes; then
2870 INCLUDE_LOCALE_H="#include <locale.h>"
2873 /* The system does not provide the header <locale.h>. Take care yourself. */"
2877 if test -f $srcdir/po2tbl.sed.in; then
2878 if test "$CATOBJEXT" = ".cat"; then
2879 ac_safe=`echo "linux/version.h" | sed 'y%./+-%__p_%'`
2880 echo $ac_n "checking for linux/version.h""... $ac_c" 1>&6
2881 echo "configure:2882: checking for linux/version.h" >&5
2882 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2883 echo $ac_n "(cached) $ac_c" 1>&6
2885 cat > conftest.$ac_ext <<EOF
2886 #line 2887 "configure"
2887 #include "confdefs.h"
2888 #include <linux/version.h>
2890 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2891 { (eval echo configure:2892: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2892 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2893 if test -z "$ac_err"; then
2895 eval "ac_cv_header_$ac_safe=yes"
2898 echo "configure: failed program was:" >&5
2899 cat conftest.$ac_ext >&5
2901 eval "ac_cv_header_$ac_safe=no"
2905 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2906 echo "$ac_t""yes" 1>&6
2909 echo "$ac_t""no" 1>&6
2914 sed -e '/^#/d' $srcdir/$msgformat-msg.sed > po2msg.sed
2916 sed -e '/^#.*[^\\]$/d' -e '/^#$/d' \
2917 $srcdir/po2tbl.sed.in > po2tbl.sed
2920 if test "$PACKAGE" = "gettext"; then
2930 MKINSTALLDIRS="\$(srcdir)/../../mkinstalldirs"
2936 if test -d $srcdir/po; then
2937 test -d po || mkdir po
2938 if test "x$srcdir" != "x."; then
2939 if test "x`echo $srcdir | sed 's@/.*@@'`" = "x"; then
2940 posrcprefix="$srcdir/"
2942 posrcprefix="../$srcdir/"
2948 sed -e "/^#/d" -e "/^\$/d" -e "s,.*, $posrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \
2949 < $srcdir/po/POTFILES.in > po/POTFILES
2953 # Check for common headers.
2954 # FIXME: Seems to me this can cause problems for i386-windows hosts.
2955 # At one point there were hardcoded AC_DEFINE's if ${host} = i386-*-windows*.
2956 for ac_hdr in stdlib.h string.h strings.h unistd.h time.h
2958 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2959 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2960 echo "configure:2961: checking for $ac_hdr" >&5
2961 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2962 echo $ac_n "(cached) $ac_c" 1>&6
2964 cat > conftest.$ac_ext <<EOF
2965 #line 2966 "configure"
2966 #include "confdefs.h"
2969 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2970 { (eval echo configure:2971: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2971 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2972 if test -z "$ac_err"; then
2974 eval "ac_cv_header_$ac_safe=yes"
2977 echo "configure: failed program was:" >&5
2978 cat conftest.$ac_ext >&5
2980 eval "ac_cv_header_$ac_safe=no"
2984 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2985 echo "$ac_t""yes" 1>&6
2986 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2987 cat >> confdefs.h <<EOF
2988 #define $ac_tr_hdr 1
2992 echo "$ac_t""no" 1>&6
2996 for ac_hdr in sys/time.h sys/resource.h
2998 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2999 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
3000 echo "configure:3001: checking for $ac_hdr" >&5
3001 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3002 echo $ac_n "(cached) $ac_c" 1>&6
3004 cat > conftest.$ac_ext <<EOF
3005 #line 3006 "configure"
3006 #include "confdefs.h"
3009 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3010 { (eval echo configure:3011: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3011 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3012 if test -z "$ac_err"; then
3014 eval "ac_cv_header_$ac_safe=yes"
3017 echo "configure: failed program was:" >&5
3018 cat conftest.$ac_ext >&5
3020 eval "ac_cv_header_$ac_safe=no"
3024 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3025 echo "$ac_t""yes" 1>&6
3026 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
3027 cat >> confdefs.h <<EOF
3028 #define $ac_tr_hdr 1
3032 echo "$ac_t""no" 1>&6
3036 for ac_hdr in fcntl.h fpu_control.h
3038 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
3039 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
3040 echo "configure:3041: checking for $ac_hdr" >&5
3041 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3042 echo $ac_n "(cached) $ac_c" 1>&6
3044 cat > conftest.$ac_ext <<EOF
3045 #line 3046 "configure"
3046 #include "confdefs.h"
3049 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3050 { (eval echo configure:3051: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3051 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3052 if test -z "$ac_err"; then
3054 eval "ac_cv_header_$ac_safe=yes"
3057 echo "configure: failed program was:" >&5
3058 cat conftest.$ac_ext >&5
3060 eval "ac_cv_header_$ac_safe=no"
3064 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3065 echo "$ac_t""yes" 1>&6
3066 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
3067 cat >> confdefs.h <<EOF
3068 #define $ac_tr_hdr 1
3072 echo "$ac_t""no" 1>&6
3076 for ac_hdr in dlfcn.h errno.h sys/stat.h
3078 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
3079 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
3080 echo "configure:3081: checking for $ac_hdr" >&5
3081 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3082 echo $ac_n "(cached) $ac_c" 1>&6
3084 cat > conftest.$ac_ext <<EOF
3085 #line 3086 "configure"
3086 #include "confdefs.h"
3089 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3090 { (eval echo configure:3091: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3091 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3092 if test -z "$ac_err"; then
3094 eval "ac_cv_header_$ac_safe=yes"
3097 echo "configure: failed program was:" >&5
3098 cat conftest.$ac_ext >&5
3100 eval "ac_cv_header_$ac_safe=no"
3104 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3105 echo "$ac_t""yes" 1>&6
3106 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
3107 cat >> confdefs.h <<EOF
3108 #define $ac_tr_hdr 1
3112 echo "$ac_t""no" 1>&6
3116 for ac_func in getrusage time sigaction __setfpucw
3118 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3119 echo "configure:3120: checking for $ac_func" >&5
3120 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3121 echo $ac_n "(cached) $ac_c" 1>&6
3123 cat > conftest.$ac_ext <<EOF
3124 #line 3125 "configure"
3125 #include "confdefs.h"
3126 /* System header to define __stub macros and hopefully few prototypes,
3127 which can conflict with char $ac_func(); below. */
3129 /* Override any gcc2 internal prototype to avoid an error. */
3130 /* We use char because int might match the return type of a gcc2
3131 builtin and then its argument prototype would still apply. */
3136 /* The GNU C library defines this for functions which it implements
3137 to always fail with ENOSYS. Some functions are actually named
3138 something starting with __ and the normal name is an alias. */
3139 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3147 if { (eval echo configure:3148: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3149 eval "ac_cv_func_$ac_func=yes"
3151 echo "configure: failed program was:" >&5
3152 cat conftest.$ac_ext >&5
3154 eval "ac_cv_func_$ac_func=no"
3159 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3160 echo "$ac_t""yes" 1>&6
3161 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3162 cat >> confdefs.h <<EOF
3163 #define $ac_tr_func 1
3167 echo "$ac_t""no" 1>&6
3172 # Check for socket libraries
3173 echo $ac_n "checking for bind in -lsocket""... $ac_c" 1>&6
3174 echo "configure:3175: checking for bind in -lsocket" >&5
3175 ac_lib_var=`echo socket'_'bind | sed 'y%./+-%__p_%'`
3176 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3177 echo $ac_n "(cached) $ac_c" 1>&6
3179 ac_save_LIBS="$LIBS"
3180 LIBS="-lsocket $LIBS"
3181 cat > conftest.$ac_ext <<EOF
3182 #line 3183 "configure"
3183 #include "confdefs.h"
3184 /* Override any gcc2 internal prototype to avoid an error. */
3185 /* We use char because int might match the return type of a gcc2
3186 builtin and then its argument prototype would still apply. */
3193 if { (eval echo configure:3194: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3195 eval "ac_cv_lib_$ac_lib_var=yes"
3197 echo "configure: failed program was:" >&5
3198 cat conftest.$ac_ext >&5
3200 eval "ac_cv_lib_$ac_lib_var=no"
3203 LIBS="$ac_save_LIBS"
3206 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3207 echo "$ac_t""yes" 1>&6
3208 ac_tr_lib=HAVE_LIB`echo socket | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3209 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3210 cat >> confdefs.h <<EOF
3211 #define $ac_tr_lib 1
3214 LIBS="-lsocket $LIBS"
3217 echo "$ac_t""no" 1>&6
3220 echo $ac_n "checking for gethostbyname in -lnsl""... $ac_c" 1>&6
3221 echo "configure:3222: checking for gethostbyname in -lnsl" >&5
3222 ac_lib_var=`echo nsl'_'gethostbyname | sed 'y%./+-%__p_%'`
3223 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3224 echo $ac_n "(cached) $ac_c" 1>&6
3226 ac_save_LIBS="$LIBS"
3228 cat > conftest.$ac_ext <<EOF
3229 #line 3230 "configure"
3230 #include "confdefs.h"
3231 /* Override any gcc2 internal prototype to avoid an error. */
3232 /* We use char because int might match the return type of a gcc2
3233 builtin and then its argument prototype would still apply. */
3234 char gethostbyname();
3240 if { (eval echo configure:3241: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3242 eval "ac_cv_lib_$ac_lib_var=yes"
3244 echo "configure: failed program was:" >&5
3245 cat conftest.$ac_ext >&5
3247 eval "ac_cv_lib_$ac_lib_var=no"
3250 LIBS="$ac_save_LIBS"
3253 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3254 echo "$ac_t""yes" 1>&6
3255 ac_tr_lib=HAVE_LIB`echo nsl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3256 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3257 cat >> confdefs.h <<EOF
3258 #define $ac_tr_lib 1
3264 echo "$ac_t""no" 1>&6
3268 . ${srcdir}/../../bfd/configure.host
3272 USE_MAINTAINER_MODE=no
3273 # Check whether --enable-maintainer-mode or --disable-maintainer-mode was given.
3274 if test "${enable_maintainer_mode+set}" = set; then
3275 enableval="$enable_maintainer_mode"
3276 case "${enableval}" in
3277 yes) MAINT="" USE_MAINTAINER_MODE=yes ;;
3279 *) { echo "configure: error: "--enable-maintainer-mode does not take a value"" 1>&2; exit 1; }; MAINT="#" ;;
3281 if test x"$silent" != x"yes" && test x"$MAINT" = x""; then
3282 echo "Setting maintainer mode" 6>&1
3290 # Check whether --enable-sim-bswap or --disable-sim-bswap was given.
3291 if test "${enable_sim_bswap+set}" = set; then
3292 enableval="$enable_sim_bswap"
3293 case "${enableval}" in
3294 yes) sim_bswap="-DWITH_BSWAP=1 -DUSE_BSWAP=1";;
3295 no) sim_bswap="-DWITH_BSWAP=0";;
3296 *) { echo "configure: error: "--enable-sim-bswap does not take a value"" 1>&2; exit 1; }; sim_bswap="";;
3298 if test x"$silent" != x"yes" && test x"$sim_bswap" != x""; then
3299 echo "Setting bswap flags = $sim_bswap" 6>&1
3307 # Check whether --enable-sim-cflags or --disable-sim-cflags was given.
3308 if test "${enable_sim_cflags+set}" = set; then
3309 enableval="$enable_sim_cflags"
3310 case "${enableval}" in
3311 yes) sim_cflags="-O2 -fomit-frame-pointer";;
3312 trace) { echo "configure: error: "Please use --enable-sim-debug instead."" 1>&2; exit 1; }; sim_cflags="";;
3314 *) sim_cflags=`echo "${enableval}" | sed -e "s/,/ /g"`;;
3316 if test x"$silent" != x"yes" && test x"$sim_cflags" != x""; then
3317 echo "Setting sim cflags = $sim_cflags" 6>&1
3325 # Check whether --enable-sim-debug or --disable-sim-debug was given.
3326 if test "${enable_sim_debug+set}" = set; then
3327 enableval="$enable_sim_debug"
3328 case "${enableval}" in
3329 yes) sim_debug="-DDEBUG=7 -DWITH_DEBUG=7";;
3330 no) sim_debug="-DDEBUG=0 -DWITH_DEBUG=0";;
3331 *) sim_debug="-DDEBUG='(${enableval})' -DWITH_DEBUG='(${enableval})'";;
3333 if test x"$silent" != x"yes" && test x"$sim_debug" != x""; then
3334 echo "Setting sim debug = $sim_debug" 6>&1
3342 # Check whether --enable-sim-stdio or --disable-sim-stdio was given.
3343 if test "${enable_sim_stdio+set}" = set; then
3344 enableval="$enable_sim_stdio"
3345 case "${enableval}" in
3346 yes) sim_stdio="-DWITH_STDIO=DO_USE_STDIO";;
3347 no) sim_stdio="-DWITH_STDIO=DONT_USE_STDIO";;
3348 *) { echo "configure: error: "Unknown value $enableval passed to --enable-sim-stdio"" 1>&2; exit 1; }; sim_stdio="";;
3350 if test x"$silent" != x"yes" && test x"$sim_stdio" != x""; then
3351 echo "Setting stdio flags = $sim_stdio" 6>&1
3359 # Check whether --enable-sim-trace or --disable-sim-trace was given.
3360 if test "${enable_sim_trace+set}" = set; then
3361 enableval="$enable_sim_trace"
3362 case "${enableval}" in
3363 yes) sim_trace="-DTRACE=1 -DWITH_TRACE=-1";;
3364 no) sim_trace="-DTRACE=0 -DWITH_TRACE=0";;
3366 sim_trace="-DTRACE='(${enableval})' -DWITH_TRACE='(${enableval})'";;
3369 for x in `echo "$enableval" | sed -e "s/,/ /g"`; do
3370 if test x"$sim_trace" = x; then
3371 sim_trace="-DWITH_TRACE='(TRACE_$x"
3373 sim_trace="${sim_trace}|TRACE_$x"
3376 sim_trace="$sim_trace)'" ;;
3378 if test x"$silent" != x"yes" && test x"$sim_trace" != x""; then
3379 echo "Setting sim trace = $sim_trace" 6>&1
3387 # Check whether --enable-sim-profile or --disable-sim-profile was given.
3388 if test "${enable_sim_profile+set}" = set; then
3389 enableval="$enable_sim_profile"
3390 case "${enableval}" in
3391 yes) sim_profile="-DPROFILE=1 -DWITH_PROFILE=-1";;
3392 no) sim_profile="-DPROFILE=0 -DWITH_PROFILE=0";;
3394 sim_profile="-DPROFILE='(${enableval})' -DWITH_PROFILE='(${enableval})'";;
3397 for x in `echo "$enableval" | sed -e "s/,/ /g"`; do
3398 if test x"$sim_profile" = x; then
3399 sim_profile="-DWITH_PROFILE='(PROFILE_$x"
3401 sim_profile="${sim_profile}|PROFILE_$x"
3404 sim_profile="$sim_profile)'" ;;
3406 if test x"$silent" != x"yes" && test x"$sim_profile" != x""; then
3407 echo "Setting sim profile = $sim_profile" 6>&1
3415 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
3416 echo "configure:3417: checking return type of signal handlers" >&5
3417 if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
3418 echo $ac_n "(cached) $ac_c" 1>&6
3420 cat > conftest.$ac_ext <<EOF
3421 #line 3422 "configure"
3422 #include "confdefs.h"
3423 #include <sys/types.h>
3429 extern "C" void (*signal (int, void (*)(int)))(int);
3431 void (*signal ()) ();
3438 if { (eval echo configure:3439: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3440 ac_cv_type_signal=void
3442 echo "configure: failed program was:" >&5
3443 cat conftest.$ac_ext >&5
3445 ac_cv_type_signal=int
3450 echo "$ac_t""$ac_cv_type_signal" 1>&6
3451 cat >> confdefs.h <<EOF
3452 #define RETSIGTYPE $ac_cv_type_signal
3459 echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
3460 echo "configure:3461: checking for executable suffix" >&5
3461 if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then
3462 echo $ac_n "(cached) $ac_c" 1>&6
3464 if test "$CYGWIN" = yes || test "$MINGW32" = yes; then
3468 echo 'int main () { return 0; }' > conftest.$ac_ext
3470 if { (eval echo configure:3471: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
3471 for file in conftest.*; do
3473 *.c | *.o | *.obj | *.ilk | *.pdb) ;;
3474 *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
3478 { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
3481 test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
3486 test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
3487 echo "$ac_t""${ac_cv_exeext}" 1>&6
3494 sim_link_links=tconfig.h
3495 if test -f ${srcdir}/tconfig.in
3497 sim_link_files=tconfig.in
3499 sim_link_files=../common/tconfig.in
3502 # targ-vals.def points to the libc macro description file.
3504 *-*-*) TARG_VALS_DEF=../common/nltvals.def ;;
3506 sim_link_files="${sim_link_files} ${TARG_VALS_DEF}"
3507 sim_link_links="${sim_link_links} targ-vals.def"
3512 wire_endian="BIG_ENDIAN"
3514 # Check whether --enable-sim-endian or --disable-sim-endian was given.
3515 if test "${enable_sim_endian+set}" = set; then
3516 enableval="$enable_sim_endian"
3517 case "${enableval}" in
3518 b*|B*) sim_endian="-DWITH_TARGET_BYTE_ORDER=BIG_ENDIAN";;
3519 l*|L*) sim_endian="-DWITH_TARGET_BYTE_ORDER=LITTLE_ENDIAN";;
3520 yes) if test x"$wire_endian" != x; then
3521 sim_endian="-DWITH_TARGET_BYTE_ORDER=${wire_endian}"
3523 if test x"$default_endian" != x; then
3524 sim_endian="-DWITH_TARGET_BYTE_ORDER=${default_endian}"
3526 echo "No hard-wired endian for target $target" 1>&6
3527 sim_endian="-DWITH_TARGET_BYTE_ORDER=0"
3530 no) if test x"$default_endian" != x; then
3531 sim_endian="-DWITH_DEFAULT_TARGET_BYTE_ORDER=${default_endian}"
3533 if test x"$wire_endian" != x; then
3534 sim_endian="-DWITH_DEFAULT_TARGET_BYTE_ORDER=${wire_endian}"
3536 echo "No default endian for target $target" 1>&6
3537 sim_endian="-DWITH_DEFAULT_TARGET_BYTE_ORDER=0"
3540 *) { echo "configure: error: "Unknown value $enableval for --enable-sim-endian"" 1>&2; exit 1; }; sim_endian="";;
3542 if test x"$silent" != x"yes" && test x"$sim_endian" != x""; then
3543 echo "Setting endian flags = $sim_endian" 6>&1
3546 if test x"$default_endian" != x; then
3547 sim_endian="-DWITH_DEFAULT_TARGET_BYTE_ORDER=${default_endian}"
3549 if test x"$wire_endian" != x; then
3550 sim_endian="-DWITH_TARGET_BYTE_ORDER=${wire_endian}"
3557 wire_alignment="STRICT_ALIGNMENT"
3558 default_alignment=""
3560 # Check whether --enable-sim-alignment or --disable-sim-alignment was given.
3561 if test "${enable_sim_alignment+set}" = set; then
3562 enableval="$enable_sim_alignment"
3563 case "${enableval}" in
3564 strict | STRICT) sim_alignment="-DWITH_ALIGNMENT=STRICT_ALIGNMENT";;
3565 nonstrict | NONSTRICT) sim_alignment="-DWITH_ALIGNMENT=NONSTRICT_ALIGNMENT";;
3566 forced | FORCED) sim_alignment="-DWITH_ALIGNMENT=FORCED_ALIGNMENT";;
3567 yes) if test x"$wire_alignment" != x; then
3568 sim_alignment="-DWITH_ALIGNMENT=${wire_alignment}"
3570 if test x"$default_alignment" != x; then
3571 sim_alignment="-DWITH_ALIGNMENT=${default_alignment}"
3573 echo "No hard-wired alignment for target $target" 1>&6
3574 sim_alignment="-DWITH_ALIGNMENT=0"
3577 no) if test x"$default_alignment" != x; then
3578 sim_alignment="-DWITH_DEFAULT_ALIGNMENT=${default_alignment}"
3580 if test x"$wire_alignment" != x; then
3581 sim_alignment="-DWITH_DEFAULT_ALIGNMENT=${wire_alignment}"
3583 echo "No default alignment for target $target" 1>&6
3584 sim_alignment="-DWITH_DEFAULT_ALIGNMENT=0"
3587 *) { echo "configure: error: "Unknown value $enableval passed to --enable-sim-alignment"" 1>&2; exit 1; }; sim_alignment="";;
3589 if test x"$silent" != x"yes" && test x"$sim_alignment" != x""; then
3590 echo "Setting alignment flags = $sim_alignment" 6>&1
3593 if test x"$default_alignment" != x; then
3594 sim_alignment="-DWITH_DEFAULT_ALIGNMENT=${default_alignment}"
3596 if test x"$wire_alignment" != x; then
3597 sim_alignment="-DWITH_ALIGNMENT=${wire_alignment}"
3605 # Check whether --enable-sim-hostendian or --disable-sim-hostendian was given.
3606 if test "${enable_sim_hostendian+set}" = set; then
3607 enableval="$enable_sim_hostendian"
3608 case "${enableval}" in
3609 no) sim_hostendian="-DWITH_HOST_BYTE_ORDER=0";;
3610 b*|B*) sim_hostendian="-DWITH_HOST_BYTE_ORDER=BIG_ENDIAN";;
3611 l*|L*) sim_hostendian="-DWITH_HOST_BYTE_ORDER=LITTLE_ENDIAN";;
3612 *) { echo "configure: error: "Unknown value $enableval for --enable-sim-hostendian"" 1>&2; exit 1; }; sim_hostendian="";;
3614 if test x"$silent" != x"yes" && test x"$sim_hostendian" != x""; then
3615 echo "Setting hostendian flags = $sim_hostendian" 6>&1
3619 if test "x$cross_compiling" = "xno"; then
3620 echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
3621 echo "configure:3622: checking whether byte ordering is bigendian" >&5
3622 if eval "test \"`echo '$''{'ac_cv_c_bigendian'+set}'`\" = set"; then
3623 echo $ac_n "(cached) $ac_c" 1>&6
3625 ac_cv_c_bigendian=unknown
3626 # See if sys/param.h defines the BYTE_ORDER macro.
3627 cat > conftest.$ac_ext <<EOF
3628 #line 3629 "configure"
3629 #include "confdefs.h"
3630 #include <sys/types.h>
3631 #include <sys/param.h>
3634 #if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
3639 if { (eval echo configure:3640: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3641 # It does; now see whether it defined to BIG_ENDIAN or not.
3642 cat > conftest.$ac_ext <<EOF
3643 #line 3644 "configure"
3644 #include "confdefs.h"
3645 #include <sys/types.h>
3646 #include <sys/param.h>
3649 #if BYTE_ORDER != BIG_ENDIAN
3654 if { (eval echo configure:3655: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3656 ac_cv_c_bigendian=yes
3658 echo "configure: failed program was:" >&5
3659 cat conftest.$ac_ext >&5
3661 ac_cv_c_bigendian=no
3665 echo "configure: failed program was:" >&5
3666 cat conftest.$ac_ext >&5
3669 if test $ac_cv_c_bigendian = unknown; then
3670 if test "$cross_compiling" = yes; then
3671 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
3673 cat > conftest.$ac_ext <<EOF
3674 #line 3675 "configure"
3675 #include "confdefs.h"
3677 /* Are we little or big endian? From Harbison&Steele. */
3681 char c[sizeof (long)];
3684 exit (u.c[sizeof (long) - 1] == 1);
3687 if { (eval echo configure:3688: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
3689 ac_cv_c_bigendian=no
3691 echo "configure: failed program was:" >&5
3692 cat conftest.$ac_ext >&5
3694 ac_cv_c_bigendian=yes
3702 echo "$ac_t""$ac_cv_c_bigendian" 1>&6
3703 if test $ac_cv_c_bigendian = yes; then
3704 cat >> confdefs.h <<\EOF
3705 #define WORDS_BIGENDIAN 1
3710 if test $ac_cv_c_bigendian = yes; then
3711 sim_hostendian="-DWITH_HOST_BYTE_ORDER=BIG_ENDIAN"
3713 sim_hostendian="-DWITH_HOST_BYTE_ORDER=LITTLE_ENDIAN"
3716 sim_hostendian="-DWITH_HOST_BYTE_ORDER=0"
3721 default_sim_scache="16384"
3722 # Check whether --enable-sim-scache or --disable-sim-scache was given.
3723 if test "${enable_sim_scache+set}" = set; then
3724 enableval="$enable_sim_scache"
3725 case "${enableval}" in
3726 yes) sim_scache="-DWITH_SCACHE=${default_sim_scache}";;
3727 no) sim_scache="-DWITH_SCACHE=0" ;;
3728 [0-9]*) sim_cache=${enableval};;
3729 *) { echo "configure: error: "Bad value $enableval passed to --enable-sim-scache"" 1>&2; exit 1; };
3732 if test x"$silent" != x"yes" && test x"$sim_scache" != x""; then
3733 echo "Setting scache size = $sim_scache" 6>&1
3736 sim_scache="-DWITH_SCACHE=${default_sim_scache}"
3741 default_sim_default_model="m32r/d"
3742 # Check whether --enable-sim-default-model or --disable-sim-default-model was given.
3743 if test "${enable_sim_default_model+set}" = set; then
3744 enableval="$enable_sim_default_model"
3745 case "${enableval}" in
3746 yes|no) { echo "configure: error: "Missing argument to --enable-sim-default-model"" 1>&2; exit 1; };;
3747 *) sim_default_model="-DWITH_DEFAULT_MODEL='\"${enableval}\"'";;
3749 if test x"$silent" != x"yes" && test x"$sim_default_model" != x""; then
3750 echo "Setting default model = $sim_default_model" 6>&1
3753 sim_default_model="-DWITH_DEFAULT_MODEL='\"${default_sim_default_model}\"'"
3758 # Check whether --enable-sim-environment or --disable-sim-environment was given.
3759 if test "${enable_sim_environment+set}" = set; then
3760 enableval="$enable_sim_environment"
3761 case "${enableval}" in
3762 all | ALL) sim_environment="-DWITH_ENVIRONMENT=ALL_ENVIRONMENT";;
3763 user | USER) sim_environment="-DWITH_ENVIRONMENT=USER_ENVIRONMENT";;
3764 virtual | VIRTUAL) sim_environment="-DWITH_ENVIRONMENT=VIRTUAL_ENVIRONMENT";;
3765 operating | OPERATING) sim_environment="-DWITH_ENVIRONMENT=OPERATING_ENVIRONMENT";;
3766 *) { echo "configure: error: "Unknown value $enableval passed to --enable-sim-environment"" 1>&2; exit 1; };
3767 sim_environment="";;
3769 if test x"$silent" != x"yes" && test x"$sim_environment" != x""; then
3770 echo "Setting sim environment = $sim_environment" 6>&1
3773 sim_environment="-DWITH_ENVIRONMENT=ALL_ENVIRONMENT"
3777 default_sim_inline=""
3778 # Check whether --enable-sim-inline or --disable-sim-inline was given.
3779 if test "${enable_sim_inline+set}" = set; then
3780 enableval="$enable_sim_inline"
3782 case "$enableval" in
3783 no) sim_inline="-DDEFAULT_INLINE=0";;
3784 0) sim_inline="-DDEFAULT_INLINE=0";;
3785 yes | 2) sim_inline="-DDEFAULT_INLINE=ALL_C_INLINE";;
3786 1) sim_inline="-DDEFAULT_INLINE=INLINE_LOCALS";;
3787 *) for x in `echo "$enableval" | sed -e "s/,/ /g"`; do
3790 *_INLINE=*) new_flag="-D$x";;
3791 *=*) new_flag=`echo "$x" | sed -e "s/=/_INLINE=/" -e "s/^/-D/"`;;
3792 *_INLINE) new_flag="-D$x=ALL_C_INLINE";;
3793 *) new_flag="-D$x""_INLINE=ALL_C_INLINE";;
3795 if test x"$sim_inline" = x""; then
3796 sim_inline="$new_flag"
3798 sim_inline="$sim_inline $new_flag"
3802 if test x"$silent" != x"yes" && test x"$sim_inline" != x""; then
3803 echo "Setting inline flags = $sim_inline" 6>&1
3807 if test "x$cross_compiling" = "xno"; then
3808 if test x"$GCC" != "x" -a x"${default_sim_inline}" != "x" ; then
3809 sim_inline="${default_sim_inline}"
3810 if test x"$silent" != x"yes"; then
3811 echo "Setting inline flags = $sim_inline" 6>&1
3817 sim_inline="-DDEFAULT_INLINE=0"
3823 cgen=../../cgen/cgen
3824 cgendir='$(srcdir)/../../cgen'
3825 # Check whether --enable-cgen-maint or --disable-cgen-maint was given.
3826 if test "${enable_cgen_maint+set}" = set; then
3827 enableval="$enable_cgen_maint"
3828 case "${enableval}" in
3829 yes) cgen_maint=yes ;;
3830 no) cgen_maint=no ;;
3832 # argument is cgen install directory (not implemented yet).
3833 # Having a `share' directory might be more appropriate for the .scm,
3835 cgendir=${cgen_maint}/lib/cgen
3836 cgen=${cgendir}/bin/cgen
3840 if test x${cgen_maint} != xno ; then
3853 cat > confcache <<\EOF
3854 # This file is a shell script that caches the results of configure
3855 # tests run on this system so they can be shared between configure
3856 # scripts and configure runs. It is not useful on other systems.
3857 # If it contains results you don't want to keep, you may remove or edit it.
3859 # By default, configure uses ./config.cache as the cache file,
3860 # creating it if it does not exist already. You can give configure
3861 # the --cache-file=FILE option to use a different cache file; that is
3862 # what configure does when it calls configure scripts in
3863 # subdirectories, so they share the cache.
3864 # Giving --cache-file=/dev/null disables caching, for debugging configure.
3865 # config.status only pays attention to the cache file if you give it the
3866 # --recheck option to rerun configure.
3869 # The following way of writing the cache mishandles newlines in values,
3870 # but we know of no workaround that is simple, portable, and efficient.
3871 # So, don't put newlines in cache variables' values.
3872 # Ultrix sh set writes to stderr and can't be redirected directly,
3873 # and sets the high bit in the cache file unless we assign to the vars.
3875 case `(ac_space=' '; set | grep ac_space) 2>&1` in
3877 # `set' does not quote correctly, so add quotes (double-quote substitution
3878 # turns \\\\ into \\, and sed turns \\ into \).
3880 -e "s/'/'\\\\''/g" \
3881 -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
3884 # `set' quotes correctly as required by POSIX, so do not add quotes.
3885 sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
3888 if cmp -s $cache_file confcache; then
3891 if test -w $cache_file; then
3892 echo "updating cache $cache_file"
3893 cat confcache > $cache_file
3895 echo "not updating unwritable cache $cache_file"
3900 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
3902 test "x$prefix" = xNONE && prefix=$ac_default_prefix
3903 # Let make expand exec_prefix.
3904 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
3906 # Any assignment to VPATH causes Sun make to only execute
3907 # the first set of double-colon rules, so remove it if not needed.
3908 # If there is a colon in the path, we need to keep it.
3909 if test "x$srcdir" = x.; then
3910 ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d'
3913 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
3915 DEFS=-DHAVE_CONFIG_H
3917 # Without the "./", some shells look in PATH for config.status.
3918 : ${CONFIG_STATUS=./config.status}
3920 echo creating $CONFIG_STATUS
3921 rm -f $CONFIG_STATUS
3922 cat > $CONFIG_STATUS <<EOF
3924 # Generated automatically by configure.
3925 # Run this file to recreate the current configuration.
3926 # This directory was configured as follows,
3927 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
3929 # $0 $ac_configure_args
3931 # Compiler output produced by configure, useful for debugging
3932 # configure, is in ./config.log if it exists.
3934 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
3937 case "\$ac_option" in
3938 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
3939 echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
3940 exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
3941 -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
3942 echo "$CONFIG_STATUS generated by autoconf version 2.13"
3944 -help | --help | --hel | --he | --h)
3945 echo "\$ac_cs_usage"; exit 0 ;;
3946 *) echo "\$ac_cs_usage"; exit 1 ;;
3950 ac_given_srcdir=$srcdir
3951 ac_given_INSTALL="$INSTALL"
3953 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
3955 cat >> $CONFIG_STATUS <<EOF
3957 # Protect against being on the right side of a sed subst in config.status.
3958 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
3959 s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
3962 s%@sim_environment@%$sim_environment%g
3963 s%@sim_alignment@%$sim_alignment%g
3964 s%@sim_assert@%$sim_assert%g
3965 s%@sim_bitsize@%$sim_bitsize%g
3966 s%@sim_endian@%$sim_endian%g
3967 s%@sim_hostendian@%$sim_hostendian%g
3968 s%@sim_float@%$sim_float%g
3969 s%@sim_scache@%$sim_scache%g
3970 s%@sim_default_model@%$sim_default_model%g
3971 s%@sim_hw_cflags@%$sim_hw_cflags%g
3972 s%@sim_hw_objs@%$sim_hw_objs%g
3973 s%@sim_hw@%$sim_hw%g
3974 s%@sim_inline@%$sim_inline%g
3975 s%@sim_packages@%$sim_packages%g
3976 s%@sim_regparm@%$sim_regparm%g
3977 s%@sim_reserved_bits@%$sim_reserved_bits%g
3978 s%@sim_smp@%$sim_smp%g
3979 s%@sim_stdcall@%$sim_stdcall%g
3980 s%@sim_xor_endian@%$sim_xor_endian%g
3981 s%@build_warnings@%$build_warnings%g
3983 s%@CFLAGS@%$CFLAGS%g
3984 s%@CPPFLAGS@%$CPPFLAGS%g
3985 s%@CXXFLAGS@%$CXXFLAGS%g
3986 s%@FFLAGS@%$FFLAGS%g
3988 s%@LDFLAGS@%$LDFLAGS%g
3990 s%@exec_prefix@%$exec_prefix%g
3991 s%@prefix@%$prefix%g
3992 s%@program_transform_name@%$program_transform_name%g
3993 s%@bindir@%$bindir%g
3994 s%@sbindir@%$sbindir%g
3995 s%@libexecdir@%$libexecdir%g
3996 s%@datadir@%$datadir%g
3997 s%@sysconfdir@%$sysconfdir%g
3998 s%@sharedstatedir@%$sharedstatedir%g
3999 s%@localstatedir@%$localstatedir%g
4000 s%@libdir@%$libdir%g
4001 s%@includedir@%$includedir%g
4002 s%@oldincludedir@%$oldincludedir%g
4003 s%@infodir@%$infodir%g
4004 s%@mandir@%$mandir%g
4006 s%@host_alias@%$host_alias%g
4007 s%@host_cpu@%$host_cpu%g
4008 s%@host_vendor@%$host_vendor%g
4009 s%@host_os@%$host_os%g
4010 s%@target@%$target%g
4011 s%@target_alias@%$target_alias%g
4012 s%@target_cpu@%$target_cpu%g
4013 s%@target_vendor@%$target_vendor%g
4014 s%@target_os@%$target_os%g
4016 s%@build_alias@%$build_alias%g
4017 s%@build_cpu@%$build_cpu%g
4018 s%@build_vendor@%$build_vendor%g
4019 s%@build_os@%$build_os%g
4021 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
4022 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
4023 s%@INSTALL_DATA@%$INSTALL_DATA%g
4024 s%@CC_FOR_BUILD@%$CC_FOR_BUILD%g
4025 s%@HDEFINES@%$HDEFINES%g
4027 s%@RANLIB@%$RANLIB%g
4028 s%@SET_MAKE@%$SET_MAKE%g
4030 s%@ALLOCA@%$ALLOCA%g
4031 s%@USE_NLS@%$USE_NLS%g
4032 s%@MSGFMT@%$MSGFMT%g
4033 s%@GMSGFMT@%$GMSGFMT%g
4034 s%@XGETTEXT@%$XGETTEXT%g
4035 s%@USE_INCLUDED_LIBINTL@%$USE_INCLUDED_LIBINTL%g
4036 s%@CATALOGS@%$CATALOGS%g
4037 s%@CATOBJEXT@%$CATOBJEXT%g
4038 s%@DATADIRNAME@%$DATADIRNAME%g
4039 s%@GMOFILES@%$GMOFILES%g
4040 s%@INSTOBJEXT@%$INSTOBJEXT%g
4041 s%@INTLDEPS@%$INTLDEPS%g
4042 s%@INTLLIBS@%$INTLLIBS%g
4043 s%@INTLOBJS@%$INTLOBJS%g
4044 s%@POFILES@%$POFILES%g
4046 s%@INCLUDE_LOCALE_H@%$INCLUDE_LOCALE_H%g
4048 s%@GT_YES@%$GT_YES%g
4049 s%@MKINSTALLDIRS@%$MKINSTALLDIRS%g
4052 s%@sim_bswap@%$sim_bswap%g
4053 s%@sim_cflags@%$sim_cflags%g
4054 s%@sim_debug@%$sim_debug%g
4055 s%@sim_stdio@%$sim_stdio%g
4056 s%@sim_trace@%$sim_trace%g
4057 s%@sim_profile@%$sim_profile%g
4058 s%@EXEEXT@%$EXEEXT%g
4059 s%@CGEN_MAINT@%$CGEN_MAINT%g
4060 s%@cgendir@%$cgendir%g
4066 cat >> $CONFIG_STATUS <<\EOF
4068 # Split the substitutions into bite-sized pieces for seds with
4069 # small command number limits, like on Digital OSF/1 and HP-UX.
4070 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
4071 ac_file=1 # Number of current file.
4072 ac_beg=1 # First line for current file.
4073 ac_end=$ac_max_sed_cmds # Line after last line for current file.
4076 while $ac_more_lines; do
4077 if test $ac_beg -gt 1; then
4078 sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
4080 sed "${ac_end}q" conftest.subs > conftest.s$ac_file
4082 if test ! -s conftest.s$ac_file; then
4084 rm -f conftest.s$ac_file
4086 if test -z "$ac_sed_cmds"; then
4087 ac_sed_cmds="sed -f conftest.s$ac_file"
4089 ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
4091 ac_file=`expr $ac_file + 1`
4093 ac_end=`expr $ac_end + $ac_max_sed_cmds`
4096 if test -z "$ac_sed_cmds"; then
4101 cat >> $CONFIG_STATUS <<EOF
4103 CONFIG_FILES=\${CONFIG_FILES-"Makefile.sim:Makefile.in Make-common.sim:../common/Make-common.in .gdbinit:../common/gdbinit.in"}
4105 cat >> $CONFIG_STATUS <<\EOF
4106 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
4107 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
4109 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
4110 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
4111 *) ac_file_in="${ac_file}.in" ;;
4114 # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
4116 # Remove last slash and all that follows it. Not all systems have dirname.
4117 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
4118 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
4119 # The file is in a subdirectory.
4120 test ! -d "$ac_dir" && mkdir "$ac_dir"
4121 ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
4122 # A "../" for each directory in $ac_dir_suffix.
4123 ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
4125 ac_dir_suffix= ac_dots=
4128 case "$ac_given_srcdir" in
4130 if test -z "$ac_dots"; then top_srcdir=.
4131 else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
4132 /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
4134 srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
4135 top_srcdir="$ac_dots$ac_given_srcdir" ;;
4138 case "$ac_given_INSTALL" in
4139 [/$]*) INSTALL="$ac_given_INSTALL" ;;
4140 *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
4143 echo creating "$ac_file"
4145 configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
4147 *Makefile*) ac_comsub="1i\\
4148 # $configure_input" ;;
4152 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
4154 s%@configure_input@%$configure_input%g
4155 s%@srcdir@%$srcdir%g
4156 s%@top_srcdir@%$top_srcdir%g
4157 s%@INSTALL@%$INSTALL%g
4158 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
4162 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
4163 # NAME is the cpp macro being defined and VALUE is the value it is being given.
4165 # ac_d sets the value in "#define NAME VALUE" lines.
4166 ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)'
4167 ac_dB='\([ ][ ]*\)[^ ]*%\1#\2'
4170 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
4171 ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
4172 ac_uB='\([ ]\)%\1#\2define\3'
4175 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
4176 ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
4177 ac_eB='$%\1#\2define\3'
4181 if test "${CONFIG_HEADERS+set}" != set; then
4183 cat >> $CONFIG_STATUS <<EOF
4184 CONFIG_HEADERS="config.h:config.in"
4186 cat >> $CONFIG_STATUS <<\EOF
4188 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
4189 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
4191 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
4192 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
4193 *) ac_file_in="${ac_file}.in" ;;
4196 echo creating $ac_file
4198 rm -f conftest.frag conftest.in conftest.out
4199 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
4200 cat $ac_file_inputs > conftest.in
4204 # Transform confdefs.h into a sed script conftest.vals that substitutes
4205 # the proper values into config.h.in to produce config.h. And first:
4206 # Protect against being on the right side of a sed subst in config.status.
4207 # Protect against being in an unquoted here document in config.status.
4209 cat > conftest.hdr <<\EOF
4212 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
4216 sed -n -f conftest.hdr confdefs.h > conftest.vals
4219 # This sed command replaces #undef with comments. This is necessary, for
4220 # example, in the case of _POSIX_SOURCE, which is predefined and required
4221 # on some systems where configure will not decide to define it.
4222 cat >> conftest.vals <<\EOF
4223 s%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
4226 # Break up conftest.vals because some shells have a limit on
4227 # the size of here documents, and old seds have small limits too.
4232 ac_lines=`grep -c . conftest.vals`
4233 # grep -c gives empty output for an empty file on some AIX systems.
4234 if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
4235 # Write a limited-size here document to conftest.frag.
4236 echo ' cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
4237 sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
4239 sed -f conftest.frag conftest.in > conftest.out
4241 mv conftest.out conftest.in
4243 sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
4245 mv conftest.tail conftest.vals
4249 cat >> $CONFIG_STATUS <<\EOF
4250 rm -f conftest.frag conftest.h
4251 echo "/* $ac_file. Generated automatically by configure. */" > conftest.h
4252 cat conftest.in >> conftest.h
4254 if cmp -s $ac_file conftest.h 2>/dev/null; then
4255 echo "$ac_file is unchanged"
4258 # Remove last slash and all that follows it. Not all systems have dirname.
4259 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
4260 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
4261 # The file is in a subdirectory.
4262 test ! -d "$ac_dir" && mkdir "$ac_dir"
4265 mv conftest.h $ac_file
4271 cat >> $CONFIG_STATUS <<EOF
4272 ac_sources="$sim_link_files"
4273 ac_dests="$sim_link_links"
4276 cat >> $CONFIG_STATUS <<\EOF
4277 srcdir=$ac_given_srcdir
4278 while test -n "$ac_sources"; do
4279 set $ac_dests; ac_dest=$1; shift; ac_dests=$*
4280 set $ac_sources; ac_source=$1; shift; ac_sources=$*
4282 echo "linking $srcdir/$ac_source to $ac_dest"
4284 if test ! -r $srcdir/$ac_source; then
4285 { echo "configure: error: $srcdir/$ac_source: File not found" 1>&2; exit 1; }
4289 # Make relative symlinks.
4290 # Remove last slash and all that follows it. Not all systems have dirname.
4291 ac_dest_dir=`echo $ac_dest|sed 's%/[^/][^/]*$%%'`
4292 if test "$ac_dest_dir" != "$ac_dest" && test "$ac_dest_dir" != .; then
4293 # The dest file is in a subdirectory.
4294 test ! -d "$ac_dest_dir" && mkdir "$ac_dest_dir"
4295 ac_dest_dir_suffix="/`echo $ac_dest_dir|sed 's%^\./%%'`"
4296 # A "../" for each directory in $ac_dest_dir_suffix.
4297 ac_dots=`echo $ac_dest_dir_suffix|sed 's%/[^/]*%../%g'`
4299 ac_dest_dir_suffix= ac_dots=
4303 [/$]*) ac_rel_source="$srcdir/$ac_source" ;;
4304 *) ac_rel_source="$ac_dots$srcdir/$ac_source" ;;
4307 # Make a symlink if possible; otherwise try a hard link.
4308 if ln -s $ac_rel_source $ac_dest 2>/dev/null ||
4309 ln $srcdir/$ac_source $ac_dest; then :
4311 { echo "configure: error: can not link $ac_dest to $srcdir/$ac_source" 1>&2; exit 1; }
4315 cat >> $CONFIG_STATUS <<EOF
4318 cat >> $CONFIG_STATUS <<\EOF
4319 case "x$CONFIG_FILES" in
4321 echo "Merging Makefile.sim+Make-common.sim into Makefile ..."
4322 rm -f Makesim1.tmp Makesim2.tmp Makefile
4323 sed -n -e '/^## COMMON_PRE_/,/^## End COMMON_PRE_/ p' <Make-common.sim >Makesim1.tmp
4324 sed -n -e '/^## COMMON_POST_/,/^## End COMMON_POST_/ p' <Make-common.sim >Makesim2.tmp
4325 sed -e '/^## COMMON_PRE_/ r Makesim1.tmp' \
4326 -e '/^## COMMON_POST_/ r Makesim2.tmp' \
4327 <Makefile.sim >Makefile
4328 rm -f Makefile.sim Make-common.sim Makesim1.tmp Makesim2.tmp
4331 case "x$CONFIG_HEADERS" in xconfig.h:config.in) echo > stamp-h ;; esac
4335 chmod +x $CONFIG_STATUS
4336 rm -fr confdefs* $ac_clean_files
4337 test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1