		trap 'rm -fr conftest* confdefs* core $ac_clean_files; exit 1' 1 2 15
trap 'rm -fr confdefs* $ac_clean_files' 0

# Save the original args if we used an alternate arg parser.
ac_configure_temp="${configure_args-$*}"
# Strip out --no-create and --norecursion so they don't pile up.
configure_args=
for ac_arg in $ac_configure_temp; do
  case "$ac_arg" in
  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
  | --no-cr | --no-c) ;;
  -norecursion | --norecursion | --norecursio | --norecursi \
  | --norecurs | --norecur | --norecu | --norec | --nore | --nor) ;;
  *) configure_args="$configure_args $ac_arg" ;;
  esac
done

# NLS nuisances.
# These must not be set unconditionally because not all systems understand
# e.g. LANG=C (notably SCO).
if test "${LC_ALL+set}" = 'set'; then LC_ALL=C; export LC_ALL; fi
if test "${LANG+set}"   = 'set'; then LANG=C;   export LANG;   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=Makefile.in

# 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 `..'.
  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
fi
if test ! -r $srcdir/$ac_unique_file; then
  if test x$ac_srcdir_defaulted = xyes; then
    echo "configure: can not find sources in ${ac_confdir} or .." >&2; exit 1
  else
    echo "configure: can not find sources in ${srcdir}" >&2; exit 1
  fi
fi
ac_ext=c
# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
ac_cpp='${CPP}'
ac_compile='${CC-cc} $CFLAGS $LDFLAGS conftest.${ac_ext} -o conftest $LIBS >/dev/null 2>&1'



				
### Remove any more than one leading "." element from the path name.
progname="`echo $0 | sed 's:^\./\./:\./:'`"

short_usage="Usage: ${progname} CONFIGURATION [-OPTION[=VALUE] ...]

Set compilation and installation parameters for ECL, and report.
CONFIGURATION specifies the machine to build for.

  Installation options:

  --srcdir=DIR          Look for the ECL source files in DIR.
  --prefix=DIR          Install files below DIR. Defaults to \`${prefix}'.
  --bindir=DIR          Where to install the executable.
  --mandir=DIR          Where to install the manual page.
  --infodir=DIR         Where to install the info files.
  --in-place		Build ECL in the src directory.

  Configuration flags:

  --clos                Include CLOS.
  --clx                 Include CLX.
  --tcp                 Include socket interface.
  --locative            Include locative support.
  --threads             Include the multiple thread facility.
  --runtime             Build a RunTime Lisp with no compiler.

If successful, ${progname} leaves its status in config.status in.  If
unsuccessful after disturbing the status quo, it removes config.status."

### Establish some default values.

prefix='/usr/local'
exec_prefix='${prefix}'
bindir='${exec_prefix}/bin'
libdir='${exec_prefix}/lib'
mandir='${prefix}/man/man1'
infodir='${prefix}/info'

oflag='-O'

### Record all the arguments, so we can save them in config.status.
arguments="$@"

### Shell Magic: Quote the quoted arguments in ARGUMENTS.  At a later date,
### in order to get the arguments back in $@, we have to do an
###  `eval set x "$quoted_arguments"; shift'.
quoted_arguments=
for i in "$@"; do
   quoted_arguments="$quoted_arguments '$i'"
done

