45 sim_inline="-DDEFAULT_INLINE=0"
82 # This file is derived from `gettext.m4'. The difference is that the
83 # included macros assume Cygnus-style source and build trees.
85 # Macro to add for using GNU gettext.
86 # Ulrich Drepper <drepper@cygnus.com>, 1995.
88 # This file file be copied and used freely without restrictions. It can
89 # be used in projects which are not available under the GNU Public License
90 # but which still want to provide support for the GNU gettext functionality.
91 # Please note that the actual code is *not* freely available.
99 # Search path for a program which passes the given test.
100 # Ulrich Drepper <drepper@cygnus.com>, 1996.
102 # This file file be copied and used freely without restrictions. It can
103 # be used in projects which are not available under the GNU Public License
104 # but which still want to provide support for the GNU gettext functionality.
105 # Please note that the actual code is *not* freely available.
111 # Check whether LC_MESSAGES is available in <locale.h>.
112 # Ulrich Drepper <drepper@cygnus.com>, 1995.
114 # This file file be copied and used freely without restrictions. It can
115 # be used in projects which are not available under the GNU Public License
116 # but which still want to provide support for the GNU gettext functionality.
117 # Please note that the actual code is *not* freely available.
126 # Guess values for system-dependent variables and create Makefiles.
127 # Generated automatically using autoconf version 2.13
128 # Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
130 # This configure script is free software; the Free Software Foundation
131 # gives unlimited permission to copy, distribute and modify it.
135 ac_default_prefix=/usr/local
136 # Any additions from configure.in:
138 --disable-nls do not use Native Language Support"
140 --with-included-gettext use the GNU gettext library included here"
142 --enable-maintainer-mode Enable developer functionality."
144 --enable-sim-bswap Use Host specific BSWAP instruction."
146 --enable-sim-cflags=opts Extra CFLAGS for use in building simulator"
148 --enable-sim-debug=opts Enable debugging flags"
150 --enable-sim-stdio Specify whether to use stdio for console input/output."
152 --enable-sim-trace=opts Enable tracing flags"
154 --enable-sim-profile=opts Enable profiling flags"
156 --enable-sim-endian=endian Specify target byte endian orientation."
158 --enable-sim-alignment=align Specify strict, nonstrict or forced alignment of memory accesses."
160 --enable-sim-hostendian=end Specify host byte endian orientation."
162 --enable-build-warnings Enable build-time compiler warnings if gcc is used"
164 --enable-gdb-build-warnings Enable SIM specific build-time compiler warnings if gcc is used"
166 --enable-sim-reserved-bits Specify whether to check reserved bits in instruction."
168 --enable-sim-bitsize=N Specify target bitsize (32 or 64)."
170 # Initialize some variables set by options.
171 # The variables have the same names as the options, with
172 # dashes changed to underlines.
174 cache_file=./config.cache
183 program_transform_name=s,x,x,
192 bindir='${exec_prefix}/bin'
193 sbindir='${exec_prefix}/sbin'
194 libexecdir='${exec_prefix}/libexec'
195 datadir='${prefix}/share'
196 sysconfdir='${prefix}/etc'
197 sharedstatedir='${prefix}/com'
198 localstatedir='${prefix}/var'
199 libdir='${exec_prefix}/lib'
200 includedir='${prefix}/include'
201 oldincludedir='/usr/include'
202 infodir='${prefix}/info'
203 mandir='${prefix}/man'
205 # Initialize some other variables.
208 SHELL=${CONFIG_SHELL-/bin/sh}
209 # Maximum number of lines to put in a shell here document.
216 # If the previous option needs an argument, assign it.
217 if test -n "$ac_prev"; then
218 eval "$ac_prev=\$ac_option"
224 -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
228 # Accept the important Cygnus configure options, so we can diagnose typos.
232 -bindir | --bindir | --bindi | --bind | --bin | --bi)
234 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
235 bindir="$ac_optarg" ;;
237 -build | --build | --buil | --bui | --bu)
239 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
240 build="$ac_optarg" ;;
242 -cache-file | --cache-file | --cache-fil | --cache-fi \
243 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
244 ac_prev=cache_file ;;
245 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
246 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
247 cache_file="$ac_optarg" ;;
249 -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
251 -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
253 datadir="$ac_optarg" ;;
255 -disable-* | --disable-*)
256 ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
257 # Reject names that are not valid shell variable names.
258 if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
259 { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
261 ac_feature=`echo $ac_feature| sed 's/-/_/g'`
262 eval "enable_${ac_feature}=no" ;;
264 -enable-* | --enable-*)
265 ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
266 # Reject names that are not valid shell variable names.
267 if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
268 { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
270 ac_feature=`echo $ac_feature| sed 's/-/_/g'`
275 eval "enable_${ac_feature}='$ac_optarg'" ;;
277 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
278 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
279 | --exec | --exe | --ex)
280 ac_prev=exec_prefix ;;
281 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
282 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
283 | --exec=* | --exe=* | --ex=*)
284 exec_prefix="$ac_optarg" ;;
286 -gas | --gas | --ga | --g)
287 # Obsolete; use --with-gas.
290 -help | --help | --hel | --he)
291 # Omit some internal or obsolete options to make the list less imposing.
292 # This message is too long to be a string in the A/UX 3.1 sh.
294 Usage: configure [options] [host]
295 Options: [defaults in brackets after descriptions]
297 --cache-file=FILE cache test results in FILE
298 --help print this message
299 --no-create do not create output files
300 --quiet, --silent do not print \`checking...' messages
301 --site-file=FILE use FILE as the site file
302 --version print the version of autoconf that created configure
303 Directory and file names:
304 --prefix=PREFIX install architecture-independent files in PREFIX
306 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
308 --bindir=DIR user executables in DIR [EPREFIX/bin]
309 --sbindir=DIR system admin executables in DIR [EPREFIX/sbin]
310 --libexecdir=DIR program executables in DIR [EPREFIX/libexec]
311 --datadir=DIR read-only architecture-independent data in DIR
313 --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc]
314 --sharedstatedir=DIR modifiable architecture-independent data in DIR
316 --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var]
317 --libdir=DIR object code libraries in DIR [EPREFIX/lib]
318 --includedir=DIR C header files in DIR [PREFIX/include]
319 --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include]
320 --infodir=DIR info documentation in DIR [PREFIX/info]
321 --mandir=DIR man documentation in DIR [PREFIX/man]
322 --srcdir=DIR find the sources in DIR [configure dir or ..]
323 --program-prefix=PREFIX prepend PREFIX to installed program names
324 --program-suffix=SUFFIX append SUFFIX to installed program names
325 --program-transform-name=PROGRAM
326 run sed PROGRAM on installed program names
330 --build=BUILD configure for building on BUILD [BUILD=HOST]
331 --host=HOST configure for HOST [guessed]
332 --target=TARGET configure for TARGET [TARGET=HOST]
333 Features and packages:
334 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
335 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
336 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
337 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
338 --x-includes=DIR X include files are in DIR
339 --x-libraries=DIR X library files are in DIR
341 if test -n "$ac_help"; then
342 echo "--enable and --with options recognized:$ac_help"
346 -host | --host | --hos | --ho)
348 -host=* | --host=* | --hos=* | --ho=*)
351 -includedir | --includedir | --includedi | --included | --include \
352 | --includ | --inclu | --incl | --inc)
353 ac_prev=includedir ;;
354 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
355 | --includ=* | --inclu=* | --incl=* | --inc=*)
356 includedir="$ac_optarg" ;;
358 -infodir | --infodir | --infodi | --infod | --info | --inf)
360 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
361 infodir="$ac_optarg" ;;
363 -libdir | --libdir | --libdi | --libd)
365 -libdir=* | --libdir=* | --libdi=* | --libd=*)
366 libdir="$ac_optarg" ;;
368 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
369 | --libexe | --libex | --libe)
370 ac_prev=libexecdir ;;
371 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
372 | --libexe=* | --libex=* | --libe=*)
373 libexecdir="$ac_optarg" ;;
375 -localstatedir | --localstatedir | --localstatedi | --localstated \
376 | --localstate | --localstat | --localsta | --localst \
377 | --locals | --local | --loca | --loc | --lo)
378 ac_prev=localstatedir ;;
379 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
380 | --localstate=* | --localstat=* | --localsta=* | --localst=* \
381 | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
382 localstatedir="$ac_optarg" ;;
384 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
386 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
387 mandir="$ac_optarg" ;;
390 # Obsolete; use --without-fp.
393 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
397 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
398 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
401 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
402 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
403 | --oldin | --oldi | --old | --ol | --o)
404 ac_prev=oldincludedir ;;
405 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
406 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
407 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
408 oldincludedir="$ac_optarg" ;;
410 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
412 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
413 prefix="$ac_optarg" ;;
415 -program-prefix | --program-prefix | --program-prefi | --program-pref \
416 | --program-pre | --program-pr | --program-p)
417 ac_prev=program_prefix ;;
418 -program-prefix=* | --program-prefix=* | --program-prefi=* \
419 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
420 program_prefix="$ac_optarg" ;;
422 -program-suffix | --program-suffix | --program-suffi | --program-suff \
423 | --program-suf | --program-su | --program-s)
424 ac_prev=program_suffix ;;
425 -program-suffix=* | --program-suffix=* | --program-suffi=* \
426 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
427 program_suffix="$ac_optarg" ;;
429 -program-transform-name | --program-transform-name \
430 | --program-transform-nam | --program-transform-na \
431 | --program-transform-n | --program-transform- \
432 | --program-transform | --program-transfor \
433 | --program-transfo | --program-transf \
434 | --program-trans | --program-tran \
435 | --progr-tra | --program-tr | --program-t)
436 ac_prev=program_transform_name ;;
437 -program-transform-name=* | --program-transform-name=* \
438 | --program-transform-nam=* | --program-transform-na=* \
439 | --program-transform-n=* | --program-transform-=* \
440 | --program-transform=* | --program-transfor=* \
441 | --program-transfo=* | --program-transf=* \
442 | --program-trans=* | --program-tran=* \
443 | --progr-tra=* | --program-tr=* | --program-t=*)
444 program_transform_name="$ac_optarg" ;;
446 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
447 | -silent | --silent | --silen | --sile | --sil)
450 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
452 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
454 sbindir="$ac_optarg" ;;
456 -sharedstatedir | --sharedstatedir | --sharedstatedi \
457 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
458 | --sharedst | --shareds | --shared | --share | --shar \
460 ac_prev=sharedstatedir ;;
461 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
462 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
463 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
465 sharedstatedir="$ac_optarg" ;;
467 -site | --site | --sit)
469 -site=* | --site=* | --sit=*)
472 -site-file | --site-file | --site-fil | --site-fi | --site-f)
474 -site-file=* | --site-file=* | --site-fil=* | --site-fi=* | --site-f=*)
475 sitefile="$ac_optarg" ;;
477 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
479 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
480 srcdir="$ac_optarg" ;;
482 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
483 | --syscon | --sysco | --sysc | --sys | --sy)
484 ac_prev=sysconfdir ;;
485 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
486 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
487 sysconfdir="$ac_optarg" ;;
489 -target | --target | --targe | --targ | --tar | --ta | --t)
491 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
492 target="$ac_optarg" ;;
494 -v | -verbose | --verbose | --verbos | --verbo | --verb)
497 -version | --version | --versio | --versi | --vers)
498 echo "configure generated by autoconf version 2.13"
502 ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
503 # Reject names that are not valid shell variable names.
504 if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
505 { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
507 ac_package=`echo $ac_package| sed 's/-/_/g'`
512 eval "with_${ac_package}='$ac_optarg'" ;;
514 -without-* | --without-*)
515 ac_package=`echo $ac_option|sed -e 's/-*without-//'`
516 # Reject names that are not valid shell variable names.
517 if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
518 { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
520 ac_package=`echo $ac_package| sed 's/-/_/g'`
521 eval "with_${ac_package}=no" ;;
524 # Obsolete; use --with-x.
527 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
528 | --x-incl | --x-inc | --x-in | --x-i)
529 ac_prev=x_includes ;;
530 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
531 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
532 x_includes="$ac_optarg" ;;
534 -x-libraries | --x-libraries | --x-librarie | --x-librari \
535 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
536 ac_prev=x_libraries ;;
537 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
538 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
539 x_libraries="$ac_optarg" ;;
541 -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
545 if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
546 echo "configure: warning: $ac_option: invalid host type" 1>&2
548 if test "x$nonopt" != xNONE; then
549 { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
557 if test -n "$ac_prev"; then
558 { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
561 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
563 # File descriptor usage:
566 # 2 errors and warnings
567 # 3 some systems may open it to /dev/tty
568 # 4 used on the Kubota Titan
569 # 6 checking for... messages and results
570 # 5 compiler messages saved in config.log
571 if test "$silent" = yes; then
579 This file contains any messages produced by compilers while
580 running configure, to aid debugging if configure makes a mistake.
583 # Strip out --no-create and --no-recursion so they do not pile up.
584 # Also quote any args containing shell metacharacters.
589 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
590 | --no-cr | --no-c) ;;
591 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
592 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
593 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
594 ac_configure_args="$ac_configure_args '$ac_arg'" ;;
595 *) ac_configure_args="$ac_configure_args $ac_arg" ;;
600 # Only set these to C if already set. These must not be set unconditionally
601 # because not all systems understand e.g. LANG=C (notably SCO).
602 # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
603 # Non-C LC_CTYPE values break the ctype check.
604 if test "${LANG+set}" = set; then LANG=C; export LANG; fi
605 if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
606 if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
607 if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi
609 # confdefs.h avoids OS command line length limits that DEFS can exceed.
610 rm -rf conftest* confdefs.h
611 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
614 # A filename unique to this package, relative to the directory that
615 # configure is in, which we can look for to find out if srcdir is correct.
616 ac_unique_file=Makefile.in
618 # Find the source files, if location was not specified.
619 if test -z "$srcdir"; then
620 ac_srcdir_defaulted=yes
621 # Try the directory containing this script, then its parent.
623 ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
624 test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
626 if test ! -r $srcdir/$ac_unique_file; then
630 ac_srcdir_defaulted=no
632 if test ! -r $srcdir/$ac_unique_file; then
633 if test "$ac_srcdir_defaulted" = yes; then
634 { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
636 { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
639 srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
641 # Prefer explicitly selected file to automatically selected ones.
642 if test -z "$sitefile"; then
643 if test -z "$CONFIG_SITE"; then
644 if test "x$prefix" != xNONE; then
645 CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
647 CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
651 CONFIG_SITE="$sitefile"
653 for ac_site_file in $CONFIG_SITE; do
654 if test -r "$ac_site_file"; then
655 echo "loading site script $ac_site_file"
660 if test -r "$cache_file"; then
661 echo "loading cache $cache_file"
664 echo "creating cache $cache_file"
669 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
670 ac_cpp='$CPP $CPPFLAGS'
671 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
672 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
673 cross_compiling=$ac_cv_prog_cc_cross
677 if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
678 # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
679 if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
686 ac_n= ac_c='\c' ac_t=
691 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
692 echo "configure:693: checking how to run the C preprocessor" >&5
693 # On Suns, sometimes $CPP names a directory.
694 if test -n "$CPP" && test -d "$CPP"; then
697 if test -z "$CPP"; then
698 if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
699 echo $ac_n "(cached) $ac_c" 1>&6
701 # This must be in double quotes, not single quotes, because CPP may get
702 # substituted into the Makefile and "${CC-cc}" will confuse make.
704 # On the NeXT, cc -E runs the code through the compiler's parser,
705 # not just through cpp.
706 cat > conftest.$ac_ext <<EOF
707 #line 708 "configure"
708 #include "confdefs.h"
712 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
713 { (eval echo configure:714: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
714 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
715 if test -z "$ac_err"; then
719 echo "configure: failed program was:" >&5
720 cat conftest.$ac_ext >&5
722 CPP="${CC-cc} -E -traditional-cpp"
723 cat > conftest.$ac_ext <<EOF
724 #line 725 "configure"
725 #include "confdefs.h"
729 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
730 { (eval echo configure:731: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
731 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
732 if test -z "$ac_err"; then
736 echo "configure: failed program was:" >&5
737 cat conftest.$ac_ext >&5
739 CPP="${CC-cc} -nologo -E"
740 cat > conftest.$ac_ext <<EOF
741 #line 742 "configure"
742 #include "confdefs.h"
746 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
747 { (eval echo configure:748: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
748 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
749 if test -z "$ac_err"; then
753 echo "configure: failed program was:" >&5
754 cat conftest.$ac_ext >&5
763 ac_cv_prog_CPP="$CPP"
765 CPP="$ac_cv_prog_CPP"
767 ac_cv_prog_CPP="$CPP"
769 echo "$ac_t""$CPP" 1>&6
771 echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
772 echo "configure:773: checking whether ${MAKE-make} sets \${MAKE}" >&5
773 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
774 if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
775 echo $ac_n "(cached) $ac_c" 1>&6
777 cat > conftestmake <<\EOF
779 @echo 'ac_maketemp="${MAKE}"'
781 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
782 eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
783 if test -n "$ac_maketemp"; then
784 eval ac_cv_prog_make_${ac_make}_set=yes
786 eval ac_cv_prog_make_${ac_make}_set=no
790 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
791 echo "$ac_t""yes" 1>&6
794 echo "$ac_t""no" 1>&6
795 SET_MAKE="MAKE=${MAKE-make}"
798 echo $ac_n "checking for POSIXized ISC""... $ac_c" 1>&6
799 echo "configure:800: checking for POSIXized ISC" >&5
800 if test -d /etc/conf/kconfig.d &&
801 grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1
803 echo "$ac_t""yes" 1>&6
804 ISC=yes # If later tests want to check for ISC.
805 cat >> confdefs.h <<\EOF
806 #define _POSIX_SOURCE 1
809 if test "$GCC" = yes; then
815 echo "$ac_t""no" 1>&6
819 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
820 echo "configure:821: checking for ANSI C header files" >&5
821 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
822 echo $ac_n "(cached) $ac_c" 1>&6
824 cat > conftest.$ac_ext <<EOF
825 #line 826 "configure"
826 #include "confdefs.h"
832 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
833 { (eval echo configure:834: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
834 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
835 if test -z "$ac_err"; then
837 ac_cv_header_stdc=yes
840 echo "configure: failed program was:" >&5
841 cat conftest.$ac_ext >&5
847 if test $ac_cv_header_stdc = yes; then
848 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
849 cat > conftest.$ac_ext <<EOF
850 #line 851 "configure"
851 #include "confdefs.h"
854 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
855 egrep "memchr" >/dev/null 2>&1; then
865 if test $ac_cv_header_stdc = yes; then
866 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
867 cat > conftest.$ac_ext <<EOF
868 #line 869 "configure"
869 #include "confdefs.h"
872 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
873 egrep "free" >/dev/null 2>&1; then
883 if test $ac_cv_header_stdc = yes; then
884 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
885 if test "$cross_compiling" = yes; then
888 cat > conftest.$ac_ext <<EOF
889 #line 890 "configure"
890 #include "confdefs.h"
892 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
893 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
894 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
895 int main () { int i; for (i = 0; i < 256; i++)
896 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
900 if { (eval echo configure:901: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
904 echo "configure: failed program was:" >&5
905 cat conftest.$ac_ext >&5
915 echo "$ac_t""$ac_cv_header_stdc" 1>&6
916 if test $ac_cv_header_stdc = yes; then
917 cat >> confdefs.h <<\EOF
918 #define STDC_HEADERS 1
923 echo $ac_n "checking for working const""... $ac_c" 1>&6
924 echo "configure:925: checking for working const" >&5
925 if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
926 echo $ac_n "(cached) $ac_c" 1>&6
928 cat > conftest.$ac_ext <<EOF
929 #line 930 "configure"
930 #include "confdefs.h"
934 /* Ultrix mips cc rejects this. */
935 typedef int charset[2]; const charset x;
936 /* SunOS 4.1.1 cc rejects this. */
937 char const *const *ccp;
939 /* NEC SVR4.0.2 mips cc rejects this. */
940 struct point {int x, y;};
941 static struct point const zero = {0,0};
942 /* AIX XL C 1.02.0.0 rejects this.
943 It does not let you subtract one const X* pointer from another in an arm
944 of an if-expression whose if-part is not a constant expression */
945 const char *g = "string";
946 ccp = &g + (g ? g-g : 0);
947 /* HPUX 7.0 cc rejects these. */
950 ccp = (char const *const *) p;
951 { /* SCO 3.2v4 cc rejects this. */
953 char const *s = 0 ? (char *) 0 : (char const *) 0;
957 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
959 const int *foo = &x[0];
962 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
963 typedef const int *iptr;
967 { /* AIX XL C 1.02.0.0 rejects this saying
968 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
969 struct s { int j; const int *ap[3]; };
970 struct s *b; b->j = 5;
972 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
978 if { (eval echo configure:979: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
982 echo "configure: failed program was:" >&5
983 cat conftest.$ac_ext >&5
990 echo "$ac_t""$ac_cv_c_const" 1>&6
991 if test $ac_cv_c_const = no; then
992 cat >> confdefs.h <<\EOF
998 echo $ac_n "checking for inline""... $ac_c" 1>&6
999 echo "configure:1000: checking for inline" >&5
1000 if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then
1001 echo $ac_n "(cached) $ac_c" 1>&6
1004 for ac_kw in inline __inline__ __inline; do
1005 cat > conftest.$ac_ext <<EOF
1006 #line 1007 "configure"
1007 #include "confdefs.h"
1013 if { (eval echo configure:1014: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1015 ac_cv_c_inline=$ac_kw; break
1017 echo "configure: failed program was:" >&5
1018 cat conftest.$ac_ext >&5
1025 echo "$ac_t""$ac_cv_c_inline" 1>&6
1026 case "$ac_cv_c_inline" in
1028 no) cat >> confdefs.h <<\EOF
1032 *) cat >> confdefs.h <<EOF
1033 #define inline $ac_cv_c_inline
1038 echo $ac_n "checking for off_t""... $ac_c" 1>&6
1039 echo "configure:1040: checking for off_t" >&5
1040 if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then
1041 echo $ac_n "(cached) $ac_c" 1>&6
1043 cat > conftest.$ac_ext <<EOF
1044 #line 1045 "configure"
1045 #include "confdefs.h"
1046 #include <sys/types.h>
1052 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1053 egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
1055 ac_cv_type_off_t=yes
1063 echo "$ac_t""$ac_cv_type_off_t" 1>&6
1064 if test $ac_cv_type_off_t = no; then
1065 cat >> confdefs.h <<\EOF
1071 echo $ac_n "checking for size_t""... $ac_c" 1>&6
1072 echo "configure:1073: checking for size_t" >&5
1073 if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
1074 echo $ac_n "(cached) $ac_c" 1>&6
1076 cat > conftest.$ac_ext <<EOF
1077 #line 1078 "configure"
1078 #include "confdefs.h"
1079 #include <sys/types.h>
1085 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1086 egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
1088 ac_cv_type_size_t=yes
1091 ac_cv_type_size_t=no
1096 echo "$ac_t""$ac_cv_type_size_t" 1>&6
1097 if test $ac_cv_type_size_t = no; then
1098 cat >> confdefs.h <<\EOF
1099 #define size_t unsigned
1104 # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
1105 # for constant arguments. Useless!
1106 echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6
1107 echo "configure:1108: checking for working alloca.h" >&5
1108 if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then
1109 echo $ac_n "(cached) $ac_c" 1>&6
1111 cat > conftest.$ac_ext <<EOF
1112 #line 1113 "configure"
1113 #include "confdefs.h"
1116 char *p = alloca(2 * sizeof(int));
1119 if { (eval echo configure:1120: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1121 ac_cv_header_alloca_h=yes
1123 echo "configure: failed program was:" >&5
1124 cat conftest.$ac_ext >&5
1126 ac_cv_header_alloca_h=no
1131 echo "$ac_t""$ac_cv_header_alloca_h" 1>&6
1132 if test $ac_cv_header_alloca_h = yes; then
1133 cat >> confdefs.h <<\EOF
1134 #define HAVE_ALLOCA_H 1
1139 echo $ac_n "checking for alloca""... $ac_c" 1>&6
1140 echo "configure:1141: checking for alloca" >&5
1141 if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then
1142 echo $ac_n "(cached) $ac_c" 1>&6
1144 cat > conftest.$ac_ext <<EOF
1145 #line 1146 "configure"
1146 #include "confdefs.h"
1149 # define alloca __builtin_alloca
1152 # include <malloc.h>
1153 # define alloca _alloca
1156 # include <alloca.h>
1161 # ifndef alloca /* predefined by HP cc +Olibcalls */
1170 char *p = (char *) alloca(1);
1173 if { (eval echo configure:1174: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1175 ac_cv_func_alloca_works=yes
1177 echo "configure: failed program was:" >&5
1178 cat conftest.$ac_ext >&5
1180 ac_cv_func_alloca_works=no
1185 echo "$ac_t""$ac_cv_func_alloca_works" 1>&6
1186 if test $ac_cv_func_alloca_works = yes; then
1187 cat >> confdefs.h <<\EOF
1188 #define HAVE_ALLOCA 1
1193 if test $ac_cv_func_alloca_works = no; then
1194 # The SVR3 libPW and SVR4 libucb both contain incompatible functions
1195 # that cause trouble. Some versions do not even contain alloca or
1196 # contain a buggy version. If you still want to use their alloca,
1197 # use ar to extract alloca.o from them instead of compiling alloca.c.
1198 ALLOCA=alloca.${ac_objext}
1199 cat >> confdefs.h <<\EOF
1204 echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
1205 echo "configure:1206: checking whether alloca needs Cray hooks" >&5
1206 if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then
1207 echo $ac_n "(cached) $ac_c" 1>&6
1209 cat > conftest.$ac_ext <<EOF
1210 #line 1211 "configure"
1211 #include "confdefs.h"
1212 #if defined(CRAY) && ! defined(CRAY2)
1219 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1220 egrep "webecray" >/dev/null 2>&1; then
1231 echo "$ac_t""$ac_cv_os_cray" 1>&6
1232 if test $ac_cv_os_cray = yes; then
1233 for ac_func in _getb67 GETB67 getb67; do
1234 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
1235 echo "configure:1236: checking for $ac_func" >&5
1236 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
1237 echo $ac_n "(cached) $ac_c" 1>&6
1239 cat > conftest.$ac_ext <<EOF
1240 #line 1241 "configure"
1241 #include "confdefs.h"
1242 /* System header to define __stub macros and hopefully few prototypes,
1243 which can conflict with char $ac_func(); below. */
1245 /* Override any gcc2 internal prototype to avoid an error. */
1246 /* We use char because int might match the return type of a gcc2
1247 builtin and then its argument prototype would still apply. */
1252 /* The GNU C library defines this for functions which it implements
1253 to always fail with ENOSYS. Some functions are actually named
1254 something starting with __ and the normal name is an alias. */
1255 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
1263 if { (eval echo configure:1264: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1265 eval "ac_cv_func_$ac_func=yes"
1267 echo "configure: failed program was:" >&5
1268 cat conftest.$ac_ext >&5
1270 eval "ac_cv_func_$ac_func=no"
1275 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
1276 echo "$ac_t""yes" 1>&6
1277 cat >> confdefs.h <<EOF
1278 #define CRAY_STACKSEG_END $ac_func
1283 echo "$ac_t""no" 1>&6
1289 echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
1290 echo "configure:1291: checking stack direction for C alloca" >&5
1291 if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then
1292 echo $ac_n "(cached) $ac_c" 1>&6
1294 if test "$cross_compiling" = yes; then
1295 ac_cv_c_stack_direction=0
1297 cat > conftest.$ac_ext <<EOF
1298 #line 1299 "configure"
1299 #include "confdefs.h"
1300 find_stack_direction ()
1302 static char *addr = 0;
1307 return find_stack_direction ();
1310 return (&dummy > addr) ? 1 : -1;
1314 exit (find_stack_direction() < 0);
1317 if { (eval echo configure:1318: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
1319 ac_cv_c_stack_direction=1
1321 echo "configure: failed program was:" >&5
1322 cat conftest.$ac_ext >&5
1324 ac_cv_c_stack_direction=-1
1331 echo "$ac_t""$ac_cv_c_stack_direction" 1>&6
1332 cat >> confdefs.h <<EOF
1333 #define STACK_DIRECTION $ac_cv_c_stack_direction
1338 for ac_hdr in unistd.h
1340 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
1341 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
1342 echo "configure:1343: checking for $ac_hdr" >&5
1343 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1344 echo $ac_n "(cached) $ac_c" 1>&6
1346 cat > conftest.$ac_ext <<EOF
1347 #line 1348 "configure"
1348 #include "confdefs.h"
1351 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1352 { (eval echo configure:1353: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1353 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1354 if test -z "$ac_err"; then
1356 eval "ac_cv_header_$ac_safe=yes"
1359 echo "configure: failed program was:" >&5
1360 cat conftest.$ac_ext >&5
1362 eval "ac_cv_header_$ac_safe=no"
1366 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1367 echo "$ac_t""yes" 1>&6
1368 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
1369 cat >> confdefs.h <<EOF
1370 #define $ac_tr_hdr 1
1374 echo "$ac_t""no" 1>&6
1378 for ac_func in getpagesize
1380 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
1381 echo "configure:1382: checking for $ac_func" >&5
1382 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
1383 echo $ac_n "(cached) $ac_c" 1>&6
1385 cat > conftest.$ac_ext <<EOF
1386 #line 1387 "configure"
1387 #include "confdefs.h"
1388 /* System header to define __stub macros and hopefully few prototypes,
1389 which can conflict with char $ac_func(); below. */
1391 /* Override any gcc2 internal prototype to avoid an error. */
1392 /* We use char because int might match the return type of a gcc2
1393 builtin and then its argument prototype would still apply. */
1398 /* The GNU C library defines this for functions which it implements
1399 to always fail with ENOSYS. Some functions are actually named
1400 something starting with __ and the normal name is an alias. */
1401 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
1409 if { (eval echo configure:1410: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1411 eval "ac_cv_func_$ac_func=yes"
1413 echo "configure: failed program was:" >&5
1414 cat conftest.$ac_ext >&5
1416 eval "ac_cv_func_$ac_func=no"
1421 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
1422 echo "$ac_t""yes" 1>&6
1423 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
1424 cat >> confdefs.h <<EOF
1425 #define $ac_tr_func 1
1429 echo "$ac_t""no" 1>&6
1433 echo $ac_n "checking for working mmap""... $ac_c" 1>&6
1434 echo "configure:1435: checking for working mmap" >&5
1435 if eval "test \"`echo '$''{'ac_cv_func_mmap_fixed_mapped'+set}'`\" = set"; then
1436 echo $ac_n "(cached) $ac_c" 1>&6
1438 if test "$cross_compiling" = yes; then
1439 ac_cv_func_mmap_fixed_mapped=no
1441 cat > conftest.$ac_ext <<EOF
1442 #line 1443 "configure"
1443 #include "confdefs.h"
1445 /* Thanks to Mike Haertel and Jim Avera for this test.
1446 Here is a matrix of mmap possibilities:
1447 mmap private not fixed
1448 mmap private fixed at somewhere currently unmapped
1449 mmap private fixed at somewhere already mapped
1450 mmap shared not fixed
1451 mmap shared fixed at somewhere currently unmapped
1452 mmap shared fixed at somewhere already mapped
1453 For private mappings, we should verify that changes cannot be read()
1454 back from the file, nor mmap's back from the file at a different
1455 address. (There have been systems where private was not correctly
1456 implemented like the infamous i386 svr4.0, and systems where the
1457 VM page cache was not coherent with the filesystem buffer cache
1458 like early versions of FreeBSD and possibly contemporary NetBSD.)
1459 For shared mappings, we should conversely verify that changes get
1460 propogated back to all the places they're supposed to be.
1462 Grep wants private fixed already mapped.
1463 The main things grep needs to know about mmap are:
1464 * does it exist and is it safe to write into the mmap'd area
1465 * how to use it (BSD variants) */
1466 #include <sys/types.h>
1468 #include <sys/mman.h>
1470 /* This mess was copied from the GNU getpagesize.h. */
1471 #ifndef HAVE_GETPAGESIZE
1472 # ifdef HAVE_UNISTD_H
1473 # include <unistd.h>
1476 /* Assume that all systems that can run configure have sys/param.h. */
1477 # ifndef HAVE_SYS_PARAM_H
1478 # define HAVE_SYS_PARAM_H 1
1481 # ifdef _SC_PAGESIZE
1482 # define getpagesize() sysconf(_SC_PAGESIZE)
1483 # else /* no _SC_PAGESIZE */
1484 # ifdef HAVE_SYS_PARAM_H
1485 # include <sys/param.h>
1486 # ifdef EXEC_PAGESIZE
1487 # define getpagesize() EXEC_PAGESIZE
1488 # else /* no EXEC_PAGESIZE */
1490 # define getpagesize() NBPG * CLSIZE
1493 # endif /* no CLSIZE */
1494 # else /* no NBPG */
1496 # define getpagesize() NBPC
1497 # else /* no NBPC */
1499 # define getpagesize() PAGESIZE
1500 # endif /* PAGESIZE */
1501 # endif /* no NBPC */
1502 # endif /* no NBPG */
1503 # endif /* no EXEC_PAGESIZE */
1504 # else /* no HAVE_SYS_PARAM_H */
1505 # define getpagesize() 8192 /* punt totally */
1506 # endif /* no HAVE_SYS_PARAM_H */
1507 # endif /* no _SC_PAGESIZE */
1509 #endif /* no HAVE_GETPAGESIZE */
1512 extern "C" { void *malloc(unsigned); }
1520 char *data, *data2, *data3;
1524 pagesize = getpagesize();
1527 * First, make a file with some known garbage in it.
1529 data = malloc(pagesize);
1532 for (i = 0; i < pagesize; ++i)
1533 *(data + i) = rand();
1535 fd = creat("conftestmmap", 0600);
1538 if (write(fd, data, pagesize) != pagesize)
1543 * Next, try to mmap the file at a fixed address which
1544 * already has something else allocated at it. If we can,
1545 * also make sure that we see the same garbage.
1547 fd = open("conftestmmap", O_RDWR);
1550 data2 = malloc(2 * pagesize);
1553 data2 += (pagesize - ((int) data2 & (pagesize - 1))) & (pagesize - 1);
1554 if (data2 != mmap(data2, pagesize, PROT_READ | PROT_WRITE,
1555 MAP_PRIVATE | MAP_FIXED, fd, 0L))
1557 for (i = 0; i < pagesize; ++i)
1558 if (*(data + i) != *(data2 + i))
1562 * Finally, make sure that changes to the mapped area
1563 * do not percolate back to the file as seen by read().
1564 * (This is a bug on some variants of i386 svr4.0.)
1566 for (i = 0; i < pagesize; ++i)
1567 *(data2 + i) = *(data2 + i) + 1;
1568 data3 = malloc(pagesize);
1571 if (read(fd, data3, pagesize) != pagesize)
1573 for (i = 0; i < pagesize; ++i)
1574 if (*(data + i) != *(data3 + i))
1577 unlink("conftestmmap");
1582 if { (eval echo configure:1583: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
1584 ac_cv_func_mmap_fixed_mapped=yes
1586 echo "configure: failed program was:" >&5
1587 cat conftest.$ac_ext >&5
1589 ac_cv_func_mmap_fixed_mapped=no
1596 echo "$ac_t""$ac_cv_func_mmap_fixed_mapped" 1>&6
1597 if test $ac_cv_func_mmap_fixed_mapped = yes; then
1598 cat >> confdefs.h <<\EOF
1604 echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
1605 echo "configure:1606: checking for Cygwin environment" >&5
1606 if eval "test \"`echo '$''{'ac_cv_cygwin'+set}'`\" = set"; then
1607 echo $ac_n "(cached) $ac_c" 1>&6
1609 cat > conftest.$ac_ext <<EOF
1610 #line 1611 "configure"
1611 #include "confdefs.h"
1616 #define __CYGWIN__ __CYGWIN32__
1621 if { (eval echo configure:1622: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1625 echo "configure: failed program was:" >&5
1626 cat conftest.$ac_ext >&5
1634 echo "$ac_t""$ac_cv_cygwin" 1>&6
1636 test "$ac_cv_cygwin" = yes && CYGWIN=yes
1637 echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
1638 echo "configure:1639: checking for mingw32 environment" >&5
1639 if eval "test \"`echo '$''{'ac_cv_mingw32'+set}'`\" = set"; then
1640 echo $ac_n "(cached) $ac_c" 1>&6
1642 cat > conftest.$ac_ext <<EOF
1643 #line 1644 "configure"
1644 #include "confdefs.h"
1650 if { (eval echo configure:1651: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1654 echo "configure: failed program was:" >&5
1655 cat conftest.$ac_ext >&5
1663 echo "$ac_t""$ac_cv_mingw32" 1>&6
1665 test "$ac_cv_mingw32" = yes && MINGW32=yes
1667 # autoconf.info says this should be called right after AC_INIT.
1671 for ac_dir in `cd $srcdir;pwd`/../.. $srcdir/`cd $srcdir;pwd`/../..; do
1672 if test -f $ac_dir/install-sh; then
1674 ac_install_sh="$ac_aux_dir/install-sh -c"
1676 elif test -f $ac_dir/install.sh; then
1678 ac_install_sh="$ac_aux_dir/install.sh -c"
1682 if test -z "$ac_aux_dir"; then
1683 { echo "configure: error: can not find install-sh or install.sh in `cd $srcdir;pwd`/../.. $srcdir/`cd $srcdir;pwd`/../.." 1>&2; exit 1; }
1685 ac_config_guess=$ac_aux_dir/config.guess
1686 ac_config_sub=$ac_aux_dir/config.sub
1687 ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
1690 # Do some error checking and defaulting for the host and target type.
1692 # configure --host=HOST --target=TARGET --build=BUILD NONOPT
1695 # 1. You are not allowed to specify --host, --target, and nonopt at the
1697 # 2. Host defaults to nonopt.
1698 # 3. If nonopt is not specified, then host defaults to the current host,
1699 # as determined by config.guess.
1700 # 4. Target and build default to nonopt.
1701 # 5. If nonopt is not specified, then target and build default to host.
1703 # The aliases save the names the user supplied, while $host etc.
1704 # will get canonicalized.
1705 case $host---$target---$nonopt in
1706 NONE---*---* | *---NONE---* | *---*---NONE) ;;
1707 *) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;;
1711 # Make sure we can run config.sub.
1712 if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then :
1713 else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
1716 echo $ac_n "checking host system type""... $ac_c" 1>&6
1717 echo "configure:1718: checking host system type" >&5
1720 case "$host_alias" in
1724 if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then :
1725 else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
1727 *) host_alias=$nonopt ;;
1731 host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias`
1732 host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1733 host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1734 host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1735 echo "$ac_t""$host" 1>&6
1737 echo $ac_n "checking target system type""... $ac_c" 1>&6
1738 echo "configure:1739: checking target system type" >&5
1740 target_alias=$target
1741 case "$target_alias" in
1744 NONE) target_alias=$host_alias ;;
1745 *) target_alias=$nonopt ;;
1749 target=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $target_alias`
1750 target_cpu=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1751 target_vendor=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1752 target_os=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1753 echo "$ac_t""$target" 1>&6
1755 echo $ac_n "checking build system type""... $ac_c" 1>&6
1756 echo "configure:1757: checking build system type" >&5
1759 case "$build_alias" in
1762 NONE) build_alias=$host_alias ;;
1763 *) build_alias=$nonopt ;;
1767 build=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $build_alias`
1768 build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1769 build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1770 build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1771 echo "$ac_t""$build" 1>&6
1773 test "$host_alias" != "$target_alias" &&
1774 test "$program_prefix$program_suffix$program_transform_name" = \
1776 program_prefix=${target_alias}-
1778 if test "$program_transform_name" = s,x,x,; then
1779 program_transform_name=
1781 # Double any \ or $. echo might interpret backslashes.
1782 cat <<\EOF_SED > conftestsed
1783 s,\\,\\\\,g; s,\$,$$,g
1785 program_transform_name="`echo $program_transform_name|sed -f conftestsed`"
1788 test "$program_prefix" != NONE &&
1789 program_transform_name="s,^,${program_prefix},; $program_transform_name"
1790 # Use a double $ so make ignores it.
1791 test "$program_suffix" != NONE &&
1792 program_transform_name="s,\$\$,${program_suffix},; $program_transform_name"
1794 # sed with no file args requires a program.
1795 test "$program_transform_name" = "" && program_transform_name="s,x,x,"
1797 # Extract the first word of "gcc", so it can be a program name with args.
1798 set dummy gcc; ac_word=$2
1799 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1800 echo "configure:1801: checking for $ac_word" >&5
1801 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
1802 echo $ac_n "(cached) $ac_c" 1>&6
1804 if test -n "$CC"; then
1805 ac_cv_prog_CC="$CC" # Let the user override the test.
1807 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1809 for ac_dir in $ac_dummy; do
1810 test -z "$ac_dir" && ac_dir=.
1811 if test -f $ac_dir/$ac_word; then
1820 if test -n "$CC"; then
1821 echo "$ac_t""$CC" 1>&6
1823 echo "$ac_t""no" 1>&6
1826 if test -z "$CC"; then
1827 # Extract the first word of "cc", so it can be a program name with args.
1828 set dummy cc; ac_word=$2
1829 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1830 echo "configure:1831: checking for $ac_word" >&5
1831 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
1832 echo $ac_n "(cached) $ac_c" 1>&6
1834 if test -n "$CC"; then
1835 ac_cv_prog_CC="$CC" # Let the user override the test.
1837 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1840 for ac_dir in $ac_dummy; do
1841 test -z "$ac_dir" && ac_dir=.
1842 if test -f $ac_dir/$ac_word; then
1843 if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
1844 ac_prog_rejected=yes
1852 if test $ac_prog_rejected = yes; then
1853 # We found a bogon in the path, so make sure we never use it.
1854 set dummy $ac_cv_prog_CC
1856 if test $# -gt 0; then
1857 # We chose a different compiler from the bogus one.
1858 # However, it has the same basename, so the bogon will be chosen
1859 # first if we set CC to just the basename; use the full file name.
1861 set dummy "$ac_dir/$ac_word" "$@"
1869 if test -n "$CC"; then
1870 echo "$ac_t""$CC" 1>&6
1872 echo "$ac_t""no" 1>&6
1875 if test -z "$CC"; then
1876 case "`uname -s`" in
1878 # Extract the first word of "cl", so it can be a program name with args.
1879 set dummy cl; ac_word=$2
1880 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1881 echo "configure:1882: checking for $ac_word" >&5
1882 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
1883 echo $ac_n "(cached) $ac_c" 1>&6
1885 if test -n "$CC"; then
1886 ac_cv_prog_CC="$CC" # Let the user override the test.
1888 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1890 for ac_dir in $ac_dummy; do
1891 test -z "$ac_dir" && ac_dir=.
1892 if test -f $ac_dir/$ac_word; then
1901 if test -n "$CC"; then
1902 echo "$ac_t""$CC" 1>&6
1904 echo "$ac_t""no" 1>&6
1909 test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
1912 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
1913 echo "configure:1914: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
1916 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
1917 ac_cpp='$CPP $CPPFLAGS'
1918 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
1919 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
1920 cross_compiling=$ac_cv_prog_cc_cross
1922 cat > conftest.$ac_ext << EOF
1924 #line 1925 "configure"
1925 #include "confdefs.h"
1929 if { (eval echo configure:1930: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1930 ac_cv_prog_cc_works=yes
1931 # If we can't run a trivial program, we are probably using a cross compiler.
1932 if (./conftest; exit) 2>/dev/null; then
1933 ac_cv_prog_cc_cross=no
1935 ac_cv_prog_cc_cross=yes
1938 echo "configure: failed program was:" >&5
1939 cat conftest.$ac_ext >&5
1940 ac_cv_prog_cc_works=no
1944 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
1945 ac_cpp='$CPP $CPPFLAGS'
1946 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
1947 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
1948 cross_compiling=$ac_cv_prog_cc_cross
1950 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
1951 if test $ac_cv_prog_cc_works = no; then
1952 { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
1954 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
1955 echo "configure:1956: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
1956 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
1957 cross_compiling=$ac_cv_prog_cc_cross
1959 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
1960 echo "configure:1961: checking whether we are using GNU C" >&5
1961 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
1962 echo $ac_n "(cached) $ac_c" 1>&6
1964 cat > conftest.c <<EOF
1969 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1970: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
1976 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
1978 if test $ac_cv_prog_gcc = yes; then
1984 ac_test_CFLAGS="${CFLAGS+set}"
1985 ac_save_CFLAGS="$CFLAGS"
1987 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
1988 echo "configure:1989: checking whether ${CC-cc} accepts -g" >&5
1989 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
1990 echo $ac_n "(cached) $ac_c" 1>&6
1992 echo 'void f(){}' > conftest.c
1993 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
2002 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
2003 if test "$ac_test_CFLAGS" = set; then
2004 CFLAGS="$ac_save_CFLAGS"
2005 elif test $ac_cv_prog_cc_g = yes; then
2006 if test "$GCC" = yes; then
2012 if test "$GCC" = yes; then
2019 # Find a good install program. We prefer a C program (faster),
2020 # so one script is as good as another. But avoid the broken or
2021 # incompatible versions:
2022 # SysV /etc/install, /usr/sbin/install
2023 # SunOS /usr/etc/install
2024 # IRIX /sbin/install
2026 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
2027 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
2028 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
2029 # ./install, which can be erroneously created by make from ./install.sh.
2030 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
2031 echo "configure:2032: checking for a BSD compatible install" >&5
2032 if test -z "$INSTALL"; then
2033 if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
2034 echo $ac_n "(cached) $ac_c" 1>&6
2036 IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS=":"
2037 for ac_dir in $PATH; do
2038 # Account for people who put trailing slashes in PATH elements.
2040 /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
2042 # OSF1 and SCO ODT 3.0 have their own names for install.
2043 # Don't use installbsd from OSF since it installs stuff as root
2045 for ac_prog in ginstall scoinst install; do
2046 if test -f $ac_dir/$ac_prog; then
2047 if test $ac_prog = install &&
2048 grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
2049 # AIX install. It has an incompatible calling convention.
2052 ac_cv_path_install="$ac_dir/$ac_prog -c"
2063 if test "${ac_cv_path_install+set}" = set; then
2064 INSTALL="$ac_cv_path_install"
2066 # As a last resort, use the slow shell script. We don't cache a
2067 # path for INSTALL within a source directory, because that will
2068 # break other packages using the cache if that directory is
2069 # removed, or if the path is relative.
2070 INSTALL="$ac_install_sh"
2073 echo "$ac_t""$INSTALL" 1>&6
2075 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
2076 # It thinks the first close brace ends the variable substitution.
2077 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
2079 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
2081 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
2084 # Put a plausible default for CC_FOR_BUILD in Makefile.
2085 if test "x$cross_compiling" = "xno"; then
2086 CC_FOR_BUILD='$(CC)'
2096 # Extract the first word of "ranlib", so it can be a program name with args.
2097 set dummy ranlib; ac_word=$2
2098 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2099 echo "configure:2100: checking for $ac_word" >&5
2100 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
2101 echo $ac_n "(cached) $ac_c" 1>&6
2103 if test -n "$RANLIB"; then
2104 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
2106 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2108 for ac_dir in $ac_dummy; do
2109 test -z "$ac_dir" && ac_dir=.
2110 if test -f $ac_dir/$ac_word; then
2111 ac_cv_prog_RANLIB="ranlib"
2116 test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
2119 RANLIB="$ac_cv_prog_RANLIB"
2120 if test -n "$RANLIB"; then
2121 echo "$ac_t""$RANLIB" 1>&6
2123 echo "$ac_t""no" 1>&6
2129 for ac_hdr in argz.h limits.h locale.h nl_types.h malloc.h string.h \
2130 unistd.h values.h sys/param.h
2132 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2133 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2134 echo "configure:2135: checking for $ac_hdr" >&5
2135 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2136 echo $ac_n "(cached) $ac_c" 1>&6
2138 cat > conftest.$ac_ext <<EOF
2139 #line 2140 "configure"
2140 #include "confdefs.h"
2143 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2144 { (eval echo configure:2145: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2145 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2146 if test -z "$ac_err"; then
2148 eval "ac_cv_header_$ac_safe=yes"
2151 echo "configure: failed program was:" >&5
2152 cat conftest.$ac_ext >&5
2154 eval "ac_cv_header_$ac_safe=no"
2158 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2159 echo "$ac_t""yes" 1>&6
2160 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2161 cat >> confdefs.h <<EOF
2162 #define $ac_tr_hdr 1
2166 echo "$ac_t""no" 1>&6
2170 for ac_func in getcwd munmap putenv setenv setlocale strchr strcasecmp \
2171 __argz_count __argz_stringify __argz_next
2173 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
2174 echo "configure:2175: checking for $ac_func" >&5
2175 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2176 echo $ac_n "(cached) $ac_c" 1>&6
2178 cat > conftest.$ac_ext <<EOF
2179 #line 2180 "configure"
2180 #include "confdefs.h"
2181 /* System header to define __stub macros and hopefully few prototypes,
2182 which can conflict with char $ac_func(); below. */
2184 /* Override any gcc2 internal prototype to avoid an error. */
2185 /* We use char because int might match the return type of a gcc2
2186 builtin and then its argument prototype would still apply. */
2191 /* The GNU C library defines this for functions which it implements
2192 to always fail with ENOSYS. Some functions are actually named
2193 something starting with __ and the normal name is an alias. */
2194 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
2202 if { (eval echo configure:2203: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2204 eval "ac_cv_func_$ac_func=yes"
2206 echo "configure: failed program was:" >&5
2207 cat conftest.$ac_ext >&5
2209 eval "ac_cv_func_$ac_func=no"
2214 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
2215 echo "$ac_t""yes" 1>&6
2216 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2217 cat >> confdefs.h <<EOF
2218 #define $ac_tr_func 1
2222 echo "$ac_t""no" 1>&6
2227 if test "${ac_cv_func_stpcpy+set}" != "set"; then
2228 for ac_func in stpcpy
2230 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
2231 echo "configure:2232: checking for $ac_func" >&5
2232 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2233 echo $ac_n "(cached) $ac_c" 1>&6
2235 cat > conftest.$ac_ext <<EOF
2236 #line 2237 "configure"
2237 #include "confdefs.h"
2238 /* System header to define __stub macros and hopefully few prototypes,
2239 which can conflict with char $ac_func(); below. */
2241 /* Override any gcc2 internal prototype to avoid an error. */
2242 /* We use char because int might match the return type of a gcc2
2243 builtin and then its argument prototype would still apply. */
2248 /* The GNU C library defines this for functions which it implements
2249 to always fail with ENOSYS. Some functions are actually named
2250 something starting with __ and the normal name is an alias. */
2251 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
2259 if { (eval echo configure:2260: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2261 eval "ac_cv_func_$ac_func=yes"
2263 echo "configure: failed program was:" >&5
2264 cat conftest.$ac_ext >&5
2266 eval "ac_cv_func_$ac_func=no"
2271 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
2272 echo "$ac_t""yes" 1>&6
2273 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2274 cat >> confdefs.h <<EOF
2275 #define $ac_tr_func 1
2279 echo "$ac_t""no" 1>&6
2284 if test "${ac_cv_func_stpcpy}" = "yes"; then
2285 cat >> confdefs.h <<\EOF
2286 #define HAVE_STPCPY 1
2291 if test $ac_cv_header_locale_h = yes; then
2292 echo $ac_n "checking for LC_MESSAGES""... $ac_c" 1>&6
2293 echo "configure:2294: checking for LC_MESSAGES" >&5
2294 if eval "test \"`echo '$''{'am_cv_val_LC_MESSAGES'+set}'`\" = set"; then
2295 echo $ac_n "(cached) $ac_c" 1>&6
2297 cat > conftest.$ac_ext <<EOF
2298 #line 2299 "configure"
2299 #include "confdefs.h"
2305 if { (eval echo configure:2306: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2307 am_cv_val_LC_MESSAGES=yes
2309 echo "configure: failed program was:" >&5
2310 cat conftest.$ac_ext >&5
2312 am_cv_val_LC_MESSAGES=no
2317 echo "$ac_t""$am_cv_val_LC_MESSAGES" 1>&6
2318 if test $am_cv_val_LC_MESSAGES = yes; then
2319 cat >> confdefs.h <<\EOF
2320 #define HAVE_LC_MESSAGES 1
2325 echo $ac_n "checking whether NLS is requested""... $ac_c" 1>&6
2326 echo "configure:2327: checking whether NLS is requested" >&5
2327 # Check whether --enable-nls or --disable-nls was given.
2328 if test "${enable_nls+set}" = set; then
2329 enableval="$enable_nls"
2335 echo "$ac_t""$USE_NLS" 1>&6
2338 USE_INCLUDED_LIBINTL=no
2340 if test "$USE_NLS" = "yes"; then
2341 cat >> confdefs.h <<\EOF
2342 #define ENABLE_NLS 1
2345 echo $ac_n "checking whether included gettext is requested""... $ac_c" 1>&6
2346 echo "configure:2347: checking whether included gettext is requested" >&5
2347 # Check whether --with-included-gettext or --without-included-gettext was given.
2348 if test "${with_included_gettext+set}" = set; then
2349 withval="$with_included_gettext"
2350 nls_cv_force_use_gnu_gettext=$withval
2352 nls_cv_force_use_gnu_gettext=no
2355 echo "$ac_t""$nls_cv_force_use_gnu_gettext" 1>&6
2357 nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext"
2358 if test "$nls_cv_force_use_gnu_gettext" != "yes"; then
2360 nls_cv_header_libgt=
2363 ac_safe=`echo "libintl.h" | sed 'y%./+-%__p_%'`
2364 echo $ac_n "checking for libintl.h""... $ac_c" 1>&6
2365 echo "configure:2366: checking for libintl.h" >&5
2366 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2367 echo $ac_n "(cached) $ac_c" 1>&6
2369 cat > conftest.$ac_ext <<EOF
2370 #line 2371 "configure"
2371 #include "confdefs.h"
2372 #include <libintl.h>
2374 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2375 { (eval echo configure:2376: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2376 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2377 if test -z "$ac_err"; then
2379 eval "ac_cv_header_$ac_safe=yes"
2382 echo "configure: failed program was:" >&5
2383 cat conftest.$ac_ext >&5
2385 eval "ac_cv_header_$ac_safe=no"
2389 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2390 echo "$ac_t""yes" 1>&6
2391 echo $ac_n "checking for gettext in libc""... $ac_c" 1>&6
2392 echo "configure:2393: checking for gettext in libc" >&5
2393 if eval "test \"`echo '$''{'gt_cv_func_gettext_libc'+set}'`\" = set"; then
2394 echo $ac_n "(cached) $ac_c" 1>&6
2396 cat > conftest.$ac_ext <<EOF
2397 #line 2398 "configure"
2398 #include "confdefs.h"
2399 #include <libintl.h>
2401 return (int) gettext ("")
2404 if { (eval echo configure:2405: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2406 gt_cv_func_gettext_libc=yes
2408 echo "configure: failed program was:" >&5
2409 cat conftest.$ac_ext >&5
2411 gt_cv_func_gettext_libc=no
2416 echo "$ac_t""$gt_cv_func_gettext_libc" 1>&6
2418 if test "$gt_cv_func_gettext_libc" != "yes"; then
2419 echo $ac_n "checking for bindtextdomain in -lintl""... $ac_c" 1>&6
2420 echo "configure:2421: checking for bindtextdomain in -lintl" >&5
2421 ac_lib_var=`echo intl'_'bindtextdomain | sed 'y%./+-%__p_%'`
2422 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2423 echo $ac_n "(cached) $ac_c" 1>&6
2425 ac_save_LIBS="$LIBS"
2427 cat > conftest.$ac_ext <<EOF
2428 #line 2429 "configure"
2429 #include "confdefs.h"
2430 /* Override any gcc2 internal prototype to avoid an error. */
2431 /* We use char because int might match the return type of a gcc2
2432 builtin and then its argument prototype would still apply. */
2433 char bindtextdomain();
2439 if { (eval echo configure:2440: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2441 eval "ac_cv_lib_$ac_lib_var=yes"
2443 echo "configure: failed program was:" >&5
2444 cat conftest.$ac_ext >&5
2446 eval "ac_cv_lib_$ac_lib_var=no"
2449 LIBS="$ac_save_LIBS"
2452 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2453 echo "$ac_t""yes" 1>&6
2454 echo $ac_n "checking for gettext in libintl""... $ac_c" 1>&6
2455 echo "configure:2456: checking for gettext in libintl" >&5
2456 if eval "test \"`echo '$''{'gt_cv_func_gettext_libintl'+set}'`\" = set"; then
2457 echo $ac_n "(cached) $ac_c" 1>&6
2459 cat > conftest.$ac_ext <<EOF
2460 #line 2461 "configure"
2461 #include "confdefs.h"
2464 return (int) gettext ("")
2467 if { (eval echo configure:2468: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2469 gt_cv_func_gettext_libintl=yes
2471 echo "configure: failed program was:" >&5
2472 cat conftest.$ac_ext >&5
2474 gt_cv_func_gettext_libintl=no
2479 echo "$ac_t""$gt_cv_func_gettext_libintl" 1>&6
2481 echo "$ac_t""no" 1>&6
2486 if test "$gt_cv_func_gettext_libc" = "yes" \
2487 || test "$gt_cv_func_gettext_libintl" = "yes"; then
2488 cat >> confdefs.h <<\EOF
2489 #define HAVE_GETTEXT 1
2492 # Extract the first word of "msgfmt", so it can be a program name with args.
2493 set dummy msgfmt; ac_word=$2
2494 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2495 echo "configure:2496: checking for $ac_word" >&5
2496 if eval "test \"`echo '$''{'ac_cv_path_MSGFMT'+set}'`\" = set"; then
2497 echo $ac_n "(cached) $ac_c" 1>&6
2501 ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path.
2504 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
2505 for ac_dir in $PATH; do
2506 test -z "$ac_dir" && ac_dir=.
2507 if test -f $ac_dir/$ac_word; then
2508 if test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"; then
2509 ac_cv_path_MSGFMT="$ac_dir/$ac_word"
2515 test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT="no"
2519 MSGFMT="$ac_cv_path_MSGFMT"
2520 if test -n "$MSGFMT"; then
2521 echo "$ac_t""$MSGFMT" 1>&6
2523 echo "$ac_t""no" 1>&6
2525 if test "$MSGFMT" != "no"; then
2526 for ac_func in dcgettext
2528 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
2529 echo "configure:2530: checking for $ac_func" >&5
2530 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2531 echo $ac_n "(cached) $ac_c" 1>&6
2533 cat > conftest.$ac_ext <<EOF
2534 #line 2535 "configure"
2535 #include "confdefs.h"
2536 /* System header to define __stub macros and hopefully few prototypes,
2537 which can conflict with char $ac_func(); below. */
2539 /* Override any gcc2 internal prototype to avoid an error. */
2540 /* We use char because int might match the return type of a gcc2
2541 builtin and then its argument prototype would still apply. */
2546 /* The GNU C library defines this for functions which it implements
2547 to always fail with ENOSYS. Some functions are actually named
2548 something starting with __ and the normal name is an alias. */
2549 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
2557 if { (eval echo configure:2558: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2559 eval "ac_cv_func_$ac_func=yes"
2561 echo "configure: failed program was:" >&5
2562 cat conftest.$ac_ext >&5
2564 eval "ac_cv_func_$ac_func=no"
2569 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
2570 echo "$ac_t""yes" 1>&6
2571 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2572 cat >> confdefs.h <<EOF
2573 #define $ac_tr_func 1
2577 echo "$ac_t""no" 1>&6
2581 # Extract the first word of "gmsgfmt", so it can be a program name with args.
2582 set dummy gmsgfmt; ac_word=$2
2583 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2584 echo "configure:2585: checking for $ac_word" >&5
2585 if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then
2586 echo $ac_n "(cached) $ac_c" 1>&6
2590 ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path.
2593 ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a dos path.
2596 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2598 for ac_dir in $ac_dummy; do
2599 test -z "$ac_dir" && ac_dir=.
2600 if test -f $ac_dir/$ac_word; then
2601 ac_cv_path_GMSGFMT="$ac_dir/$ac_word"
2606 test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT"
2610 GMSGFMT="$ac_cv_path_GMSGFMT"
2611 if test -n "$GMSGFMT"; then
2612 echo "$ac_t""$GMSGFMT" 1>&6
2614 echo "$ac_t""no" 1>&6
2617 # Extract the first word of "xgettext", so it can be a program name with args.
2618 set dummy xgettext; ac_word=$2
2619 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2620 echo "configure:2621: checking for $ac_word" >&5
2621 if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then
2622 echo $ac_n "(cached) $ac_c" 1>&6
2626 ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path.
2629 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
2630 for ac_dir in $PATH; do
2631 test -z "$ac_dir" && ac_dir=.
2632 if test -f $ac_dir/$ac_word; then
2633 if test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"; then
2634 ac_cv_path_XGETTEXT="$ac_dir/$ac_word"
2640 test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":"
2644 XGETTEXT="$ac_cv_path_XGETTEXT"
2645 if test -n "$XGETTEXT"; then
2646 echo "$ac_t""$XGETTEXT" 1>&6
2648 echo "$ac_t""no" 1>&6
2651 cat > conftest.$ac_ext <<EOF
2652 #line 2653 "configure"
2653 #include "confdefs.h"
2656 extern int _nl_msg_cat_cntr;
2657 return _nl_msg_cat_cntr
2660 if { (eval echo configure:2661: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2665 echo "configure: failed program was:" >&5
2666 cat conftest.$ac_ext >&5
2677 echo "$ac_t""no" 1>&6
2682 if test "$CATOBJEXT" = "NONE"; then
2683 nls_cv_use_gnu_gettext=yes
2687 if test "$nls_cv_use_gnu_gettext" = "yes"; then
2688 INTLOBJS="\$(GETTOBJS)"
2689 # Extract the first word of "msgfmt", so it can be a program name with args.
2690 set dummy msgfmt; ac_word=$2
2691 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2692 echo "configure:2693: checking for $ac_word" >&5
2693 if eval "test \"`echo '$''{'ac_cv_path_MSGFMT'+set}'`\" = set"; then
2694 echo $ac_n "(cached) $ac_c" 1>&6
2698 ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path.
2701 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
2702 for ac_dir in $PATH; do
2703 test -z "$ac_dir" && ac_dir=.
2704 if test -f $ac_dir/$ac_word; then
2705 if test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"; then
2706 ac_cv_path_MSGFMT="$ac_dir/$ac_word"
2712 test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT="msgfmt"
2716 MSGFMT="$ac_cv_path_MSGFMT"
2717 if test -n "$MSGFMT"; then
2718 echo "$ac_t""$MSGFMT" 1>&6
2720 echo "$ac_t""no" 1>&6
2723 # Extract the first word of "gmsgfmt", so it can be a program name with args.
2724 set dummy gmsgfmt; ac_word=$2
2725 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2726 echo "configure:2727: checking for $ac_word" >&5
2727 if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then
2728 echo $ac_n "(cached) $ac_c" 1>&6
2732 ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path.
2735 ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a dos path.
2738 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2740 for ac_dir in $ac_dummy; do
2741 test -z "$ac_dir" && ac_dir=.
2742 if test -f $ac_dir/$ac_word; then
2743 ac_cv_path_GMSGFMT="$ac_dir/$ac_word"
2748 test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT"
2752 GMSGFMT="$ac_cv_path_GMSGFMT"
2753 if test -n "$GMSGFMT"; then
2754 echo "$ac_t""$GMSGFMT" 1>&6
2756 echo "$ac_t""no" 1>&6
2759 # Extract the first word of "xgettext", so it can be a program name with args.
2760 set dummy xgettext; ac_word=$2
2761 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2762 echo "configure:2763: checking for $ac_word" >&5
2763 if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then
2764 echo $ac_n "(cached) $ac_c" 1>&6
2768 ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path.
2771 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
2772 for ac_dir in $PATH; do
2773 test -z "$ac_dir" && ac_dir=.
2774 if test -f $ac_dir/$ac_word; then
2775 if test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"; then
2776 ac_cv_path_XGETTEXT="$ac_dir/$ac_word"
2782 test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":"
2786 XGETTEXT="$ac_cv_path_XGETTEXT"
2787 if test -n "$XGETTEXT"; then
2788 echo "$ac_t""$XGETTEXT" 1>&6
2790 echo "$ac_t""no" 1>&6
2794 USE_INCLUDED_LIBINTL=yes
2798 INTLDEPS='$(top_builddir)/../intl/libintl.a'
2800 LIBS=`echo $LIBS | sed -e 's/-lintl//'`
2801 nls_cv_header_intl=libintl.h
2802 nls_cv_header_libgt=libgettext.h
2805 if test "$XGETTEXT" != ":"; then
2806 if $XGETTEXT --omit-header /dev/null 2> /dev/null; then
2809 echo "$ac_t""found xgettext programs is not GNU xgettext; ignore it" 1>&6
2814 # We need to process the po/ directory.
2818 nls_cv_header_intl=libintl.h
2819 nls_cv_header_libgt=libgettext.h
2822 # If this is used in GNU gettext we have to set USE_NLS to `yes'
2823 # because some of the sources are only built for this goal.
2824 if test "$PACKAGE" = gettext; then
2826 USE_INCLUDED_LIBINTL=yes
2829 for lang in $ALL_LINGUAS; do
2830 GMOFILES="$GMOFILES $lang.gmo"
2831 POFILES="$POFILES $lang.po"
2847 if test "x$CATOBJEXT" != "x"; then
2848 if test "x$ALL_LINGUAS" = "x"; then
2851 echo $ac_n "checking for catalogs to be installed""... $ac_c" 1>&6
2852 echo "configure:2853: checking for catalogs to be installed" >&5
2854 for lang in ${LINGUAS=$ALL_LINGUAS}; do
2855 case "$ALL_LINGUAS" in
2856 *$lang*) NEW_LINGUAS="$NEW_LINGUAS $lang" ;;
2859 LINGUAS=$NEW_LINGUAS
2860 echo "$ac_t""$LINGUAS" 1>&6
2863 if test -n "$LINGUAS"; then
2864 for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done
2868 if test $ac_cv_header_locale_h = yes; then
2869 INCLUDE_LOCALE_H="#include <locale.h>"
2872 /* The system does not provide the header <locale.h>. Take care yourself. */"
2876 if test -f $srcdir/po2tbl.sed.in; then
2877 if test "$CATOBJEXT" = ".cat"; then
2878 ac_safe=`echo "linux/version.h" | sed 'y%./+-%__p_%'`
2879 echo $ac_n "checking for linux/version.h""... $ac_c" 1>&6
2880 echo "configure:2881: checking for linux/version.h" >&5
2881 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2882 echo $ac_n "(cached) $ac_c" 1>&6
2884 cat > conftest.$ac_ext <<EOF
2885 #line 2886 "configure"
2886 #include "confdefs.h"
2887 #include <linux/version.h>
2889 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2890 { (eval echo configure:2891: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2891 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2892 if test -z "$ac_err"; then
2894 eval "ac_cv_header_$ac_safe=yes"
2897 echo "configure: failed program was:" >&5
2898 cat conftest.$ac_ext >&5
2900 eval "ac_cv_header_$ac_safe=no"
2904 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2905 echo "$ac_t""yes" 1>&6
2908 echo "$ac_t""no" 1>&6
2913 sed -e '/^#/d' $srcdir/$msgformat-msg.sed > po2msg.sed
2915 sed -e '/^#.*[^\\]$/d' -e '/^#$/d' \
2916 $srcdir/po2tbl.sed.in > po2tbl.sed
2919 if test "$PACKAGE" = "gettext"; then
2929 MKINSTALLDIRS="\$(srcdir)/../../mkinstalldirs"
2935 if test -d $srcdir/po; then
2936 test -d po || mkdir po
2937 if test "x$srcdir" != "x."; then
2938 if test "x`echo $srcdir | sed 's@/.*@@'`" = "x"; then
2939 posrcprefix="$srcdir/"
2941 posrcprefix="../$srcdir/"
2947 sed -e "/^#/d" -e "/^\$/d" -e "s,.*, $posrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \
2948 < $srcdir/po/POTFILES.in > po/POTFILES
2952 # Check for common headers.
2953 # FIXME: Seems to me this can cause problems for i386-windows hosts.
2954 # At one point there were hardcoded AC_DEFINE's if ${host} = i386-*-windows*.
2955 for ac_hdr in stdlib.h string.h strings.h unistd.h time.h
2957 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2958 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2959 echo "configure:2960: checking for $ac_hdr" >&5
2960 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2961 echo $ac_n "(cached) $ac_c" 1>&6
2963 cat > conftest.$ac_ext <<EOF
2964 #line 2965 "configure"
2965 #include "confdefs.h"
2968 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2969 { (eval echo configure:2970: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2970 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2971 if test -z "$ac_err"; then
2973 eval "ac_cv_header_$ac_safe=yes"
2976 echo "configure: failed program was:" >&5
2977 cat conftest.$ac_ext >&5
2979 eval "ac_cv_header_$ac_safe=no"
2983 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2984 echo "$ac_t""yes" 1>&6
2985 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2986 cat >> confdefs.h <<EOF
2987 #define $ac_tr_hdr 1
2991 echo "$ac_t""no" 1>&6
2995 for ac_hdr in sys/time.h sys/resource.h
2997 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2998 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2999 echo "configure:3000: checking for $ac_hdr" >&5
3000 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3001 echo $ac_n "(cached) $ac_c" 1>&6
3003 cat > conftest.$ac_ext <<EOF
3004 #line 3005 "configure"
3005 #include "confdefs.h"
3008 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3009 { (eval echo configure:3010: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3010 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3011 if test -z "$ac_err"; then
3013 eval "ac_cv_header_$ac_safe=yes"
3016 echo "configure: failed program was:" >&5
3017 cat conftest.$ac_ext >&5
3019 eval "ac_cv_header_$ac_safe=no"
3023 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3024 echo "$ac_t""yes" 1>&6
3025 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
3026 cat >> confdefs.h <<EOF
3027 #define $ac_tr_hdr 1
3031 echo "$ac_t""no" 1>&6
3035 for ac_hdr in fcntl.h fpu_control.h
3037 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
3038 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
3039 echo "configure:3040: checking for $ac_hdr" >&5
3040 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3041 echo $ac_n "(cached) $ac_c" 1>&6
3043 cat > conftest.$ac_ext <<EOF
3044 #line 3045 "configure"
3045 #include "confdefs.h"
3048 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3049 { (eval echo configure:3050: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3050 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3051 if test -z "$ac_err"; then
3053 eval "ac_cv_header_$ac_safe=yes"
3056 echo "configure: failed program was:" >&5
3057 cat conftest.$ac_ext >&5
3059 eval "ac_cv_header_$ac_safe=no"
3063 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3064 echo "$ac_t""yes" 1>&6
3065 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
3066 cat >> confdefs.h <<EOF
3067 #define $ac_tr_hdr 1
3071 echo "$ac_t""no" 1>&6
3075 for ac_hdr in dlfcn.h errno.h sys/stat.h
3077 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
3078 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
3079 echo "configure:3080: checking for $ac_hdr" >&5
3080 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3081 echo $ac_n "(cached) $ac_c" 1>&6
3083 cat > conftest.$ac_ext <<EOF
3084 #line 3085 "configure"
3085 #include "confdefs.h"
3088 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3089 { (eval echo configure:3090: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3090 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3091 if test -z "$ac_err"; then
3093 eval "ac_cv_header_$ac_safe=yes"
3096 echo "configure: failed program was:" >&5
3097 cat conftest.$ac_ext >&5
3099 eval "ac_cv_header_$ac_safe=no"
3103 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3104 echo "$ac_t""yes" 1>&6
3105 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
3106 cat >> confdefs.h <<EOF
3107 #define $ac_tr_hdr 1
3111 echo "$ac_t""no" 1>&6
3115 for ac_func in getrusage time sigaction __setfpucw
3117 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3118 echo "configure:3119: checking for $ac_func" >&5
3119 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3120 echo $ac_n "(cached) $ac_c" 1>&6
3122 cat > conftest.$ac_ext <<EOF
3123 #line 3124 "configure"
3124 #include "confdefs.h"
3125 /* System header to define __stub macros and hopefully few prototypes,
3126 which can conflict with char $ac_func(); below. */
3128 /* Override any gcc2 internal prototype to avoid an error. */
3129 /* We use char because int might match the return type of a gcc2
3130 builtin and then its argument prototype would still apply. */
3135 /* The GNU C library defines this for functions which it implements
3136 to always fail with ENOSYS. Some functions are actually named
3137 something starting with __ and the normal name is an alias. */
3138 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3146 if { (eval echo configure:3147: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3148 eval "ac_cv_func_$ac_func=yes"
3150 echo "configure: failed program was:" >&5
3151 cat conftest.$ac_ext >&5
3153 eval "ac_cv_func_$ac_func=no"
3158 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3159 echo "$ac_t""yes" 1>&6
3160 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3161 cat >> confdefs.h <<EOF
3162 #define $ac_tr_func 1
3166 echo "$ac_t""no" 1>&6
3171 # Check for socket libraries
3172 echo $ac_n "checking for bind in -lsocket""... $ac_c" 1>&6
3173 echo "configure:3174: checking for bind in -lsocket" >&5
3174 ac_lib_var=`echo socket'_'bind | sed 'y%./+-%__p_%'`
3175 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3176 echo $ac_n "(cached) $ac_c" 1>&6
3178 ac_save_LIBS="$LIBS"
3179 LIBS="-lsocket $LIBS"
3180 cat > conftest.$ac_ext <<EOF
3181 #line 3182 "configure"
3182 #include "confdefs.h"
3183 /* Override any gcc2 internal prototype to avoid an error. */
3184 /* We use char because int might match the return type of a gcc2
3185 builtin and then its argument prototype would still apply. */
3192 if { (eval echo configure:3193: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3194 eval "ac_cv_lib_$ac_lib_var=yes"
3196 echo "configure: failed program was:" >&5
3197 cat conftest.$ac_ext >&5
3199 eval "ac_cv_lib_$ac_lib_var=no"
3202 LIBS="$ac_save_LIBS"
3205 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3206 echo "$ac_t""yes" 1>&6
3207 ac_tr_lib=HAVE_LIB`echo socket | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3208 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3209 cat >> confdefs.h <<EOF
3210 #define $ac_tr_lib 1
3213 LIBS="-lsocket $LIBS"
3216 echo "$ac_t""no" 1>&6
3219 echo $ac_n "checking for gethostbyname in -lnsl""... $ac_c" 1>&6
3220 echo "configure:3221: checking for gethostbyname in -lnsl" >&5
3221 ac_lib_var=`echo nsl'_'gethostbyname | sed 'y%./+-%__p_%'`
3222 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3223 echo $ac_n "(cached) $ac_c" 1>&6
3225 ac_save_LIBS="$LIBS"
3227 cat > conftest.$ac_ext <<EOF
3228 #line 3229 "configure"
3229 #include "confdefs.h"
3230 /* Override any gcc2 internal prototype to avoid an error. */
3231 /* We use char because int might match the return type of a gcc2
3232 builtin and then its argument prototype would still apply. */
3233 char gethostbyname();
3239 if { (eval echo configure:3240: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3241 eval "ac_cv_lib_$ac_lib_var=yes"
3243 echo "configure: failed program was:" >&5
3244 cat conftest.$ac_ext >&5
3246 eval "ac_cv_lib_$ac_lib_var=no"
3249 LIBS="$ac_save_LIBS"
3252 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3253 echo "$ac_t""yes" 1>&6
3254 ac_tr_lib=HAVE_LIB`echo nsl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3255 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3256 cat >> confdefs.h <<EOF
3257 #define $ac_tr_lib 1
3263 echo "$ac_t""no" 1>&6
3267 . ${srcdir}/../../bfd/configure.host
3271 USE_MAINTAINER_MODE=no
3272 # Check whether --enable-maintainer-mode or --disable-maintainer-mode was given.
3273 if test "${enable_maintainer_mode+set}" = set; then
3274 enableval="$enable_maintainer_mode"
3275 case "${enableval}" in
3276 yes) MAINT="" USE_MAINTAINER_MODE=yes ;;
3278 *) { echo "configure: error: "--enable-maintainer-mode does not take a value"" 1>&2; exit 1; }; MAINT="#" ;;
3280 if test x"$silent" != x"yes" && test x"$MAINT" = x""; then
3281 echo "Setting maintainer mode" 6>&1
3289 # Check whether --enable-sim-bswap or --disable-sim-bswap was given.
3290 if test "${enable_sim_bswap+set}" = set; then
3291 enableval="$enable_sim_bswap"
3292 case "${enableval}" in
3293 yes) sim_bswap="-DWITH_BSWAP=1 -DUSE_BSWAP=1";;
3294 no) sim_bswap="-DWITH_BSWAP=0";;
3295 *) { echo "configure: error: "--enable-sim-bswap does not take a value"" 1>&2; exit 1; }; sim_bswap="";;
3297 if test x"$silent" != x"yes" && test x"$sim_bswap" != x""; then
3298 echo "Setting bswap flags = $sim_bswap" 6>&1
3306 # Check whether --enable-sim-cflags or --disable-sim-cflags was given.
3307 if test "${enable_sim_cflags+set}" = set; then
3308 enableval="$enable_sim_cflags"
3309 case "${enableval}" in
3310 yes) sim_cflags="-O2 -fomit-frame-pointer";;
3311 trace) { echo "configure: error: "Please use --enable-sim-debug instead."" 1>&2; exit 1; }; sim_cflags="";;
3313 *) sim_cflags=`echo "${enableval}" | sed -e "s/,/ /g"`;;
3315 if test x"$silent" != x"yes" && test x"$sim_cflags" != x""; then
3316 echo "Setting sim cflags = $sim_cflags" 6>&1
3324 # Check whether --enable-sim-debug or --disable-sim-debug was given.
3325 if test "${enable_sim_debug+set}" = set; then
3326 enableval="$enable_sim_debug"
3327 case "${enableval}" in
3328 yes) sim_debug="-DDEBUG=7 -DWITH_DEBUG=7";;
3329 no) sim_debug="-DDEBUG=0 -DWITH_DEBUG=0";;
3330 *) sim_debug="-DDEBUG='(${enableval})' -DWITH_DEBUG='(${enableval})'";;
3332 if test x"$silent" != x"yes" && test x"$sim_debug" != x""; then
3333 echo "Setting sim debug = $sim_debug" 6>&1
3341 # Check whether --enable-sim-stdio or --disable-sim-stdio was given.
3342 if test "${enable_sim_stdio+set}" = set; then
3343 enableval="$enable_sim_stdio"
3344 case "${enableval}" in
3345 yes) sim_stdio="-DWITH_STDIO=DO_USE_STDIO";;
3346 no) sim_stdio="-DWITH_STDIO=DONT_USE_STDIO";;
3347 *) { echo "configure: error: "Unknown value $enableval passed to --enable-sim-stdio"" 1>&2; exit 1; }; sim_stdio="";;
3349 if test x"$silent" != x"yes" && test x"$sim_stdio" != x""; then
3350 echo "Setting stdio flags = $sim_stdio" 6>&1
3358 # Check whether --enable-sim-trace or --disable-sim-trace was given.
3359 if test "${enable_sim_trace+set}" = set; then
3360 enableval="$enable_sim_trace"
3361 case "${enableval}" in
3362 yes) sim_trace="-DTRACE=1 -DWITH_TRACE=-1";;
3363 no) sim_trace="-DTRACE=0 -DWITH_TRACE=0";;
3365 sim_trace="-DTRACE='(${enableval})' -DWITH_TRACE='(${enableval})'";;
3368 for x in `echo "$enableval" | sed -e "s/,/ /g"`; do
3369 if test x"$sim_trace" = x; then
3370 sim_trace="-DWITH_TRACE='(TRACE_$x"
3372 sim_trace="${sim_trace}|TRACE_$x"
3375 sim_trace="$sim_trace)'" ;;
3377 if test x"$silent" != x"yes" && test x"$sim_trace" != x""; then
3378 echo "Setting sim trace = $sim_trace" 6>&1
3386 # Check whether --enable-sim-profile or --disable-sim-profile was given.
3387 if test "${enable_sim_profile+set}" = set; then
3388 enableval="$enable_sim_profile"
3389 case "${enableval}" in
3390 yes) sim_profile="-DPROFILE=1 -DWITH_PROFILE=-1";;
3391 no) sim_profile="-DPROFILE=0 -DWITH_PROFILE=0";;
3393 sim_profile="-DPROFILE='(${enableval})' -DWITH_PROFILE='(${enableval})'";;
3396 for x in `echo "$enableval" | sed -e "s/,/ /g"`; do
3397 if test x"$sim_profile" = x; then
3398 sim_profile="-DWITH_PROFILE='(PROFILE_$x"
3400 sim_profile="${sim_profile}|PROFILE_$x"
3403 sim_profile="$sim_profile)'" ;;
3405 if test x"$silent" != x"yes" && test x"$sim_profile" != x""; then
3406 echo "Setting sim profile = $sim_profile" 6>&1
3409 sim_profile="-DPROFILE=1 -DWITH_PROFILE=-1"
3414 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
3415 echo "configure:3416: checking return type of signal handlers" >&5
3416 if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
3417 echo $ac_n "(cached) $ac_c" 1>&6
3419 cat > conftest.$ac_ext <<EOF
3420 #line 3421 "configure"
3421 #include "confdefs.h"
3422 #include <sys/types.h>
3428 extern "C" void (*signal (int, void (*)(int)))(int);
3430 void (*signal ()) ();
3437 if { (eval echo configure:3438: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3439 ac_cv_type_signal=void
3441 echo "configure: failed program was:" >&5
3442 cat conftest.$ac_ext >&5
3444 ac_cv_type_signal=int
3449 echo "$ac_t""$ac_cv_type_signal" 1>&6
3450 cat >> confdefs.h <<EOF
3451 #define RETSIGTYPE $ac_cv_type_signal
3458 echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
3459 echo "configure:3460: checking for executable suffix" >&5
3460 if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then
3461 echo $ac_n "(cached) $ac_c" 1>&6
3463 if test "$CYGWIN" = yes || test "$MINGW32" = yes; then
3467 echo 'int main () { return 0; }' > conftest.$ac_ext
3469 if { (eval echo configure:3470: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
3470 for file in conftest.*; do
3472 *.c | *.o | *.obj | *.ilk | *.pdb) ;;
3473 *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
3477 { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
3480 test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
3485 test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
3486 echo "$ac_t""${ac_cv_exeext}" 1>&6
3493 sim_link_links=tconfig.h
3494 if test -f ${srcdir}/tconfig.in
3496 sim_link_files=tconfig.in
3498 sim_link_files=../common/tconfig.in
3501 # targ-vals.def points to the libc macro description file.
3503 *-*-*) TARG_VALS_DEF=../common/nltvals.def ;;
3505 sim_link_files="${sim_link_files} ${TARG_VALS_DEF}"
3506 sim_link_links="${sim_link_links} targ-vals.def"
3511 wire_endian="LITTLE_ENDIAN"
3513 # Check whether --enable-sim-endian or --disable-sim-endian was given.
3514 if test "${enable_sim_endian+set}" = set; then
3515 enableval="$enable_sim_endian"
3516 case "${enableval}" in
3517 b*|B*) sim_endian="-DWITH_TARGET_BYTE_ORDER=BIG_ENDIAN";;
3518 l*|L*) sim_endian="-DWITH_TARGET_BYTE_ORDER=LITTLE_ENDIAN";;
3519 yes) if test x"$wire_endian" != x; then
3520 sim_endian="-DWITH_TARGET_BYTE_ORDER=${wire_endian}"
3522 if test x"$default_endian" != x; then
3523 sim_endian="-DWITH_TARGET_BYTE_ORDER=${default_endian}"
3525 echo "No hard-wired endian for target $target" 1>&6
3526 sim_endian="-DWITH_TARGET_BYTE_ORDER=0"
3529 no) if test x"$default_endian" != x; then
3530 sim_endian="-DWITH_DEFAULT_TARGET_BYTE_ORDER=${default_endian}"
3532 if test x"$wire_endian" != x; then
3533 sim_endian="-DWITH_DEFAULT_TARGET_BYTE_ORDER=${wire_endian}"
3535 echo "No default endian for target $target" 1>&6
3536 sim_endian="-DWITH_DEFAULT_TARGET_BYTE_ORDER=0"
3539 *) { echo "configure: error: "Unknown value $enableval for --enable-sim-endian"" 1>&2; exit 1; }; sim_endian="";;
3541 if test x"$silent" != x"yes" && test x"$sim_endian" != x""; then
3542 echo "Setting endian flags = $sim_endian" 6>&1
3545 if test x"$default_endian" != x; then
3546 sim_endian="-DWITH_DEFAULT_TARGET_BYTE_ORDER=${default_endian}"
3548 if test x"$wire_endian" != x; then
3549 sim_endian="-DWITH_TARGET_BYTE_ORDER=${wire_endian}"
3557 default_alignment="NONSTRICT_ALIGNMENT"
3559 # Check whether --enable-sim-alignment or --disable-sim-alignment was given.
3560 if test "${enable_sim_alignment+set}" = set; then
3561 enableval="$enable_sim_alignment"
3562 case "${enableval}" in
3563 strict | STRICT) sim_alignment="-DWITH_ALIGNMENT=STRICT_ALIGNMENT";;
3564 nonstrict | NONSTRICT) sim_alignment="-DWITH_ALIGNMENT=NONSTRICT_ALIGNMENT";;
3565 forced | FORCED) sim_alignment="-DWITH_ALIGNMENT=FORCED_ALIGNMENT";;
3566 yes) if test x"$wire_alignment" != x; then
3567 sim_alignment="-DWITH_ALIGNMENT=${wire_alignment}"
3569 if test x"$default_alignment" != x; then
3570 sim_alignment="-DWITH_ALIGNMENT=${default_alignment}"
3572 echo "No hard-wired alignment for target $target" 1>&6
3573 sim_alignment="-DWITH_ALIGNMENT=0"
3576 no) if test x"$default_alignment" != x; then
3577 sim_alignment="-DWITH_DEFAULT_ALIGNMENT=${default_alignment}"
3579 if test x"$wire_alignment" != x; then
3580 sim_alignment="-DWITH_DEFAULT_ALIGNMENT=${wire_alignment}"
3582 echo "No default alignment for target $target" 1>&6
3583 sim_alignment="-DWITH_DEFAULT_ALIGNMENT=0"
3586 *) { echo "configure: error: "Unknown value $enableval passed to --enable-sim-alignment"" 1>&2; exit 1; }; sim_alignment="";;
3588 if test x"$silent" != x"yes" && test x"$sim_alignment" != x""; then
3589 echo "Setting alignment flags = $sim_alignment" 6>&1
3592 if test x"$default_alignment" != x; then
3593 sim_alignment="-DWITH_DEFAULT_ALIGNMENT=${default_alignment}"
3595 if test x"$wire_alignment" != x; then
3596 sim_alignment="-DWITH_ALIGNMENT=${wire_alignment}"
3604 # Check whether --enable-sim-hostendian or --disable-sim-hostendian was given.
3605 if test "${enable_sim_hostendian+set}" = set; then
3606 enableval="$enable_sim_hostendian"
3607 case "${enableval}" in
3608 no) sim_hostendian="-DWITH_HOST_BYTE_ORDER=0";;
3609 b*|B*) sim_hostendian="-DWITH_HOST_BYTE_ORDER=BIG_ENDIAN";;
3610 l*|L*) sim_hostendian="-DWITH_HOST_BYTE_ORDER=LITTLE_ENDIAN";;
3611 *) { echo "configure: error: "Unknown value $enableval for --enable-sim-hostendian"" 1>&2; exit 1; }; sim_hostendian="";;
3613 if test x"$silent" != x"yes" && test x"$sim_hostendian" != x""; then
3614 echo "Setting hostendian flags = $sim_hostendian" 6>&1
3618 if test "x$cross_compiling" = "xno"; then
3619 echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
3620 echo "configure:3621: checking whether byte ordering is bigendian" >&5
3621 if eval "test \"`echo '$''{'ac_cv_c_bigendian'+set}'`\" = set"; then
3622 echo $ac_n "(cached) $ac_c" 1>&6
3624 ac_cv_c_bigendian=unknown
3625 # See if sys/param.h defines the BYTE_ORDER macro.
3626 cat > conftest.$ac_ext <<EOF
3627 #line 3628 "configure"
3628 #include "confdefs.h"
3629 #include <sys/types.h>
3630 #include <sys/param.h>
3633 #if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
3638 if { (eval echo configure:3639: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3640 # It does; now see whether it defined to BIG_ENDIAN or not.
3641 cat > conftest.$ac_ext <<EOF
3642 #line 3643 "configure"
3643 #include "confdefs.h"
3644 #include <sys/types.h>
3645 #include <sys/param.h>
3648 #if BYTE_ORDER != BIG_ENDIAN
3653 if { (eval echo configure:3654: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3655 ac_cv_c_bigendian=yes
3657 echo "configure: failed program was:" >&5
3658 cat conftest.$ac_ext >&5
3660 ac_cv_c_bigendian=no
3664 echo "configure: failed program was:" >&5
3665 cat conftest.$ac_ext >&5
3668 if test $ac_cv_c_bigendian = unknown; then
3669 if test "$cross_compiling" = yes; then
3670 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
3672 cat > conftest.$ac_ext <<EOF
3673 #line 3674 "configure"
3674 #include "confdefs.h"
3676 /* Are we little or big endian? From Harbison&Steele. */
3680 char c[sizeof (long)];
3683 exit (u.c[sizeof (long) - 1] == 1);
3686 if { (eval echo configure:3687: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
3688 ac_cv_c_bigendian=no
3690 echo "configure: failed program was:" >&5
3691 cat conftest.$ac_ext >&5
3693 ac_cv_c_bigendian=yes
3701 echo "$ac_t""$ac_cv_c_bigendian" 1>&6
3702 if test $ac_cv_c_bigendian = yes; then
3703 cat >> confdefs.h <<\EOF
3704 #define WORDS_BIGENDIAN 1
3709 if test $ac_cv_c_bigendian = yes; then
3710 sim_hostendian="-DWITH_HOST_BYTE_ORDER=BIG_ENDIAN"
3712 sim_hostendian="-DWITH_HOST_BYTE_ORDER=LITTLE_ENDIAN"
3715 sim_hostendian="-DWITH_HOST_BYTE_ORDER=0"
3720 # NOTE: Don't add -Wall or -Wunused, they both include
3721 # -Wunused-parameter which reports bogus warnings.
3722 # NOTE: If you add to this list, remember to update
3723 # gdb/doc/gdbint.texinfo.
3724 build_warnings="-Wimplicit -Wreturn-type -Wcomment -Wtrigraphs \
3725 -Wformat -Wparentheses -Wpointer-arith -Wuninitialized"
3726 # Up for debate: -Wswitch -Wcomment -trigraphs -Wtrigraphs
3727 # -Wunused-function -Wunused-label -Wunused-variable -Wunused-value
3728 # -Wchar-subscripts -Wtraditional -Wshadow -Wcast-qual
3729 # -Wcast-align -Wwrite-strings -Wconversion -Wstrict-prototypes
3730 # -Wmissing-prototypes -Wmissing-declarations -Wredundant-decls
3731 # -Woverloaded-virtual -Winline -Werror"
3732 # Check whether --enable-build-warnings or --disable-build-warnings was given.
3733 if test "${enable_build_warnings+set}" = set; then
3734 enableval="$enable_build_warnings"
3735 case "${enableval}" in
3737 no) build_warnings="-w";;
3738 ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"`
3739 build_warnings="${build_warnings} ${t}";;
3740 *,) t=`echo "${enableval}" | sed -e "s/,/ /g"`
3741 build_warnings="${t} ${build_warnings}";;
3742 *) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;;
3744 if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then
3745 echo "Setting compiler warning flags = $build_warnings" 6>&1
3748 # Check whether --enable-sim-build-warnings or --disable-sim-build-warnings was given.
3749 if test "${enable_sim_build_warnings+set}" = set; then
3750 enableval="$enable_sim_build_warnings"
3751 case "${enableval}" in
3753 no) build_warnings="-w";;
3754 ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"`
3755 build_warnings="${build_warnings} ${t}";;
3756 *,) t=`echo "${enableval}" | sed -e "s/,/ /g"`
3757 build_warnings="${t} ${build_warnings}";;
3758 *) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;;
3760 if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then
3761 echo "Setting GDB specific compiler warning flags = $build_warnings" 6>&1
3766 if test "x${build_warnings}" != x -a "x$GCC" = xyes
3768 echo $ac_n "checking compiler warning flags""... $ac_c" 1>&6
3769 echo "configure:3770: checking compiler warning flags" >&5
3770 # Separate out the -Werror flag as some files just cannot be
3771 # compiled with it enabled.
3772 for w in ${build_warnings}; do
3774 -Werr*) WERROR_CFLAGS=-Werror ;;
3775 *) # Check that GCC accepts it
3776 saved_CFLAGS="$CFLAGS"
3778 cat > conftest.$ac_ext <<EOF
3779 #line 3780 "configure"
3780 #include "confdefs.h"
3786 if { (eval echo configure:3787: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3788 WARN_CFLAGS="${WARN_CFLAGS} $w"
3790 echo "configure: failed program was:" >&5
3791 cat conftest.$ac_ext >&5
3794 CFLAGS="$saved_CFLAGS"
3797 echo "$ac_t""${WARN_CFLAGS}${WERROR_CFLAGS}" 1>&6
3801 default_sim_reserved_bits="1"
3802 # Check whether --enable-sim-reserved-bits or --disable-sim-reserved-bits was given.
3803 if test "${enable_sim_reserved_bits+set}" = set; then
3804 enableval="$enable_sim_reserved_bits"
3805 case "${enableval}" in
3806 yes) sim_reserved_bits="-DWITH_RESERVED_BITS=1";;
3807 no) sim_reserved_bits="-DWITH_RESERVED_BITS=0";;
3808 *) { echo "configure: error: "--enable-sim-reserved-bits does not take a value"" 1>&2; exit 1; }; sim_reserved_bits="";;
3810 if test x"$silent" != x"yes" && test x"$sim_reserved_bits" != x""; then
3811 echo "Setting reserved flags = $sim_reserved_bits" 6>&1
3814 sim_reserved_bits="-DWITH_RESERVED_BITS=${default_sim_reserved_bits}"
3817 wire_word_bitsize="32"
3819 wire_address_bitsize=""
3820 wire_cell_bitsize=""
3821 # Check whether --enable-sim-bitsize or --disable-sim-bitsize was given.
3822 if test "${enable_sim_bitsize+set}" = set; then
3823 enableval="$enable_sim_bitsize"
3825 case "${enableval}" in
3826 64,63 | 64,63,* ) sim_bitsize="-DWITH_TARGET_WORD_BITSIZE=64 -DWITH_TARGET_WORD_MSB=63";;
3827 32,31 | 32,31,* ) sim_bitsize="-DWITH_TARGET_WORD_BITSIZE=32 -DWITH_TARGET_WORD_MSB=31";;
3828 64,0 | 64,0,* ) sim_bitsize="-DWITH_TARGET_WORD_BITSIZE=32 -DWITH_TARGET_WORD_MSB=0";;
3829 32,0 | 64,0,* ) sim_bitsize="-DWITH_TARGET_WORD_BITSIZE=32 -DWITH_TARGET_WORD_MSB=0";;
3830 32) if test x"$wire_word_msb" != x -a x"$wire_word_msb" != x0; then
3831 sim_bitsize="-DWITH_TARGET_WORD_BITSIZE=32 -DWITH_TARGET_WORD_MSB=31"
3833 sim_bitsize="-DWITH_TARGET_WORD_BITSIZE=32 -DWITH_TARGET_WORD_MSB=0"
3835 64) if test x"$wire_word_msb" != x -a x"$wire_word_msb" != x0; then
3836 sim_bitsize="-DWITH_TARGET_WORD_BITSIZE=64 -DWITH_TARGET_WORD_MSB=63"
3838 sim_bitsize="-DWITH_TARGET_WORD_BITSIZE=64 -DWITH_TARGET_WORD_MSB=0"
3840 *) { echo "configure: error: "--enable-sim-bitsize was given $enableval. Expected 32 or 64"" 1>&2; exit 1; } ;;
3843 tmp=`echo "${enableval}" | sed -e "s/^[0-9]*,*[0-9]*,*//"`
3846 x32 | x32,* ) sim_bitsize="${sim_bitsize} -DWITH_TARGET_ADDRESS_BITSIZE=32" ;;
3847 x64 | x64,* ) sim_bitsize="${sim_bitsize} -DWITH_TARGET_ADDRESS_BITSIZE=64" ;;
3848 * ) { echo "configure: error: "--enable-sim-bitsize was given address size $enableval. Expected 32 or 64"" 1>&2; exit 1; } ;;
3851 tmp=`echo "${enableval}" | sed -e "s/^[0-9]*,*[0-9*]*,*[0-9]*,*//"`
3854 x32 | x32,* ) sim_bitsize="${sim_bitsize} -DWITH_TARGET_CELL_BITSIZE=32" ;;
3855 x64 | x64,* ) sim_bitsize="${sim_bitsize} -DWITH_TARGET_CELL_BITSIZE=64" ;;
3856 * ) { echo "configure: error: "--enable-sim-bitsize was given cell size $enableval. Expected 32 or 64"" 1>&2; exit 1; } ;;
3858 if test x"$silent" != x"yes" && test x"$sim_bitsize" != x""; then
3859 echo "Setting bitsize flags = $sim_bitsize" 6>&1
3863 if test x"$wire_word_bitsize" != x; then
3864 sim_bitsize="$sim_bitsize -DWITH_TARGET_WORD_BITSIZE=$wire_word_bitsize"
3866 if test x"$wire_word_msb" != x; then
3867 sim_bitsize="$sim_bitsize -DWITH_TARGET_WORD_MSB=$wire_word_msb"
3869 if test x"$wire_address_bitsize" != x; then
3870 sim_bitsize="$sim_bitsize -DWITH_TARGET_ADDRESS_BITSIZE=$wire_address_bitsize"
3872 if test x"$wire_cell_bitsize" != x; then
3873 sim_bitsize="$sim_bitsize -DWITH_TARGET_CELL_BITSIZE=$wire_cell_bitsize"
3878 for ac_func in time chmod utime fork execve execv chown
3880 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3881 echo "configure:3882: checking for $ac_func" >&5
3882 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3883 echo $ac_n "(cached) $ac_c" 1>&6
3885 cat > conftest.$ac_ext <<EOF
3886 #line 3887 "configure"
3887 #include "confdefs.h"
3888 /* System header to define __stub macros and hopefully few prototypes,
3889 which can conflict with char $ac_func(); below. */
3891 /* Override any gcc2 internal prototype to avoid an error. */
3892 /* We use char because int might match the return type of a gcc2
3893 builtin and then its argument prototype would still apply. */
3898 /* The GNU C library defines this for functions which it implements
3899 to always fail with ENOSYS. Some functions are actually named
3900 something starting with __ and the normal name is an alias. */
3901 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3909 if { (eval echo configure:3910: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3911 eval "ac_cv_func_$ac_func=yes"
3913 echo "configure: failed program was:" >&5
3914 cat conftest.$ac_ext >&5
3916 eval "ac_cv_func_$ac_func=no"
3921 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3922 echo "$ac_t""yes" 1>&6
3923 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3924 cat >> confdefs.h <<EOF
3925 #define $ac_tr_func 1
3929 echo "$ac_t""no" 1>&6
3933 for ac_hdr in unistd.h stdlib.h string.h strings.h utime.h time.h
3935 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
3936 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
3937 echo "configure:3938: checking for $ac_hdr" >&5
3938 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3939 echo $ac_n "(cached) $ac_c" 1>&6
3941 cat > conftest.$ac_ext <<EOF
3942 #line 3943 "configure"
3943 #include "confdefs.h"
3946 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3947 { (eval echo configure:3948: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3948 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3949 if test -z "$ac_err"; then
3951 eval "ac_cv_header_$ac_safe=yes"
3954 echo "configure: failed program was:" >&5
3955 cat conftest.$ac_ext >&5
3957 eval "ac_cv_header_$ac_safe=no"
3961 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3962 echo "$ac_t""yes" 1>&6
3963 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
3964 cat >> confdefs.h <<EOF
3965 #define $ac_tr_hdr 1
3969 echo "$ac_t""no" 1>&6
3977 if grep CGEN_MAINT $srcdir/Makefile.in >/dev/null; then
3978 cgen_breaks="break cgen_rtx_error";
3982 cat > confcache <<\EOF
3983 # This file is a shell script that caches the results of configure
3984 # tests run on this system so they can be shared between configure
3985 # scripts and configure runs. It is not useful on other systems.
3986 # If it contains results you don't want to keep, you may remove or edit it.
3988 # By default, configure uses ./config.cache as the cache file,
3989 # creating it if it does not exist already. You can give configure
3990 # the --cache-file=FILE option to use a different cache file; that is
3991 # what configure does when it calls configure scripts in
3992 # subdirectories, so they share the cache.
3993 # Giving --cache-file=/dev/null disables caching, for debugging configure.
3994 # config.status only pays attention to the cache file if you give it the
3995 # --recheck option to rerun configure.
3998 # The following way of writing the cache mishandles newlines in values,
3999 # but we know of no workaround that is simple, portable, and efficient.
4000 # So, don't put newlines in cache variables' values.
4001 # Ultrix sh set writes to stderr and can't be redirected directly,
4002 # and sets the high bit in the cache file unless we assign to the vars.
4004 case `(ac_space=' '; set | grep ac_space) 2>&1` in
4006 # `set' does not quote correctly, so add quotes (double-quote substitution
4007 # turns \\\\ into \\, and sed turns \\ into \).
4009 -e "s/'/'\\\\''/g" \
4010 -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
4013 # `set' quotes correctly as required by POSIX, so do not add quotes.
4014 sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
4017 if cmp -s $cache_file confcache; then
4020 if test -w $cache_file; then
4021 echo "updating cache $cache_file"
4022 cat confcache > $cache_file
4024 echo "not updating unwritable cache $cache_file"
4029 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
4031 test "x$prefix" = xNONE && prefix=$ac_default_prefix
4032 # Let make expand exec_prefix.
4033 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
4035 # Any assignment to VPATH causes Sun make to only execute
4036 # the first set of double-colon rules, so remove it if not needed.
4037 # If there is a colon in the path, we need to keep it.
4038 if test "x$srcdir" = x.; then
4039 ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d'
4042 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
4044 DEFS=-DHAVE_CONFIG_H
4046 # Without the "./", some shells look in PATH for config.status.
4047 : ${CONFIG_STATUS=./config.status}
4049 echo creating $CONFIG_STATUS
4050 rm -f $CONFIG_STATUS
4051 cat > $CONFIG_STATUS <<EOF
4053 # Generated automatically by configure.
4054 # Run this file to recreate the current configuration.
4055 # This directory was configured as follows,
4056 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
4058 # $0 $ac_configure_args
4060 # Compiler output produced by configure, useful for debugging
4061 # configure, is in ./config.log if it exists.
4063 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
4066 case "\$ac_option" in
4067 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
4068 echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
4069 exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
4070 -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
4071 echo "$CONFIG_STATUS generated by autoconf version 2.13"
4073 -help | --help | --hel | --he | --h)
4074 echo "\$ac_cs_usage"; exit 0 ;;
4075 *) echo "\$ac_cs_usage"; exit 1 ;;
4079 ac_given_srcdir=$srcdir
4080 ac_given_INSTALL="$INSTALL"
4082 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
4084 cat >> $CONFIG_STATUS <<EOF
4086 # Protect against being on the right side of a sed subst in config.status.
4087 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
4088 s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
4091 s%@sim_environment@%$sim_environment%g
4092 s%@sim_alignment@%$sim_alignment%g
4093 s%@sim_assert@%$sim_assert%g
4094 s%@sim_bitsize@%$sim_bitsize%g
4095 s%@sim_endian@%$sim_endian%g
4096 s%@sim_hostendian@%$sim_hostendian%g
4097 s%@sim_float@%$sim_float%g
4098 s%@sim_scache@%$sim_scache%g
4099 s%@sim_default_model@%$sim_default_model%g
4100 s%@sim_hw_cflags@%$sim_hw_cflags%g
4101 s%@sim_hw_objs@%$sim_hw_objs%g
4102 s%@sim_hw@%$sim_hw%g
4103 s%@sim_inline@%$sim_inline%g
4104 s%@sim_packages@%$sim_packages%g
4105 s%@sim_regparm@%$sim_regparm%g
4106 s%@sim_reserved_bits@%$sim_reserved_bits%g
4107 s%@sim_smp@%$sim_smp%g
4108 s%@sim_stdcall@%$sim_stdcall%g
4109 s%@sim_xor_endian@%$sim_xor_endian%g
4110 s%@WARN_CFLAGS@%$WARN_CFLAGS%g
4111 s%@WERROR_CFLAGS@%$WERROR_CFLAGS%g
4113 s%@CFLAGS@%$CFLAGS%g
4114 s%@CPPFLAGS@%$CPPFLAGS%g
4115 s%@CXXFLAGS@%$CXXFLAGS%g
4116 s%@FFLAGS@%$FFLAGS%g
4118 s%@LDFLAGS@%$LDFLAGS%g
4120 s%@exec_prefix@%$exec_prefix%g
4121 s%@prefix@%$prefix%g
4122 s%@program_transform_name@%$program_transform_name%g
4123 s%@bindir@%$bindir%g
4124 s%@sbindir@%$sbindir%g
4125 s%@libexecdir@%$libexecdir%g
4126 s%@datadir@%$datadir%g
4127 s%@sysconfdir@%$sysconfdir%g
4128 s%@sharedstatedir@%$sharedstatedir%g
4129 s%@localstatedir@%$localstatedir%g
4130 s%@libdir@%$libdir%g
4131 s%@includedir@%$includedir%g
4132 s%@oldincludedir@%$oldincludedir%g
4133 s%@infodir@%$infodir%g
4134 s%@mandir@%$mandir%g
4136 s%@host_alias@%$host_alias%g
4137 s%@host_cpu@%$host_cpu%g
4138 s%@host_vendor@%$host_vendor%g
4139 s%@host_os@%$host_os%g
4140 s%@target@%$target%g
4141 s%@target_alias@%$target_alias%g
4142 s%@target_cpu@%$target_cpu%g
4143 s%@target_vendor@%$target_vendor%g
4144 s%@target_os@%$target_os%g
4146 s%@build_alias@%$build_alias%g
4147 s%@build_cpu@%$build_cpu%g
4148 s%@build_vendor@%$build_vendor%g
4149 s%@build_os@%$build_os%g
4151 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
4152 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
4153 s%@INSTALL_DATA@%$INSTALL_DATA%g
4154 s%@CC_FOR_BUILD@%$CC_FOR_BUILD%g
4155 s%@HDEFINES@%$HDEFINES%g
4157 s%@RANLIB@%$RANLIB%g
4158 s%@SET_MAKE@%$SET_MAKE%g
4160 s%@ALLOCA@%$ALLOCA%g
4161 s%@USE_NLS@%$USE_NLS%g
4162 s%@MSGFMT@%$MSGFMT%g
4163 s%@GMSGFMT@%$GMSGFMT%g
4164 s%@XGETTEXT@%$XGETTEXT%g
4165 s%@USE_INCLUDED_LIBINTL@%$USE_INCLUDED_LIBINTL%g
4166 s%@CATALOGS@%$CATALOGS%g
4167 s%@CATOBJEXT@%$CATOBJEXT%g
4168 s%@DATADIRNAME@%$DATADIRNAME%g
4169 s%@GMOFILES@%$GMOFILES%g
4170 s%@INSTOBJEXT@%$INSTOBJEXT%g
4171 s%@INTLDEPS@%$INTLDEPS%g
4172 s%@INTLLIBS@%$INTLLIBS%g
4173 s%@INTLOBJS@%$INTLOBJS%g
4174 s%@POFILES@%$POFILES%g
4176 s%@INCLUDE_LOCALE_H@%$INCLUDE_LOCALE_H%g
4178 s%@GT_YES@%$GT_YES%g
4179 s%@MKINSTALLDIRS@%$MKINSTALLDIRS%g
4182 s%@sim_bswap@%$sim_bswap%g
4183 s%@sim_cflags@%$sim_cflags%g
4184 s%@sim_debug@%$sim_debug%g
4185 s%@sim_stdio@%$sim_stdio%g
4186 s%@sim_trace@%$sim_trace%g
4187 s%@sim_profile@%$sim_profile%g
4188 s%@EXEEXT@%$EXEEXT%g
4189 s%@cgen_breaks@%$cgen_breaks%g
4194 cat >> $CONFIG_STATUS <<\EOF
4196 # Split the substitutions into bite-sized pieces for seds with
4197 # small command number limits, like on Digital OSF/1 and HP-UX.
4198 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
4199 ac_file=1 # Number of current file.
4200 ac_beg=1 # First line for current file.
4201 ac_end=$ac_max_sed_cmds # Line after last line for current file.
4204 while $ac_more_lines; do
4205 if test $ac_beg -gt 1; then
4206 sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
4208 sed "${ac_end}q" conftest.subs > conftest.s$ac_file
4210 if test ! -s conftest.s$ac_file; then
4212 rm -f conftest.s$ac_file
4214 if test -z "$ac_sed_cmds"; then
4215 ac_sed_cmds="sed -f conftest.s$ac_file"
4217 ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
4219 ac_file=`expr $ac_file + 1`
4221 ac_end=`expr $ac_end + $ac_max_sed_cmds`
4224 if test -z "$ac_sed_cmds"; then
4229 cat >> $CONFIG_STATUS <<EOF
4231 CONFIG_FILES=\${CONFIG_FILES-"Makefile.sim:Makefile.in Make-common.sim:../common/Make-common.in .gdbinit:../common/gdbinit.in"}
4233 cat >> $CONFIG_STATUS <<\EOF
4234 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
4235 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
4237 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
4238 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
4239 *) ac_file_in="${ac_file}.in" ;;
4242 # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
4244 # Remove last slash and all that follows it. Not all systems have dirname.
4245 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
4246 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
4247 # The file is in a subdirectory.
4248 test ! -d "$ac_dir" && mkdir "$ac_dir"
4249 ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
4250 # A "../" for each directory in $ac_dir_suffix.
4251 ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
4253 ac_dir_suffix= ac_dots=
4256 case "$ac_given_srcdir" in
4258 if test -z "$ac_dots"; then top_srcdir=.
4259 else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
4260 /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
4262 srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
4263 top_srcdir="$ac_dots$ac_given_srcdir" ;;
4266 case "$ac_given_INSTALL" in
4267 [/$]*) INSTALL="$ac_given_INSTALL" ;;
4268 *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
4271 echo creating "$ac_file"
4273 configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
4275 *Makefile*) ac_comsub="1i\\
4276 # $configure_input" ;;
4280 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
4282 s%@configure_input@%$configure_input%g
4283 s%@srcdir@%$srcdir%g
4284 s%@top_srcdir@%$top_srcdir%g
4285 s%@INSTALL@%$INSTALL%g
4286 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
4290 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
4291 # NAME is the cpp macro being defined and VALUE is the value it is being given.
4293 # ac_d sets the value in "#define NAME VALUE" lines.
4294 ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)'
4295 ac_dB='\([ ][ ]*\)[^ ]*%\1#\2'
4298 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
4299 ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
4300 ac_uB='\([ ]\)%\1#\2define\3'
4303 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
4304 ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
4305 ac_eB='$%\1#\2define\3'
4309 if test "${CONFIG_HEADERS+set}" != set; then
4311 cat >> $CONFIG_STATUS <<EOF
4312 CONFIG_HEADERS="config.h:config.in"
4314 cat >> $CONFIG_STATUS <<\EOF
4316 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
4317 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
4319 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
4320 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
4321 *) ac_file_in="${ac_file}.in" ;;
4324 echo creating $ac_file
4326 rm -f conftest.frag conftest.in conftest.out
4327 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
4328 cat $ac_file_inputs > conftest.in
4332 # Transform confdefs.h into a sed script conftest.vals that substitutes
4333 # the proper values into config.h.in to produce config.h. And first:
4334 # Protect against being on the right side of a sed subst in config.status.
4335 # Protect against being in an unquoted here document in config.status.
4337 cat > conftest.hdr <<\EOF
4340 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
4344 sed -n -f conftest.hdr confdefs.h > conftest.vals
4347 # This sed command replaces #undef with comments. This is necessary, for
4348 # example, in the case of _POSIX_SOURCE, which is predefined and required
4349 # on some systems where configure will not decide to define it.
4350 cat >> conftest.vals <<\EOF
4351 s%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
4354 # Break up conftest.vals because some shells have a limit on
4355 # the size of here documents, and old seds have small limits too.
4360 ac_lines=`grep -c . conftest.vals`
4361 # grep -c gives empty output for an empty file on some AIX systems.
4362 if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
4363 # Write a limited-size here document to conftest.frag.
4364 echo ' cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
4365 sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
4367 sed -f conftest.frag conftest.in > conftest.out
4369 mv conftest.out conftest.in
4371 sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
4373 mv conftest.tail conftest.vals
4377 cat >> $CONFIG_STATUS <<\EOF
4378 rm -f conftest.frag conftest.h
4379 echo "/* $ac_file. Generated automatically by configure. */" > conftest.h
4380 cat conftest.in >> conftest.h
4382 if cmp -s $ac_file conftest.h 2>/dev/null; then
4383 echo "$ac_file is unchanged"
4386 # Remove last slash and all that follows it. Not all systems have dirname.
4387 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
4388 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
4389 # The file is in a subdirectory.
4390 test ! -d "$ac_dir" && mkdir "$ac_dir"
4393 mv conftest.h $ac_file
4399 cat >> $CONFIG_STATUS <<EOF
4400 ac_sources="$sim_link_files"
4401 ac_dests="$sim_link_links"
4404 cat >> $CONFIG_STATUS <<\EOF
4405 srcdir=$ac_given_srcdir
4406 while test -n "$ac_sources"; do
4407 set $ac_dests; ac_dest=$1; shift; ac_dests=$*
4408 set $ac_sources; ac_source=$1; shift; ac_sources=$*
4410 echo "linking $srcdir/$ac_source to $ac_dest"
4412 if test ! -r $srcdir/$ac_source; then
4413 { echo "configure: error: $srcdir/$ac_source: File not found" 1>&2; exit 1; }
4417 # Make relative symlinks.
4418 # Remove last slash and all that follows it. Not all systems have dirname.
4419 ac_dest_dir=`echo $ac_dest|sed 's%/[^/][^/]*$%%'`
4420 if test "$ac_dest_dir" != "$ac_dest" && test "$ac_dest_dir" != .; then
4421 # The dest file is in a subdirectory.
4422 test ! -d "$ac_dest_dir" && mkdir "$ac_dest_dir"
4423 ac_dest_dir_suffix="/`echo $ac_dest_dir|sed 's%^\./%%'`"
4424 # A "../" for each directory in $ac_dest_dir_suffix.
4425 ac_dots=`echo $ac_dest_dir_suffix|sed 's%/[^/]*%../%g'`
4427 ac_dest_dir_suffix= ac_dots=
4431 [/$]*) ac_rel_source="$srcdir/$ac_source" ;;
4432 *) ac_rel_source="$ac_dots$srcdir/$ac_source" ;;
4435 # Make a symlink if possible; otherwise try a hard link.
4436 if ln -s $ac_rel_source $ac_dest 2>/dev/null ||
4437 ln $srcdir/$ac_source $ac_dest; then :
4439 { echo "configure: error: can not link $ac_dest to $srcdir/$ac_source" 1>&2; exit 1; }
4443 cat >> $CONFIG_STATUS <<EOF
4446 cat >> $CONFIG_STATUS <<\EOF
4447 case "x$CONFIG_FILES" in
4449 echo "Merging Makefile.sim+Make-common.sim into Makefile ..."
4450 rm -f Makesim1.tmp Makesim2.tmp Makefile
4451 sed -n -e '/^## COMMON_PRE_/,/^## End COMMON_PRE_/ p' <Make-common.sim >Makesim1.tmp
4452 sed -n -e '/^## COMMON_POST_/,/^## End COMMON_POST_/ p' <Make-common.sim >Makesim2.tmp
4453 sed -e '/^## COMMON_PRE_/ r Makesim1.tmp' \
4454 -e '/^## COMMON_POST_/ r Makesim2.tmp' \
4455 <Makefile.sim >Makefile
4456 rm -f Makefile.sim Make-common.sim Makesim1.tmp Makesim2.tmp
4459 case "x$CONFIG_HEADERS" in xconfig.h:config.in) echo > stamp-h ;; esac
4463 chmod +x $CONFIG_STATUS
4464 rm -fr confdefs* $ac_clean_files
4465 test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1