#! /bin/sh

# Guess values for system-dependent variables and create Makefiles.
# Generated automatically using autoconf version 2.12 
# 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_default_prefix=`pwd`
ac_help="$ac_help
Use gcc to build BSPlib"
ac_help="$ac_help
Use g77 or f2c in bspfront"
ac_help="$ac_help
Use g++ in bspfront"
ac_help="$ac_help
Use BSD gettimeofday for timers"

# 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=
# 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.12"
    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=src/library_core/bsp_lib.lh

# 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


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 $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
cross_compiling=$ac_cv_prog_cc_cross

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



PACKAGE=bsplib
VERSION=1.4


cat >> confdefs.h <<EOF
#define PACKAGE "$PACKAGE"
EOF

cat >> confdefs.h <<EOF
#define VERSION "$VERSION"
EOF




# Check whether --enable-gcc or --disable-gcc was given.
if test "${enable_gcc+set}" = set; then
  enableval="$enable_gcc"
  :
fi

# Check whether --enable-g77 or --disable-g77 was given.
if test "${enable_g77+set}" = set; then
  enableval="$enable_g77"
  :
fi

# Check whether --enable-gplusplus or --disable-gplusplus was given.
if test "${enable_gplusplus+set}" = set; then
  enableval="$enable_gplusplus"
  :
fi

# Check whether --enable-bsdtimer or --disable-bsdtimer was given.
if test "${enable_bsdtimer+set}" = set; then
  enableval="$enable_bsdtimer"
  :
fi


echo "##########################################################"
echo "## Configuring BSPlib                                   ##"
echo "##########################################################"