### Don't use shift -- that destroys the argument list, which autoconf needs
### to produce config.status.  It turns out that "set - ${arguments}" doesn't
### work portably.
### However, it also turns out that many shells cannot expand ${10} at all.
### So using an index variable doesn't work either.  It is possible to use
### some shell magic to make 'set x "$arguments"; shift' work portably.
while [ $# != 0 ]; do
  arg="$1"; shift
  case "${arg}" in

    ## Anything starting with a hyphen we assume is an option.
    -* )
      ## Separate the switch name from the value it's being given.
      case "${arg}" in
        -*=*)
	  opt=`echo ${arg} | sed 's:^-*\([^=]*\)=.*$:\1:'`
	  val=`echo ${arg} | sed 's:^-*[^=]*=\(.*\)$:\1:'`
	  valomitted=no
	;;
        -*)
          ## If FOO is a boolean argument, --FOO is equivalent to
          ## --FOO=yes.  Otherwise, the value comes from the next
          ## argument - see below.
	  opt=`echo ${arg} | sed 's:^-*\(.*\)$:\1:'`
          val="yes"
          valomitted=yes
        ;;
      esac

      ## Change `-' in the option name to `_'.
      optname="${opt}"
      opt="`echo ${opt} | tr - _`"

      ## Process the option.
      case "${opt}" in

        ## Has the user specified a source directory?
	"srcdir" )
	  ## If the value was omitted, get it from the next argument.
	  if [ "${valomitted}" = "yes" ]; then
	    ## Get the next argument from the argument list, if there is one.
            if [ $# = 0 ]; then
	      (echo "${progname}: You must give a value for the \`--${optname}' option, as in
    \`--${optname}=FOO'."
	       echo "${short_usage}") >&2
	      exit 1
	    fi
	    val="$1"; shift
	  fi
          srcdir="${val}"
	;;
	## Has the user specified one of the configuration options?
	clos | clx | tcp | locative | threads | runtime )
	   eval "${opt}=1"
	;;

	## Has the user specified one of the path options?
	prefix | exec_prefix | bindir | mandir | infodir )
	   ## If the value was omitted, get it from the next argument.
	   if [ "${valomitted}" = "yes" ]; then
	      if [ $# = 0 ]; then
		 (echo \
"$progname: You must give a value for the \`--${optname}' option,";
		  echo \
"as in \`--${optname}=`eval echo '$'$optname`.'"
		  echo "$short_usage") >&2
		 exit 1
	      fi
	      val="$1"; shift
	   fi
	   eval "${opt}=\"${val}\""
	;;

	## Verbose flag, tested by autoconf macros.
	"verbose" )
	  verbose=yes
	;;

	## Has the user asked for some help?
	"usage" | "help" )
	    echo "${short_usage}"
	  exit
	;;

        ## We ignore all other options silently.
      esac
    ;;

    ## Anything not starting with a hyphen we assume is a
    ## MACHINE name.
    *)
      machine=${arg}
    ;;

  esac
done

if [ "${machine}" = "" ] ; then
 echo "$short_usage" >&2
 exit
fi

#### Make srcdir absolute, if it isn't already.  It's important to
#### avoid running the path through pwd unnecessarily, since pwd can
#### give you automounter prefixes, which can go away.
case "${srcdir}" in
  /* ) ;;
  . )
    ## We may be able to use the $PWD environment variable to make this
    ## absolute.  But sometimes PWD is inaccurate.
    if [ "${PWD}" != "" ] && [ "`(cd ${PWD} ; sh -c pwd)`" = "`pwd`" ] ; then
      srcdir="$PWD"
    else
      srcdir="`(cd ${srcdir}; pwd)`"
    fi
  ;;
  *  ) srcdir="`(cd ${srcdir}; pwd)`" ;;
esac

### Get the arguments back.  See the diatribe on Shell Magic above.
eval set x "$quoted_arguments"; shift

# Source Directories

HDIR='$(top_srcdir)/h'

CCLOS='c/clos.o c/instance.o c/gfun.o'
CTHREAD='c/lwp.o'
LTHREAD='c/thread.o'

# On some systems you can keep the lines split using '...\\\...'

HFILES="../h/config.h \${HDIR}/include.h\
	\${HDIR}/object.h \${HDIR}/cs.h \${HDIR}/bds.h\
	\${HDIR}/frame.h \${HDIR}/lex.h \${HDIR}/eval.h\
	\${HDIR}/external.h \${HDIR}/lwp.h \${HDIR}/critical.h"

DOBJS="c/main.o c/alloc.o c/gbc.o c/symbol.o c/package.o c/list.o\
	c/apply.o c/eval.o c/lex.o c/bind.o c/reference.o c/character.o\
	c/file.o c/read.o c/print.o c/error.o c/string.o c/cfun.o\
	c/typespec.o c/assignment.o c/toplevel.o\
	c/predicate.o c/conditional.o c/big.o c/earith.o c/number.o\
	c/num_pred.o c/num_comp.o c/num_arith.o c/num_sfun.o c/num_co.o\
	c/num_log.o c/num_rand.o c/array.o c/sequence.o c/cmpaux.o\
	c/macros.o c/backq.o c/frame.o c/catch.o c/block.o\
	c/let.o c/prog.o c/iteration.o c/unixtime.o c/unixint.o\
	c/mapfun.o c/multival.o c/hash.o c/format.o c/pathname.o\
	c/structure.o c/load.o c/unixfsys.o c/unixsys.o c/init.o"

DLSPOBJS="lsp/defmacro.o lsp/evalmacros.o lsp/top.o lsp/module.o\
	lsp/predlib.o lsp/setf.o lsp/arraylib.o lsp/assert.o\
	lsp/defstruct.o lsp/describe.o lsp/iolib.o lsp/listlib.o\
	lsp/mislib.o lsp/numlib.o lsp/packlib.o lsp/seq.o lsp/seqlib.o\
	lsp/trace.o"

CMPOBJS="cmpdefs.o cmpinline.o cmputil.o cmptype.o cmpbind.o cmpblock.o\
	cmpcall.o cmpcatch.o cmpenv.o cmpeval.o cmpflet.o cmpfun.o\
	cmpif.o cmpexit.o cmplam.o cmplet.o cmploc.o cmpmap.o cmpmulti.o\
	cmpspecial.o cmptag.o cmptop.o cmpvar.o cmpwt.o cmpmain.o"

if [ $clos ] ; then
 DOBJS="${DOBJS} ${CCLOS}"
fi
if [ $threads ] ; then
 DOBJS="${DOBJS} ${CTHREAD}"
 DLSPOBJS="${DLSPOBJS} ${LTHREAD}"
fi
if [ "$clx" -o "$tcp" ] ; then
 DOBJS="${DOBJS} c/tcp.o"
fi

OBJS=`echo "$DOBJS" | sed "s%c/%%g"`
LSPOBJS=`echo "$DLSPOBJS" | sed "s%lsp/%%g"`


test "${clos}" && 
{
test -n "$verbose" && \
echo "	defining CLOS"
echo "#define" CLOS "1" >> confdefs.h
DEFS="$DEFS -DCLOS=1"
ac_sed_defs="${ac_sed_defs}\${ac_dA}CLOS\${ac_dB}CLOS\${ac_dC}1\${ac_dD}
\${ac_uA}CLOS\${ac_uB}CLOS\${ac_uC}1\${ac_uD}
\${ac_eA}CLOS\${ac_eB}CLOS\${ac_eC}1\${ac_eD}
"
}

test "${clx}" && 
{
test -n "$verbose" && \
echo "	defining CLX"
echo "#define" CLX "1" >> confdefs.h
DEFS="$DEFS -DCLX=1"
ac_sed_defs="${ac_sed_defs}\${ac_dA}CLX\${ac_dB}CLX\${ac_dC}1\${ac_dD}
\${ac_uA}CLX\${ac_uB}CLX\${ac_uC}1\${ac_uD}
\${ac_eA}CLX\${ac_eB}CLX\${ac_eC}1\${ac_eD}
"
}

test "${tcp}" && 
{
test -n "$verbose" && \
echo "	defining TCP"
echo "#define" TCP "1" >> confdefs.h
DEFS="$DEFS -DTCP=1"
ac_sed_defs="${ac_sed_defs}\${ac_dA}TCP\${ac_dB}TCP\${ac_dC}1\${ac_dD}
\${ac_uA}TCP\${ac_uB}TCP\${ac_uC}1\${ac_uD}
\${ac_eA}TCP\${ac_eB}TCP\${ac_eC}1\${ac_eD}
"
}

test "${locative}" && 
{
test -n "$verbose" && \
echo "	defining LOCATIVE"
echo "#define" LOCATIVE "1" >> confdefs.h
DEFS="$DEFS -DLOCATIVE=1"
ac_sed_defs="${ac_sed_defs}\${ac_dA}LOCATIVE\${ac_dB}LOCATIVE\${ac_dC}1\${ac_dD}
\${ac_uA}LOCATIVE\${ac_uB}LOCATIVE\${ac_uC}1\${ac_uD}
\${ac_eA}LOCATIVE\${ac_eB}LOCATIVE\${ac_eC}1\${ac_eD}
"
}

test "${threads}" && 
{
test -n "$verbose" && \
echo "	defining THREADS"
echo "#define" THREADS "1" >> confdefs.h
DEFS="$DEFS -DTHREADS=1"
ac_sed_defs="${ac_sed_defs}\${ac_dA}THREADS\${ac_dB}THREADS\${ac_dC}1\${ac_dD}
\${ac_uA}THREADS\${ac_uB}THREADS\${ac_uC}1\${ac_uD}
\${ac_eA}THREADS\${ac_eB}THREADS\${ac_eC}1\${ac_eD}
"
}

test "${runtime}" && 
{
test -n "$verbose" && \
echo "	defining RUNTIME"
echo "#define" RUNTIME "1" >> confdefs.h
DEFS="$DEFS -DRUNTIME=1"
ac_sed_defs="${ac_sed_defs}\${ac_dA}RUNTIME\${ac_dB}RUNTIME\${ac_dC}1\${ac_dD}
\${ac_uA}RUNTIME\${ac_uB}RUNTIME\${ac_uC}1\${ac_uD}
\${ac_eA}RUNTIME\${ac_eB}RUNTIME\${ac_eC}1\${ac_eD}
"
}

 
CC=gcc		      # We need gcc for variable length arrays

test -n "$silent" || echo "checking how to run the C preprocessor"
if test -z "$CPP"; then
  # This must be in double quotes, not single quotes, because CPP may get
  # substituted into the Makefile and ``${CC-cc}'' will simply confuse
  # make.  It must be expanded now.
  CPP="${CC-cc} -E"
  cat > conftest.${ac_ext} <<EOF
#include "confdefs.h"
#include <stdio.h>
Syntax Error
EOF
# Some shells (Coherent) do redirections in the wrong order, so need
# the parens.
ac_err=`eval "($ac_cpp conftest.${ac_ext} >/dev/null) 2>&1"`
if test -z "$ac_err"; then
  :
else
  rm -rf conftest*
  CPP="${CC-cc} -E -traditional-cpp"
  cat > conftest.${ac_ext} <<EOF
#include "confdefs.h"
#include <stdio.h>
Syntax Error
EOF
# Some shells (Coherent) do redirections in the wrong order, so need
# the parens.
ac_err=`eval "($ac_cpp conftest.${ac_ext} >/dev/null) 2>&1"`
if test -z "$ac_err"; then
  :
else
  rm -rf conftest*
  CPP=/lib/cpp
fi
rm -f conftest*
fi
rm -f conftest*
fi
test -n "$verbose" && echo "	setting CPP to $CPP"
           if test -z "$RANLIB"; then
  # Extract the first word of `ranlib', so it can be a program name with args.
  set ac_dummy ranlib; ac_word=$2
  test -n "$silent" || echo "checking for $ac_word"
  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
      RANLIB="ranlib"
      break
    fi
  done
  IFS="$ac_save_ifs"
fi
test -z "$RANLIB" && RANLIB=":"
test -n "$RANLIB" && test -n "$verbose" && echo "	setting RANLIB to $RANLIB"
        # Make sure to not get the incompatible SysV /etc/install and
# /usr/sbin/install, which might be in PATH before a BSD-like install,
# or the SunOS /usr/etc/install directory, or the AIX /bin/install,
# or the AFS install, which mishandles nonexistent args, or
# /usr/ucb/install on SVR4, which tries to use the nonexistent group
# `staff', or /sbin/install on IRIX which has incompatible command-line
# syntax.  Sigh.
#
#     On most BSDish systems install is in /usr/bin, not /usr/ucb
#     anyway.
# This turns out not to be true, so the mere pathname isn't an indication
# of whether the program works.  What we really need is a set of tests for
# the install program to see if it actually works in all the required ways.
#
# Avoid using ./install, which might have been erroneously created
# by make from ./install.sh.
if test -z "${INSTALL}"; then
  test -n "$silent" || echo "checking for a BSD compatible install"
  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS="${IFS}:"
  for ac_dir in $PATH; do
    case "$ac_dir" in
    ''|.|/etc|/sbin|/usr/sbin|/usr/etc|/usr/afsws/bin|/usr/ucb) ;;
    *)
      # OSF1 and SCO ODT 3.0 have their own names for install.
      for ac_prog in 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
	    INSTALL="$ac_dir/$ac_prog -c"
	    break 2
	  fi
	fi
      done
      ;;
    esac
  done
  IFS="$ac_save_ifs"
