From a5b607c895adfb751c273e51fea101935d94e103 Mon Sep 17 00:00:00 2001 From: matz Date: Tue, 16 May 2000 02:46:57 +0000 Subject: remove configure from repositry git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@693 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ChangeLog | 5 + configure | 5416 -------------------------------------------------------- eval.c | 223 ++- gc.c | 45 +- io.c | 2 +- regex.c | 41 +- ruby.h | 7 + sample/test.rb | 2 +- st.c | 9 +- 9 files changed, 219 insertions(+), 5531 deletions(-) delete mode 100644 configure diff --git a/ChangeLog b/ChangeLog index 086e091719..bed749fbc5 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,10 @@ Mon May 15 15:38:09 2000 Yukihiro Matsumoto + * ruby.h: exported symbols should be for xmalloc etc. are now + prefixed by 'ruby_', e.g. ruby_xmalloc(). + + * eval.c (rb_thread_select): remove busy wait for select. + * dir.c (glob): trailing path may be null, e.g. glob("**"). Mon May 15 01:18:20 2000 Yukihiro Matsumoto diff --git a/configure b/configure deleted file mode 100644 index 4c06877872..0000000000 --- a/configure +++ /dev/null @@ -1,5416 +0,0 @@ -#! /bin/sh - -# Guess values for system-dependent variables and create Makefiles. -# Generated automatically using autoconf version 2.13 -# Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc. -# -# This configure script is free software; the Free Software Foundation -# gives unlimited permission to copy, distribute and modify it. - -# Defaults: -ac_help= -ac_default_prefix=/usr/local -# Any additions from configure.in: -ac_help="$ac_help ---without-gcc never use gcc" -ac_help="$ac_help ---enable-fat-binary build a NeXT/Apple Multi Architecture Binary. " -ac_help="$ac_help ---with-default-kcode=CODE specify default value for \$KCODE (utf8|euc|sjis|none)" -ac_help="$ac_help ---with-dln-a-out use dln_a_out if possible" -ac_help="$ac_help ---with-static-linked-ext link external modules statically" -ac_help="$ac_help ---enable-shared build a shared library for Ruby. " -ac_help="$ac_help ---with-sitedir=DIR site libraries in DIR [PREFIX/lib/ruby/site_ruby]" -ac_help="$ac_help ---with-search-path specify the additional search path" - -# Initialize some variables set by options. -# The variables have the same names as the options, with -# dashes changed to underlines. -build=NONE -cache_file=./config.cache -exec_prefix=NONE -host=NONE -no_create= -nonopt=NONE -no_recursion= -prefix=NONE -program_prefix=NONE -program_suffix=NONE -program_transform_name=s,x,x, -silent= -site= -srcdir= -target=NONE -verbose= -x_includes=NONE -x_libraries=NONE -bindir='${exec_prefix}/bin' -sbindir='${exec_prefix}/sbin' -libexecdir='${exec_prefix}/libexec' -datadir='${prefix}/share' -sysconfdir='${prefix}/etc' -sharedstatedir='${prefix}/com' -localstatedir='${prefix}/var' -libdir='${exec_prefix}/lib' -includedir='${prefix}/include' -oldincludedir='/usr/include' -infodir='${prefix}/info' -mandir='${prefix}/man' - -# Initialize some other variables. -subdirs= -MFLAGS= MAKEFLAGS= -SHELL=${CONFIG_SHELL-/bin/sh} -# Maximum number of lines to put in a shell here document. -ac_max_here_lines=12 - -ac_prev= -for ac_option -do - - # If the previous option needs an argument, assign it. - if test -n "$ac_prev"; then - eval "$ac_prev=\$ac_option" - ac_prev= - continue - fi - - case "$ac_option" in - -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;; - *) ac_optarg= ;; - esac - - # Accept the important Cygnus configure options, so we can diagnose typos. - - case "$ac_option" in - - -bindir | --bindir | --bindi | --bind | --bin | --bi) - ac_prev=bindir ;; - -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) - bindir="$ac_optarg" ;; - - -build | --build | --buil | --bui | --bu) - ac_prev=build ;; - -build=* | --build=* | --buil=* | --bui=* | --bu=*) - build="$ac_optarg" ;; - - -cache-file | --cache-file | --cache-fil | --cache-fi \ - | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) - ac_prev=cache_file ;; - -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ - | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) - cache_file="$ac_optarg" ;; - - -datadir | --datadir | --datadi | --datad | --data | --dat | --da) - ac_prev=datadir ;; - -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \ - | --da=*) - datadir="$ac_optarg" ;; - - -disable-* | --disable-*) - ac_feature=`echo $ac_option|sed -e 's/-*disable-//'` - # Reject names that are not valid shell variable names. - if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then - { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; } - fi - ac_feature=`echo $ac_feature| sed 's/-/_/g'` - eval "enable_${ac_feature}=no" ;; - - -enable-* | --enable-*) - ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'` - # Reject names that are not valid shell variable names. - if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then - { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; } - fi - ac_feature=`echo $ac_feature| sed 's/-/_/g'` - case "$ac_option" in - *=*) ;; - *) ac_optarg=yes ;; - esac - eval "enable_${ac_feature}='$ac_optarg'" ;; - - -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ - | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ - | --exec | --exe | --ex) - ac_prev=exec_prefix ;; - -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ - | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ - | --exec=* | --exe=* | --ex=*) - exec_prefix="$ac_optarg" ;; - - -gas | --gas | --ga | --g) - # Obsolete; use --with-gas. - with_gas=yes ;; - - -help | --help | --hel | --he) - # Omit some internal or obsolete options to make the list less imposing. - # This message is too long to be a string in the A/UX 3.1 sh. - cat << EOF -Usage: configure [options] [host] -Options: [defaults in brackets after descriptions] -Configuration: - --cache-file=FILE cache test results in FILE - --help print this message - --no-create do not create output files - --quiet, --silent do not print \`checking...' messages - --version print the version of autoconf that created configure -Directory and file names: - --prefix=PREFIX install architecture-independent files in PREFIX - [$ac_default_prefix] - --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX - [same as prefix] - --bindir=DIR user executables in DIR [EPREFIX/bin] - --sbindir=DIR system admin executables in DIR [EPREFIX/sbin] - --libexecdir=DIR program executables in DIR [EPREFIX/libexec] - --datadir=DIR read-only architecture-independent data in DIR - [PREFIX/share] - --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc] - --sharedstatedir=DIR modifiable architecture-independent data in DIR - [PREFIX/com] - --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var] - --libdir=DIR object code libraries in DIR [EPREFIX/lib] - --includedir=DIR C header files in DIR [PREFIX/include] - --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include] - --infodir=DIR info documentation in DIR [PREFIX/info] - --mandir=DIR man documentation in DIR [PREFIX/man] - --srcdir=DIR find the sources in DIR [configure dir or ..] - --program-prefix=PREFIX prepend PREFIX to installed program names - --program-suffix=SUFFIX append SUFFIX to installed program names - --program-transform-name=PROGRAM - run sed PROGRAM on installed program names -EOF - cat << EOF -Host type: - --build=BUILD configure for building on BUILD [BUILD=HOST] - --host=HOST configure for HOST [guessed] - --target=TARGET configure for TARGET [TARGET=HOST] -Features and packages: - --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) - --enable-FEATURE[=ARG] include FEATURE [ARG=yes] - --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] - --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) - --x-includes=DIR X include files are in DIR - --x-libraries=DIR X library files are in DIR -EOF - if test -n "$ac_help"; then - echo "--enable and --with options recognized:$ac_help" - fi - exit 0 ;; - - -host | --host | --hos | --ho) - ac_prev=host ;; - -host=* | --host=* | --hos=* | --ho=*) - host="$ac_optarg" ;; - - -includedir | --includedir | --includedi | --included | --include \ - | --includ | --inclu | --incl | --inc) - ac_prev=includedir ;; - -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ - | --includ=* | --inclu=* | --incl=* | --inc=*) - includedir="$ac_optarg" ;; - - -infodir | --infodir | --infodi | --infod | --info | --inf) - ac_prev=infodir ;; - -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) - infodir="$ac_optarg" ;; - - -libdir | --libdir | --libdi | --libd) - ac_prev=libdir ;; - -libdir=* | --libdir=* | --libdi=* | --libd=*) - libdir="$ac_optarg" ;; - - -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ - | --libexe | --libex | --libe) - ac_prev=libexecdir ;; - -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ - | --libexe=* | --libex=* | --libe=*) - libexecdir="$ac_optarg" ;; - - -localstatedir | --localstatedir | --localstatedi | --localstated \ - | --localstate | --localstat | --localsta | --localst \ - | --locals | --local | --loca | --loc | --lo) - ac_prev=localstatedir ;; - -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ - | --localstate=* | --localstat=* | --localsta=* | --localst=* \ - | --locals=* | --local=* | --loca=* | --loc=* | --lo=*) - localstatedir="$ac_optarg" ;; - - -mandir | --mandir | --mandi | --mand | --man | --ma | --m) - ac_prev=mandir ;; - -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) - mandir="$ac_optarg" ;; - - -nfp | --nfp | --nf) - # Obsolete; use --without-fp. - with_fp=no ;; - - -no-create | --no-create | --no-creat | --no-crea | --no-cre \ - | --no-cr | --no-c) - no_create=yes ;; - - -no-recursion | --no-recursion | --no-recursio | --no-recursi \ - | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) - no_recursion=yes ;; - - -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ - | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ - | --oldin | --oldi | --old | --ol | --o) - ac_prev=oldincludedir ;; - -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ - | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ - | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) - oldincludedir="$ac_optarg" ;; - - -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) - ac_prev=prefix ;; - -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) - prefix="$ac_optarg" ;; - - -program-prefix | --program-prefix | --program-prefi | --program-pref \ - | --program-pre | --program-pr | --program-p) - ac_prev=program_prefix ;; - -program-prefix=* | --program-prefix=* | --program-prefi=* \ - | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) - program_prefix="$ac_optarg" ;; - - -program-suffix | --program-suffix | --program-suffi | --program-suff \ - | --program-suf | --program-su | --program-s) - ac_prev=program_suffix ;; - -program-suffix=* | --program-suffix=* | --program-suffi=* \ - | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) - program_suffix="$ac_optarg" ;; - - -program-transform-name | --program-transform-name \ - | --program-transform-nam | --program-transform-na \ - | --program-transform-n | --program-transform- \ - | --program-transform | --program-transfor \ - | --program-transfo | --program-transf \ - | --program-trans | --program-tran \ - | --progr-tra | --program-tr | --program-t) - ac_prev=program_transform_name ;; - -program-transform-name=* | --program-transform-name=* \ - | --program-transform-nam=* | --program-transform-na=* \ - | --program-transform-n=* | --program-transform-=* \ - | --program-transform=* | --program-transfor=* \ - | --program-transfo=* | --program-transf=* \ - | --program-trans=* | --program-tran=* \ - | --progr-tra=* | --program-tr=* | --program-t=*) - program_transform_name="$ac_optarg" ;; - - -q | -quiet | --quiet | --quie | --qui | --qu | --q \ - | -silent | --silent | --silen | --sile | --sil) - silent=yes ;; - - -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) - ac_prev=sbindir ;; - -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ - | --sbi=* | --sb=*) - sbindir="$ac_optarg" ;; - - -sharedstatedir | --sharedstatedir | --sharedstatedi \ - | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ - | --sharedst | --shareds | --shared | --share | --shar \ - | --sha | --sh) - ac_prev=sharedstatedir ;; - -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ - | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ - | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ - | --sha=* | --sh=*) - sharedstatedir="$ac_optarg" ;; - - -site | --site | --sit) - ac_prev=site ;; - -site=* | --site=* | --sit=*) - site="$ac_optarg" ;; - - -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) - ac_prev=srcdir ;; - -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) - srcdir="$ac_optarg" ;; - - -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ - | --syscon | --sysco | --sysc | --sys | --sy) - ac_prev=sysconfdir ;; - -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ - | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) - sysconfdir="$ac_optarg" ;; - - -target | --target | --targe | --targ | --tar | --ta | --t) - ac_prev=target ;; - -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) - target="$ac_optarg" ;; - - -v | -verbose | --verbose | --verbos | --verbo | --verb) - verbose=yes ;; - - -version | --version | --versio | --versi | --vers) - echo "configure generated by autoconf version 2.13" - exit 0 ;; - - -with-* | --with-*) - ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'` - # Reject names that are not valid shell variable names. - if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then - { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; } - fi - ac_package=`echo $ac_package| sed 's/-/_/g'` - case "$ac_option" in - *=*) ;; - *) ac_optarg=yes ;; - esac - eval "with_${ac_package}='$ac_optarg'" ;; - - -without-* | --without-*) - ac_package=`echo $ac_option|sed -e 's/-*without-//'` - # Reject names that are not valid shell variable names. - if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then - { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; } - fi - ac_package=`echo $ac_package| sed 's/-/_/g'` - eval "with_${ac_package}=no" ;; - - --x) - # Obsolete; use --with-x. - with_x=yes ;; - - -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ - | --x-incl | --x-inc | --x-in | --x-i) - ac_prev=x_includes ;; - -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ - | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) - x_includes="$ac_optarg" ;; - - -x-libraries | --x-libraries | --x-librarie | --x-librari \ - | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) - ac_prev=x_libraries ;; - -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ - | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) - x_libraries="$ac_optarg" ;; - - -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; } - ;; - - *) - if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then - echo "configure: warning: $ac_option: invalid host type" 1>&2 - fi - if test "x$nonopt" != xNONE; then - { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } - fi - nonopt="$ac_option" - ;; - - esac -done - -if test -n "$ac_prev"; then - { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; } -fi - -trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15 - -# File descriptor usage: -# 0 standard input -# 1 file creation -# 2 errors and warnings -# 3 some systems may open it to /dev/tty -# 4 used on the Kubota Titan -# 6 checking for... messages and results -# 5 compiler messages saved in config.log -if test "$silent" = yes; then - exec 6>/dev/null -else - exec 6>&1 -fi -exec 5>./config.log - -echo "\ -This file contains any messages produced by compilers while -running configure, to aid debugging if configure makes a mistake. -" 1>&5 - -# Strip out --no-create and --no-recursion so they do not pile up. -# Also quote any args containing shell metacharacters. -ac_configure_args= -for ac_arg -do - case "$ac_arg" in - -no-create | --no-create | --no-creat | --no-crea | --no-cre \ - | --no-cr | --no-c) ;; - -no-recursion | --no-recursion | --no-recursio | --no-recursi \ - | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;; - *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*) - ac_configure_args="$ac_configure_args '$ac_arg'" ;; - *) ac_configure_args="$ac_configure_args $ac_arg" ;; - esac -done - -# NLS nuisances. -# Only set these to C if already set. These must not be set unconditionally -# because not all systems understand e.g. LANG=C (notably SCO). -# Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'! -# Non-C LC_CTYPE values break the ctype check. -if test "${LANG+set}" = set; then LANG=C; export LANG; fi -if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi -if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi -if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi - -# confdefs.h avoids OS command line length limits that DEFS can exceed. -rm -rf conftest* confdefs.h -# AIX cpp loses on an empty file, so make sure it contains at least a newline. -echo > confdefs.h - -# A filename unique to this package, relative to the directory that -# configure is in, which we can look for to find out if srcdir is correct. -ac_unique_file=ruby.h - -# Find the source files, if location was not specified. -if test -z "$srcdir"; then - ac_srcdir_defaulted=yes - # Try the directory containing this script, then its parent. - ac_prog=$0 - ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'` - test "x$ac_confdir" = "x$ac_prog" && ac_confdir=. - srcdir=$ac_confdir - if test ! -r $srcdir/$ac_unique_file; then - srcdir=.. - fi -else - ac_srcdir_defaulted=no -fi -if test ! -r $srcdir/$ac_unique_file; then - if test "$ac_srcdir_defaulted" = yes; then - { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; } - else - { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; } - fi -fi -srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'` - -# Prefer explicitly selected file to automatically selected ones. -if test -z "$CONFIG_SITE"; then - if test "x$prefix" != xNONE; then - CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site" - else - CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site" - fi -fi -for ac_site_file in $CONFIG_SITE; do - if test -r "$ac_site_file"; then - echo "loading site script $ac_site_file" - . "$ac_site_file" - fi -done - -if test -r "$cache_file"; then - echo "loading cache $cache_file" - . $cache_file -else - echo "creating cache $cache_file" - > $cache_file -fi - -ac_ext=c -# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. -ac_cpp='$CPP $CPPFLAGS' -ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' -ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' -cross_compiling=$ac_cv_prog_cc_cross - -ac_exeext= -ac_objext=o -if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then - # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu. - if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then - ac_n= ac_c=' -' ac_t=' ' - else - ac_n=-n ac_c= ac_t= - fi -else - ac_n= ac_c='\c' ac_t= -fi - - - -rb_version=`grep RUBY_VERSION $srcdir/version.h` -MAJOR=`expr "$rb_version" : '#define RUBY_VERSION "\([0-9][0-9]*\)\.[0-9][0-9]*\.[0-9][0-9]*"'` -MINOR=`expr "$rb_version" : '#define RUBY_VERSION "[0-9][0-9]*\.\([0-9][0-9]*\)\.[0-9][0-9]*"'` -TEENY=`expr "$rb_version" : '#define RUBY_VERSION "[0-9][0-9]*\.[0-9][0-9]*\.\([0-9][0-9]*\)"'` - - - -# Check whether --with-gcc or --without-gcc was given. -if test "${with_gcc+set}" = set; then - withval="$with_gcc" - - case $withval in - no) CC=cc - without_gcc=yes;; - yes) CC=gcc - without_gcc=no;; - *) CC=$withval - without_gcc=$withval;; - esac -else - without_gcc=no -fi - -if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC" -then - { echo "configure: error: cached CC is different -- throw away $cache_file -(it is also a good idea to do 'make clean' before compiling)" 1>&2; exit 1; } -fi - -ac_aux_dir= -for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do - if test -f $ac_dir/install-sh; then - ac_aux_dir=$ac_dir - ac_install_sh="$ac_aux_dir/install-sh -c" - break - elif test -f $ac_dir/install.sh; then - ac_aux_dir=$ac_dir - ac_install_sh="$ac_aux_dir/install.sh -c" - break - fi -done -if test -z "$ac_aux_dir"; then - { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; } -fi -ac_config_guess=$ac_aux_dir/config.guess -ac_config_sub=$ac_aux_dir/config.sub -ac_configure=$ac_aux_dir/configure # This should be Cygnus configure. - - -# Make sure we can run config.sub. -if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then : -else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; } -fi - -echo $ac_n "checking host system type""... $ac_c" 1>&6 -echo "configure:597: checking host system type" >&5 - -host_alias=$host -case "$host_alias" in -NONE) - case $nonopt in - NONE) - if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then : - else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; } - fi ;; - *) host_alias=$nonopt ;; - esac ;; -esac - -host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias` -host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` -host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` -host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` -echo "$ac_t""$host" 1>&6 - -echo $ac_n "checking target system type""... $ac_c" 1>&6 -echo "configure:618: checking target system type" >&5 - -target_alias=$target -case "$target_alias" in -NONE) - case $nonopt in - NONE) target_alias=$host_alias ;; - *) target_alias=$nonopt ;; - esac ;; -esac - -target=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $target_alias` -target_cpu=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` -target_vendor=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` -target_os=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` -echo "$ac_t""$target" 1>&6 - - -fat_binary=no -# Check whether --enable-fat-binary or --disable-fat-binary was given. -if test "${enable_fat_binary+set}" = set; then - enableval="$enable_fat_binary" - fat_binary=$enableval -fi - - if test "$fat_binary" = yes ; then - - echo $ac_n "checking target architecture""... $ac_c" 1>&6 -echo "configure:646: checking target architecture" >&5 - - case "$target_os" in - rhapsody*) - echo -n "MacOS X Server: " - if test "$TARGET_ARCHS" = "" ; then - TARGET_ARCHS="ppc i386" - fi - ;; - macos*) - echo -n "MacOS X : " - if test "$TARGET_ARCHS" = "" ; then - TARGET_ARCHS="ppc i386" - fi - ;; - nextstep*|openstep*) - echo -n "NeXTSTEP/OPENSTEP: " - if test "$TARGET_ARCHS" = "" ; then - if test `/usr/bin/arch` = "m68k" ; then - TARGET_ARCHS="m68k i486" - else # Black and Native one - TARGET_ARCHS="m68k `/usr/bin/arch`" - fi - fi - ;; - esac - # /usr/lib/arch_tool -archify_list $TARGET_ARCHS - for archs in $TARGET_ARCHS - do - ARCH_FLAG="$ARCH_FLAG -arch $archs " - echo -n " $archs" - done - cat >> confdefs.h <<\EOF -#define NEXT_FAT_BINARY 1 -EOF - - echo "." -fi - -if test "$program_transform_name" = s,x,x,; then - program_transform_name= -else - # Double any \ or $. echo might interpret backslashes. - cat <<\EOF_SED > conftestsed -s,\\,\\\\,g; s,\$,$$,g -EOF_SED - program_transform_name="`echo $program_transform_name|sed -f conftestsed`" - rm -f conftestsed -fi -test "$program_prefix" != NONE && - program_transform_name="s,^,${program_prefix},; $program_transform_name" -# Use a double $ so make ignores it. -test "$program_suffix" != NONE && - program_transform_name="s,\$\$,${program_suffix},; $program_transform_name" - -# sed with no file args requires a program. -test "$program_transform_name" = "" && program_transform_name="s,x,x," - - - -if test x"${build}" != x"${host}"; then - echo $ac_n "checking build system type""... $ac_c" 1>&6 -echo "configure:708: checking build system type" >&5 - -build_alias=$build -case "$build_alias" in -NONE) - case $nonopt in - NONE) build_alias=$host_alias ;; - *) build_alias=$nonopt ;; - esac ;; -esac - -build=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $build_alias` -build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` -build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` -build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` -echo "$ac_t""$build" 1>&6 - -if test $host != $build; then - ac_tool_prefix=${host_alias}- -else - ac_tool_prefix= -fi - -# Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. -set dummy ${ac_tool_prefix}gcc; ac_word=$2 -echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:734: checking for $ac_word" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - if test -n "$CC"; then - ac_cv_prog_CC="$CC" # Let the user override the test. -else - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" - ac_dummy="$PATH" - for ac_dir in $ac_dummy; do - test -z "$ac_dir" && ac_dir=. - if test -f $ac_dir/$ac_word; then - ac_cv_prog_CC="${ac_tool_prefix}gcc" - break - fi - done - IFS="$ac_save_ifs" - test -z "$ac_cv_prog_CC" && ac_cv_prog_CC="gcc" -fi -fi -CC="$ac_cv_prog_CC" -if test -n "$CC"; then - echo "$ac_t""$CC" 1>&6 -else - echo "$ac_t""no" 1>&6 -fi - - - -fi -# Extract the first word of "gcc", so it can be a program name with args. -set dummy gcc; ac_word=$2 -echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:767: checking for $ac_word" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - if test -n "$CC"; then - ac_cv_prog_CC="$CC" # Let the user override the test. -else - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" - ac_dummy="$PATH" - for ac_dir in $ac_dummy; do - test -z "$ac_dir" && ac_dir=. - if test -f $ac_dir/$ac_word; then - ac_cv_prog_CC="gcc" - break - fi - done - IFS="$ac_save_ifs" -fi -fi -CC="$ac_cv_prog_CC" -if test -n "$CC"; then - echo "$ac_t""$CC" 1>&6 -else - echo "$ac_t""no" 1>&6 -fi - -if test -z "$CC"; then - # Extract the first word of "cc", so it can be a program name with args. -set dummy cc; ac_word=$2 -echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:797: checking for $ac_word" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - if test -n "$CC"; then - ac_cv_prog_CC="$CC" # Let the user override the test. -else - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" - ac_prog_rejected=no - ac_dummy="$PATH" - for ac_dir in $ac_dummy; do - test -z "$ac_dir" && ac_dir=. - if test -f $ac_dir/$ac_word; then - if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then - ac_prog_rejected=yes - continue - fi - ac_cv_prog_CC="cc" - break - fi - done - IFS="$ac_save_ifs" -if test $ac_prog_rejected = yes; then - # We found a bogon in the path, so make sure we never use it. - set dummy $ac_cv_prog_CC - shift - if test $# -gt 0; then - # We chose a different compiler from the bogus one. - # However, it has the same basename, so the bogon will be chosen - # first if we set CC to just the basename; use the full file name. - shift - set dummy "$ac_dir/$ac_word" "$@" - shift - ac_cv_prog_CC="$@" - fi -fi -fi -fi -CC="$ac_cv_prog_CC" -if test -n "$CC"; then - echo "$ac_t""$CC" 1>&6 -else - echo "$ac_t""no" 1>&6 -fi - - if test -z "$CC"; then - case "`uname -s`" in - *win32* | *WIN32*) - # Extract the first word of "cl", so it can be a program name with args. -set dummy cl; ac_word=$2 -echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:848: checking for $ac_word" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - if test -n "$CC"; then - ac_cv_prog_CC="$CC" # Let the user override the test. -else - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" - ac_dummy="$PATH" - for ac_dir in $ac_dummy; do - test -z "$ac_dir" && ac_dir=. - if test -f $ac_dir/$ac_word; then - ac_cv_prog_CC="cl" - break - fi - done - IFS="$ac_save_ifs" -fi -fi -CC="$ac_cv_prog_CC" -if test -n "$CC"; then - echo "$ac_t""$CC" 1>&6 -else - echo "$ac_t""no" 1>&6 -fi - ;; - esac - fi - test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; } -fi - -echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6 -echo "configure:880: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 - -ac_ext=c -# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. -ac_cpp='$CPP $CPPFLAGS' -ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' -ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' -cross_compiling=$ac_cv_prog_cc_cross - -cat > conftest.$ac_ext << EOF - -#line 891 "configure" -#include "confdefs.h" - -main(){return(0);} -EOF -if { (eval echo configure:896: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - ac_cv_prog_cc_works=yes - # If we can't run a trivial program, we are probably using a cross compiler. - if (./conftest; exit) 2>/dev/null; then - ac_cv_prog_cc_cross=no - else - ac_cv_prog_cc_cross=yes - fi -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - ac_cv_prog_cc_works=no -fi -rm -fr conftest* -ac_ext=c -# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. -ac_cpp='$CPP $CPPFLAGS' -ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' -ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' -cross_compiling=$ac_cv_prog_cc_cross - -echo "$ac_t""$ac_cv_prog_cc_works" 1>&6 -if test $ac_cv_prog_cc_works = no; then - { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; } -fi -echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 -echo "configure:922: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 -echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6 -cross_compiling=$ac_cv_prog_cc_cross - -echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6 -echo "configure:927: checking whether we are using GNU C" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.c <&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then - ac_cv_prog_gcc=yes -else - ac_cv_prog_gcc=no -fi -fi - -echo "$ac_t""$ac_cv_prog_gcc" 1>&6 - -if test $ac_cv_prog_gcc = yes; then - GCC=yes -else - GCC= -fi - -ac_test_CFLAGS="${CFLAGS+set}" -ac_save_CFLAGS="$CFLAGS" -CFLAGS= -echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6 -echo "configure:955: checking whether ${CC-cc} accepts -g" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - echo 'void f(){}' > conftest.c -if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then - ac_cv_prog_cc_g=yes -else - ac_cv_prog_cc_g=no -fi -rm -f conftest* - -fi - -echo "$ac_t""$ac_cv_prog_cc_g" 1>&6 -if test "$ac_test_CFLAGS" = set; then - CFLAGS="$ac_save_CFLAGS" -elif test $ac_cv_prog_cc_g = yes; then - if test "$GCC" = yes; then - CFLAGS="-g -O2" - else - CFLAGS="-g" - fi -else - if test "$GCC" = yes; then - CFLAGS="-O2" - else - CFLAGS= - fi -fi - -echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6 -echo "configure:987: checking how to run the C preprocessor" >&5 -# On Suns, sometimes $CPP names a directory. -if test -n "$CPP" && test -d "$CPP"; then - CPP= -fi -if test -z "$CPP"; then -if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - # This must be in double quotes, not single quotes, because CPP may get - # substituted into the Makefile and "${CC-cc}" will confuse make. - CPP="${CC-cc} -E" - # On the NeXT, cc -E runs the code through the compiler's parser, - # not just through cpp. - cat > conftest.$ac_ext < -Syntax Error -EOF -ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1008: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` -if test -z "$ac_err"; then - : -else - echo "$ac_err" >&5 - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - CPP="${CC-cc} -E -traditional-cpp" - cat > conftest.$ac_ext < -Syntax Error -EOF -ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1025: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` -if test -z "$ac_err"; then - : -else - echo "$ac_err" >&5 - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - CPP="${CC-cc} -nologo -E" - cat > conftest.$ac_ext < -Syntax Error -EOF -ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1042: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` -if test -z "$ac_err"; then - : -else - echo "$ac_err" >&5 - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - CPP=/lib/cpp -fi -rm -f conftest* -fi -rm -f conftest* -fi -rm -f conftest* - ac_cv_prog_CPP="$CPP" -fi - CPP="$ac_cv_prog_CPP" -else - ac_cv_prog_CPP="$CPP" -fi -echo "$ac_t""$CPP" 1>&6 - -if test $ac_cv_prog_gcc = yes; then - echo $ac_n "checking whether ${CC-cc} needs -traditional""... $ac_c" 1>&6 -echo "configure:1068: checking whether ${CC-cc} needs -traditional" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_gcc_traditional'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - ac_pattern="Autoconf.*'x'" - cat > conftest.$ac_ext < -Autoconf TIOCGETP -EOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - egrep "$ac_pattern" >/dev/null 2>&1; then - rm -rf conftest* - ac_cv_prog_gcc_traditional=yes -else - rm -rf conftest* - ac_cv_prog_gcc_traditional=no -fi -rm -f conftest* - - - if test $ac_cv_prog_gcc_traditional = no; then - cat > conftest.$ac_ext < -Autoconf TCGETA -EOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - egrep "$ac_pattern" >/dev/null 2>&1; then - rm -rf conftest* - ac_cv_prog_gcc_traditional=yes -fi -rm -f conftest* - - fi -fi - -echo "$ac_t""$ac_cv_prog_gcc_traditional" 1>&6 - if test $ac_cv_prog_gcc_traditional = yes; then - CC="$CC -traditional" - fi -fi - - -for ac_prog in 'bison -y' byacc -do -# Extract the first word of "$ac_prog", so it can be a program name with args. -set dummy $ac_prog; ac_word=$2 -echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1119: checking for $ac_word" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_YACC'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - if test -n "$YACC"; then - ac_cv_prog_YACC="$YACC" # Let the user override the test. -else - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" - ac_dummy="$PATH" - for ac_dir in $ac_dummy; do - test -z "$ac_dir" && ac_dir=. - if test -f $ac_dir/$ac_word; then - ac_cv_prog_YACC="$ac_prog" - break - fi - done - IFS="$ac_save_ifs" -fi -fi -YACC="$ac_cv_prog_YACC" -if test -n "$YACC"; then - echo "$ac_t""$YACC" 1>&6 -else - echo "$ac_t""no" 1>&6 -fi - -test -n "$YACC" && break -done -test -n "$YACC" || YACC="yacc" - -# Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. -set dummy ${ac_tool_prefix}ranlib; ac_word=$2 -echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1152: checking for $ac_word" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - if test -n "$RANLIB"; then - ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. -else - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" - ac_dummy="$PATH" - for ac_dir in $ac_dummy; do - test -z "$ac_dir" && ac_dir=. - if test -f $ac_dir/$ac_word; then - ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" - break - fi - done - IFS="$ac_save_ifs" -fi -fi -RANLIB="$ac_cv_prog_RANLIB" -if test -n "$RANLIB"; then - echo "$ac_t""$RANLIB" 1>&6 -else - echo "$ac_t""no" 1>&6 -fi - - -if test -z "$ac_cv_prog_RANLIB"; then -if test -n "$ac_tool_prefix"; then - # Extract the first word of "ranlib", so it can be a program name with args. -set dummy ranlib; ac_word=$2 -echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1184: checking for $ac_word" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - if test -n "$RANLIB"; then - ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. -else - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" - ac_dummy="$PATH" - for ac_dir in $ac_dummy; do - test -z "$ac_dir" && ac_dir=. - if test -f $ac_dir/$ac_word; then - ac_cv_prog_RANLIB="ranlib" - break - fi - done - IFS="$ac_save_ifs" - test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":" -fi -fi -RANLIB="$ac_cv_prog_RANLIB" -if test -n "$RANLIB"; then - echo "$ac_t""$RANLIB" 1>&6 -else - echo "$ac_t""no" 1>&6 -fi - -else - RANLIB=":" -fi -fi - -# Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args. -set dummy ${ac_tool_prefix}ar; ac_word=$2 -echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1219: checking for $ac_word" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - if test -n "$AR"; then - ac_cv_prog_AR="$AR" # Let the user override the test. -else - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" - ac_dummy="$PATH" - for ac_dir in $ac_dummy; do - test -z "$ac_dir" && ac_dir=. - if test -f $ac_dir/$ac_word; then - ac_cv_prog_AR="${ac_tool_prefix}ar" - break - fi - done - IFS="$ac_save_ifs" - test -z "$ac_cv_prog_AR" && ac_cv_prog_AR="ar" -fi -fi -AR="$ac_cv_prog_AR" -if test -n "$AR"; then - echo "$ac_t""$AR" 1>&6 -else - echo "$ac_t""no" 1>&6 -fi - - - -for ac_prog in ar aal -do -# Extract the first word of "$ac_prog", so it can be a program name with args. -set dummy $ac_prog; ac_word=$2 -echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1253: checking for $ac_word" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - if test -n "$AR"; then - ac_cv_prog_AR="$AR" # Let the user override the test. -else - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" - ac_dummy="$PATH" - for ac_dir in $ac_dummy; do - test -z "$ac_dir" && ac_dir=. - if test -f $ac_dir/$ac_word; then - ac_cv_prog_AR="$ac_prog" - break - fi - done - IFS="$ac_save_ifs" -fi -fi -AR="$ac_cv_prog_AR" -if test -n "$AR"; then - echo "$ac_t""$AR" 1>&6 -else - echo "$ac_t""no" 1>&6 -fi - -test -n "$AR" && break -done -test -n "$AR" || AR="ar" - - -case "$target_os" in - cygwin*|mingw*) - # Extract the first word of "${ac_tool_prefix}nm", so it can be a program name with args. -set dummy ${ac_tool_prefix}nm; ac_word=$2 -echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1289: checking for $ac_word" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_NM'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - if test -n "$NM"; then - ac_cv_prog_NM="$NM" # Let the user override the test. -else - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" - ac_dummy="$PATH" - for ac_dir in $ac_dummy; do - test -z "$ac_dir" && ac_dir=. - if test -f $ac_dir/$ac_word; then - ac_cv_prog_NM="${ac_tool_prefix}nm" - break - fi - done - IFS="$ac_save_ifs" - test -z "$ac_cv_prog_NM" && ac_cv_prog_NM="nm" -fi -fi -NM="$ac_cv_prog_NM" -if test -n "$NM"; then - echo "$ac_t""$NM" 1>&6 -else - echo "$ac_t""no" 1>&6 -fi - - - - # Extract the first word of "${ac_tool_prefix}dllwrap", so it can be a program name with args. -set dummy ${ac_tool_prefix}dllwrap; ac_word=$2 -echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1321: checking for $ac_word" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_DLLWRAP'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - if test -n "$DLLWRAP"; then - ac_cv_prog_DLLWRAP="$DLLWRAP" # Let the user override the test. -else - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" - ac_dummy="$PATH" - for ac_dir in $ac_dummy; do - test -z "$ac_dir" && ac_dir=. - if test -f $ac_dir/$ac_word; then - ac_cv_prog_DLLWRAP="${ac_tool_prefix}dllwrap" - break - fi - done - IFS="$ac_save_ifs" - test -z "$ac_cv_prog_DLLWRAP" && ac_cv_prog_DLLWRAP="dllwrap" -fi -fi -DLLWRAP="$ac_cv_prog_DLLWRAP" -if test -n "$DLLWRAP"; then - echo "$ac_t""$DLLWRAP" 1>&6 -else - echo "$ac_t""no" 1>&6 -fi - - - - # Extract the first word of "${ac_tool_prefix}as", so it can be a program name with args. -set dummy ${ac_tool_prefix}as; ac_word=$2 -echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1353: checking for $ac_word" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_AS'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - if test -n "$AS"; then - ac_cv_prog_AS="$AS" # Let the user override the test. -else - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" - ac_dummy="$PATH" - for ac_dir in $ac_dummy; do - test -z "$ac_dir" && ac_dir=. - if test -f $ac_dir/$ac_word; then - ac_cv_prog_AS="${ac_tool_prefix}as" - break - fi - done - IFS="$ac_save_ifs" - test -z "$ac_cv_prog_AS" && ac_cv_prog_AS="as" -fi -fi -AS="$ac_cv_prog_AS" -if test -n "$AS"; then - echo "$ac_t""$AS" 1>&6 -else - echo "$ac_t""no" 1>&6 -fi - - - - # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args. -set dummy ${ac_tool_prefix}dlltool; ac_word=$2 -echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1385: checking for $ac_word" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_DLLTOOL'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - if test -n "$DLLTOOL"; then - ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test. -else - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" - ac_dummy="$PATH" - for ac_dir in $ac_dummy; do - test -z "$ac_dir" && ac_dir=. - if test -f $ac_dir/$ac_word; then - ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool" - break - fi - done - IFS="$ac_save_ifs" - test -z "$ac_cv_prog_DLLTOOL" && ac_cv_prog_DLLTOOL="dlltool" -fi -fi -DLLTOOL="$ac_cv_prog_DLLTOOL" -if test -n "$DLLTOOL"; then - echo "$ac_t""$DLLTOOL" 1>&6 -else - echo "$ac_t""no" 1>&6 -fi - - - - ;; -esac - -echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6 -echo "configure:1418: checking whether ln -s works" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - rm -f conftestdata -if ln -s X conftestdata 2>/dev/null -then - rm -f conftestdata - ac_cv_prog_LN_S="ln -s" -else - ac_cv_prog_LN_S=ln -fi -fi -LN_S="$ac_cv_prog_LN_S" -if test "$ac_cv_prog_LN_S" = "ln -s"; then - echo "$ac_t""yes" 1>&6 -else - echo "$ac_t""no" 1>&6 -fi - -echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6 -echo "configure:1439: checking whether ${MAKE-make} sets \${MAKE}" >&5 -set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'` -if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftestmake <<\EOF -all: - @echo 'ac_maketemp="${MAKE}"' -EOF -# GNU make sometimes prints "make[1]: Entering...", which would confuse us. -eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=` -if test -n "$ac_maketemp"; then - eval ac_cv_prog_make_${ac_make}_set=yes -else - eval ac_cv_prog_make_${ac_make}_set=no -fi -rm -f conftestmake -fi -if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then - echo "$ac_t""yes" 1>&6 - SET_MAKE= -else - echo "$ac_t""no" 1>&6 - SET_MAKE="MAKE=${MAKE-make}" -fi - - -# checks for UNIX variants that set C preprocessor variables -ac_safe=`echo "minix/config.h" | sed 'y%./+-%__p_%'` -echo $ac_n "checking for minix/config.h""... $ac_c" 1>&6 -echo "configure:1469: checking for minix/config.h" >&5 -if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext < -EOF -ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1479: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` -if test -z "$ac_err"; then - rm -rf conftest* - eval "ac_cv_header_$ac_safe=yes" -else - echo "$ac_err" >&5 - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_header_$ac_safe=no" -fi -rm -f conftest* -fi -if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then - echo "$ac_t""yes" 1>&6 - MINIX=yes -else - echo "$ac_t""no" 1>&6 -MINIX= -fi - -if test "$MINIX" = yes; then - cat >> confdefs.h <<\EOF -#define _POSIX_SOURCE 1 -EOF - - cat >> confdefs.h <<\EOF -#define _POSIX_1_SOURCE 2 -EOF - - cat >> confdefs.h <<\EOF -#define _MINIX 1 -EOF - -fi - - -echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6 -echo "configure:1518: checking for Cygwin environment" >&5 -if eval "test \"`echo '$''{'ac_cv_cygwin'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - ac_cv_cygwin=yes -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - ac_cv_cygwin=no -fi -rm -f conftest* -rm -f conftest* -fi - -echo "$ac_t""$ac_cv_cygwin" 1>&6 -CYGWIN= -test "$ac_cv_cygwin" = yes && CYGWIN=yes -echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6 -echo "configure:1551: checking for mingw32 environment" >&5 -if eval "test \"`echo '$''{'ac_cv_mingw32'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - ac_cv_mingw32=yes -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - ac_cv_mingw32=no -fi -rm -f conftest* -rm -f conftest* -fi - -echo "$ac_t""$ac_cv_mingw32" 1>&6 -MINGW32= -test "$ac_cv_mingw32" = yes && MINGW32=yes - - -echo $ac_n "checking for executable suffix""... $ac_c" 1>&6 -echo "configure:1582: checking for executable suffix" >&5 -if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - if test "$CYGWIN" = yes || test "$MINGW32" = yes; then - ac_cv_exeext=.exe -else - rm -f conftest* - echo 'int main () { return 0; }' > conftest.$ac_ext - ac_cv_exeext= - if { (eval echo configure:1592: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then - for file in conftest.*; do - case $file in - *.c | *.o | *.obj) ;; - *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;; - esac - done - else - { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; } - fi - rm -f conftest* - test x"${ac_cv_exeext}" = x && ac_cv_exeext=no -fi -fi - -EXEEXT="" -test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext} -echo "$ac_t""${ac_cv_exeext}" 1>&6 -ac_exeext=$EXEEXT - -echo $ac_n "checking for object suffix""... $ac_c" 1>&6 -echo "configure:1613: checking for object suffix" >&5 -if eval "test \"`echo '$''{'ac_cv_objext'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - rm -f conftest* -echo 'int i = 1;' > conftest.$ac_ext -if { (eval echo configure:1619: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - for ac_file in conftest.*; do - case $ac_file in - *.c) ;; - *) ac_cv_objext=`echo $ac_file | sed -e s/conftest.//` ;; - esac - done -else - { echo "configure: error: installation or configuration problem; compiler does not work" 1>&2; exit 1; } -fi -rm -f conftest* -fi - -echo "$ac_t""$ac_cv_objext" 1>&6 -OBJEXT=$ac_cv_objext -ac_objext=$ac_cv_objext - - -echo $ac_n "checking size of int""... $ac_c" 1>&6 -echo "configure:1638: checking size of int" >&5 -if eval "test \"`echo '$''{'ac_cv_sizeof_int'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - if test "$cross_compiling" = yes; then - ac_cv_sizeof_int=4 -else - cat > conftest.$ac_ext < -main() -{ - FILE *f=fopen("conftestval", "w"); - if (!f) exit(1); - fprintf(f, "%d\n", sizeof(int)); - exit(0); -} -EOF -if { (eval echo configure:1657: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null -then - ac_cv_sizeof_int=`cat conftestval` -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -fr conftest* - ac_cv_sizeof_int=0 -fi -rm -fr conftest* -fi - -fi -echo "$ac_t""$ac_cv_sizeof_int" 1>&6 -cat >> confdefs.h <&6 -echo "configure:1677: checking size of short" >&5 -if eval "test \"`echo '$''{'ac_cv_sizeof_short'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - if test "$cross_compiling" = yes; then - ac_cv_sizeof_short=2 -else - cat > conftest.$ac_ext < -main() -{ - FILE *f=fopen("conftestval", "w"); - if (!f) exit(1); - fprintf(f, "%d\n", sizeof(short)); - exit(0); -} -EOF -if { (eval echo configure:1696: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null -then - ac_cv_sizeof_short=`cat conftestval` -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -fr conftest* - ac_cv_sizeof_short=0 -fi -rm -fr conftest* -fi - -fi -echo "$ac_t""$ac_cv_sizeof_short" 1>&6 -cat >> confdefs.h <&6 -echo "configure:1716: checking size of long" >&5 -if eval "test \"`echo '$''{'ac_cv_sizeof_long'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - if test "$cross_compiling" = yes; then - ac_cv_sizeof_long=4 -else - cat > conftest.$ac_ext < -main() -{ - FILE *f=fopen("conftestval", "w"); - if (!f) exit(1); - fprintf(f, "%d\n", sizeof(long)); - exit(0); -} -EOF -if { (eval echo configure:1735: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null -then - ac_cv_sizeof_long=`cat conftestval` -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -fr conftest* - ac_cv_sizeof_long=0 -fi -rm -fr conftest* -fi - -fi -echo "$ac_t""$ac_cv_sizeof_long" 1>&6 -cat >> confdefs.h <&6 -echo "configure:1755: checking size of void*" >&5 -if eval "test \"`echo '$''{'ac_cv_sizeof_voidp'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - if test "$cross_compiling" = yes; then - ac_cv_sizeof_voidp=4 -else - cat > conftest.$ac_ext < -main() -{ - FILE *f=fopen("conftestval", "w"); - if (!f) exit(1); - fprintf(f, "%d\n", sizeof(void*)); - exit(0); -} -EOF -if { (eval echo configure:1774: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null -then - ac_cv_sizeof_voidp=`cat conftestval` -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -fr conftest* - ac_cv_sizeof_voidp=0 -fi -rm -fr conftest* -fi - -fi -echo "$ac_t""$ac_cv_sizeof_voidp" 1>&6 -cat >> confdefs.h <&6 -echo "configure:1794: checking size of float" >&5 -if eval "test \"`echo '$''{'ac_cv_sizeof_float'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - if test "$cross_compiling" = yes; then - ac_cv_sizeof_float=4 -else - cat > conftest.$ac_ext < -main() -{ - FILE *f=fopen("conftestval", "w"); - if (!f) exit(1); - fprintf(f, "%d\n", sizeof(float)); - exit(0); -} -EOF -if { (eval echo configure:1813: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null -then - ac_cv_sizeof_float=`cat conftestval` -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -fr conftest* - ac_cv_sizeof_float=0 -fi -rm -fr conftest* -fi - -fi -echo "$ac_t""$ac_cv_sizeof_float" 1>&6 -cat >> confdefs.h <&6 -echo "configure:1833: checking size of double" >&5 -if eval "test \"`echo '$''{'ac_cv_sizeof_double'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - if test "$cross_compiling" = yes; then - ac_cv_sizeof_double=8 -else - cat > conftest.$ac_ext < -main() -{ - FILE *f=fopen("conftestval", "w"); - if (!f) exit(1); - fprintf(f, "%d\n", sizeof(double)); - exit(0); -} -EOF -if { (eval echo configure:1852: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null -then - ac_cv_sizeof_double=`cat conftestval` -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -fr conftest* - ac_cv_sizeof_double=0 -fi -rm -fr conftest* -fi - -fi -echo "$ac_t""$ac_cv_sizeof_double" 1>&6 -cat >> confdefs.h <&6 -echo "configure:1873: checking for prototypes" >&5 -if eval "test \"`echo '$''{'rb_cv_have_prototypes'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - rb_cv_have_prototypes=yes -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - rb_cv_have_prototypes=no -fi -rm -f conftest* -fi - -echo "$ac_t""$rb_cv_have_prototypes" 1>&6 -if test "$rb_cv_have_prototypes" = yes; then - cat >> confdefs.h <<\EOF -#define HAVE_PROTOTYPES 1 -EOF - -fi - -echo $ac_n "checking token paste string""... $ac_c" 1>&6 -echo "configure:1906: checking token paste string" >&5 -if eval "test \"`echo '$''{'rb_cv_tokenpaste'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - rb_cv_tokenpaste=ansi -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - rb_cv_tokenpaste=knr -fi -rm -f conftest* -fi - -echo "$ac_t""$rb_cv_tokenpaste" 1>&6 -if test "$rb_cv_tokenpaste" = ansi; then - cat >> confdefs.h <<\EOF -#define TOKEN_PASTE(x,y) x##y -EOF - -else - cat >> confdefs.h <<\EOF -#define TOKEN_PASTE(x,y) x/**/y -EOF - -fi - -echo $ac_n "checking for variable length prototypes and stdarg.h""... $ac_c" 1>&6 -echo "configure:1944: checking for variable length prototypes and stdarg.h" >&5 -if eval "test \"`echo '$''{'rb_cv_stdarg'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext < -int foo(int x, ...) { - va_list va; - va_start(va, x); - va_arg(va, int); - va_arg(va, char *); - va_arg(va, double); - return 0; -} - -int main() { -return foo(10, "", 3.14); -; return 0; } -EOF -if { (eval echo configure:1966: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - rb_cv_stdarg=yes -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - rb_cv_stdarg=no -fi -rm -f conftest* -fi - -echo "$ac_t""$rb_cv_stdarg" 1>&6 -if test "$rb_cv_stdarg" = yes; then - cat >> confdefs.h <<\EOF -#define HAVE_STDARG_PROTOTYPES 1 -EOF - -fi - -echo $ac_n "checking for gcc attribute noreturn""... $ac_c" 1>&6 -echo "configure:1987: checking for gcc attribute noreturn" >&5 -if eval "test \"`echo '$''{'rb_cv_have_attr_noreturn'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - rb_cv_have_attr_noreturn=yes -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - rb_cv_have_attr_noreturn=no -fi -rm -f conftest* -fi - -echo "$ac_t""$rb_cv_have_attr_noreturn" 1>&6 -if test "$rb_cv_have_attr_noreturn" = yes; then - cat >> confdefs.h <<\EOF -#define HAVE_ATTR_NORETURN 1 -EOF - -fi - -case "$target_os" in -nextstep*) ;; -openstep*) ;; -rhapsody*) ;; -macos*) ;; -human*) ac_cv_func_getpgrp_void=yes;; -beos*) ;; -cygwin*) ;; -mingw*) LIBS="-lwsock32 -lmsvcrt $LIBS" - ac_cv_header_a_out_h=no - ac_cv_header_pwd_h=no - ac_cv_header_utime_h=no - ac_cv_header_sys_ioctl_h=no - ac_cv_header_sys_param_h=no - ac_cv_header_sys_resource_h=no - ac_cv_header_sys_select_h=no - ac_cv_header_sys_times_h=no;; -os2_emx*) LIBS="-lm $LIBS" - ac_cv_lib_xpg4_setlocale=no - ac_cv_lib_dir_opendir=no;; -*) LIBS="-lm $LIBS";; -esac -echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6 -echo "configure:2042: checking for crypt in -lcrypt" >&5 -ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-%__p_%'` -if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - ac_save_LIBS="$LIBS" -LIBS="-lcrypt $LIBS" -cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=no" -fi -rm -f conftest* -LIBS="$ac_save_LIBS" - -fi -if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_lib=HAVE_LIB`echo crypt | sed -e 's/[^a-zA-Z0-9_]/_/g' \ - -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` - cat >> confdefs.h <&6 -fi - -echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6 -echo "configure:2089: checking for dlopen in -ldl" >&5 -ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'` -if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - ac_save_LIBS="$LIBS" -LIBS="-ldl $LIBS" -cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=no" -fi -rm -f conftest* -LIBS="$ac_save_LIBS" - -fi -if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_lib=HAVE_LIB`echo dl | sed -e 's/[^a-zA-Z0-9_]/_/g' \ - -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` - cat >> confdefs.h <&6 -fi - # Dynamic linking for SunOS/Solaris and SYSV -echo $ac_n "checking for shl_load in -ldld""... $ac_c" 1>&6 -echo "configure:2136: checking for shl_load in -ldld" >&5 -ac_lib_var=`echo dld'_'shl_load | sed 'y%./+-%__p_%'` -if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - ac_save_LIBS="$LIBS" -LIBS="-ldld $LIBS" -cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=no" -fi -rm -f conftest* -LIBS="$ac_save_LIBS" - -fi -if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_lib=HAVE_LIB`echo dld | sed -e 's/[^a-zA-Z0-9_]/_/g' \ - -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` - cat >> confdefs.h <&6 -fi - # Dynamic linking for HP-UX -echo $ac_n "checking for setlocale in -lxpg4""... $ac_c" 1>&6 -echo "configure:2183: checking for setlocale in -lxpg4" >&5 -ac_lib_var=`echo xpg4'_'setlocale | sed 'y%./+-%__p_%'` -if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - ac_save_LIBS="$LIBS" -LIBS="-lxpg4 $LIBS" -cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=no" -fi -rm -f conftest* -LIBS="$ac_save_LIBS" - -fi -if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_lib=HAVE_LIB`echo xpg4 | sed -e 's/[^a-zA-Z0-9_]/_/g' \ - -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` - cat >> confdefs.h <&6 -fi - # FreeBSD needs this - -ac_header_dirent=no -for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h -do -ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` -echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6 -echo "configure:2235: checking for $ac_hdr that defines DIR" >&5 -if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext < -#include <$ac_hdr> -int main() { -DIR *dirp = 0; -; return 0; } -EOF -if { (eval echo configure:2248: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - eval "ac_cv_header_dirent_$ac_safe=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_header_dirent_$ac_safe=no" -fi -rm -f conftest* -fi -if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` - cat >> confdefs.h <&6 -fi -done -# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix. -if test $ac_header_dirent = dirent.h; then -echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6 -echo "configure:2273: checking for opendir in -ldir" >&5 -ac_lib_var=`echo dir'_'opendir | sed 'y%./+-%__p_%'` -if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - ac_save_LIBS="$LIBS" -LIBS="-ldir $LIBS" -cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=no" -fi -rm -f conftest* -LIBS="$ac_save_LIBS" - -fi -if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then - echo "$ac_t""yes" 1>&6 - LIBS="$LIBS -ldir" -else - echo "$ac_t""no" 1>&6 -fi - -else -echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6 -echo "configure:2314: checking for opendir in -lx" >&5 -ac_lib_var=`echo x'_'opendir | sed 'y%./+-%__p_%'` -if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - ac_save_LIBS="$LIBS" -LIBS="-lx $LIBS" -cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=no" -fi -rm -f conftest* -LIBS="$ac_save_LIBS" - -fi -if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then - echo "$ac_t""yes" 1>&6 - LIBS="$LIBS -lx" -else - echo "$ac_t""no" 1>&6 -fi - -fi - -echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6 -echo "configure:2356: checking for ANSI C header files" >&5 -if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext < -#include -#include -#include -EOF -ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2369: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` -if test -z "$ac_err"; then - rm -rf conftest* - ac_cv_header_stdc=yes -else - echo "$ac_err" >&5 - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - ac_cv_header_stdc=no -fi -rm -f conftest* - -if test $ac_cv_header_stdc = yes; then - # SunOS 4.x string.h does not declare mem*, contrary to ANSI. -cat > conftest.$ac_ext < -EOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - egrep "memchr" >/dev/null 2>&1; then - : -else - rm -rf conftest* - ac_cv_header_stdc=no -fi -rm -f conftest* - -fi - -if test $ac_cv_header_stdc = yes; then - # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. -cat > conftest.$ac_ext < -EOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - egrep "free" >/dev/null 2>&1; then - : -else - rm -rf conftest* - ac_cv_header_stdc=no -fi -rm -f conftest* - -fi - -if test $ac_cv_header_stdc = yes; then - # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. -if test "$cross_compiling" = yes; then - : -else - cat > conftest.$ac_ext < -#define ISLOWER(c) ('a' <= (c) && (c) <= 'z') -#define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) -#define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) -int main () { int i; for (i = 0; i < 256; i++) -if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2); -exit (0); } - -EOF -if { (eval echo configure:2436: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null -then - : -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -fr conftest* - ac_cv_header_stdc=no -fi -rm -fr conftest* -fi - -fi -fi - -echo "$ac_t""$ac_cv_header_stdc" 1>&6 -if test $ac_cv_header_stdc = yes; then - cat >> confdefs.h <<\EOF -#define STDC_HEADERS 1 -EOF - -fi - -echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6 -echo "configure:2460: checking for sys/wait.h that is POSIX.1 compatible" >&5 -if eval "test \"`echo '$''{'ac_cv_header_sys_wait_h'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext < -#include -#ifndef WEXITSTATUS -#define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8) -#endif -#ifndef WIFEXITED -#define WIFEXITED(stat_val) (((stat_val) & 255) == 0) -#endif -int main() { -int s; -wait (&s); -s = WIFEXITED (s) ? WEXITSTATUS (s) : 1; -; return 0; } -EOF -if { (eval echo configure:2481: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - ac_cv_header_sys_wait_h=yes -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - ac_cv_header_sys_wait_h=no -fi -rm -f conftest* -fi - -echo "$ac_t""$ac_cv_header_sys_wait_h" 1>&6 -if test $ac_cv_header_sys_wait_h = yes; then - cat >> confdefs.h <<\EOF -#define HAVE_SYS_WAIT_H 1 -EOF - -fi - -for ac_hdr in stdlib.h string.h unistd.h limits.h sys/file.h sys/ioctl.h\ - fcntl.h sys/fcntl.h sys/select.h sys/time.h sys/times.h sys/param.h\ - syscall.h pwd.h a.out.h utime.h memory.h direct.h sys/resource.h -do -ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` -echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:2507: checking for $ac_hdr" >&5 -if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext < -EOF -ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2517: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` -if test -z "$ac_err"; then - rm -rf conftest* - eval "ac_cv_header_$ac_safe=yes" -else - echo "$ac_err" >&5 - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_header_$ac_safe=no" -fi -rm -f conftest* -fi -if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` - cat >> confdefs.h <&6 -fi -done - - -echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6 -echo "configure:2545: checking for uid_t in sys/types.h" >&5 -if eval "test \"`echo '$''{'ac_cv_type_uid_t'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext < -EOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - egrep "uid_t" >/dev/null 2>&1; then - rm -rf conftest* - ac_cv_type_uid_t=yes -else - rm -rf conftest* - ac_cv_type_uid_t=no -fi -rm -f conftest* - -fi - -echo "$ac_t""$ac_cv_type_uid_t" 1>&6 -if test $ac_cv_type_uid_t = no; then - cat >> confdefs.h <<\EOF -#define uid_t int -EOF - - cat >> confdefs.h <<\EOF -#define gid_t int -EOF - -fi - -echo $ac_n "checking for size_t""... $ac_c" 1>&6 -echo "configure:2579: checking for size_t" >&5 -if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext < -#if STDC_HEADERS -#include -#include -#endif -EOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then - rm -rf conftest* - ac_cv_type_size_t=yes -else - rm -rf conftest* - ac_cv_type_size_t=no -fi -rm -f conftest* - -fi -echo "$ac_t""$ac_cv_type_size_t" 1>&6 -if test $ac_cv_type_size_t = no; then - cat >> confdefs.h <<\EOF -#define size_t unsigned -EOF - -fi - -echo $ac_n "checking for st_blksize in struct stat""... $ac_c" 1>&6 -echo "configure:2612: checking for st_blksize in struct stat" >&5 -if eval "test \"`echo '$''{'ac_cv_struct_st_blksize'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext < -#include -int main() { -struct stat s; s.st_blksize; -; return 0; } -EOF -if { (eval echo configure:2625: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - ac_cv_struct_st_blksize=yes -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - ac_cv_struct_st_blksize=no -fi -rm -f conftest* -fi - -echo "$ac_t""$ac_cv_struct_st_blksize" 1>&6 -if test $ac_cv_struct_st_blksize = yes; then - cat >> confdefs.h <<\EOF -#define HAVE_ST_BLKSIZE 1 -EOF - -fi - -save_LIBOJBS="$LIBOBJS" -echo $ac_n "checking for st_blocks in struct stat""... $ac_c" 1>&6 -echo "configure:2647: checking for st_blocks in struct stat" >&5 -if eval "test \"`echo '$''{'ac_cv_struct_st_blocks'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext < -#include -int main() { -struct stat s; s.st_blocks; -; return 0; } -EOF -if { (eval echo configure:2660: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - ac_cv_struct_st_blocks=yes -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - ac_cv_struct_st_blocks=no -fi -rm -f conftest* -fi - -echo "$ac_t""$ac_cv_struct_st_blocks" 1>&6 -if test $ac_cv_struct_st_blocks = yes; then - cat >> confdefs.h <<\EOF -#define HAVE_ST_BLOCKS 1 -EOF - -else - LIBOBJS="$LIBOBJS fileblocks.${ac_objext}" -fi - -LIBOBJS="$save_LIBOBJS" -echo $ac_n "checking for st_rdev in struct stat""... $ac_c" 1>&6 -echo "configure:2684: checking for st_rdev in struct stat" >&5 -if eval "test \"`echo '$''{'ac_cv_struct_st_rdev'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext < -#include -int main() { -struct stat s; s.st_rdev; -; return 0; } -EOF -if { (eval echo configure:2697: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - ac_cv_struct_st_rdev=yes -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - ac_cv_struct_st_rdev=no -fi -rm -f conftest* -fi - -echo "$ac_t""$ac_cv_struct_st_rdev" 1>&6 -if test $ac_cv_struct_st_rdev = yes; then - cat >> confdefs.h <<\EOF -#define HAVE_ST_RDEV 1 -EOF - -fi - - -echo $ac_n "checking type of array argument to getgroups""... $ac_c" 1>&6 -echo "configure:2719: checking type of array argument to getgroups" >&5 -if eval "test \"`echo '$''{'ac_cv_type_getgroups'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - if test "$cross_compiling" = yes; then - ac_cv_type_getgroups=cross -else - cat > conftest.$ac_ext < -#define NGID 256 -#undef MAX -#define MAX(x, y) ((x) > (y) ? (x) : (y)) -main() -{ - gid_t gidset[NGID]; - int i, n; - union { gid_t gval; long lval; } val; - - val.lval = -1; - for (i = 0; i < NGID; i++) - gidset[i] = val.gval; - n = getgroups (sizeof (gidset) / MAX (sizeof (int), sizeof (gid_t)) - 1, - gidset); - /* Exit non-zero if getgroups seems to require an array of ints. This - happens when gid_t is short but getgroups modifies an array of ints. */ - exit ((n > 0 && gidset[n] != val.gval) ? 1 : 0); -} - -EOF -if { (eval echo configure:2752: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null -then - ac_cv_type_getgroups=gid_t -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -fr conftest* - ac_cv_type_getgroups=int -fi -rm -fr conftest* -fi - -if test $ac_cv_type_getgroups = cross; then - cat > conftest.$ac_ext < -EOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - egrep "getgroups.*int.*gid_t" >/dev/null 2>&1; then - rm -rf conftest* - ac_cv_type_getgroups=gid_t -else - rm -rf conftest* - ac_cv_type_getgroups=int -fi -rm -f conftest* - -fi -fi - -echo "$ac_t""$ac_cv_type_getgroups" 1>&6 -cat >> confdefs.h <&6 -echo "configure:2790: checking return type of signal handlers" >&5 -if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext < -#include -#ifdef signal -#undef signal -#endif -#ifdef __cplusplus -extern "C" void (*signal (int, void (*)(int)))(int); -#else -void (*signal ()) (); -#endif - -int main() { -int i; -; return 0; } -EOF -if { (eval echo configure:2812: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - ac_cv_type_signal=void -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - ac_cv_type_signal=int -fi -rm -f conftest* -fi - -echo "$ac_t""$ac_cv_type_signal" 1>&6 -cat >> confdefs.h <&6 -echo "configure:2833: checking for working alloca.h" >&5 -if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext < -int main() { -char *p = alloca(2 * sizeof(int)); -; return 0; } -EOF -if { (eval echo configure:2845: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - ac_cv_header_alloca_h=yes -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - ac_cv_header_alloca_h=no -fi -rm -f conftest* -fi - -echo "$ac_t""$ac_cv_header_alloca_h" 1>&6 -if test $ac_cv_header_alloca_h = yes; then - cat >> confdefs.h <<\EOF -#define HAVE_ALLOCA_H 1 -EOF - -fi - -echo $ac_n "checking for alloca""... $ac_c" 1>&6 -echo "configure:2866: checking for alloca" >&5 -if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext < -# define alloca _alloca -# else -# if HAVE_ALLOCA_H -# include -# else -# ifdef _AIX - #pragma alloca -# else -# ifndef alloca /* predefined by HP cc +Olibcalls */ -char *alloca (); -# endif -# endif -# endif -# endif -#endif - -int main() { -char *p = (char *) alloca(1); -; return 0; } -EOF -if { (eval echo configure:2899: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - ac_cv_func_alloca_works=yes -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - ac_cv_func_alloca_works=no -fi -rm -f conftest* -fi - -echo "$ac_t""$ac_cv_func_alloca_works" 1>&6 -if test $ac_cv_func_alloca_works = yes; then - cat >> confdefs.h <<\EOF -#define HAVE_ALLOCA 1 -EOF - -fi - -if test $ac_cv_func_alloca_works = no; then - # The SVR3 libPW and SVR4 libucb both contain incompatible functions - # that cause trouble. Some versions do not even contain alloca or - # contain a buggy version. If you still want to use their alloca, - # use ar to extract alloca.o from them instead of compiling alloca.c. - ALLOCA=alloca.${ac_objext} - cat >> confdefs.h <<\EOF -#define C_ALLOCA 1 -EOF - - -echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6 -echo "configure:2931: checking whether alloca needs Cray hooks" >&5 -if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext <&5 | - egrep "webecray" >/dev/null 2>&1; then - rm -rf conftest* - ac_cv_os_cray=yes -else - rm -rf conftest* - ac_cv_os_cray=no -fi -rm -f conftest* - -fi - -echo "$ac_t""$ac_cv_os_cray" 1>&6 -if test $ac_cv_os_cray = yes; then -for ac_func in _getb67 GETB67 getb67; do - echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:2961: checking for $ac_func" >&5 -if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext < -/* Override any gcc2 internal prototype to avoid an error. */ -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char $ac_func(); - -int main() { - -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined (__stub_$ac_func) || defined (__stub___$ac_func) -choke me -#else -$ac_func(); -#endif - -; return 0; } -EOF -if { (eval echo configure:2989: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_func_$ac_func=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_func_$ac_func=no" -fi -rm -f conftest* -fi - -if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then - echo "$ac_t""yes" 1>&6 - cat >> confdefs.h <&6 -fi - -done -fi - -echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6 -echo "configure:3016: checking stack direction for C alloca" >&5 -if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - if test "$cross_compiling" = yes; then - ac_cv_c_stack_direction=0 -else - cat > conftest.$ac_ext < addr) ? 1 : -1; -} -main () -{ - exit (find_stack_direction() < 0); -} -EOF -if { (eval echo configure:3043: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null -then - ac_cv_c_stack_direction=1 -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -fr conftest* - ac_cv_c_stack_direction=-1 -fi -rm -fr conftest* -fi - -fi - -echo "$ac_t""$ac_cv_c_stack_direction" 1>&6 -cat >> confdefs.h <&6 -echo "configure:3065: checking for pid_t" >&5 -if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext < -#if STDC_HEADERS -#include -#include -#endif -EOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then - rm -rf conftest* - ac_cv_type_pid_t=yes -else - rm -rf conftest* - ac_cv_type_pid_t=no -fi -rm -f conftest* - -fi -echo "$ac_t""$ac_cv_type_pid_t" 1>&6 -if test $ac_cv_type_pid_t = no; then - cat >> confdefs.h <<\EOF -#define pid_t int -EOF - -fi - -ac_safe=`echo "vfork.h" | sed 'y%./+-%__p_%'` -echo $ac_n "checking for vfork.h""... $ac_c" 1>&6 -echo "configure:3099: checking for vfork.h" >&5 -if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext < -EOF -ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:3109: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` -if test -z "$ac_err"; then - rm -rf conftest* - eval "ac_cv_header_$ac_safe=yes" -else - echo "$ac_err" >&5 - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_header_$ac_safe=no" -fi -rm -f conftest* -fi -if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then - echo "$ac_t""yes" 1>&6 - cat >> confdefs.h <<\EOF -#define HAVE_VFORK_H 1 -EOF - -else - echo "$ac_t""no" 1>&6 -fi - -echo $ac_n "checking for working vfork""... $ac_c" 1>&6 -echo "configure:3134: checking for working vfork" >&5 -if eval "test \"`echo '$''{'ac_cv_func_vfork_works'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - if test "$cross_compiling" = yes; then - echo $ac_n "checking for vfork""... $ac_c" 1>&6 -echo "configure:3140: checking for vfork" >&5 -if eval "test \"`echo '$''{'ac_cv_func_vfork'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext < -/* Override any gcc2 internal prototype to avoid an error. */ -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char vfork(); - -int main() { - -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined (__stub_vfork) || defined (__stub___vfork) -choke me -#else -vfork(); -#endif - -; return 0; } -EOF -if { (eval echo configure:3168: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_func_vfork=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_func_vfork=no" -fi -rm -f conftest* -fi - -if eval "test \"`echo '$ac_cv_func_'vfork`\" = yes"; then - echo "$ac_t""yes" 1>&6 - : -else - echo "$ac_t""no" 1>&6 -fi - -ac_cv_func_vfork_works=$ac_cv_func_vfork -else - cat > conftest.$ac_ext < -#include -#include -#ifdef HAVE_UNISTD_H -#include -#endif -#ifdef HAVE_VFORK_H -#include -#endif -/* On some sparc systems, changes by the child to local and incoming - argument registers are propagated back to the parent. - The compiler is told about this with #include , - but some compilers (e.g. gcc -O) don't grok . - Test for this by using a static variable whose address - is put into a register that is clobbered by the vfork. */ -static -#ifdef __cplusplus -sparc_address_test (int arg) -#else -sparc_address_test (arg) int arg; -#endif -{ - static pid_t child; - if (!child) { - child = vfork (); - if (child < 0) { - perror ("vfork"); - _exit(2); - } - if (!child) { - arg = getpid(); - write(-1, "", 0); - _exit (arg); - } - } -} -main() { - pid_t parent = getpid (); - pid_t child; - - sparc_address_test (); - - child = vfork (); - - if (child == 0) { - /* Here is another test for sparc vfork register problems. - This test uses lots of local variables, at least - as many local variables as main has allocated so far - including compiler temporaries. 4 locals are enough for - gcc 1.40.3 on a Solaris 4.1.3 sparc, but we use 8 to be safe. - A buggy compiler should reuse the register of parent - for one of the local variables, since it will think that - parent can't possibly be used any more in this routine. - Assigning to the local variable will thus munge parent - in the parent process. */ - pid_t - p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(), - p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid(); - /* Convince the compiler that p..p7 are live; otherwise, it might - use the same hardware register for all 8 local variables. */ - if (p != p1 || p != p2 || p != p3 || p != p4 - || p != p5 || p != p6 || p != p7) - _exit(1); - - /* On some systems (e.g. IRIX 3.3), - vfork doesn't separate parent from child file descriptors. - If the child closes a descriptor before it execs or exits, - this munges the parent's descriptor as well. - Test for this by closing stdout in the child. */ - _exit(close(fileno(stdout)) != 0); - } else { - int status; - struct stat st; - - while (wait(&status) != child) - ; - exit( - /* Was there some problem with vforking? */ - child < 0 - - /* Did the child fail? (This shouldn't happen.) */ - || status - - /* Did the vfork/compiler bug occur? */ - || parent != getpid() - - /* Did the file descriptor bug occur? */ - || fstat(fileno(stdout), &st) != 0 - ); - } -} -EOF -if { (eval echo configure:3285: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null -then - ac_cv_func_vfork_works=yes -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -fr conftest* - ac_cv_func_vfork_works=no -fi -rm -fr conftest* -fi - -fi - -echo "$ac_t""$ac_cv_func_vfork_works" 1>&6 -if test $ac_cv_func_vfork_works = no; then - cat >> confdefs.h <<\EOF -#define vfork fork -EOF - -fi - -echo $ac_n "checking for 8-bit clean memcmp""... $ac_c" 1>&6 -echo "configure:3308: checking for 8-bit clean memcmp" >&5 -if eval "test \"`echo '$''{'ac_cv_func_memcmp_clean'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - if test "$cross_compiling" = yes; then - ac_cv_func_memcmp_clean=no -else - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null -then - ac_cv_func_memcmp_clean=yes -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -fr conftest* - ac_cv_func_memcmp_clean=no -fi -rm -fr conftest* -fi - -fi - -echo "$ac_t""$ac_cv_func_memcmp_clean" 1>&6 -test $ac_cv_func_memcmp_clean = no && LIBOBJS="$LIBOBJS memcmp.${ac_objext}" - -for ac_func in dup2 memmove mkdir strcasecmp strncasecmp strerror strftime\ - strchr strstr strtoul strdup crypt flock vsnprintf\ - isinf isnan finite -do -echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:3348: checking for $ac_func" >&5 -if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext < -/* Override any gcc2 internal prototype to avoid an error. */ -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char $ac_func(); - -int main() { - -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined (__stub_$ac_func) || defined (__stub___$ac_func) -choke me -#else -$ac_func(); -#endif - -; return 0; } -EOF -if { (eval echo configure:3376: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_func_$ac_func=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_func_$ac_func=no" -fi -rm -f conftest* -fi - -if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` - cat >> confdefs.h <&6 -LIBOBJS="$LIBOBJS ${ac_func}.${ac_objext}" -fi -done - - -for ac_func in fmod killpg drand48 random wait4 waitpid syscall getcwd\ - truncate chsize times utimes fcntl lockf setitimer\ - setruid seteuid setreuid setrgid setegid setregid\ - getpgrp setpgrp getpgid setpgid getgroups getpriority\ - dlopen sigprocmask sigaction _setjmp setsid getrlimit -do -echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:3409: checking for $ac_func" >&5 -if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext < -/* Override any gcc2 internal prototype to avoid an error. */ -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char $ac_func(); - -int main() { - -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined (__stub_$ac_func) || defined (__stub___$ac_func) -choke me -#else -$ac_func(); -#endif - -; return 0; } -EOF -if { (eval echo configure:3437: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_func_$ac_func=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_func_$ac_func=no" -fi -rm -f conftest* -fi - -if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` - cat >> confdefs.h <&6 -fi -done - -echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6 -echo "configure:3462: checking whether struct tm is in sys/time.h or time.h" >&5 -if eval "test \"`echo '$''{'ac_cv_struct_tm'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext < -#include -int main() { -struct tm *tp; tp->tm_sec; -; return 0; } -EOF -if { (eval echo configure:3475: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - ac_cv_struct_tm=time.h -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - ac_cv_struct_tm=sys/time.h -fi -rm -f conftest* -fi - -echo "$ac_t""$ac_cv_struct_tm" 1>&6 -if test $ac_cv_struct_tm = sys/time.h; then - cat >> confdefs.h <<\EOF -#define TM_IN_SYS_TIME 1 -EOF - -fi - -echo $ac_n "checking for tm_zone in struct tm""... $ac_c" 1>&6 -echo "configure:3496: checking for tm_zone in struct tm" >&5 -if eval "test \"`echo '$''{'ac_cv_struct_tm_zone'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext < -#include <$ac_cv_struct_tm> -int main() { -struct tm tm; tm.tm_zone; -; return 0; } -EOF -if { (eval echo configure:3509: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - ac_cv_struct_tm_zone=yes -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - ac_cv_struct_tm_zone=no -fi -rm -f conftest* -fi - -echo "$ac_t""$ac_cv_struct_tm_zone" 1>&6 -if test "$ac_cv_struct_tm_zone" = yes; then - cat >> confdefs.h <<\EOF -#define HAVE_TM_ZONE 1 -EOF - -else - echo $ac_n "checking for tzname""... $ac_c" 1>&6 -echo "configure:3529: checking for tzname" >&5 -if eval "test \"`echo '$''{'ac_cv_var_tzname'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext < -#ifndef tzname /* For SGI. */ -extern char *tzname[]; /* RS6000 and others reject char **tzname. */ -#endif -int main() { -atoi(*tzname); -; return 0; } -EOF -if { (eval echo configure:3544: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - ac_cv_var_tzname=yes -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - ac_cv_var_tzname=no -fi -rm -f conftest* -fi - -echo "$ac_t""$ac_cv_var_tzname" 1>&6 - if test $ac_cv_var_tzname = yes; then - cat >> confdefs.h <<\EOF -#define HAVE_TZNAME 1 -EOF - - fi -fi - -if test "$ac_cv_func_strftime" = no; then - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - cat >> confdefs.h <<\EOF -#define HAVE_DAYLIGHT 1 -EOF - -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 -fi -rm -f conftest* -fi - -if test "$ac_cv_func_sigprocmask" = yes && test "$ac_cv_func_sigaction" = yes; then - cat >> confdefs.h <<\EOF -#define POSIX_SIGNAL 1 -EOF - -else - echo $ac_n "checking for BSD signal semantics""... $ac_c" 1>&6 -echo "configure:3594: checking for BSD signal semantics" >&5 -if eval "test \"`echo '$''{'rb_cv_bsd_signal'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - if test "$cross_compiling" = yes; then - rb_cv_bsd_signal=no -else - cat > conftest.$ac_ext < -#include - -void -sig_handler(dummy) - int dummy; -{ -} - -int -main() -{ - signal(SIGINT, sig_handler); - kill(getpid(), SIGINT); - kill(getpid(), SIGINT); - return 0; -} - -EOF -if { (eval echo configure:3624: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null -then - rb_cv_bsd_signal=yes -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -fr conftest* - rb_cv_bsd_signal=no -fi -rm -fr conftest* -fi - -fi - -echo "$ac_t""$rb_cv_bsd_signal" 1>&6 - if test "$rb_cv_bsd_signal" = yes; then - cat >> confdefs.h <<\EOF -#define BSD_SIGNAL 1 -EOF - - fi -fi - -echo $ac_n "checking whether getpgrp takes no argument""... $ac_c" 1>&6 -echo "configure:3648: checking whether getpgrp takes no argument" >&5 -if eval "test \"`echo '$''{'ac_cv_func_getpgrp_void'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - if test "$cross_compiling" = yes; then - { echo "configure: error: cannot check getpgrp if cross compiling" 1>&2; exit 1; } -else - cat > conftest.$ac_ext < -#include - -int pid; -int pg1, pg2, pg3, pg4; -int ng, np, s, child; - -main() -{ - pid = getpid(); - pg1 = getpgrp(0); - pg2 = getpgrp(); - pg3 = getpgrp(pid); - pg4 = getpgrp(1); - - /* - * If all of these values are the same, it's pretty sure that - * we're on a system that ignores getpgrp's first argument. - */ - if (pg2 == pg4 && pg1 == pg3 && pg2 == pg3) - exit(0); - - child = fork(); - if (child < 0) - exit(1); - else if (child == 0) { - np = getpid(); - /* - * If this is Sys V, this will not work; pgrp will be - * set to np because setpgrp just changes a pgrp to be - * the same as the pid. - */ - setpgrp(np, pg1); - ng = getpgrp(0); /* Same result for Sys V and BSD */ - if (ng == pg1) { - exit(1); - } else { - exit(0); - } - } else { - wait(&s); - exit(s>>8); - } -} - -EOF -if { (eval echo configure:3711: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null -then - ac_cv_func_getpgrp_void=yes -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -fr conftest* - ac_cv_func_getpgrp_void=no -fi -rm -fr conftest* -fi - - -fi - -echo "$ac_t""$ac_cv_func_getpgrp_void" 1>&6 -if test $ac_cv_func_getpgrp_void = yes; then - cat >> confdefs.h <<\EOF -#define GETPGRP_VOID 1 -EOF - -fi - -echo $ac_n "checking whether setpgrp takes no argument""... $ac_c" 1>&6 -echo "configure:3735: checking whether setpgrp takes no argument" >&5 -if eval "test \"`echo '$''{'ac_cv_func_setpgrp_void'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - if test "$cross_compiling" = yes; then - { echo "configure: error: cannot check setpgrp if cross compiling" 1>&2; exit 1; } -else - cat > conftest.$ac_ext < -#endif - -/* - * If this system has a BSD-style setpgrp, which takes arguments, exit - * successfully. - */ -main() -{ - if (setpgrp(1,1) == -1) - exit(0); - else - exit(1); -} - -EOF -if { (eval echo configure:3763: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null -then - ac_cv_func_setpgrp_void=no -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -fr conftest* - ac_cv_func_setpgrp_void=yes -fi -rm -fr conftest* -fi - - -fi - -echo "$ac_t""$ac_cv_func_setpgrp_void" 1>&6 -if test $ac_cv_func_setpgrp_void = yes; then - cat >> confdefs.h <<\EOF -#define SETPGRP_VOID 1 -EOF - -fi - - -echo $ac_n "checking for working strtod""... $ac_c" 1>&6 -echo "configure:3788: checking for working strtod" >&5 -if eval "test \"`echo '$''{'rb_cv_func_strtod'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - if test "$cross_compiling" = yes; then - rb_cv_func_strtod=no -else - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null -then - rb_cv_func_strtod=yes -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -fr conftest* - rb_cv_func_strtod=no -fi -rm -fr conftest* -fi - -fi - -echo "$ac_t""$rb_cv_func_strtod" 1>&6 -test $rb_cv_func_strtod = no && LIBOBJS="$LIBOBJS strtod.o" - -echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6 -echo "configure:3844: checking whether byte ordering is bigendian" >&5 -if eval "test \"`echo '$''{'ac_cv_c_bigendian'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - ac_cv_c_bigendian=unknown -# See if sys/param.h defines the BYTE_ORDER macro. -cat > conftest.$ac_ext < -#include -int main() { - -#if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN - bogus endian macros -#endif -; return 0; } -EOF -if { (eval echo configure:3862: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - # It does; now see whether it defined to BIG_ENDIAN or not. -cat > conftest.$ac_ext < -#include -int main() { - -#if BYTE_ORDER != BIG_ENDIAN - not big endian -#endif -; return 0; } -EOF -if { (eval echo configure:3877: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - ac_cv_c_bigendian=yes -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - ac_cv_c_bigendian=no -fi -rm -f conftest* -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 -fi -rm -f conftest* -if test $ac_cv_c_bigendian = unknown; then -if test "$cross_compiling" = yes; then - { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } -else - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null -then - ac_cv_c_bigendian=no -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -fr conftest* - ac_cv_c_bigendian=yes -fi -rm -fr conftest* -fi - -fi -fi - -echo "$ac_t""$ac_cv_c_bigendian" 1>&6 -if test $ac_cv_c_bigendian = yes; then - cat >> confdefs.h <<\EOF -#define WORDS_BIGENDIAN 1 -EOF - -fi - -echo $ac_n "checking for working const""... $ac_c" 1>&6 -echo "configure:3934: checking for working const" >&5 -if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext <j = 5; -} -{ /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */ - const int foo = 10; -} - -; return 0; } -EOF -if { (eval echo configure:3988: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - ac_cv_c_const=yes -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - ac_cv_c_const=no -fi -rm -f conftest* -fi - -echo "$ac_t""$ac_cv_c_const" 1>&6 -if test $ac_cv_c_const = no; then - cat >> confdefs.h <<\EOF -#define const -EOF - -fi - -echo $ac_n "checking whether char is unsigned""... $ac_c" 1>&6 -echo "configure:4009: checking whether char is unsigned" >&5 -if eval "test \"`echo '$''{'ac_cv_c_char_unsigned'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - if test "$GCC" = yes; then - # GCC predefines this symbol on systems where it applies. -cat > conftest.$ac_ext <&5 | - egrep "yes" >/dev/null 2>&1; then - rm -rf conftest* - ac_cv_c_char_unsigned=yes -else - rm -rf conftest* - ac_cv_c_char_unsigned=no -fi -rm -f conftest* - -else -if test "$cross_compiling" = yes; then - { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } -else - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null -then - ac_cv_c_char_unsigned=yes -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -fr conftest* - ac_cv_c_char_unsigned=no -fi -rm -fr conftest* -fi - -fi -fi - -echo "$ac_t""$ac_cv_c_char_unsigned" 1>&6 -if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then - cat >> confdefs.h <<\EOF -#define __CHAR_UNSIGNED__ 1 -EOF - -fi - - -echo $ac_n "checking whether right shift preserve sign bit""... $ac_c" 1>&6 -echo "configure:4073: checking whether right shift preserve sign bit" >&5 -if eval "test \"`echo '$''{'rb_cv_rshift_sign'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - if test "$cross_compiling" = yes; then - rb_cv_rshift_sign=yes -else - cat > conftest.$ac_ext <>1)) - return 0; - return 1; -} - -EOF -if { (eval echo configure:4093: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null -then - rb_cv_rshift_sign=yes -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -fr conftest* - rb_cv_rshift_sign=no -fi -rm -fr conftest* -fi - -fi - -echo "$ac_t""$rb_cv_rshift_sign" 1>&6 -if test "$rb_cv_rshift_sign" = yes; then - cat >> confdefs.h <<\EOF -#define RSHIFT(x,y) ((x)>>(int)y) -EOF - -else - cat >> confdefs.h <<\EOF -#define RSHIFT(x,y) (((x)<0) ? ~((~(x))>>y) : (x)>>y) -EOF - -fi - -echo $ac_n "checking count field in FILE structures""... $ac_c" 1>&6 -echo "configure:4121: checking count field in FILE structures" >&5 -if eval "test \"`echo '$''{'rb_cv_fcnt'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext < -int main() { -FILE *f = stdin; f->_cnt = 0; -; return 0; } -EOF -if { (eval echo configure:4133: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - rb_cv_fcnt="_cnt" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 -fi -rm -f conftest* -if test "$rb_cv_fcnt" = ""; then - cat > conftest.$ac_ext < -int main() { -FILE *f = stdin; f->__cnt = 0; -; return 0; } -EOF -if { (eval echo configure:4150: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - rb_cv_fcnt="__cnt" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 -fi -rm -f conftest* -fi -if test "$rb_cv_fcnt" = ""; then - cat > conftest.$ac_ext < -int main() { -FILE *f = stdin; f->_r = 0; -; return 0; } -EOF -if { (eval echo configure:4168: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - rb_cv_fcnt="_r" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 -fi -rm -f conftest* -fi -if test "$rb_cv_fcnt" = ""; then - cat > conftest.$ac_ext < -int main() { -FILE *f = stdin; f->readCount = 0; -; return 0; } -EOF -if { (eval echo configure:4186: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - rb_cv_fcnt="readCount" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 -fi -rm -f conftest* -fi -if test "$rb_cv_fcnt" = ""; then - cat > conftest.$ac_ext < -int main() { -FILE *f = stdin; f->_rcount = 0; -; return 0; } -EOF -if { (eval echo configure:4204: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - rb_cv_fcnt="_rcount" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - rb_cv_fcnt="not found" -fi -rm -f conftest* -fi -fi - -if test "$rb_cv_fcnt" = "not found"; then - echo "$ac_t""not found(OK if using GNU libc)" 1>&6 -else - echo "$ac_t""$rb_cv_fcnt" 1>&6 - cat >> confdefs.h <&2;; - esac -fi - -cat >> confdefs.h <&6 -echo "configure:4261: checking whether ELF binaries are produced" >&5 -if eval "test \"`echo '$''{'rb_cv_binary_elf'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - if test "$cross_compiling" = yes; then - rb_cv_binary_elf=yes -else - cat > conftest.$ac_ext < -#include -main() { - char buffer[4]; - int i=open("conftest",O_RDONLY); - if(i==-1) - exit(1); /* fail */ - if(read(i,&buffer[0],4)<4) - exit(1); /* fail */ - if(buffer[0] != 127 || buffer[1] != 'E' || - buffer[2] != 'L' || buffer[3] != 'F') - exit(1); /* fail */ - exit(0); /* succeed (yes, it's ELF) */ -} - -EOF -if { (eval echo configure:4289: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null -then - rb_cv_binary_elf=yes -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -fr conftest* - rb_cv_binary_elf=no -fi -rm -fr conftest* -fi - -fi - -echo "$ac_t""$rb_cv_binary_elf" 1>&6 - -if test "$rb_cv_binary_elf" = yes; then - cat >> confdefs.h <<\EOF -#define USE_ELF 1 -EOF - -fi - -case "$target_os" in - linux*) - if test "$rb_cv_binary_elf" = no; then - with_dln_a_out=yes - target_os=${target_os}-a_out - else - LDFLAGS="-rdynamic" - fi;; -netbsd*) - if [ "`$CC -dM -E - &6 -echo "configure:4337: checking whether OS depend dynamic link works" >&5 - if test "$GCC" = yes; then - case "$target_os" in - nextstep*) ;; - openstep*) ;; - rhapsody*) ;; - macos*) ;; - human*) ;; - bsdi*) ;; - cygwin*) ;; - mingw*) ;; - netbsd*) CCDLFLAGS=-fpic - case "$target_cpu" in - mips*) CCDLFLAGS=-fPIC ;; - *) ;; - esac ;; - *) CCDLFLAGS=-fPIC;; - esac - else - case "$target_os" in - hpux*) CCDLFLAGS='+z';; - solaris*|irix*) CCDLFLAGS='-K PIC' ;; - sunos*) CCDLFLAGS='-PIC' ;; - esix*|uxpds*) CCDLFLAGS='-KPIC' ;; - *) CCDLFLAGS='' ;; - esac - fi - - case "$target_os" in - hpux*) DLDFLAGS="-E" - LDSHARED='ld -b' - LDFLAGS="-Wl,-E" - rb_cv_dlopen=yes;; - solaris*) if test "$GCC" = yes; then - LDSHARED='$(CC) -Wl,-G' - `$CC --print-prog-name=ld` -v 2>&1 | grep "GNU ld" > /dev/null && LDFLAGS="-Wl,-E" - else - LDSHARED='ld -G' - fi - rb_cv_dlopen=yes;; - sunos*) LDSHARED='ld -assert nodefinitions' - rb_cv_dlopen=yes;; - irix*) LDSHARED='ld -ignore_unresolved' - rb_cv_dlopen=yes;; - sysv4*) LDSHARED='ld -G' - rb_cv_dlopen=yes;; - esix*|uxpds*) LDSHARED="ld -G" - rb_cv_dlopen=yes ;; - osf*) LDSHARED="$CC -shared" - rb_cv_dlopen=yes ;; - linux*) LDSHARED="$CC -shared" - rb_cv_dlopen=yes ;; - freebsd*) LDSHARED="$CC -shared" - if test "$rb_cv_binary_elf" = yes; then - LDFLAGS="-rdynamic" - DLDFLAGS='-Wl,-soname,$(.TARGET)' - else - test "$GCC" = yes && `$CC --print-prog-name=ld` -v 2>&1 | grep "GNU ld" > /dev/null || LDSHARED="ld -Bshareable" - fi - rb_cv_dlopen=yes ;; - netbsd*) LDSHARED="ld -shared" - if test "$rb_cv_binary_elf" = yes; then - LDFLAGS="-export-dynamic" - fi - rb_cv_dlopen=yes ;; - openbsd*) LDSHARED="ld -Bforcearchive -Bshareable" - rb_cv_dlopen=yes ;; - bsdi3*) case "$CC" in - *shlicc*) LDSHARED="$CC -r" - rb_cv_dlopen=yes ;; - esac ;; - bsdi*) LDSHARED="ld -shared" - LDFLAGS='-rdynamic -Wl,-rpath,$(prefix)/lib/ruby/$(MAJOR).$(MINOR)/i386-bsdi4.0' - rb_cv_dlopen=yes ;; - nextstep*) LDSHARED='cc -r -nostdlib' - LDFLAGS="-u libsys_s" - DLDFLAGS="$ARCH_FLAG" - rb_cv_dlopen=yes ;; - openstep*) LDSHARED='cc -dynamic -bundle -undefined suppress' - LDFLAGS="" - DLDFLAGS="$ARCH_FLAG" - rb_cv_dlopen=yes ;; - rhapsody*) LDSHARED='cc -dynamic -bundle -undefined suppress' - LDFLAGS="" - DLDFLAGS="$ARCH_FLAG" - rb_cv_dlopen=yes ;; - macos*) LDSHARED='cc -dynamic -bundle -undefined suppress' - LDFLAGS="" - DLDFLAGS="$ARCH_FLAG" - rb_cv_dlopen=yes ;; - aix*) LDSHARED='/usr/ccs/bin/ld' - XLDFLAGS='-Wl,-bE:ruby.imp' - DLDFLAGS='-eInit_$(TARGET) -bI:$(topdir)/ruby.imp -bM:SRE -T512 -H512 -lc' - LDFLAGS="-brtl" - rb_cv_dlopen=yes ;; - - human*) DLDFLAGS='' - LDSHARED='' - LDFLAGS='' - rb_cv_dlopen=yes ;; - beos*) case "$target_cpu" in - powerpc*) - LDSHARED="ld -xms" - DLDFLAGS="-f ruby.exp -lbe -lroot glue-noinit.a init_term_dyn.o start_dyn.o" - ;; - i586*) - LDSHARED="ld -shared" - DLDFLAGS="-L/boot/develop/lib/x86 -lbe -lroot" - ;; - *) - DLDFLAGS="ruby.def -lbe -lroot glue-noinit.a init_term_dyn.o start_dyn.o" - esac - rb_cv_dlopen=yes ;; - cygwin*|mingw*) : ${LDSHARED="${DLLWRAP} --target=${target_os} --as=${AS} --dlltool-name=${DLLTOOL} --driver-name=${CC} --export-all -s"} - rb_cv_dlopen=yes ;; - *) LDSHARED='ld' ;; - esac - echo "$ac_t""$rb_cv_dlopen" 1>&6 -fi - -dln_a_out_works=no -if test "$ac_cv_header_a_out_h" = yes; then - if test "$with_dln_a_out" = yes || test "$rb_cv_dlopen" = unknown; then - cat confdefs.h > config.h - echo $ac_n "checking whether matz's dln works""... $ac_c" 1>&6 -echo "configure:4462: checking whether matz's dln works" >&5 -if eval "test \"`echo '$''{'rb_cv_dln_a_out'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - rb_cv_dln_a_out=yes -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - rb_cv_dln_a_out=no -fi -rm -f conftest* -fi - -echo "$ac_t""$rb_cv_dln_a_out" 1>&6 - if test "$rb_cv_dln_a_out" = yes; then - dln_a_out_works=yes - cat >> confdefs.h <<\EOF -#define USE_DLN_A_OUT 1 -EOF - - fi - fi -fi - -if test "$dln_a_out_works" = yes; then - if test "$GCC" = yes; then - STATIC=-static - else - STATIC=-Bstatic - fi - DLEXT=so - cat >> confdefs.h <<\EOF -#define DLEXT ".so" -EOF - - CCDLFLAGS= -else - case "$target_os" in - hpux*) DLEXT=sl - cat >> confdefs.h <<\EOF -#define DLEXT ".sl" -EOF -;; - nextstep*) DLEXT=bundle - cat >> confdefs.h <<\EOF -#define DLEXT ".bundle" -EOF -;; - openstep*) DLEXT=bundle - cat >> confdefs.h <<\EOF -#define DLEXT ".bundle" -EOF -;; - rhapsody*) DLEXT=bundle - cat >> confdefs.h <<\EOF -#define DLEXT ".bundle" -EOF -;; - macos*) DLEXT=bundle - cat >> confdefs.h <<\EOF -#define DLEXT ".bundle" -EOF -;; - os2_emx*) DLEXT=dll - cat >> confdefs.h <<\EOF -#define DLEXT ".dll" -EOF -;; - cygwin*|mingw*) DLEXT=so - cat >> confdefs.h <<\EOF -#define DLEXT ".so" -EOF - - DLEXT2=dll - cat >> confdefs.h <<\EOF -#define DLEXT2 ".dll" -EOF -;; - *) DLEXT=so - cat >> confdefs.h <<\EOF -#define DLEXT ".so" -EOF -;; - esac -fi - -if test "$with_dln_a_out" = yes; then - STRIP=true -else - STRIP=strip -fi - -case "$target_os" in - linux*) - STRIP='strip -S -x';; - nextstep*) - STRIP='strip -A -n';; - openstep*) - STRIP='strip -A -n';; - rhapsody*) - STRIP='strip -A -n';; - macos*) - STRIP='strip -A -n';; -esac - -EXTSTATIC= -# Check whether --with-static-linked-ext or --without-static-linked-ext was given. -if test "${with_static_linked_ext+set}" = set; then - withval="$with_static_linked_ext" - case $withval in - yes) STATIC= - EXTSTATIC=static;; - *) ;; - esac -fi - - -case "$target_os" in - human*) - echo $ac_n "checking for _harderr in -lsignal""... $ac_c" 1>&6 -echo "configure:4596: checking for _harderr in -lsignal" >&5 -ac_lib_var=`echo signal'_'_harderr | sed 'y%./+-%__p_%'` -if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - ac_save_LIBS="$LIBS" -LIBS="-lsignal $LIBS" -cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=no" -fi -rm -f conftest* -LIBS="$ac_save_LIBS" - -fi -if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_lib=HAVE_LIB`echo signal | sed -e 's/[^a-zA-Z0-9_]/_/g' \ - -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` - cat >> confdefs.h <&6 -fi - - echo $ac_n "checking for hmemset in -lhmem""... $ac_c" 1>&6 -echo "configure:4643: checking for hmemset in -lhmem" >&5 -ac_lib_var=`echo hmem'_'hmemset | sed 'y%./+-%__p_%'` -if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - ac_save_LIBS="$LIBS" -LIBS="-lhmem $LIBS" -cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=no" -fi -rm -f conftest* -LIBS="$ac_save_LIBS" - -fi -if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_lib=HAVE_LIB`echo hmem | sed -e 's/[^a-zA-Z0-9_]/_/g' \ - -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` - cat >> confdefs.h <&6 -fi - - for ac_func in select gettimeofday -do -echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:4692: checking for $ac_func" >&5 -if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext < -/* Override any gcc2 internal prototype to avoid an error. */ -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char $ac_func(); - -int main() { - -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined (__stub_$ac_func) || defined (__stub___$ac_func) -choke me -#else -$ac_func(); -#endif - -; return 0; } -EOF -if { (eval echo configure:4720: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_func_$ac_func=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_func_$ac_func=no" -fi -rm -f conftest* -fi - -if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` - cat >> confdefs.h <&6 -fi -done - - echo $ac_n "checking whether PD libc _dtos18 fail to convert big number""... $ac_c" 1>&6 -echo "configure:4745: checking whether PD libc _dtos18 fail to convert big number" >&5 -if eval "test \"`echo '$''{'rb_cv_missing__dtos18'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - if test "$cross_compiling" = yes; then - rb_cv_missing__dtos18=no -else - cat > conftest.$ac_ext < -main () -{ - char buf[256]; - sprintf (buf, "%g", 1e+300); - exit (strcmp (buf, "1e+300") ? 0 : 1); -} - -EOF -if { (eval echo configure:4765: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null -then - rb_cv_missing__dtos18=yes -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -fr conftest* - rb_cv_missing__dtos18=no -fi -rm -fr conftest* -fi - -fi - -echo "$ac_t""$rb_cv_missing__dtos18" 1>&6 - if test "$rb_cv_missing__dtos18" = yes; then - cat >> confdefs.h <<\EOF -#define MISSING__DTOS18 1 -EOF - - fi - echo $ac_n "checking whether PD libc fconvert fail to round""... $ac_c" 1>&6 -echo "configure:4787: checking whether PD libc fconvert fail to round" >&5 -if eval "test \"`echo '$''{'rb_cv_missing_fconvert'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - if test "$cross_compiling" = yes; then - rb_cv_missing_fconvert=no -else - cat > conftest.$ac_ext < -#include -main () -{ - char buf[256]; - sprintf (buf, "%f", log(exp(1.0))); - exit (strcmp (buf, "1.000000") ? 0 : 1); -} - -EOF -if { (eval echo configure:4808: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null -then - rb_cv_missing_fconvert=yes -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -fr conftest* - rb_cv_missing_fconvert=no -fi -rm -fr conftest* -fi - -fi - -echo "$ac_t""$rb_cv_missing_fconvert" 1>&6 - if test "$rb_cv_missing_fconvert" = yes; then - cat >> confdefs.h <<\EOF -#define MISSING_FCONVERT 1 -EOF - - fi - LIBOBJS="$LIBOBJS x68.o" - CFLAGS="$CFLAGS -fansi-only -cc1-stack=262144 -cpp-stack=2694144" - EXEEXT=.x - OBJEXT=o - setup=Setup.x68 - ;; - os2_emx) - LIBOBJS="$LIBOBJS os2.$OBJEXT" - setup=Setup.emx - ;; - *) - setup=Setup - ;; -esac - - - -if test "$prefix" = NONE; then - prefix=$ac_default_prefix -fi - -if test "$fat_binary" = yes ; then - CFLAGS="$CFLAGS $ARCH_FLAG" -fi - -if test x"$cross_compiling" = xyes; then - MINIRUBY='ruby -I.. -rprep' - PREP=prep.rb -else - MINIRUBY='./miniruby$(EXEEXT)' - PREP='' -fi - - - -FIRSTMAKEFILE="" -LIBRUBY_A='lib$(RUBY_INSTALL_NAME).a' -LIBRUBY='$(LIBRUBY_A)' -LIBRUBYARG='$(LIBRUBY_A)' -SOLIBS= -if test "$target_os" = "beos"; then - LIBRUBY='$(LIBRUBY_SO)' - LIBRUBYARG='-l$(RUBY_INSTALL_NAME)' - SOLIBS='-lnet' - echo creating ruby.def - case "$target_cpu" in - powerpc*) - cp beos/ruby.def.in ruby.exp - CFLAGS="$CFLAGS -relax_pointers" - ;; - i586*) - LDFLAGS="$LDFLAGS -L." - ;; - *) - echo EXPORTS > ruby.def - cat beos/ruby.def.in >> ruby.def - ;; - esac -fi - -case "$target_os" in - cygwin*|mingw*|beos*|openstep*|nextstep*|rhapsody*|macos*|os2_emx*) - DLDLIBS="" - ;; - *) - DLDLIBS="-lc" - ;; -esac - -LIBRUBY_LDSHARED=$LDSHARED -LIBRUBY_DLDFLAGS=$DLDFLAGS -LIBRUBY_SO='lib$(RUBY_INSTALL_NAME).so.$(MAJOR).$(MINOR).$(TEENY)' -LIBRUBY_ALIASES='lib$(RUBY_INSTALL_NAME).so' -# Check whether --enable-enable-shared or --disable-enable-shared was given. -if test "${enable_enable_shared+set}" = set; then - enableval="$enable_enable_shared" - enable_shared=$enableval -fi - -if test "$enable_shared" = 'yes'; then - LIBRUBY='$(LIBRUBY_SO)' - LIBRUBYARG='-L. -l$(RUBY_INSTALL_NAME)' - CFLAGS="$CFLAGS $CCDLFLAGS" - case "$target_os" in - sunos4*) - LIBRUBY_ALIASES='lib$(RUBY_INSTALL_NAME).so.$(MAJOR).$(MINOR) lib$(RUBY_INSTALL_NAME).so' - ;; - linux*) - LIBRUBY_DLDFLAGS='-Wl,-soname,lib$(RUBY_INSTALL_NAME).so.$(MAJOR).$(MINOR)' - LIBRUBY_ALIASES='lib$(RUBY_INSTALL_NAME).so.$(MAJOR).$(MINOR) lib$(RUBY_INSTALL_NAME).so' - ;; - freebsd*) - LIBRUBY_SO='lib$(RUBY_INSTALL_NAME).so.$(MAJOR)$(MINOR)' - if test "$rb_cv_binary_elf" != "yes" ; then - LIBRUBY_SO="$LIBRUBY_SO.\$(TEENY)" - LIBRUBY_ALIASES='' - fi - ;; - netbsd*) - LIBRUBY_SO='lib$(RUBY_INSTALL_NAME).so.$(MAJOR).$(MINOR)' - if test "$rb_cv_binary_elf" = yes; then # ELF platforms - LIBRUBY_ALIASES='lib$(RUBY_INSTALL_NAME).so.$(MAJOR) lib$(RUBY_INSTALL_NAME).so' - else - LIBRUBY_ALIASES= # a.out platforms - fi - ;; - solaris*) - XLDFLAGS='-R${prefix}/lib' - ;; - hpux*) - XLDFLAGS='-Wl,+s,+b,$(prefix)/lib' - LIBRUBY_SO='lib$(RUBY_INSTALL_NAME).sl.$(MAJOR).$(MINOR).$(TEENY)' - LIBRUBY_ALIASES='lib$(RUBY_INSTALL_NAME).sl.$(MAJOR).$(MINOR) lib$(RUBY_INSTALL_NAME).sl' - ;; - aix*) - if test "$GCC" = yes; then - LIBRUBY_LDSHARED='$(CC) -shared' - LIBRUBY_DLDFLAGS='-Wl,-bE:ruby.imp' - else - LIBRUBY_LDSHARED='/usr/ccs/bin/ld' - LIBRUBY_DLDFLAGS='-bE:ruby.imp -bM:SRE -bnoentry' - fi - LIBRUBYARG='-L${prefix}/lib -Wl,lib$(RUBY_INSTALL_NAME).so' - SOLIBS='-lm -lc' - ;; - cygwin*|mingw*) - LIBRUBY_SO='lib$(RUBY_INSTALL_NAME).a' - LIBRUBY_ALIASES='' - LIBRUBY_A='lib$(RUBY_INSTALL_NAME)s.a' - LIBRUBYARG='-L. -l$(RUBY_INSTALL_NAME)' - FIRSTMAKEFILE=GNUmakefile:cygwin/GNUmakefile.in - case "$target_os" in - cygwin*) - CCDLFLAGS=-DUSEIMPORTLIB ;; - mingw*) - CCDLFLAGS=-DIMPORT - SOLIBS='-lwsock32 -lmsvcrt' ;; - esac - ;; - *) - ;; - esac -fi - -case "$target_os" in - nextstep*) - CFLAGS="$CFLAGS -pipe" - ;; - openstep*) - CFLAGS="$CFLAGS -pipe" - ;; - rhasody*) - CFLAGS="$CFLAGS -pipe -no-precomp" - ;; - osf*) - if test "$without_gcc" = "no" ; then - CFLAGS="$CFLAGS -ansi" - else - # compile something small: taint.c is fine for this. - # the main point is the '-v' flag of 'cc'. - case "`cc -v -I. -c main.c -o /tmp/main.o 2>&1`" in - */gemc_cc*) # we have the new DEC GEM CC - CFLAGS="$CFLAGS -oldc" - ;; - *) # we have the old MIPS CC - ;; - esac - # cleanup - rm -f /tmp/main.o - CFLAGS="$CFLAGS -std" - fi - ;; - cygwin*) - LIBOBJS="$LIBOBJS strftime.o" - ;; - mingw*) - LIBOBJS="$LIBOBJS win32.o" - CFLAGS="-DNT -D__MSVCRT__ $CFLAGS" - ;; - *) - ;; -esac - - - - - - - - - - - - -ri_prefix= -test "$program_prefix" != NONE && - ri_prefix=$program_prefix - -ri_suffix= -test "$program_suffix" != NONE && - ri_suffix=$program_suffix - -RUBY_INSTALL_NAME="${ri_prefix}ruby${ri_suffix}" -RUBY_LIB_PREFIX="${prefix}/lib/ruby" -RUBY_LIB_PATH="${RUBY_LIB_PREFIX}/${MAJOR}.${MINOR}" -sitedir="${prefix}/lib/ruby/site_ruby" -# Check whether --with-sitedir or --without-sitedir was given. -if test "${with_sitedir+set}" = set; then - withval="$with_sitedir" - sitedir=$withval -fi - -RUBY_SITE_LIB_PATH="${sitedir}" -RUBY_SITE_LIB_PATH2="${sitedir}/${MAJOR}.${MINOR}" - -cat >> confdefs.h <> confdefs.h <> confdefs.h <> confdefs.h <> confdefs.h <> confdefs.h <> confdefs.h <> confdefs.h <> confdefs.h <> confdefs.h < config.h - -trap '' 1 2 15 -cat > confcache <<\EOF -# This file is a shell script that caches the results of configure -# tests run on this system so they can be shared between configure -# scripts and configure runs. It is not useful on other systems. -# If it contains results you don't want to keep, you may remove or edit it. -# -# By default, configure uses ./config.cache as the cache file, -# creating it if it does not exist already. You can give configure -# the --cache-file=FILE option to use a different cache file; that is -# what configure does when it calls configure scripts in -# subdirectories, so they share the cache. -# Giving --cache-file=/dev/null disables caching, for debugging configure. -# config.status only pays attention to the cache file if you give it the -# --recheck option to rerun configure. -# -EOF -# The following way of writing the cache mishandles newlines in values, -# but we know of no workaround that is simple, portable, and efficient. -# So, don't put newlines in cache variables' values. -# Ultrix sh set writes to stderr and can't be redirected directly, -# and sets the high bit in the cache file unless we assign to the vars. -(set) 2>&1 | - case `(ac_space=' '; set | grep ac_space) 2>&1` in - *ac_space=\ *) - # `set' does not quote correctly, so add quotes (double-quote substitution - # turns \\\\ into \\, and sed turns \\ into \). - sed -n \ - -e "s/'/'\\\\''/g" \ - -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p" - ;; - *) - # `set' quotes correctly as required by POSIX, so do not add quotes. - sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p' - ;; - esac >> confcache -if cmp -s $cache_file confcache; then - : -else - if test -w $cache_file; then - echo "updating cache $cache_file" - cat confcache > $cache_file - else - echo "not updating unwritable cache $cache_file" - fi -fi -rm -f confcache - -trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15 - -test "x$prefix" = xNONE && prefix=$ac_default_prefix -# Let make expand exec_prefix. -test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' - -# Any assignment to VPATH causes Sun make to only execute -# the first set of double-colon rules, so remove it if not needed. -# If there is a colon in the path, we need to keep it. -if test "x$srcdir" = x.; then - ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d' -fi - -trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15 - -# Transform confdefs.h into DEFS. -# Protect against shell expansion while executing Makefile rules. -# Protect against Makefile macro expansion. -cat > conftest.defs <<\EOF -s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%-D\1=\2%g -s%[ `~#$^&*(){}\\|;'"<>?]%\\&%g -s%\[%\\&%g -s%\]%\\&%g -s%\$%$$%g -EOF -DEFS=`sed -f conftest.defs confdefs.h | tr '\012' ' '` -rm -f conftest.defs - - -# Without the "./", some shells look in PATH for config.status. -: ${CONFIG_STATUS=./config.status} - -echo creating $CONFIG_STATUS -rm -f $CONFIG_STATUS -cat > $CONFIG_STATUS </dev/null | sed 1q`: -# -# $0 $ac_configure_args -# -# Compiler output produced by configure, useful for debugging -# configure, is in ./config.log if it exists. - -ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]" -for ac_option -do - case "\$ac_option" in - -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) - echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion" - exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;; - -version | --version | --versio | --versi | --vers | --ver | --ve | --v) - echo "$CONFIG_STATUS generated by autoconf version 2.13" - exit 0 ;; - -help | --help | --hel | --he | --h) - echo "\$ac_cs_usage"; exit 0 ;; - *) echo "\$ac_cs_usage"; exit 1 ;; - esac -done - -ac_given_srcdir=$srcdir - -trap 'rm -fr `echo "$FIRSTMAKEFILE Makefile ext/extmk.rb" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15 -EOF -cat >> $CONFIG_STATUS < conftest.subs <<\\CEOF -$ac_vpsub -$extrasub -s%@SHELL@%$SHELL%g -s%@CFLAGS@%$CFLAGS%g -s%@CPPFLAGS@%$CPPFLAGS%g -s%@CXXFLAGS@%$CXXFLAGS%g -s%@FFLAGS@%$FFLAGS%g -s%@DEFS@%$DEFS%g -s%@LDFLAGS@%$LDFLAGS%g -s%@LIBS@%$LIBS%g -s%@exec_prefix@%$exec_prefix%g -s%@prefix@%$prefix%g -s%@program_transform_name@%$program_transform_name%g -s%@bindir@%$bindir%g -s%@sbindir@%$sbindir%g -s%@libexecdir@%$libexecdir%g -s%@datadir@%$datadir%g -s%@sysconfdir@%$sysconfdir%g -s%@sharedstatedir@%$sharedstatedir%g -s%@localstatedir@%$localstatedir%g -s%@libdir@%$libdir%g -s%@includedir@%$includedir%g -s%@oldincludedir@%$oldincludedir%g -s%@infodir@%$infodir%g -s%@mandir@%$mandir%g -s%@MAJOR@%$MAJOR%g -s%@MINOR@%$MINOR%g -s%@TEENY@%$TEENY%g -s%@host@%$host%g -s%@host_alias@%$host_alias%g -s%@host_cpu@%$host_cpu%g -s%@host_vendor@%$host_vendor%g -s%@host_os@%$host_os%g -s%@target@%$target%g -s%@target_alias@%$target_alias%g -s%@target_cpu@%$target_cpu%g -s%@target_vendor@%$target_vendor%g -s%@target_os@%$target_os%g -s%@build@%$build%g -s%@build_alias@%$build_alias%g -s%@build_cpu@%$build_cpu%g -s%@build_vendor@%$build_vendor%g -s%@build_os@%$build_os%g -s%@CC@%$CC%g -s%@CPP@%$CPP%g -s%@YACC@%$YACC%g -s%@RANLIB@%$RANLIB%g -s%@AR@%$AR%g -s%@NM@%$NM%g -s%@DLLWRAP@%$DLLWRAP%g -s%@AS@%$AS%g -s%@DLLTOOL@%$DLLTOOL%g -s%@LN_S@%$LN_S%g -s%@SET_MAKE@%$SET_MAKE%g -s%@EXEEXT@%$EXEEXT%g -s%@OBJEXT@%$OBJEXT%g -s%@LIBOBJS@%$LIBOBJS%g -s%@ALLOCA@%$ALLOCA%g -s%@XLDFLAGS@%$XLDFLAGS%g -s%@DLDFLAGS@%$DLDFLAGS%g -s%@STATIC@%$STATIC%g -s%@CCDLFLAGS@%$CCDLFLAGS%g -s%@LDSHARED@%$LDSHARED%g -s%@DLEXT@%$DLEXT%g -s%@DLEXT2@%$DLEXT2%g -s%@STRIP@%$STRIP%g -s%@EXTSTATIC@%$EXTSTATIC%g -s%@setup@%$setup%g -s%@MINIRUBY@%$MINIRUBY%g -s%@PREP@%$PREP%g -s%@LIBRUBY_LDSHARED@%$LIBRUBY_LDSHARED%g -s%@LIBRUBY_DLDFLAGS@%$LIBRUBY_DLDFLAGS%g -s%@RUBY_INSTALL_NAME@%$RUBY_INSTALL_NAME%g -s%@LIBRUBY_A@%$LIBRUBY_A%g -s%@LIBRUBY_SO@%$LIBRUBY_SO%g -s%@LIBRUBY_ALIASES@%$LIBRUBY_ALIASES%g -s%@LIBRUBY@%$LIBRUBY%g -s%@LIBRUBYARG@%$LIBRUBYARG%g -s%@SOLIBS@%$SOLIBS%g -s%@DLDLIBS@%$DLDLIBS%g -s%@arch@%$arch%g -s%@sitedir@%$sitedir%g -s%@configure_args@%$configure_args%g - -CEOF -EOF - -cat >> $CONFIG_STATUS <<\EOF - -# Split the substitutions into bite-sized pieces for seds with -# small command number limits, like on Digital OSF/1 and HP-UX. -ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script. -ac_file=1 # Number of current file. -ac_beg=1 # First line for current file. -ac_end=$ac_max_sed_cmds # Line after last line for current file. -ac_more_lines=: -ac_sed_cmds="" -while $ac_more_lines; do - if test $ac_beg -gt 1; then - sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file - else - sed "${ac_end}q" conftest.subs > conftest.s$ac_file - fi - if test ! -s conftest.s$ac_file; then - ac_more_lines=false - rm -f conftest.s$ac_file - else - if test -z "$ac_sed_cmds"; then - ac_sed_cmds="sed -f conftest.s$ac_file" - else - ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file" - fi - ac_file=`expr $ac_file + 1` - ac_beg=$ac_end - ac_end=`expr $ac_end + $ac_max_sed_cmds` - fi -done -if test -z "$ac_sed_cmds"; then - ac_sed_cmds=cat -fi -EOF - -cat >> $CONFIG_STATUS <> $CONFIG_STATUS <<\EOF -for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then - # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". - case "$ac_file" in - *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'` - ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;; - *) ac_file_in="${ac_file}.in" ;; - esac - - # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories. - - # Remove last slash and all that follows it. Not all systems have dirname. - ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'` - if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then - # The file is in a subdirectory. - test ! -d "$ac_dir" && mkdir "$ac_dir" - ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`" - # A "../" for each directory in $ac_dir_suffix. - ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'` - else - ac_dir_suffix= ac_dots= - fi - - case "$ac_given_srcdir" in - .) srcdir=. - if test -z "$ac_dots"; then top_srcdir=. - else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;; - /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;; - *) # Relative path. - srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix" - top_srcdir="$ac_dots$ac_given_srcdir" ;; - esac - - - echo creating "$ac_file" - rm -f "$ac_file" - configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure." - case "$ac_file" in - *Makefile*) ac_comsub="1i\\ -# $configure_input" ;; - *) ac_comsub= ;; - esac - - ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"` - sed -e "$ac_comsub -s%@configure_input@%$configure_input%g -s%@srcdir@%$srcdir%g -s%@top_srcdir@%$top_srcdir%g -" $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file -fi; done -rm -f conftest.s* - -EOF -cat >> $CONFIG_STATUS <> $CONFIG_STATUS <<\EOF - -exit 0 -EOF -chmod +x $CONFIG_STATUS -rm -fr confdefs* $ac_clean_files -test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1 - diff --git a/eval.c b/eval.c index 7466e587df..7b672d992b 100644 --- a/eval.c +++ b/eval.c @@ -6235,8 +6235,10 @@ enum thread_status { }; #define WAIT_FD (1<<0) -#define WAIT_TIME (1<<1) -#define WAIT_JOIN (1<<2) +#define WAIT_SELECT (1<<1) +#define WAIT_TIME (1<<2) +#define WAIT_JOIN (1<<3) +#define WAIT_PID (1<<4) /* +infty, for this purpose */ #define DELAY_INFTY 1E30 @@ -6279,6 +6281,9 @@ struct thread { enum thread_status status; int wait_for; int fd; + fd_set readfds; + fd_set writefds; + fd_set exceptfds; double delay; thread_t join; @@ -6296,10 +6301,6 @@ struct thread { static thread_t main_thread; static thread_t curr_thread = 0; -static int num_waiting_on_fd = 0; -static int num_waiting_on_timer = 0; -static int num_waiting_on_join = 0; - #define FOREACH_THREAD_FROM(f,x) x = f; do { x = x->next; #define END_FOREACH_FROM(f,x) } while (x != f) @@ -6565,16 +6566,6 @@ static void rb_thread_ready(th) thread_t th; { - /* The thread is no longer waiting on anything */ - if (th->wait_for & WAIT_FD) { - num_waiting_on_fd--; - } - if (th->wait_for & WAIT_TIME) { - num_waiting_on_timer--; - } - if (th->wait_for & WAIT_JOIN) { - num_waiting_on_join--; - } th->wait_for = 0; th->status = THREAD_RUNNABLE; } @@ -6602,7 +6593,7 @@ rb_thread_fd_close(fd) thread_t th; FOREACH_THREAD(th) { - if ((th->wait_for & WAIT_FD) && th->fd == fd) { + if ((th->wait_for & WAIT_FD) && fd == th->fd) { th_raise_argc = 1; th_raise_argv[0] = rb_exc_new2(rb_eIOError, "stream closed"); th_raise_file = ruby_sourcefile; @@ -6637,6 +6628,59 @@ rb_thread_deadlock() #endif } +static void +copy_fds(dst, src, max) + fd_set *dst, *src; + int max; +{ + int n = 0; + int i; + + for (i=0; i<=max; i++) { + if (FD_ISSET(i, src)) { + n = i; + FD_SET(i, dst); + } + } +} + +static int +match_fds(dst, src, max) + fd_set *dst, *src; + int max; +{ + int i; + + for (i=0; i<=max; i++) { + if (FD_ISSET(i, src) && FD_ISSET(i, dst)) { + return Qtrue; + } + } + return Qfalse; +} + +static int +intersect_fds(dst, src, max) + fd_set *dst, *src; + int max; +{ + int i; + + for (i=0; i<=max; i++) { + if (FD_ISSET(i, src)) { + if (FD_ISSET(i, dst)) { + /* Wake up only one thread per fd. */ + FD_CLR(i, dst); + } + else { + FD_CLR(i, src); + } + return Qtrue; + } + } + return Qfalse; +} + void rb_thread_schedule() { @@ -6645,6 +6689,9 @@ rb_thread_schedule() thread_t curr; int found = 0; + int waiting_on_fd = 0; + int waiting_on_timer = 0; + select_err: rb_thread_pending = 0; if (curr_thread == curr_thread->next @@ -6659,55 +6706,59 @@ rb_thread_schedule() } FOREACH_THREAD_FROM(curr, th) { - if (th->status == THREAD_RUNNABLE || th->status == THREAD_TO_KILL) { - found = 1; - break; - } - } - END_FOREACH_FROM(curr, th); - - if (num_waiting_on_join) { - FOREACH_THREAD_FROM(curr, th) { - if ((th->wait_for&WAIT_JOIN) && rb_thread_dead(th->join)) { - th->join = 0; - th->wait_for &= ~WAIT_JOIN; - th->status = THREAD_RUNNABLE; - num_waiting_on_join--; - found = 1; - } + if (!found && (th->status == THREAD_RUNNABLE || th->status == THREAD_TO_KILL)) { + found = 1; } - END_FOREACH_FROM(curr, th); + if ((th->wait_for&WAIT_JOIN) && rb_thread_dead(th->join)) { + th->join = 0; + th->wait_for = 0; + th->status = THREAD_RUNNABLE; + found = 1; + } + if (th->wait_for&(WAIT_FD|WAIT_SELECT)) waiting_on_fd = 1; + if (th->wait_for&WAIT_TIME) waiting_on_timer = 1; } + END_FOREACH_FROM(curr, th); - if (num_waiting_on_fd > 0 || num_waiting_on_timer > 0) { + if (waiting_on_fd || waiting_on_timer) { fd_set readfds; + fd_set writefds; + fd_set exceptfds; struct timeval delay_tv, *delay_ptr; double delay, now; /* OK */ int n, max; + do { max = 0; FD_ZERO(&readfds); - if (num_waiting_on_fd > 0) { + FD_ZERO(&writefds); + FD_ZERO(&exceptfds); + if (waiting_on_fd) { FOREACH_THREAD_FROM(curr, th) { + if (max < th->fd) max = th->fd; if (th->wait_for & WAIT_FD) { FD_SET(th->fd, &readfds); - if (th->fd > max) max = th->fd; + } + if (th->wait_for & WAIT_SELECT) { + copy_fds(&readfds, &th->readfds, th->fd); + copy_fds(&writefds, &th->writefds, th->fd); + copy_fds(&exceptfds, &th->exceptfds, th->fd); + th->fd = 0; } } END_FOREACH_FROM(curr, th); } delay = DELAY_INFTY; - if (num_waiting_on_timer > 0) { + if (waiting_on_timer) { now = timeofday(); FOREACH_THREAD_FROM(curr, th) { if (th->wait_for & WAIT_TIME) { if (th->delay <= now) { th->delay = 0.0; - th->wait_for &= ~WAIT_TIME; + th->wait_for = 0; th->status = THREAD_RUNNABLE; - num_waiting_on_timer--; found = 1; } else if (th->delay < delay) { delay = th->delay; @@ -6717,7 +6768,7 @@ rb_thread_schedule() END_FOREACH_FROM(curr, th); } /* Do the select if needed */ - if (num_waiting_on_fd > 0 || !found) { + if (waiting_on_fd || !found) { /* Convert delay to a timeval */ /* If a thread is runnable, just poll */ if (found) { @@ -6735,11 +6786,12 @@ rb_thread_schedule() delay_ptr = &delay_tv; } - n = select(max+1, &readfds, 0, 0, delay_ptr); + n = select(max+1, &readfds, &writefds, &exceptfds, delay_ptr); if (n < 0) { if (rb_trap_pending) rb_trap_exec(); switch (errno) { case EBADF: + /* xxx */ case ENOMEM: n = 0; break; @@ -6751,14 +6803,25 @@ rb_thread_schedule() /* Some descriptors are ready. Make the corresponding threads runnable. */ FOREACH_THREAD_FROM(curr, th) { - if ((th->wait_for&WAIT_FD) - && FD_ISSET(th->fd, &readfds)) { + if ((th->wait_for&WAIT_FD) && FD_ISSET(th->fd, &readfds)) { /* Wake up only one thread per fd. */ FD_CLR(th->fd, &readfds); th->status = THREAD_RUNNABLE; th->fd = 0; - th->wait_for &= ~WAIT_FD; - num_waiting_on_fd--; + th->wait_for = 0; + found = 1; + } + if ((th->wait_for&WAIT_SELECT) && + (match_fds(&readfds, &th->readfds, max) || + match_fds(&writefds, &th->writefds, max) || + match_fds(&exceptfds, &th->exceptfds, max))) { + /* Wake up only one thread per fd. */ + th->status = THREAD_RUNNABLE; + th->wait_for = 0; + intersect_fds(&readfds, &th->readfds, max); + intersect_fds(&writefds, &th->writefds, max); + intersect_fds(&exceptfds, &th->exceptfds, max); + th->fd = n; found = 1; } } @@ -6821,8 +6884,7 @@ rb_thread_wait_fd(fd) if (curr_thread == curr_thread->next) return; curr_thread->status = THREAD_STOPPED; - curr_thread->fd = fd; - num_waiting_on_fd++; + FD_SET(fd, &curr_thread->readfds); curr_thread->wait_for |= WAIT_FD; rb_thread_schedule(); } @@ -6831,18 +6893,15 @@ int rb_thread_fd_writable(fd) int fd; { - struct timeval zero; - fd_set fds; - - if (curr_thread == curr_thread->next) return 1; + if (curr_thread == curr_thread->next) return; - zero.tv_sec = zero.tv_usec = 0; - for (;;) { - FD_ZERO(&fds); - FD_SET(fd, &fds); - if (select(fd+1, 0, &fds, 0, &zero) == 1) return 0; - rb_thread_schedule(); - } + curr_thread->status = THREAD_STOPPED; + FD_ZERO(&curr_thread->readfds); + FD_ZERO(&curr_thread->writefds); + FD_ZERO(&curr_thread->exceptfds); + FD_SET(fd, &curr_thread->writefds); + curr_thread->wait_for |= WAIT_SELECT; + rb_thread_schedule(); } void @@ -6880,7 +6939,6 @@ rb_thread_wait_for(time) date = timeofday() + (double)time.tv_sec + (double)time.tv_usec*1e-6; curr_thread->status = THREAD_STOPPED; curr_thread->delay = date; - num_waiting_on_timer++; curr_thread->wait_for |= WAIT_TIME; rb_thread_schedule(); } @@ -6901,7 +6959,6 @@ rb_thread_select(max, read, write, except, timeout) { double limit; struct timeval zero; - fd_set r, *rp, w, *wp, x, *xp; int n; if (!read && !write && !except) { @@ -6955,30 +7012,22 @@ rb_thread_select(max, read, write, except, timeout) } - for (;;) { - zero.tv_sec = zero.tv_usec = 0; - if (read) {rp = &r; r = *read;} else {rp = 0;} - if (write) {wp = &w; w = *write;} else {wp = 0;} - if (except) {xp = &x; x = *except;} else {xp = 0;} - n = select(max, rp, wp, xp, &zero); - if (n > 0) { - /* write back fds */ - if (read) {*read = r;} - if (write) {*write = w;} - if (except) {*except = x;} - return n; - } - if (n < 0 && errno != EINTR) { - return n; - } - if (timeout) { - if (timeout->tv_sec == 0 && timeout->tv_usec == 0) return 0; - if (limit <= timeofday()) return 0; - } - - rb_thread_schedule(); - CHECK_INTS; + curr_thread->status = THREAD_STOPPED; + curr_thread->readfds = *read; + curr_thread->writefds = *write; + curr_thread->exceptfds = *except; + curr_thread->fd = max; + curr_thread->wait_for = WAIT_SELECT; + if (timeout) { + curr_thread->delay = timeofday() + + (double)timeout->tv_sec + (double)timeout->tv_usec*1e-6; + curr_thread->wait_for |= WAIT_TIME; } + rb_thread_schedule(); + *read = curr_thread->readfds; + *write = curr_thread->writefds; + *except = curr_thread->exceptfds; + return curr_thread->fd; } static VALUE @@ -6994,7 +7043,6 @@ rb_thread_join(thread) rb_raise(rb_eThreadError, "Thread#join: deadlock - mutual join"); curr_thread->status = THREAD_STOPPED; curr_thread->join = th; - num_waiting_on_join++; curr_thread->wait_for |= WAIT_JOIN; rb_thread_schedule(); } @@ -7146,7 +7194,6 @@ rb_thread_sleep_forever() return; } - num_waiting_on_timer++; curr_thread->delay = DELAY_INFTY; curr_thread->wait_for |= WAIT_TIME; curr_thread->status = THREAD_STOPPED; @@ -7236,7 +7283,9 @@ rb_thread_abort_exc_set(thread, val) th->stk_len = 0;\ th->stk_max = 0;\ th->wait_for = 0;\ - th->fd = 0;\ + FD_ZERO(&th->readfds);\ + FD_ZERO(&th->writefds);\ + FD_ZERO(&th->exceptfds);\ th->delay = 0.0;\ th->join = 0;\ \ diff --git a/gc.c b/gc.c index edb290fbc4..33e864d24c 100644 --- a/gc.c +++ b/gc.c @@ -63,9 +63,8 @@ mem_error(mesg) rb_fatal(mesg); } -#ifndef xmalloc void * -xmalloc(size) +ruby_xmalloc(size) size_t size; { void *mem; @@ -95,7 +94,7 @@ xmalloc(size) } void * -xcalloc(n, size) +ruby_xcalloc(n, size) size_t n, size; { void *mem; @@ -107,7 +106,7 @@ xcalloc(n, size) } void * -xrealloc(ptr, size) +ruby_xrealloc(ptr, size) void *ptr; size_t size; { @@ -134,12 +133,11 @@ xrealloc(ptr, size) } void -xfree(x) +ruby_xfree(x) void *x; { if (x) free(x); } -#endif extern int ruby_in_compile; static int dont_gc; @@ -1220,3 +1218,38 @@ Init_GC() rb_gc_unregister_address(&rb_mObSpace); finalizers = rb_ary_new(); } + +#undef xmalloc +#undef xcalloc +#undef xrealloc +#undef xfree + +void* +xmalloc(size) + size_t size; +{ + return ruby_xmalloc(size); +} + +void* +xcalloc(n,size) + size_t n,size; +{ + return ruby_xcalloc(n, size); +} + +void* +xrealloc(ptr,size) + void *ptr; + size_t size; +{ + return ruby_xrealloc(ptr, size); +} + +void +xfree(ptr) + void *ptr; +{ + return ruby_xfree(ptr); +} + diff --git a/io.c b/io.c index af011b3a02..cf244d1eb0 100644 --- a/io.c +++ b/io.c @@ -63,7 +63,7 @@ char *strdup(); extern void Init_File _((void)); #ifdef __BEOS__ -# ifdef NOFILE +# ifndef NOFILE # define NOFILE (OPEN_MAX) # endif #include diff --git a/regex.c b/regex.c index 91fc1d98c1..2f9739ac11 100644 --- a/regex.c +++ b/regex.c @@ -70,13 +70,16 @@ void rb_trap_exec _((void)); # define CHECK_INTS if (!rb_prohibit_interrupt) {\ if (rb_trap_pending) rb_trap_exec();\ } -#endif -#ifndef xmalloc +#define xmalloc ruby_xmalloc +#define xcalloc ruby_xcalloc +#define xrealloc ruby_xrealloc +#define xfree ruby_xfree + void *xmalloc _((size_t)); void *xcalloc _((size_t,size_t)); void *xrealloc _((void*,size_t)); -void free _((void*)); +void xfree _((void*)); #endif #define NO_ALLOCA /* try it out for now */ @@ -125,8 +128,8 @@ char *alloca(); #define FREE_VARIABLES() -#define FREE_AND_RETURN_VOID(stackb) do { free(stackb); return; } while(0) -#define FREE_AND_RETURN(stackb,val) do { free(stackb); return(val); } while(0) +#define FREE_AND_RETURN_VOID(stackb) do { xfree(stackb); return; } while(0) +#define FREE_AND_RETURN(stackb,val) do { xfree(stackb); return(val); } while(0) #define DOUBLE_STACK(stackx,stackb,len,type) do { \ stackx = (type*)xrealloc(stackb, 2 * len * sizeof(type)); \ } while (0) @@ -2410,18 +2413,18 @@ void re_free_pattern(bufp) struct re_pattern_buffer *bufp; { - free(bufp->buffer); - free(bufp->fastmap); - if (bufp->must_skip) free(bufp->must_skip); - - free(bufp->regstart); - free(bufp->regend); - free(bufp->old_regstart); - free(bufp->old_regend); - free(bufp->best_regstart); - free(bufp->best_regend); - free(bufp->reg_info); - free(bufp); + xfree(bufp->buffer); + xfree(bufp->fastmap); + if (bufp->must_skip) xfree(bufp->must_skip); + + xfree(bufp->regstart); + xfree(bufp->regend); + xfree(bufp->old_regstart); + xfree(bufp->old_regend); + xfree(bufp->best_regstart); + xfree(bufp->best_regend); + xfree(bufp->reg_info); + xfree(bufp); } /* Store a jump of the form . @@ -4347,8 +4350,8 @@ re_free_registers(regs) struct re_registers *regs; { if (regs->allocated == 0) return; - if (regs->beg) free(regs->beg); - if (regs->end) free(regs->end); + if (regs->beg) xfree(regs->beg); + if (regs->end) xfree(regs->end); } /* Functions for multi-byte support. diff --git a/ruby.h b/ruby.h index 149ca98557..40c88fee93 100644 --- a/ruby.h +++ b/ruby.h @@ -369,9 +369,16 @@ struct RBignum { #define OBJ_FROZEN(x) FL_TEST((x), FL_FREEZE) #define OBJ_FREEZE(x) FL_SET((x), FL_FREEZE) +#define xmalloc ruby_xmalloc +#define xcalloc ruby_xcalloc +#define xrealloc ruby_xrealloc +#define xfree ruby_xfree + void *xmalloc _((size_t)); void *xcalloc _((size_t,size_t)); void *xrealloc _((void*,size_t)); +void xfree _((void*)); + #define ALLOC_N(type,n) (type*)xmalloc(sizeof(type)*(n)) #define ALLOC(type) (type*)xmalloc(sizeof(type)) #define REALLOC_N(var,type,n) (var)=(type*)xrealloc((char*)(var),sizeof(type)*(n)) diff --git a/sample/test.rb b/sample/test.rb index bc97882e6c..7fe028055a 100644 --- a/sample/test.rb +++ b/sample/test.rb @@ -969,7 +969,7 @@ File.unlink "script_tmp" or `/bin/rm -f "script_tmp"` File.unlink "script_tmp.bak" or `/bin/rm -f "script_tmp.bak"` $bad = false -for script in Dir["{lib,sample}/*.rb"] +for script in Dir["{lib,sample}/**/*.rb"] unless `./miniruby -c #{script}`.chomp == "Syntax OK" p `./miniruby -c #{script}`.chomp $bad = true diff --git a/st.c b/st.c index 2ce868d64c..e7bd0ecf52 100644 --- a/st.c +++ b/st.c @@ -45,11 +45,18 @@ static struct st_hash_type type_strhash = { strhash, }; -#ifndef xmalloc +#ifdef RUBY_PLATFORM +#define xmalloc ruby_xmalloc +#define xcalloc ruby_xcalloc +#define xrealloc ruby_xrealloc +#define xfree ruby_xfree + void *xmalloc(); void *xcalloc(); void *xrealloc(); +void xfree(); #endif + static void rehash(); #define alloc(type) (type*)xmalloc((unsigned)sizeof(type)) -- cgit v1.2.3