# Extract the first word of "perl", so it can be a program name with args.
set dummy perl; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:572: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_PERL'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  case "$PERL" in
  /*)
  ac_cv_path_PERL="$PERL" # Let the user override the test with a path.
  ;;
  *)
  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS="${IFS}:"
  for ac_dir in $PATH; do
    test -z "$ac_dir" && ac_dir=.
    if test -f $ac_dir/$ac_word; then
      ac_cv_path_PERL="$ac_dir/$ac_word"
      break
    fi
  done
  IFS="$ac_save_ifs"
  ;;
esac
fi
PERL="$ac_cv_path_PERL"
if test -n "$PERL"; then
  echo "$ac_t""$PERL" 1>&6
else
  echo "$ac_t""no" 1>&6
fi

if test -z "${PERL}"; then
  { echo "configure: error: BSPlib requires perl: make sure sure it is on your path." 1>&2; exit 1; }
fi
(cd bin; make bindir=`pwd` PERL=$PERL configarch)



  echo ""
  echo ""
  echo "BSPlib is available for the following architectures:"
  echo ""
  ./bin/bsparch -allarch
  echo ""
  yesno=dontcare
  while (test $yesno != yes && test $yesno != y) do
    yesno=dontcare
    echo $ac_n "Which architecture do you want built (<return> for " $ac_c
    ./bin/bsparch -nodefault
    echo $ac_n ")? " $ac_c
    read configarch
    if test -z "$configarch"; then
      configarch=`./bin/bsparch -nodefault`
    fi

    while (test -z "$yesno"   || 
             (test $yesno != yes && test $yesno != y &&
              test $yesno != no  && test $yesno != n)) do

      echo $ac_n "Please confirm the architecture \"" $ac_c
      ./bin/bsparch -convertname $configarch
      echo $ac_n "\" (y/n)? " $ac_c
      read yesno
    done
  done
  BSPARCH_DEFAULT_ARCH=$configarch
  


  echo ""
  echo ""
  echo "BSPlib uses the following devices for inter-process communication:"
  echo ""
  ./bin/bsparch -alldevice
  echo ""
  yesno=dontcare
  while (test $yesno != yes && test $yesno != y) do
    yesno=dontcare
    echo $ac_n "Which device do you want built (<return> for " $ac_c
    ./bin/bsparch -defdevice $configarch
    echo $ac_n ")? " $ac_c
    read configdevice
    if test -z "$configdevice"; then
      configdevice=`./bin/bsparch -defdevice $configarch`
    fi

    while (test -z "$yesno"   || 
             (test $yesno != yes && test $yesno != y &&
              test $yesno != no  && test $yesno != n)) do

      echo $ac_n "Please confirm the device \"" $ac_c
      ./bin/bsparch -convertdevice $configdevice
      echo $ac_n "\" (y/n)? " $ac_c
      read yesno
    done
  done
  BSPARCH_DEFAULT_DEVICE=$configdevice
  


  echo ""
  echo ""
  if test -n "$BSP_ONLINE_PROCS" && test $BSP_ONLINE_PROCS -ge 1; then
    configprocs=$BSP_ONLINE_PROCS
  else
    configprocs=0
  fi
  
  echo "**Note: please do not over estimate the number of processors **"
  echo "**      you will require. Smaller configurations require less**"
  echo "**      memory (and a 1024 processor configuration may eat   **"
  echo "**      tens of megabytes of memory that you will never be   **"
  echo "**      able to use).                                        **"
  echo ""
  while (test -z "$configprocs" || test $configprocs -le 0 || test $configprocs -ge 1024) do
    if test $configdevice = "MPASS_UDPIP"  ||
       test $configdevice = "MPASS_3C905B" ||
       test $configdevice = "MPASS_TCPIP"  ||
       test $configdevice = "MPASS_MPI"; then
      echo $ac_n  "What is the number of processors in " $ac_c
       echo $ac_n  "your NOW cluster (1--128)? " $ac_c
    else
    if  test $configdevice = "SHMEM_SYSV" ||
        test $configdevice = "SHMEM_SGI"  ||
        test $configdevice = "SHMEM_WIN32"; then
      echo "**Note: if you are building a uni-processor development version"
      echo "**      of BSPlib, the following answer should be 1."
      echo ""
      echo $ac_n "How many processors has your " $ac_c
      echo $ac_n "shared memory multiprocessor (1--128)? " $ac_c
    else
      echo $ac_n "How many processors are there in the " $ac_c
      ./bin/bsparch -convertname $configarch
      echo $ac_n "? " $ac_c
    fi
    fi
    read configprocs    
  done  
  BSP_ONLINE_PROCS=$configprocs
  cat >> confdefs.h <<EOF
#define BSP_ONLINE_PROCS $BSP_ONLINE_PROCS
EOF

  



  if test $configdevice = "MPASS_MPI"; then  
    if test -z "$MPI_INCLUDE_DIR"; then
      echo ""; echo ""
      echo $ac_n "Which directory are the MPI header files in? "
      read MPI_INCLUDE_DIR
    fi

    if test -z "$MPI_LIB_DIR"; then
      echo ""; echo ""
      echo $ac_n "Which directory is the MPI library (libmpi.a) in? "
      read MPI_LIB_DIR
    fi 
    mpiincludedir=$MPI_INCLUDE_DIR
    mpilibdir=$MPI_LIB_DIR
    
    
  fi


  BSP_DEFAULT_SLOTSIZE=1400
  BSP_DEFAULT_NOSLOTS=$BSP_ONLINE_PROCS
  BSP_DEFAULT_ROUNDTRIP=1000
  BSP_DEFAULT_SENDLATENCY=500

  if test $configdevice = "MPASS_TCPIP"  || 
     test $configdevice = "MPASS_3C905B" ||
     test $configdevice = "MPASS_UDPIP"; then
    echo "";echo "";
    echo "Which of the following networks are you using:"
    echo "    1) 10Mbit  Ethernet"
    echo "    2) 100Mbit Ethernet"
    echo "    3) 1Gbit   Ethernet"
    echo "    4) Token ring"
    echo "    5) FDDI"
    echo "    6) Other (e.g., proprietary switches or SAN)"
    enetchoice=0
    while (test -z "$enetchoice" || 
           (test $enetchoice -lt 1 || test $enetchoice -gt 6)) do
      echo $ac_n "    (answer 1--6)? " $ac_c
      read enetchoice
    done
    
    if test $enetchoice = 6; then
      enetbandwidth=0;
      while (test $enetbandwidth -le 0) do
        echo "";echo "";
        echo $ac_n "What is the link bandwidth of the network (in Mbits/s)? " $ac_c
        read enetbandwidth
      done
      BSP_DEFAULT_SLOTSIZE=`echo "((1200*10)/$enetbandwidth)" | bc`
    fi

    if test $enetchoice = 2; then
      BSP_DEFAULT_SLOTSIZE=140
    fi

    if test $enetchoice = 3; then
      BSP_DEFAULT_SLOTSIZE=50
    fi

    if test $enetchoice = 4; then
      BSP_DEFAULT_SLOTSIZE=3048
    fi

    if test $enetchoice = 5; then
      BSP_DEFAULT_SLOTSIZE=122
    fi    

    if test $enetchoice -ge 1 && test $enetchoice -le 3 ||
       test $enetchoice = 6; then
      echo "";echo "";
      echo "Are your machines connected by a network that is a:"
      echo "    1) switch with full-duplex links"
      echo "    2) switch with half-duplex links"
      echo "    3) a hub or bus"
      switchchoice=0
      while (test -z "$switchchoice" || 
             (test $switchchoice -lt 1 || test $switchchoice -gt 3)) do
        echo $ac_n "    (answer 1--3)? " $ac_c
        read switchchoice
      done

      if test $switchchoice = 1; then
        BSP_DEFAULT_NOSLOTS=1
      fi
      if test $switchchoice = 2; then
        BSP_DEFAULT_NOSLOTS=2
      fi
    fi 
    
    echo "";echo "";
    echo "What is the round trip delay time (in usecs) between any two machines"
    echo "in your network---an approximate value can sometimes be found by"
    echo "using the ping command. "

    enetroundtrip=0;
    while (test -z "$enetroundtrip" ||
           (test $enetroundtrip -le 0 || test $enetroundtrip -gt 100000)) do
      echo $ac_n "    (answer 1--100000)? " $ac_c
      read enetroundtrip
    done
    BSP_DEFAULT_ROUNDTRIP=$enetroundtrip;
    
    echo "";echo "";
    echo "What is the minimum gap between consecutive sends (in usecs) "
    echo "between any two machines in your network---an approximate value "
    echo "is half the round trip delay time. Please do not under-estimate "
    echo "this paramater as it may lead to poor performance."

    enetsendlatency=0;
    while (test -z "$enetsendlatency" ||
           (test $enetsendlatency -le 0 || 
            test $enetsendlatency -gt 100000)) do
      echo $ac_n "    (answer 1--100000)? " $ac_c
      read enetsendlatency
    done
    BSP_DEFAULT_SENDLATENCY=$enetsendlatency

    echo ""; echo "";
    echo "##########################################################"
    echo "From the network information entered, the following"
    echo "BSPlib defaults will be passed to bspfront:"
    echo ""
    echo $ac_n "    1) bspfront -slotsize " $ac_c
    echo $BSP_DEFAULT_SLOTSIZE
    echo $ac_n "    2) bspfront -bspnoslots " $ac_c
    echo $BSP_DEFAULT_NOSLOTS
    echo $ac_n "    3) bspfront -bsproundtrip " $ac_c
    echo $BSP_DEFAULT_ROUNDTRIP;
    echo $ac_n "    4) bspfront -bspsendlatency " $ac_c
    echo $BSP_DEFAULT_SENDLATENCY
    echo ""
    echo "These setting can be overrode whenever you link a bsp "
    echo "program by changing the value of one of the bspfront  "
    echo "options -slotsize, -bspnoslots, or -bsproundtrip."
    echo "";
  fi
  
  
  
  


 echo       ""
 echo       "##########################################################"
 echo       "## Configuring BSPlib for a $configprocs processor" 
 echo $ac_n "## " $ac_c
 ./bin/bsparch -convertname $configarch
 echo ", that uses "
 echo $ac_n "## " $ac_c
 ./bin/bsparch -convertdevice $configdevice
 echo ""
 echo       "## for inter-process communication. "
 echo       "##########################################################"
 echo       ""


if test -z "$enable_bsdtimer" || test $enable_bsdtimer = no; then
  echo "Installation will use tailored high-precision timing routines"  
else
  echo "Installation will use BSD timing routines"
  cat >> confdefs.h <<\EOF
#define USE_BSD_TIMER 1
EOF

fi

if test -z "$enable_gcc" || test $enable_gcc = yes; then
  # 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:887: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_GCC'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  if test -n "$GCC"; then
  ac_cv_prog_GCC="$GCC" # Let the user override the test.
else
  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS="${IFS}:"
  for ac_dir in $PATH; do
    test -z "$ac_dir" && ac_dir=.
    if test -f $ac_dir/$ac_word; then
      ac_cv_prog_GCC="gcc"
      break
    fi
  done
  IFS="$ac_save_ifs"
fi
fi
GCC="$ac_cv_prog_GCC"
if test -n "$GCC"; then
  echo "$ac_t""$GCC" 1>&6
else
  echo "$ac_t""no" 1>&6
fi


if test -n "$GCC"; then
  CC=$GCC
fi

fi

if test -z "$enable_g77" || test $enable_g77 = yes; then
  # Extract the first word of "f2c", so it can be a program name with args.
set dummy f2c; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:923: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_G77'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  if test -n "$G77"; then
  ac_cv_prog_G77="$G77" # Let the user override the test.
else
  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS="${IFS}:"
  for ac_dir in $PATH; do
    test -z "$ac_dir" && ac_dir=.
    if test -f $ac_dir/$ac_word; then
      ac_cv_prog_G77="f2c"
      break
    fi
  done
  IFS="$ac_save_ifs"
fi
fi
G77="$ac_cv_prog_G77"
if test -n "$G77"; then
  echo "$ac_t""$G77" 1>&6
else
  echo "$ac_t""no" 1>&6
fi

 if test -z "$G77"; then
   # Extract the first word of "g77", so it can be a program name with args.
set dummy g77; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:952: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_G77'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  if test -n "$G77"; then
  ac_cv_prog_G77="$G77" # Let the user override the test.
else
  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS="${IFS}:"
  for ac_dir in $PATH; do
    test -z "$ac_dir" && ac_dir=.
    if test -f $ac_dir/$ac_word; then
      ac_cv_prog_G77="g77"
      break
    fi
  done
  IFS="$ac_save_ifs"
fi
fi
G77="$ac_cv_prog_G77"
if test -n "$G77"; then
  echo "$ac_t""$G77" 1>&6
else
  echo "$ac_t""no" 1>&6
fi

     if test -n "$G77"; then
       cat >> confdefs.h <<\EOF
#define DOUBLEUNDERSCORE 1
EOF

     fi
 fi
 

fi

if test -z "$enable_gplusplus" || test $enable_gplusplus = yes; then
  # Extract the first word of "g++", so it can be a program name with args.
set dummy g++; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:992: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_GPLUSPLUS'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  if test -n "$GPLUSPLUS"; then
  ac_cv_prog_GPLUSPLUS="$GPLUSPLUS" # Let the user override the test.
else
  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS="${IFS}:"
  for ac_dir in $PATH; do
    test -z "$ac_dir" && ac_dir=.
    if test -f $ac_dir/$ac_word; then
      ac_cv_prog_GPLUSPLUS="g++"
      break
    fi
  done
  IFS="$ac_save_ifs"
fi
fi
GPLUSPLUS="$ac_cv_prog_GPLUSPLUS"
if test -n "$GPLUSPLUS"; then
  echo "$ac_t""$GPLUSPLUS" 1>&6
else
  echo "$ac_t""no" 1>&6
fi

 

fi

echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
echo "configure:1022: 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

# Extract the first word of "ar", so it can be a program name with args.
set dummy ar; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:1051: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_AR'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  case "$AR" in
  /*)
  ac_cv_path_AR="$AR" # Let the user override the test with a path.
  ;;
  *)
  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS="${IFS}:"
  for ac_dir in $PATH; do
    test -z "$ac_dir" && ac_dir=.
    if test -f $ac_dir/$ac_word; then
      ac_cv_path_AR="$ac_dir/$ac_word"
      break
    fi
  done
  IFS="$ac_save_ifs"
  test -z "$ac_cv_path_AR" && ac_cv_path_AR="ar"
  ;;
esac
fi
AR="$ac_cv_path_AR"
if test -n "$AR"; then
  echo "$ac_t""$AR" 1>&6
else
  echo "$ac_t""no" 1>&6
fi

# 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:1083: 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="${IFS}:"
  for ac_dir in $PATH; 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

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:1114: 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="${IFS}:"
  for ac_dir in $PATH; 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 "flex", so it can be a program name with args.
set dummy flex; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:1146: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_LEX'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  if test -n "$LEX"; then
  ac_cv_prog_LEX="$LEX" # Let the user override the test.
else
  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS="${IFS}:"
  for ac_dir in $PATH; do
    test -z "$ac_dir" && ac_dir=.
    if test -f $ac_dir/$ac_word; then
      ac_cv_prog_LEX="flex"
      break
    fi
  done
  IFS="$ac_save_ifs"
  test -z "$ac_cv_prog_LEX" && ac_cv_prog_LEX="lex"
fi
fi
LEX="$ac_cv_prog_LEX"
if test -n "$LEX"; then
  echo "$ac_t""$LEX" 1>&6
else
  echo "$ac_t""no" 1>&6
fi

if test -z "$LEXLIB"
then
  case "$LEX" in
  flex*) ac_lib=fl ;;
  *) ac_lib=l ;;
  esac
  echo $ac_n "checking for yywrap in -l$ac_lib""... $ac_c" 1>&6
echo "configure:1179: checking for yywrap in -l$ac_lib" >&5
ac_lib_var=`echo $ac_lib'_'yywrap | 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="-l$ac_lib  $LIBS"
cat > conftest.$ac_ext <<EOF
#line 1187 "configure"
#include "confdefs.h"
/* 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 yywrap();

int main() {
yywrap()
; return 0; }
EOF
if { (eval echo configure:1198: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; 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
  LEXLIB="-l$ac_lib"
else
  echo "$ac_t""no" 1>&6
fi

fi

INSTALL='./install-sh -c'

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.

# Find a good install program.  We prefer a C program (faster),
# so one script is as good as another.  But avoid the broken or
# incompatible versions:
# SysV /etc/install, /usr/sbin/install
# SunOS /usr/etc/install
# IRIX /sbin/install
# AIX /bin/install
# AFS /usr/afsws/bin/install, which mishandles nonexistent args
# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
# ./install, which can be erroneously created by make from ./install.sh.
echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
echo "configure:1252: checking for a BSD compatible install" >&5
if test -z "$INSTALL"; then
if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
    IFS="${IFS= 	}"; ac_save_IFS="$IFS"; IFS="${IFS}:"
  for ac_dir in $PATH; do
    # Account for people who put trailing slashes in PATH elements.
    case "$ac_dir/" in
    /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
    *)
      # OSF1 and SCO ODT 3.0 have their own names for install.
      for ac_prog in ginstall installbsd scoinst install; do
        if test -f $ac_dir/$ac_prog; then
	  if test $ac_prog = install &&
            grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
	    # AIX install.  It has an incompatible calling convention.
	    # OSF/1 installbsd also uses dspmsg, but is usable.
	    :
	  else
	    ac_cv_path_install="$ac_dir/$ac_prog -c"
	    break 2
	  fi
	fi
      done
      ;;
    esac
  done
  IFS="$ac_save_IFS"

fi
  if test "${ac_cv_path_install+set}" = set; then
    INSTALL="$ac_cv_path_install"
  else
    # As a last resort, use the slow shell script.  We don't cache a
    # path for INSTALL within a source directory, because that will
    # break other packages using the cache if that directory is
    # removed, or if the path is relative.
    INSTALL="$ac_install_sh"
  fi
fi
echo "$ac_t""$INSTALL" 1>&6

# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
# It thinks the first close brace ends the variable substitution.
test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'

test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'


# Extract the first word of "daVinci", so it can be a program name with args.
set dummy daVinci; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:1305: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_DAVINCI'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  case "$DAVINCI" in
  /*)
  ac_cv_path_DAVINCI="$DAVINCI" # Let the user override the test with a path.
  ;;
  *)
  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS="${IFS}:"
  for ac_dir in $PATH; do
    test -z "$ac_dir" && ac_dir=.
    if test -f $ac_dir/$ac_word; then
      ac_cv_path_DAVINCI="$ac_dir/$ac_word"
      break
    fi
  done
  IFS="$ac_save_ifs"
  ;;
esac
fi
DAVINCI="$ac_cv_path_DAVINCI"
if test -n "$DAVINCI"; then
  echo "$ac_t""$DAVINCI" 1>&6
else
  echo "$ac_t""no" 1>&6
fi

if test -z "${DAVINCI}"; then
  echo "configure: warning: 
**********************************************************************
*** BSPlib requires davinci to visualise call-graph profiling      ***
*** http://www.informatik.uni-bremen.de/~inform/forschung/daVinci/ ***
**********************************************************************
" 1>&2
fi


# Extract the first word of "nroff", so it can be a program name with args.
set dummy nroff; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:1346: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_NROFF'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  case "$NROFF" in
  /*)
  ac_cv_path_NROFF="$NROFF" # Let the user override the test with a path.
  ;;
  *)
  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS="${IFS}:"
  for ac_dir in $PATH; do
    test -z "$ac_dir" && ac_dir=.
    if test -f $ac_dir/$ac_word; then
      ac_cv_path_NROFF="$ac_dir/$ac_word"
      break
    fi
  done
  IFS="$ac_save_ifs"
  ;;
esac
fi
NROFF="$ac_cv_path_NROFF"
if test -n "$NROFF"; then
  echo "$ac_t""$NROFF" 1>&6
else
  echo "$ac_t""no" 1>&6
fi

# Extract the first word of "catman", so it can be a program name with args.
set dummy catman; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:1377: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_CATMAN'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  case "$CATMAN" in
  /*)
  ac_cv_path_CATMAN="$CATMAN" # Let the user override the test with a path.
  ;;
  *)
  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS="${IFS}:"
  for ac_dir in $PATH; do
    test -z "$ac_dir" && ac_dir=.
    if test -f $ac_dir/$ac_word; then
      ac_cv_path_CATMAN="$ac_dir/$ac_word"
      break
    fi
  done
  IFS="$ac_save_ifs"
  ;;
esac
fi
CATMAN="$ac_cv_path_CATMAN"
if test -n "$CATMAN"; then
  echo "$ac_t""$CATMAN" 1>&6
else
  echo "$ac_t""no" 1>&6
fi


echo $ac_n "checking for main in -lsocket""... $ac_c" 1>&6
echo "configure:1407: checking for main in -lsocket" >&5
ac_lib_var=`echo socket'_'main | 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="-lsocket  $LIBS"
cat > conftest.$ac_ext <<EOF
#line 1415 "configure"
#include "confdefs.h"

int main() {
main()
; return 0; }
EOF
if { (eval echo configure:1422: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; 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
  SOCKET_LIBRARY='-lsocket'
else
  echo "$ac_t""no" 1>&6
SOCKET_LIBRARY=''
fi

 

echo $ac_n "checking for main in -lnsl""... $ac_c" 1>&6
echo "configure:1446: checking for main in -lnsl" >&5
ac_lib_var=`echo nsl'_'main | 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="-lnsl  $LIBS"
cat > conftest.$ac_ext <<EOF
#line 1454 "configure"
#include "confdefs.h"

int main() {
main()
; return 0; }
EOF
if { (eval echo configure:1461: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; 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
  NSL_LIBRARY='-lnsl'
else
  echo "$ac_t""no" 1>&6
NSL_LIBRARY=''
fi



echo $ac_n "checking for main in -lbsd""... $ac_c" 1>&6
echo "configure:1485: checking for main in -lbsd" >&5
ac_lib_var=`echo bsd'_'main | 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="-lbsd  $LIBS"
cat > conftest.$ac_ext <<EOF
#line 1493 "configure"
#include "confdefs.h"

int main() {
main()
; return 0; }
EOF
if { (eval echo configure:1500: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; 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
  BSD_LIBRARY='-lbsd'
else
  echo "$ac_t""no" 1>&6
BSD_LIBRARY=''
fi



echo $ac_n "checking for main in -lF77""... $ac_c" 1>&6
echo "configure:1524: checking for main in -lF77" >&5
ac_lib_var=`echo F77'_'main | 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="-lF77  $LIBS"
cat > conftest.$ac_ext <<EOF
#line 1532 "configure"
#include "confdefs.h"

int main() {
main()
; return 0; }
EOF
if { (eval echo configure:1539: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; 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
  F77_LIBRARY='-lF77'
else
  echo "$ac_t""no" 1>&6
F77_LIBRARY=''
fi



echo $ac_n "checking for main in -lI77""... $ac_c" 1>&6
echo "configure:1563: checking for main in -lI77" >&5
ac_lib_var=`echo I77'_'main | 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="-lI77  $LIBS"
cat > conftest.$ac_ext <<EOF
#line 1571 "configure"
#include "confdefs.h"

int main() {
main()
; return 0; }
EOF
if { (eval echo configure:1578: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; 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
  I77_LIBRARY='-lI77'
else
  echo "$ac_t""no" 1>&6
I77_LIBRARY=''
fi



echo $ac_n "checking for main in -lf2c""... $ac_c" 1>&6
echo "configure:1602: checking for main in -lf2c" >&5
ac_lib_var=`echo f2c'_'main | 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="-lf2c  $LIBS"
cat > conftest.$ac_ext <<EOF
#line 1610 "configure"
#include "confdefs.h"

int main() {
main()
; return 0; }
EOF
if { (eval echo configure:1617: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; 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
  F2C_LIBRARY='-lF2C'
else
  echo "$ac_t""no" 1>&6
F2C_LIBRARY=''
fi



echo $ac_n "checking if perl works""... $ac_c" 1>&6
echo "configure:1641: checking if perl works" >&5
if eval "test \"`echo '$''{'ac_cv_perl_ok'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftestperl <<EOF
#! $PERL
%test_env = ("foo","yes","bar","no");
  print \$test_env{"foo"};
EOF
chmod a+rx conftestperl
ac_cv_perl_ok=`./conftestperl`
rm -f conftestperl

fi

echo "$ac_t""$ac_cv_perl_ok" 1>&6
if test $ac_cv_perl_ok = yes; then
  ac_cv_perl_ok=1
else
  { echo "configure: error: Perl doesn't seem to work. On some systems (e.g., T3E) 
there is a limit on the size of filename that can be used in the #! 
command at the start of a shell script. May be the length of the path 
for the perl command is too long? Try moving perl somewhere higher up 
your directory structure." 1>&2; exit 1; }
  ac_cv_perl_ok=0
fi

echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
echo "configure:1669: 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 <<EOF
#line 1684 "configure"
#include "confdefs.h"
#include <assert.h>
Syntax Error
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:1690: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out`
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 <<EOF
#line 1701 "configure"
#include "confdefs.h"
#include <assert.h>
Syntax Error
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:1707: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out`
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*
  ac_cv_prog_CPP="$CPP"
fi
  CPP="$ac_cv_prog_CPP"
else
  ac_cv_prog_CPP="$CPP"
fi
echo "$ac_t""$CPP" 1>&6

echo $ac_n "checking if cpp supports stringification""... $ac_c" 1>&6
echo "configure:1730: checking if cpp supports stringification" >&5
if eval "test \"`echo '$''{'ac_cv_cppstrings'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
#line 1735 "configure"
#include "confdefs.h"
#define xstr(x) #x
      xstr(BSPlib)
     
EOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  egrep ""BSPlib"" >/dev/null 2>&1; then
  rm -rf conftest*
  ac_cv_cppstrings=yes
else
  rm -rf conftest*
  ac_cv_cppstrings=no
fi
rm -f conftest*


fi

echo "$ac_t""$ac_cv_cppstrings" 1>&6
if test $ac_cv_cppstrings = yes; then
  cat >> confdefs.h <<\EOF
#define CPP_STRINGIFICATION 1
EOF

fi

echo $ac_n "checking if semun is defined in <sys/sem.h>""... $ac_c" 1>&6
echo "configure:1763: checking if semun is defined in <sys/sem.h>" >&5
if eval "test \"`echo '$''{'ac_cv_is_semun'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
#line 1768 "configure"
#include "confdefs.h"
#include <sys/sem.h>
EOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  egrep "union *semun" >/dev/null 2>&1; then
  rm -rf conftest*
  ac_cv_is_semun=yes
else
  rm -rf conftest*
  ac_cv_is_semun=no
fi
rm -f conftest*

fi

echo "$ac_t""$ac_cv_is_semun" 1>&6
if test $ac_cv_is_semun = no; then
  cat >> confdefs.h <<\EOF
#define SHMEM_SYSV_NO_SEMAPHORE_UNION 1
EOF

fi

echo $ac_n "checking if times is defined in <sys/times.h>""... $ac_c" 1>&6
echo "configure:1793: checking if times is defined in <sys/times.h>" >&5
if eval "test \"`echo '$''{'ac_cv_is_times'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
#line 1798 "configure"
#include "confdefs.h"
#include <sys/times.h>
EOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  egrep "clock_t times" >/dev/null 2>&1; then
  rm -rf conftest*
  ac_cv_is_times=yes
else
  rm -rf conftest*
  ac_cv_is_times=no
fi
rm -f conftest*

fi

echo "$ac_t""$ac_cv_is_times" 1>&6
if test $ac_cv_is_times = yes; then
  cat >> confdefs.h <<\EOF
#define LIBC_HAS_CPU_TIMER 1
EOF

fi

echo $ac_n "checking if perl supports dbm files""... $ac_c" 1>&6
echo "configure:1823: checking if perl supports dbm files" >&5
if eval "test \"`echo '$''{'ac_cv_perl_dbmok'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftestperl <<EOF
#! $PERL
  if (dbmopen(logfile,"conftestperl",0777)) {
    print "yes";
    dbmclose(logfile);
  }
EOF
chmod a+rx conftestperl
if { ac_try='./conftestperl'; { (eval echo configure:1835: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
  ac_cv_perl_dbmok=yes
else
  ac_cv_perl_dbmok=no
fi
rm -f conftestperl*

fi

echo "$ac_t""$ac_cv_perl_dbmok" 1>&6
if test $ac_cv_perl_dbmok = yes; then
  PERL_DBMOK=1
else
  PERL_DBMOK=0
fi


if test $configdevice = "MPASS_TCPIP"; then
  if test $BSPARCH_DEFAULT_ARCH != "LINUX"; then
    echo $ac_n "checking if receive low water marks on sockets are supported by TCP/IP""... $ac_c" 1>&6
echo "configure:1855: checking if receive low water marks on sockets are supported by TCP/IP" >&5
if eval "test \"`echo '$''{'ac_cv_is_recvlowat'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
#line 1860 "configure"
#include "confdefs.h"
#include <sys/socket.h>
      #ifdef SO_RCVLOWAT
       yes_found_so_rcvlowat_for_bsplib
      #endif
     
EOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  egrep "yes_found_so_rcvlowat_for_bsplib" >/dev/null 2>&1; then
  rm -rf conftest*
  ac_cv_is_recvlowat=yes
else
  rm -rf conftest*
  ac_cv_is_recvlowat=no
fi
rm -f conftest*


fi

echo "$ac_t""$ac_cv_is_recvlowat" 1>&6
if test $ac_cv_is_recvlowat = no; then
  echo "configure: warning: 
**********************************************************************
***    TCP/IP implementation may run slowly without SO_RCVLOWAT    ***
**********************************************************************
" 1>&2
fi

    echo $ac_n "checking if send low water marks on sockets are supported by TCP/IP""... $ac_c" 1>&6
echo "configure:1891: checking if send low water marks on sockets are supported by TCP/IP" >&5
if eval "test \"`echo '$''{'ac_cv_is_sndlowat'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
      
    LIBS="$SOCKET_LIBRARY $NSL_LIBRARY"
    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 <<EOF
#line 1901 "configure"
#include "confdefs.h"

#include <sys/types.h>
#include <sys/socket.h>
#include <stdio.h>

void main() {
  int new_sock, status;
  int optval, optlen;

  status=1;
  optval = 1542;

  new_sock = socket(AF_INET,SOCK_STREAM,0);
  if (new_sock>=0) {
    if (!setsockopt(new_sock,SOL_SOCKET,SO_SNDLOWAT,
                    (char *)&optval,sizeof(int))) {
       optlen=sizeof(optval);
       if (!getsockopt(new_sock,SOL_SOCKET,SO_SNDLOWAT,
                       (char *)&optval,&optlen)) {
         status = !(optlen && (optval == 1542));
       }
    }
  }
  exit(status);
}


EOF
if { (eval echo configure:1931: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
then
  ac_cv_is_sndlowat=yes
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -fr conftest*
  ac_cv_is_sndlowat=no
fi
rm -fr conftest*
fi


fi

echo "$ac_t""$ac_cv_is_sndlowat" 1>&6
if test $ac_cv_is_sndlowat = no; then
  echo "configure: warning: 
**********************************************************************
***    The TCP/IP socket low water marks are not working on this   ***
***    platform. As BSPlib requires the SO_SNDLOWAT option to      ***
***    setsockopt to work correctly, the TCP/IP version may not    ***
***    work correctly on this platform (on some platforms this     *** 
***    causes deadlock at very high loads and on others the        ***
***    TCP/IP library may not work at all --- the behaviour        ***
***    depends on the particular implementation of the protocol    ***
***    stack and/or the sockets interface). On these platforms,    ***
***    we suggest using the UDP/IP version of BSPlib.              ***
**********************************************************************
" 1>&2
fi

  fi
fi

  echo $ac_n "checking select sleeping resolution""... $ac_c" 1>&6
echo "configure:1967: checking select sleeping resolution" >&5
  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 <<EOF
#line 1972 "configure"
#include "confdefs.h"

#include <stdio.h>
#include <sys/time.h>
#include <unistd.h>

#define VERBOSE                 0
#define OVERSAMPLE            100
#define DEFAULT_RESOLUTION  25000 /* 25 Milliseconds */