fi

if test -z "$INSTALL"; then
  # As a last resort, use the slow shell script.
  for ac_dir in ${srcdir} ${srcdir}/.. ${srcdir}/../..; do
    if test -f $ac_dir/install.sh; then
      INSTALL=$ac_dir/install.sh; break
    fi
  done
fi
if test -z "$INSTALL"; then
  echo "configure: can not find install.sh in ${srcdir} or ${srcdir}/.. or ${srcdir}/../.." >&2; exit 1
fi
test -n "$verbose" && echo "	setting INSTALL to $INSTALL"

# Use test -z because SunOS4 sh mishandles ${INSTALL_PROGRAM-'${INSTALL}'}.
# It thinks the first close brace ends the variable substitution.
test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
test -n "$verbose" && echo "	setting INSTALL_PROGRAM to $INSTALL_PROGRAM"

test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
test -n "$verbose" && echo "	setting INSTALL_DATA to $INSTALL_DATA"
        test -n "$silent" || echo "checking for ln -s"
rm -f conftestdata
if ln -s X conftestdata 2>/dev/null
then
  rm -f conftestdata
  LN_S="ln -s"
else
  LN_S=ln
fi

               if test -z "$prefix"
then
  test -n "$silent" || echo "checking for  to derive installation directory prefix"
  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS="$IFS:"
  for ac_dir in $PATH; do
    test -z "$ac_dir" && ac_dir=.
    if test $ac_dir != . && test -f $ac_dir/; then
      # Not all systems have dirname.
      prefix=`echo $ac_dir|sed 's%/[^/][^/]*$%%'`
      break
    fi
  done
  IFS="$ac_save_ifs"
  test -n "$verbose" && echo "	chose installation directory prefix ${prefix}"
fi
	      
#### Some command variations:

if test ${machine} = MSDOS ; then
 RM="rm /i"
 CP="copy"
else
 RM="rm -f"
 CP="cp"
fi

#### Extract some information from the machine description file.

echo "Extracting parameters from the machine description file"

tempcname="conftest.c"

echo '
#include "'${srcdir}'/h/machines.h"
#ifdef CFLAGS
configure___ cflags=CFLAGS
#endif

#ifdef LSPCFLAGS
configure___ lspcflags=LSPCFLAGS
#endif

#ifdef CLIBS
configure___ clibs=CLIBS
else
configure___ clibs=-lg -lc
#endif

#ifdef LDFLAGS
configure___ ldflags=LDFLAGS
#endif

#ifdef ILDFLAGS
configure___ ildflags=ILDFLAGS
#endif

#ifdef UNEXEC
configure___ unexec=UNEXEC
#else
configure___ unexec=unixsave
#endif

#ifdef SETJMP
configure___ setjmp=SETJMP
#endif

#ifdef _setjmp
configure___ _jmp=1
#endif

configure___ architecture=ARCHITECTURE
configure___ software_type=SOFTWARE_TYPE
configure___ software_version=SOFTWARE_VERSION
' > ${tempcname}

# The value of CPP is a quoted variable reference, so we need to do this
# to get its actual value...
CPP=`eval "echo $CPP"`
eval `${CPP} -D${machine} ${tempcname} \
       | grep 'configure___' \
       | sed -e 's/^configure___ \([^=]*=\)\(.*[^ ]\) */\1"\2"/' `