void main() {
  int i, j,delta,sleep_resolution,deta,found,outbound;
  struct timeval select_tv, start_tv, end_tv;
  FILE *fptr;

  fptr=fopen("selecttest.out","w");
  if (fptr==NULL) exit(1);

  sleep_resolution = DEFAULT_RESOLUTION;
  for(i=100;i<DEFAULT_RESOLUTION;i+=500) {
    found =1;
    for(j=0;j<OVERSAMPLE;j++) {
       gettimeofday(&start_tv,NULL);
#ifdef LIBC_HAS_USLEEP
       usleep(i);
#else
       select_tv.tv_usec = i;
       select_tv.tv_sec  = 0;
       select(0,NULL,NULL,NULL,&select_tv);
#endif
       gettimeofday(&end_tv,NULL);
       delta = (end_tv.tv_usec - start_tv.tv_usec) +
               ((end_tv.tv_sec - start_tv.tv_sec)*1000000);
       if (VERBOSE) printf("%d(%d) %d\n",i,j,delta);
       if (delta<i || delta>(2*i)) {
	 found=0;
	 break;
       }
    }
    if (found) {
      sleep_resolution=i;
      break; 
    }
  }
  
  fprintf(fptr,"%d\n",sleep_resolution);
  fclose(fptr);
  exit(0);
}