rm ${tempcname}

test ${setjmp} && setjmpo=setjmp.o

cflags="-W ${cflags} -I../h -I\$(HDIR)"
clibs="-lm ${clibs}"

test "${_jmp}" && 
{
test -n "$verbose" && \
echo "	defining" _setjmp to be "setjmp"
echo "#define" _setjmp "setjmp" >> confdefs.h
DEFS="$DEFS -D_setjmp=setjmp"
ac_sed_defs="${ac_sed_defs}\${ac_dA}_setjmp\${ac_dB}_setjmp\${ac_dC}setjmp\${ac_dD}
\${ac_uA}_setjmp\${ac_uB}_setjmp\${ac_uC}setjmp\${ac_uD}
\${ac_eA}_setjmp\${ac_eB}_setjmp\${ac_eC}setjmp\${ac_eD}
"
}

test "${_jmp}" && 
{
test -n "$verbose" && \
echo "	defining" _longjmp to be "longjmp"
echo "#define" _longjmp "longjmp" >> confdefs.h
DEFS="$DEFS -D_longjmp=longjmp"
ac_sed_defs="${ac_sed_defs}\${ac_dA}_longjmp\${ac_dB}_longjmp\${ac_dC}longjmp\${ac_dD}
\${ac_uA}_longjmp\${ac_uB}_longjmp\${ac_uC}longjmp\${ac_uD}
\${ac_eA}_longjmp\${ac_eB}_longjmp\${ac_eC}longjmp\${ac_eD}
"
}















ac_save_LIBS="${LIBS}"
LIBS="${LIBS} -lsun"
ac_have_lib=""
test -n "$silent" || echo "checking for -lsun"
cat > conftest.${ac_ext} <<EOF
#include "confdefs.h"

int main() { return 0; }
int t() { main();; return 0; }
EOF
if eval $ac_compile; then
  rm -rf conftest*
  ac_have_lib="1"

fi
rm -f conftest*
LIBS="${ac_save_LIBS}"
if test -n "${ac_have_lib}"; then
   :; LIBS="$LIBS -lsun"
else
   :; 
fi

            		      		                            test -n "$silent" || echo "checking whether the address of an argument can be used as an array"
cat > conftest.${ac_ext} <<EOF
#include "confdefs.h"
main() {
/* Return 0 iff arg arrays are ok.  */
exit(!x(1, 2, 3, 4));
}
x(a, b, c, d) {
  return y(a, &b);
}
/* Return 1 iff arg arrays are ok.  */
y(a, b) int *b; {
  return a == 1 && b[0] == 2 && b[1] == 3 && b[2] == 4;
}
EOF
eval $ac_compile
if test -s conftest && (./conftest; exit) 2>/dev/null; then
  :
else
  
{
test -n "$verbose" && \
echo "	defining NO_ARG_ARRAY"
echo "#define" NO_ARG_ARRAY "1" >> confdefs.h
DEFS="$DEFS -DNO_ARG_ARRAY=1"
ac_sed_defs="${ac_sed_defs}\${ac_dA}NO_ARG_ARRAY\${ac_dB}NO_ARG_ARRAY\${ac_dC}1\${ac_dD}
\${ac_uA}NO_ARG_ARRAY\${ac_uB}NO_ARG_ARRAY\${ac_uC}1\${ac_uD}
\${ac_eA}NO_ARG_ARRAY\${ac_eB}NO_ARG_ARRAY\${ac_eC}1\${ac_eD}
"
}

fi
rm -fr conftest*
rm -f core
          test -n "$silent" || echo "checking byte ordering"
cat > conftest.${ac_ext} <<EOF
#include "confdefs.h"
main () {
  /* Are we little or big endian?  From Harbison&Steele.  */
  union
  {
    long l;
    char c[sizeof (long)];
  } u;
  u.l = 1;
  exit (u.c[sizeof (long) - 1] == 1);
}
EOF
eval $ac_compile
if test -s conftest && (./conftest; exit) 2>/dev/null; then
  :
else
  
{
test -n "$verbose" && \
echo "	defining WORDS_BIGENDIAN"
echo "#define" WORDS_BIGENDIAN "1" >> confdefs.h
DEFS="$DEFS -DWORDS_BIGENDIAN=1"
ac_sed_defs="${ac_sed_defs}\${ac_dA}WORDS_BIGENDIAN\${ac_dB}WORDS_BIGENDIAN\${ac_dC}1\${ac_dD}
\${ac_uA}WORDS_BIGENDIAN\${ac_uB}WORDS_BIGENDIAN\${ac_uC}1\${ac_uD}
\${ac_eA}WORDS_BIGENDIAN\${ac_eB}WORDS_BIGENDIAN\${ac_eC}1\${ac_eD}
"
}

fi
rm -fr conftest*
      # Set default prefixes.
if test -n "$prefix"; then
  test -z "$exec_prefix" && exec_prefix='${prefix}' # Let make expand it.
  ac_prsub="s%^prefix\\([ 	]*\\)=\\([ 	]*\\).*$%prefix\\1=\\2$prefix%"
fi
if test -n "$exec_prefix"; then
  ac_prsub="$ac_prsub
s%^exec_prefix\\([ 	]*\\)=\\([ 	]*\\).*$%exec_prefix\\1=\\2$exec_prefix%"
fi
# 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

# Quote sed substitution magic chars in DEFS.
cat >conftest.def <<EOF
$DEFS
EOF
ac_escape_ampersand_and_backslash='s%[&\\]%\\&%g'
DEFS=`sed "$ac_escape_ampersand_and_backslash" <conftest.def`
rm -f conftest.def
# Substitute for predefined variables.

trap 'rm -f config.status; exit 1' 1 2 15
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 $configure_args

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 $configure_args --no-create
    exec \${CONFIG_SHELL-/bin/sh} $0 $configure_args --no-create ;;
  -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
    echo "config.status generated by autoconf version 1.10"
    exit 0 ;;
  -help | --help | --hel | --he | --h)
    echo "\$ac_cs_usage"; exit 0 ;;
  *) echo "\$ac_cs_usage"; exit 1 ;;
  esac
done

trap 'rm -fr ../Makefile Makefile c/Makefile crs/Makefile lsp/Makefile
 cmp/Makefile clos/Makefile clx/Makefile clx/defsys.lsp config.lsp h/config.h h/ecl.h conftest*; exit 1' 1 2 15
machine='$machine'
prefix='$prefix'
exec_prefix='$exec_prefix'
bindir='$bindir'
libdir='$libdir'
mandir='$mandir'
infodir='$infodir'
top_srcdir='$top_srcdir'
HDIR='$HDIR'
HFILES='$HFILES'
OBJS='$OBJS'
LSPOBJS='$LSPOBJS'
CMPOBJS='$CMPOBJS'
DOBJS='$DOBJS'
DLSPOBJS='$DLSPOBJS'
CC='$CC'
CPP='$CPP'
RANLIB='$RANLIB'
INSTALL='$INSTALL'
INSTALL_PROGRAM='$INSTALL_PROGRAM'
INSTALL_DATA='$INSTALL_DATA'
LN_S='$LN_S'
CP='$CP'
RM='$RM'
cflags='$cflags'
lspcflags='$lspcflags'
oflag='$oflag'
clibs='$clibs'
ldflags='$ldflags'
ildflags='$ildflags'
unexec='$unexec'
setjmp='$setjmp'
setjmpo='$setjmpo'
architecture='$architecture'
software_type='$software_type'
software_version='$software_version'
LIBS='$LIBS'
srcdir='$srcdir'
ac_prsub='$ac_prsub'
ac_vpsub='$ac_vpsub'
extrasub='$extrasub'
EOF
cat >> config.status <<\EOF