EOF
if { (eval echo configure:2024: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
then
  ac_cv_sleep_resolution=yes
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -fr conftest*
  ac_cv_sleep_resolution=no
fi
rm -fr conftest*
fi



  select_resolution=1000000
  usleep_resolution=1000000

  if test -r 'selecttest.out'; then
     select_resolution=`cat selecttest.out`   
  fi
  echo "$ac_t""$select_resolution usecs" 1>&6

  echo $ac_n "checking for usleep""... $ac_c" 1>&6
echo "configure:2047: checking for usleep" >&5
if eval "test \"`echo '$''{'ac_cv_func_usleep'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
#line 2052 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char usleep(); below.  */
#include <assert.h>
/* 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 usleep();

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_usleep) || defined (__stub___usleep)
choke me
#else
usleep();
#endif

; return 0; }
EOF
if { (eval echo configure:2075: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  rm -rf conftest*
  eval "ac_cv_func_usleep=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_func_usleep=no"
fi
rm -f conftest*
fi

if eval "test \"`echo '$ac_cv_func_'usleep`\" = yes"; then
  echo "$ac_t""yes" 1>&6
  
    echo $ac_n "checking usleep sleeping resolution""... $ac_c" 1>&6
echo "configure:2091: checking usleep sleeping resolution" >&5
    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 <<EOF
#line 2096 "configure"
#include "confdefs.h"

#include <stdio.h>
#include <sys/time.h>
#include <unistd.h>

#define VERBOSE                 0
#define OVERSAMPLE            100
#define DEFAULT_RESOLUTION  25000 /* 25 Milliseconds */
#define LIBC_HAS_USLEEP         1

void main() {
  int i, j,delta,sleep_resolution,deta,found,outbound;
  struct timeval select_tv, start_tv, end_tv;
  FILE *fptr;

  fptr=fopen("usleeptest.out","w");
  if (fptr==NULL) exit(1);

  sleep_resolution = DEFAULT_RESOLUTION;
  for(i=100;i<DEFAULT_RESOLUTION;i+=500) {
    found =1;
    for(j=0;j<OVERSAMPLE;j++) {
       gettimeofday(&start_tv,NULL);
#ifdef LIBC_HAS_USLEEP
       usleep(i);
#else
       select_tv.tv_usec = i;
       select_tv.tv_sec  = 0;
       select(0,NULL,NULL,NULL,&select_tv);
#endif
       gettimeofday(&end_tv,NULL);
       delta = (end_tv.tv_usec - start_tv.tv_usec) +
               ((end_tv.tv_sec - start_tv.tv_sec)*1000000);
       if (VERBOSE) printf("%d(%d) %d\n",i,j,delta);
       if (delta<i || delta>(2*i)) {
	 found=0;
	 break;
       }
    }
    if (found) {
      sleep_resolution=i;
      break; 
    }
  }
  
  fprintf(fptr,"%d\n",sleep_resolution);
  fclose(fptr);
  exit(0);
}
      
EOF
if { (eval echo configure:2149: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
then
  ac_cv_sleep_resolution=yes
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -fr conftest*
  ac_cv_sleep_resolution=no
fi
rm -fr conftest*
fi


    if test -r 'usleeptest.out'; then
       usleep_resolution=`cat usleeptest.out`
    fi
    echo "$ac_t""$usleep_resolution usecs" 1>&6
    
else
  echo "$ac_t""no" 1>&6
fi

  if test $usleep_resolution -lt $select_resolution; then
    cat >> confdefs.h <<\EOF
#define LIBC_HAS_USLEEP 1
EOF

    cat >> confdefs.h <<EOF
#define LIBC_SLEEP_RESOLUTION $usleep_resolution
EOF

  else
    cat >> confdefs.h <<EOF
#define LIBC_SLEEP_RESOLUTION $select_resolution
EOF

  fi
  
  rm -f usleeptest.out selecttest.out



echo $ac_n "checking size of unsigned char""... $ac_c" 1>&6
echo "configure:2192: checking size of unsigned char" >&5
if eval "test \"`echo '$''{'ac_cv_sizeof_unsigned_char'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
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 <<EOF
#line 2200 "configure"
#include "confdefs.h"
#include <stdio.h>
main()
{
  FILE *f=fopen("conftestval", "w");
  if (!f) exit(1);
  fprintf(f, "%d\n", sizeof(unsigned char));
  exit(0);
}
EOF
if { (eval echo configure:2211: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
then
  ac_cv_sizeof_unsigned_char=`cat conftestval`
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -fr conftest*
  ac_cv_sizeof_unsigned_char=0
fi
rm -fr conftest*
fi

fi
echo "$ac_t""$ac_cv_sizeof_unsigned_char" 1>&6
cat >> confdefs.h <<EOF
#define SIZEOF_UNSIGNED_CHAR $ac_cv_sizeof_unsigned_char
EOF


echo $ac_n "checking size of unsigned short int""... $ac_c" 1>&6
echo "configure:2231: checking size of unsigned short int" >&5
if eval "test \"`echo '$''{'ac_cv_sizeof_unsigned_short_int'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
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 <<EOF
#line 2239 "configure"
#include "confdefs.h"
#include <stdio.h>
main()
{
  FILE *f=fopen("conftestval", "w");
  if (!f) exit(1);
  fprintf(f, "%d\n", sizeof(unsigned short int));
  exit(0);
}
EOF
if { (eval echo configure:2250: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
then
  ac_cv_sizeof_unsigned_short_int=`cat conftestval`
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -fr conftest*
  ac_cv_sizeof_unsigned_short_int=0
fi
rm -fr conftest*
fi

fi
echo "$ac_t""$ac_cv_sizeof_unsigned_short_int" 1>&6
cat >> confdefs.h <<EOF
#define SIZEOF_UNSIGNED_SHORT_INT $ac_cv_sizeof_unsigned_short_int
EOF


echo $ac_n "checking size of unsigned int""... $ac_c" 1>&6
echo "configure:2270: checking size of unsigned int" >&5
if eval "test \"`echo '$''{'ac_cv_sizeof_unsigned_int'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
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 <<EOF
#line 2278 "configure"
#include "confdefs.h"
#include <stdio.h>
main()
{
  FILE *f=fopen("conftestval", "w");
  if (!f) exit(1);
  fprintf(f, "%d\n", sizeof(unsigned int));
  exit(0);
}
EOF
if { (eval echo configure:2289: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
then
  ac_cv_sizeof_unsigned_int=`cat conftestval`
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -fr conftest*
  ac_cv_sizeof_unsigned_int=0
fi
rm -fr conftest*
fi

fi
echo "$ac_t""$ac_cv_sizeof_unsigned_int" 1>&6
cat >> confdefs.h <<EOF
#define SIZEOF_UNSIGNED_INT $ac_cv_sizeof_unsigned_int
EOF


echo $ac_n "checking size of unsigned long int""... $ac_c" 1>&6
echo "configure:2309: checking size of unsigned long int" >&5
if eval "test \"`echo '$''{'ac_cv_sizeof_unsigned_long_int'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
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 <<EOF
#line 2317 "configure"
#include "confdefs.h"
#include <stdio.h>
main()
{
  FILE *f=fopen("conftestval", "w");
  if (!f) exit(1);
  fprintf(f, "%d\n", sizeof(unsigned long int));
  exit(0);
}
EOF
if { (eval echo configure:2328: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
then
  ac_cv_sizeof_unsigned_long_int=`cat conftestval`
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -fr conftest*
  ac_cv_sizeof_unsigned_long_int=0
fi
rm -fr conftest*
fi

fi
echo "$ac_t""$ac_cv_sizeof_unsigned_long_int" 1>&6
cat >> confdefs.h <<EOF
#define SIZEOF_UNSIGNED_LONG_INT $ac_cv_sizeof_unsigned_long_int
EOF


echo $ac_n "checking size of unsigned long long int""... $ac_c" 1>&6
echo "configure:2348: checking size of unsigned long long int" >&5
if eval "test \"`echo '$''{'ac_cv_sizeof_unsigned_long_long_int'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
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 <<EOF
#line 2356 "configure"
#include "confdefs.h"
#include <stdio.h>
main()
{
  FILE *f=fopen("conftestval", "w");
  if (!f) exit(1);
  fprintf(f, "%d\n", sizeof(unsigned long long int));
  exit(0);
}
EOF
if { (eval echo configure:2367: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
then
  ac_cv_sizeof_unsigned_long_long_int=`cat conftestval`
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -fr conftest*
  ac_cv_sizeof_unsigned_long_long_int=0
fi
rm -fr conftest*
fi

fi
echo "$ac_t""$ac_cv_sizeof_unsigned_long_long_int" 1>&6
cat >> confdefs.h <<EOF
#define SIZEOF_UNSIGNED_LONG_LONG_INT $ac_cv_sizeof_unsigned_long_long_int
EOF



echo $ac_n "checking size of short""... $ac_c" 1>&6
echo "configure:2388: 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
    { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
else
  cat > conftest.$ac_ext <<EOF
#line 2396 "configure"
#include "confdefs.h"
#include <stdio.h>
main()
{
  FILE *f=fopen("conftestval", "w");
  if (!f) exit(1);
  fprintf(f, "%d\n", sizeof(short));
  exit(0);
}
EOF
if { (eval echo configure:2407: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./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 <<EOF
#define SIZEOF_SHORT $ac_cv_sizeof_short
EOF


echo $ac_n "checking size of int""... $ac_c" 1>&6
echo "configure:2427: 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
    { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
else
  cat > conftest.$ac_ext <<EOF
#line 2435 "configure"
#include "confdefs.h"
#include <stdio.h>
main()
{
  FILE *f=fopen("conftestval", "w");
  if (!f) exit(1);
  fprintf(f, "%d\n", sizeof(int));
  exit(0);
}
EOF
if { (eval echo configure:2446: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./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 <<EOF
#define SIZEOF_INT $ac_cv_sizeof_int
EOF


echo $ac_n "checking size of long int""... $ac_c" 1>&6
echo "configure:2466: checking size of long int" >&5
if eval "test \"`echo '$''{'ac_cv_sizeof_long_int'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
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 <<EOF
#line 2474 "configure"
#include "confdefs.h"
#include <stdio.h>
main()
{
  FILE *f=fopen("conftestval", "w");
  if (!f) exit(1);
  fprintf(f, "%d\n", sizeof(long int));
  exit(0);
}
EOF
if { (eval echo configure:2485: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
then
  ac_cv_sizeof_long_int=`cat conftestval`
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -fr conftest*
  ac_cv_sizeof_long_int=0
fi
rm -fr conftest*
fi

fi
echo "$ac_t""$ac_cv_sizeof_long_int" 1>&6
cat >> confdefs.h <<EOF
#define SIZEOF_LONG_INT $ac_cv_sizeof_long_int
EOF


echo $ac_n "checking size of long long int""... $ac_c" 1>&6
echo "configure:2505: checking size of long long int" >&5
if eval "test \"`echo '$''{'ac_cv_sizeof_long_long_int'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
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 <<EOF
#line 2513 "configure"
#include "confdefs.h"
#include <stdio.h>
main()
{
  FILE *f=fopen("conftestval", "w");
  if (!f) exit(1);
  fprintf(f, "%d\n", sizeof(long long int));
  exit(0);
}
EOF
if { (eval echo configure:2524: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
then
  ac_cv_sizeof_long_long_int=`cat conftestval`
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -fr conftest*
  ac_cv_sizeof_long_long_int=0
fi
rm -fr conftest*
fi

fi
echo "$ac_t""$ac_cv_sizeof_long_long_int" 1>&6
cat >> confdefs.h <<EOF
#define SIZEOF_LONG_LONG_INT $ac_cv_sizeof_long_long_int
EOF



trap '' 1 2 15

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 <<EOF
#! /bin/sh
# Generated automatically by configure.
# Run this file to recreate the current configuration.
# This directory was configured as follows,
# on host `(hostname || uname -n) 2>/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.12"
    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
ac_given_INSTALL="$INSTALL"

trap 'rm -fr `echo "Makefile 
           src/library_core/Makefile 
	   src/library_level1/Makefile
           src/cgprof/Makefile
	   src/library_tcpip/Makefile
	   src/library_udpip/Makefile
           src/library_now/Makefile
	   src/library_cpr/Makefile
   	   src/library_kernel/Makefile
	   src/library_shared/Makefile
           bin/Makefile
           " | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
EOF
cat >> $CONFIG_STATUS <<EOF

# Protect against being on the right side of a sed subst in config.status.
sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
 s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
$ac_vpsub
$extrasub
s%@CFLAGS@%$CFLAGS%g
s%@CPPFLAGS@%$CPPFLAGS%g
s%@CXXFLAGS@%$CXXFLAGS%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%@PACKAGE@%$PACKAGE%g
s%@VERSION@%$VERSION%g
s%@PERL@%$PERL%g
s%@BSPARCH_DEFAULT_ARCH@%$BSPARCH_DEFAULT_ARCH%g
s%@BSPARCH_DEFAULT_DEVICE@%$BSPARCH_DEFAULT_DEVICE%g
s%@BSP_ONLINE_PROCS@%$BSP_ONLINE_PROCS%g
s%@mpiincludedir@%$mpiincludedir%g
s%@mpilibdir@%$mpilibdir%g
s%@BSP_DEFAULT_SLOTSIZE@%$BSP_DEFAULT_SLOTSIZE%g
s%@BSP_DEFAULT_NOSLOTS@%$BSP_DEFAULT_NOSLOTS%g
s%@BSP_DEFAULT_ROUNDTRIP@%$BSP_DEFAULT_ROUNDTRIP%g
s%@BSP_DEFAULT_SENDLATENCY@%$BSP_DEFAULT_SENDLATENCY%g
s%@GCC@%$GCC%g
s%@G77@%$G77%g
s%@GPLUSPLUS@%$GPLUSPLUS%g
s%@SET_MAKE@%$SET_MAKE%g
s%@AR@%$AR%g
s%@RANLIB@%$RANLIB%g
s%@YACC@%$YACC%g
s%@LEX@%$LEX%g
s%@LEXLIB@%$LEXLIB%g
s%@INSTALL@%$INSTALL%g
s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
s%@INSTALL_DATA@%$INSTALL_DATA%g
s%@DAVINCI@%$DAVINCI%g
s%@NROFF@%$NROFF%g
s%@CATMAN@%$CATMAN%g
s%@SOCKET_LIBRARY@%$SOCKET_LIBRARY%g
s%@NSL_LIBRARY@%$NSL_LIBRARY%g
s%@BSD_LIBRARY@%$BSD_LIBRARY%g
s%@F77_LIBRARY@%$F77_LIBRARY%g
s%@I77_LIBRARY@%$I77_LIBRARY%g
s%@F2C_LIBRARY@%$F2C_LIBRARY%g
s%@CPP@%$CPP%g
s%@PERL_DBMOK@%$PERL_DBMOK%g
s%@LIBC_SLEEP_RESOLUTION@%$LIBC_SLEEP_RESOLUTION%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 <<EOF

CONFIG_FILES=\${CONFIG_FILES-"Makefile 
           src/library_core/Makefile 
	   src/library_level1/Makefile
           src/cgprof/Makefile
	   src/library_tcpip/Makefile
	   src/library_udpip/Makefile
           src/library_now/Makefile
	   src/library_cpr/Makefile
   	   src/library_kernel/Makefile
	   src/library_shared/Makefile
           bin/Makefile
           "}
EOF
cat >> $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

  case "$ac_given_INSTALL" in
  [/$]*) INSTALL="$ac_given_INSTALL" ;;
  *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
  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
s%@INSTALL@%$INSTALL%g
" $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
fi; done
rm -f conftest.s*

EOF
cat >> $CONFIG_STATUS <<EOF

EOF
cat >> $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