ac_given_srcdir=$srcdir

CONFIG_FILES=${CONFIG_FILES-"../Makefile Makefile c/Makefile crs/Makefile lsp/Makefile
 cmp/Makefile clos/Makefile clx/Makefile clx/defsys.lsp config.lsp"}
for ac_file in .. ${CONFIG_FILES}; do if test "x$ac_file" != x..; then
  # 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"; then
    # The file is in a subdirectory.
    test ! -d "$ac_dir" && mkdir "$ac_dir"
    ac_dir_suffix="/$ac_dir"
  else
    ac_dir_suffix=
  fi

  # A "../" for each directory in $ac_dir_suffix.
  ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
  case "$ac_given_srcdir" in
  .)  srcdir=.; top_srcdir="$ac_dots." ;;
  /*) 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"
  comment_str="Generated automatically from `echo $ac_file|sed 's|.*/||'`.in by configure."
  case "$ac_file" in
    *.c | *.h | *.C | *.cc | *.m )  echo "/* $comment_str */" > "$ac_file" ;;
    * )          echo "# $comment_str"     > "$ac_file" ;;
  esac
  sed -e "
$ac_prsub
$ac_vpsub
$extrasub
s%@machine@%$machine%g
s%@prefix@%$prefix%g
s%@exec_prefix@%$exec_prefix%g
s%@bindir@%$bindir%g
s%@libdir@%$libdir%g
s%@mandir@%$mandir%g
s%@infodir@%$infodir%g
s%@top_srcdir@%$top_srcdir%g
s%@HDIR@%$HDIR%g
s%@HFILES@%$HFILES%g
s%@OBJS@%$OBJS%g
s%@LSPOBJS@%$LSPOBJS%g
s%@CMPOBJS@%$CMPOBJS%g
s%@DOBJS@%$DOBJS%g
s%@DLSPOBJS@%$DLSPOBJS%g
s%@CC@%$CC%g
s%@CPP@%$CPP%g
s%@RANLIB@%$RANLIB%g
s%@INSTALL@%$INSTALL%g
s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
s%@INSTALL_DATA@%$INSTALL_DATA%g
s%@LN_S@%$LN_S%g
s%@CP@%$CP%g
s%@RM@%$RM%g
s%@cflags@%$cflags%g
s%@lspcflags@%$lspcflags%g
s%@oflag@%$oflag%g
s%@clibs@%$clibs%g
s%@ldflags@%$ldflags%g
s%@ildflags@%$ildflags%g
s%@unexec@%$unexec%g
s%@setjmp@%$setjmp%g
s%@setjmpo@%$setjmpo%g
s%@architecture@%$architecture%g
s%@software_type@%$software_type%g
s%@software_version@%$software_version%g
s%@LIBS@%$LIBS%g
s%@srcdir@%$srcdir%g
s%@DEFS@%-DHAVE_CONFIG_H%" $ac_given_srcdir/${ac_file}.in >> $ac_file
fi; done

# These sed commands are put into ac_sed_defs when defining a macro.
# They are broken into pieces to make the sed script easier to manage.
# They are passed to sed as "A NAME B NAME C VALUE D", where NAME
# is the cpp macro being defined and VALUE is the value it is being given.
# Each defining turns into a single global substitution command.
# Hopefully no one uses "!" as a variable value.
# Other candidates for the sed separators, like , and @, do get used.
#
# ac_d sets the value in "#define NAME VALUE" lines.
ac_dA='s!^\([ 	]*\)#\([ 	]*define[ 	][ 	]*\)'
ac_dB='\([ 	][ 	]*\)[^ 	]*!\1#\2'
ac_dC='\3'
ac_dD='!g'
# ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
ac_uA='s!^\([ 	]*\)#\([ 	]*\)undef\([ 	][ 	]*\)'
ac_uB='\([ 	]\)!\1#\2define\3'
ac_uC=' '
ac_uD='\4!g'
# ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
ac_eA='s!^\([ 	]*\)#\([ 	]*\)undef\([ 	][ 	]*\)'
ac_eB='$!\1#\2define\3'
ac_eC=' '
ac_eD='!g'
rm -f conftest.sed
EOF
# Turn off quoting long enough to insert the sed commands.
rm -f conftest.sh
cat > conftest.sh <<EOF
$ac_sed_defs
EOF

# Break up $ac_sed_defs (now in conftest.sh) because some shells have a limit
# on the size of here documents.

# Maximum number of lines to put in a single here document.
ac_max_sh_lines=9

while :
do
  # wc gives bogus results for an empty file on some AIX systems.
  ac_lines=`grep -c . conftest.sh`
  if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
  rm -f conftest.s1 conftest.s2
  sed ${ac_max_sh_lines}q conftest.sh > conftest.s1 # Like head -9.
  sed 1,${ac_max_sh_lines}d conftest.sh > conftest.s2 # Like tail +10.
  # Write a limited-size here document to append to conftest.sed.
  echo 'cat >> conftest.sed <<CONFEOF' >> config.status
  cat conftest.s1 >> config.status
  echo 'CONFEOF' >> config.status
  rm -f conftest.s1 conftest.sh
  mv conftest.s2 conftest.sh
done
rm -f conftest.sh

# Now back to your regularly scheduled config.status.
cat >> config.status <<\EOF
# This sed command replaces #undef's with comments.  This is necessary, for
# example, in the case of _POSIX_SOURCE, which is predefined and required
# on some systems where configure will not decide to define it in
# h/config.h h/ecl.h.
cat >> conftest.sed <<\CONFEOF
s,^[ 	]*#[ 	]*undef[ 	][ 	]*[a-zA-Z_][a-zA-Z_0-9]*,/* & */,
CONFEOF
rm -f conftest.h
# Break up the sed commands because old seds have small limits.
ac_max_sed_lines=20

CONFIG_HEADERS=${CONFIG_HEADERS-"h/config.h h/ecl.h"}
for ac_file in .. ${CONFIG_HEADERS}; do if test "x$ac_file" != x..; then
  echo creating $ac_file

  cp $ac_given_srcdir/$ac_file.in conftest.h1
  cp conftest.sed conftest.stm
  while :
  do
    ac_lines=`grep -c . conftest.stm`
    if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
    rm -f conftest.s1 conftest.s2 conftest.h2
    sed ${ac_max_sed_lines}q conftest.stm > conftest.s1 # Like head -20.
    sed 1,${ac_max_sed_lines}d conftest.stm > conftest.s2 # Like tail +21.
    sed -f conftest.s1 < conftest.h1 > conftest.h2
    rm -f conftest.s1 conftest.h1 conftest.stm
    mv conftest.h2 conftest.h1
    mv conftest.s2 conftest.stm
  done
  rm -f conftest.stm conftest.h
  echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
  cat conftest.h1 >> conftest.h
  rm -f conftest.h1
  if cmp -s $ac_file conftest.h 2>/dev/null; then
    # The file exists and we would not be changing it.
    echo "$ac_file is unchanged"
    rm -f conftest.h
  else
    rm -f $ac_file
    mv conftest.h $ac_file
  fi
fi; done
rm -f conftest.sed


# Fix machine dependencies in Makefiles

CPP=`grep CPP= config.status | sed -e "s/CPP=//" -e "s/'//g"`
# Prefer cpp since it does not remove backslash newline
test -x /lib/cpp && CPP=/lib/cpp

SUBDIR_MAKEFILES=`grep SUBDIR_MAKEFILES= Makefile | sed -e "s/SUBDIR_MAKEFILES=//"`
for mf in config.lsp clx/defsys.lsp Makefile ${SUBDIR_MAKEFILES}; do
     echo updating $mf
     # pull in configuration #defines, but omit #includes
     cat h/config.h | \
	grep -v '^# *include' > junk.c
     sed -e '/^#  */d' $mf >> junk.c
     ${CPP} -P -D${machine} junk.c | \
     sed  -e "s/@MACHINE@/${machine}/" \
          -e 's/^#.*//' -e 's/^[ 	][ 	]*$//' -e 's/^ /	/' | \
     sed -n -e '/^..*$/p' > $mf
     rm -f junk.c
done
echo updating ../Makefile
# Fix srcdir and VPATH
sed -e "s/@MACHINE@/${machine}/" -e "s%src/\.\.$%src%" ../Makefile > foo
mv foo ../Makefile

exit 0
EOF
chmod +x config.status
test -n "$no_create" || ${CONFIG_SHELL-/bin/sh} config.status

