Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

[7a3e83]: configure Maximize Restore History

Download this file

configure    678 lines (594 with data), 24.2 kB

#! /bin/sh
# Usage: configure [options] [dirname [cc]]
# Examples:
#   configure obj
#   CC=gcc configure make.gcc
#   CC=cc configure make.cc
#   configure make.gcc gcc     (deprecated)
#   configure make.cc cc       (deprecated)

info_help () {
cat << \EOP
Usage: configure [options] [dirname]
dirname: Name of directory in which to build CLISP. This allows you to build
         CLISP with different compilers on the same machine or for different
         architectures in the same filesystem, sharing the same source.
         Default is "src".
options: The following options are recognized:
         --help                print this message and exit
         --version             print the CLISP version and exit
         --config              unix/INSTALL step 3: configuration only
         --build               unix/INSTALL steps 3-8: configure, build, check
         --install             unix/INSTALL step 9: install
         The following options set installation parameters:
         --srcdir=SRCDIR       sets the source directory to SRCDIR
         The following options are passed to subordinate `configure' scripts:
         --quiet, --silent     do not print `checking...' messages
         --prefix=PREFIX       base directory for files to be installed
         --exec-prefix=PREFIX  base directory for architecture-dependent
                               files to be installed
         --fsstnd=STYLE        specify file system standard for installation
         --bindir=DIR          sets the installation directory for executables
         --libdir=DIR          sets the installation directory for libraries
         --includedir=DIR      sets the installation directory for C header
                               files
         --datadir=DIR         sets the installation directory for
                               read-only architecture-independent data
         --localedir=DIR       sets the installation directory for
                               locale-dependent architecture-independent data
         --docdir=DIR          sets the installation directory for
                               documentation
         --mandir=DIR          sets the installation directory for
                               documentation in man page format
         --htmldir=DIR         sets the installation directory for
                               documentation in HTML format
         --dvidir=DIR          sets the installation directory for
                               documentation in TeX DVI format
         --psdir=DIR           sets the installation directory for
                               documentation in PostScript format
         --pdfdir=DIR          sets the installation directory for
                               documentation in PDF format
         --host=HOST           specify host in CPU-VENDOR-OS format (just
                               in case config.guess guesses wrong)
         --with-PACKAGE        use PACKAGE
         --without-PACKAGE     do not use PACKAGE
           PACKAGEs available (the default is the opposite of the following):
          --without-dynamic-ffi   do not support Foreign Function Interface
          --with-dynamic-modules  support Dynamic Modules
          --without-unicode       no UNICODE support: character=8bit
          --without-readline      do not look for GNU readline
          --with-threads=FLAVOR   support multiple threads in one CLISP image
                 via OS threads [highly experimental - use at your own risk]
                 FLAVORs = POSIX_THREADS POSIXOLD_THREADS SOLARIS_THREADS
                           C_THREADS WIN32_THREADS
         --with-module=MODULE  build with add-on MODULE
                               some modules require dynamic FFI,
                               so it will be turned on if the FFI checks pass
         --list-modules        list the modules included in the distribution
         --hyperspec=URL       the path to the Common Lisp HyperSpec
           (the default is http://www.lisp.org/HyperSpec/
            or the value of the environment variable CLHSROOT, if set).
         --with-debug          pass "debug" to makemake (CFLAGS+=g &c)
         --edit-config         edit config.lisp with ${EDITOR:-vi} before make
                               (useful with --build and --install)
Example:
         configure --build built-with-gcc
         su bin
         configure --install built-with-gcc
         exit
Specifying the C compiler:
         If you wish to specify the C compiler that will get used to build
         CLISP, set the environment variables CC, CFLAGS, LIBS.
         Put compiler flags that have to be passed to the preprocessor
         into the CC variable, not the CFLAGS variable.
         For example, if you want to use gcc in ANSI C mode,
         execute the following before calling `configure':
               setenv CC "gcc -ansi"                 if using csh
               export CC="gcc -ansi"                 if using bash or ksh
               CC="gcc -ansi"; export CC             if using sh
Using GNU libiconv (only needed if you do not have GNU LIBC 2.2 or better):
         If you want to use GNU libiconv which is not installed system-wide,
         you may supply a --with-libiconv-prefix argument
         (type './src/configure --help' for details).
         The same goes for non-standard locations of libintl and libsigsegv.
EOP
}

# Abort in case something fails.
set -e

# Nuisances.
(unset CDPATH) >/dev/null 2>&1 && unset CDPATH

srcdir=''
subdir_configure_args=''
makemake_args=''
do_config=''
do_build=''
do_install=''
argcount=0
edit_config=''

prev=''
passnext=''
passnextm=''
debug=''
do_ffi='yes'
target=''

for arg # in "$@"
do
  # If the previous option needs an argument, assign it.
  if test -n "$prev"; then
    # If the previous option needs an argument for subdir_configure_args, pass it.
    if test -n "$passnext"; then
      subdir_configure_args="$subdir_configure_args $arg"
      passnext=''
      # If the previous option needs an argument for makemake_args, pass it as well.
      if test -n "$passnextm"; then
        makemake_args="$makemake_args$arg"
        passnextm=''
      fi
    else
      eval "$prev=\$arg"
    fi
    prev=''
  else

    case "$arg" in

      --build | --buil | --bui | --bu)
        do_config=1
        do_build=1 ;;

      --config | --confi | --conf | --con | --co | --c)
        do_config=1 ;;

      --install | --instal | --insta | --inst | --ins)
        do_config=1
        do_build=1
        do_install=1 ;;

      --edit-config | --edit-confi | --edit-conf | --edit-con | --edit-co | \
      --edit-c | --edit- | --edit | --edi | --ed)
        edit_config=1 ;;

      --help | --hel | --he)
        info_help
        exit 0 ;;

      --version | --versio | --versi | --vers | --ver | --ve | --v)
        version="CLISP version "`. ./version.sh ; echo $VERSION_NUMBER`
        echo $version
        exit 0 ;;

      --list-modules | --list-module | --list-modul | --list-modu | --list-mod | --list-mo | --list-m | --list- | --list | --lis)
        cd modules;
        echo "module sets found in the directory 'modules':"
        find . -name link.sh -o -name link.sh.in | sed -e 's,^\./,  ,' -e 's,/[^/]*$,,'
        exit 0 ;;

      --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
        srcdir=`echo "$arg" | sed 's,^[-_a-zA-Z0-9]*=,,'` ;;

      --srcdir | --srcdi | --srcd | --src | --sr)
        prev=srcdir
        passnext=yes ;;

      --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=*)
        subdir_configure_args="$subdir_configure_args $arg"
        makemake_args="$makemake_args --prefix="`echo "$arg" | sed 's,^[-_a-zA-Z0-9]*=,,'` ;;

      --prefix | --prefi | --pref | --pre | --pr)
        subdir_configure_args="$subdir_configure_args $arg"
        makemake_args="$makemake_args --prefix="
        prev=prefix
        passnext=yes
        passnextm=yes ;;

      --exec_prefix=* | --exec-prefix=* | --exec-prefi=* | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* | -exec=* | --exe=* | --ex=*)
        subdir_configure_args="$subdir_configure_args $arg"
        makemake_args="$makemake_args --exec-prefix="`echo "$arg" | sed 's,^[-_a-zA-Z0-9]*=,,'` ;;

      --exec_prefix | --exec-prefix | --exec-prefi | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- | -exec | --exe | --ex)
        subdir_configure_args="$subdir_configure_args $arg"
        makemake_args="$makemake_args --exec-prefix="
        prev=exec_prefix
        passnext=yes
        passnextm=yes ;;

      --fsstnd=* | --fsstn=* | --fsst=* | --fss=* | --fs=* | --f=*)
        makemake_args="$makemake_args --fsstnd="`echo "$arg" | sed 's,^[-_a-zA-Z0-9]*=,,'` ;;

      --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
        subdir_configure_args="$subdir_configure_args $arg"
        makemake_args="$makemake_args --bindir="`echo "$arg" | sed 's,^[-_a-zA-Z0-9]*=,,'` ;;

      --bindir | --bindi | --bind | --bin | --bi)
        subdir_configure_args="$subdir_configure_args $arg"
        makemake_args="$makemake_args --bindir="
        prev=bindir
        passnext=yes
        passnextm=yes ;;

      --libdir=* | --libdi=* | --libd=* | --lib=*)
        subdir_configure_args="$subdir_configure_args $arg"
        makemake_args="$makemake_args --libdir="`echo "$arg" | sed 's,^[-_a-zA-Z0-9]*=,,'` ;;

      --libdir | --libdi | --libd | --lib)
        subdir_configure_args="$subdir_configure_args $arg"
        makemake_args="$makemake_args --libdir="
        prev=libdir
        passnext=yes
        passnextm=yes ;;

      --includedir=* | --includedi=* | --included=* | --include=* | --includ=* | --inclu=* | --incl=* | --inc=*)
        subdir_configure_args="$subdir_configure_args $arg"
        makemake_args="$makemake_args --includedir="`echo "$arg" | sed 's,^[-_a-zA-Z0-9]*=,,'` ;;

      --includedir | --includedi | --included | --include | --includ | --inclu | --incl | --inc)
        subdir_configure_args="$subdir_configure_args $arg"
        makemake_args="$makemake_args --includedir="
        prev=includedir
        passnext=yes
        passnextm=yes ;;

      --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* | --da=*)
        subdir_configure_args="$subdir_configure_args $arg"
        makemake_args="$makemake_args --datadir="`echo "$arg" | sed 's,^[-_a-zA-Z0-9]*=,,'` ;;

      --datadir | --datadi | --datad | --data | --dat | --da)
        subdir_configure_args="$subdir_configure_args $arg"
        makemake_args="$makemake_args --datadir="
        prev=datadir
        passnext=yes
        passnextm=yes ;;

      --localedir=* | --localedi=* | --localed=* | --locale=* | --local=* | --loca=* | --loc=* | --lo=*)
        #subdir_configure_args="$subdir_configure_args $arg" # waiting for autoconf-2.60
        makemake_args="$makemake_args --localedir="`echo "$arg" | sed 's,^[-_a-zA-Z0-9]*=,,'` ;;

      --localedir | --localedi | --localed | --locale | --local | --loca | --loc | --lo)
        #subdir_configure_args="$subdir_configure_args $arg" # waiting for autoconf-2.60
        makemake_args="$makemake_args --localedir="
        prev=localedir
        passnext=yes
        passnextm=yes ;;

      --docdir=* | --docdi=* | --docd=* | --doc=* | --do=*)
        #subdir_configure_args="$subdir_configure_args $arg" # waiting for autoconf-2.60
        makemake_args="$makemake_args --docdir="`echo "$arg" | sed 's,^[-_a-zA-Z0-9]*=,,'` ;;

      --docdir | --docdi | --docd | --doc | --do)
        #subdir_configure_args="$subdir_configure_args $arg" # waiting for autoconf-2.60
        makemake_args="$makemake_args --docdir="
        prev=docdir
        passnext=yes
        passnextm=yes ;;

      --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
        subdir_configure_args="$subdir_configure_args $arg"
        makemake_args="$makemake_args --mandir="`echo "$arg" | sed 's,^[-_a-zA-Z0-9]*=,,'` ;;

      --mandir | --mandi | --mand | --man | --ma | --m)
        subdir_configure_args="$subdir_configure_args $arg"
        makemake_args="$makemake_args --mandir="
        prev=mandir
        passnext=yes
        passnextm=yes ;;

      --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* | --ht=*)
        #subdir_configure_args="$subdir_configure_args $arg" # waiting for autoconf-2.60
        makemake_args="$makemake_args --htmldir="`echo "$arg" | sed 's,^[-_a-zA-Z0-9]*=,,'` ;;

      --htmldir | --htmldi | --htmld | --html | --htm | --ht)
        #subdir_configure_args="$subdir_configure_args $arg" # waiting for autoconf-2.60
        makemake_args="$makemake_args --htmldir="
        prev=htmldir
        passnext=yes
        passnextm=yes ;;

      --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
        #subdir_configure_args="$subdir_configure_args $arg" # waiting for autoconf-2.60
        makemake_args="$makemake_args --dvidir="`echo "$arg" | sed 's,^[-_a-zA-Z0-9]*=,,'` ;;

      --dvidir | --dvidi | --dvid | --dvi | --dv)
        #subdir_configure_args="$subdir_configure_args $arg" # waiting for autoconf-2.60
        makemake_args="$makemake_args --dvidir="
        prev=dvidir
        passnext=yes
        passnextm=yes ;;

      --psdir=* | --psdi=* | --psd=* | --ps=*)
        #subdir_configure_args="$subdir_configure_args $arg" # waiting for autoconf-2.60
        makemake_args="$makemake_args --psdir="`echo "$arg" | sed 's,^[-_a-zA-Z0-9]*=,,'` ;;

      --psdir | --psdi | --psd | --ps)
        #subdir_configure_args="$subdir_configure_args $arg" # waiting for autoconf-2.60
        makemake_args="$makemake_args --psdir="
        prev=psdir
        passnext=yes
        passnextm=yes ;;

      --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
        #subdir_configure_args="$subdir_configure_args $arg" # waiting for autoconf-2.60
        makemake_args="$makemake_args --pdfdir="`echo "$arg" | sed 's,^[-_a-zA-Z0-9]*=,,'` ;;

      --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
        #subdir_configure_args="$subdir_configure_args $arg" # waiting for autoconf-2.60
        makemake_args="$makemake_args --pdfdir="
        prev=pdfdir
        passnext=yes
        passnextm=yes ;;

      --hyperspec=* | --hyperspe=* | --hypersp=* | --hypers=* | --hs=* | --hy=*)
        makemake_args="$makemake_args --hyperspec="`echo "$arg" | sed 's,^[-_a-zA-Z0-9]*=,,'` ;;

      --host=* | --hos=* | --ho=* | \
      --quiet | --quie | --qui | --qu | --q | \
      --silent | --silen | --sile | --sil | --si)
        subdir_configure_args="$subdir_configure_args $arg" ;;

      --host | --hos | --ho)
        subdir_configure_args="$subdir_configure_args $arg"
        prev=host
        passnext=yes ;;

      --with-debug)
        makemake_args="--verbose=yes $makemake_args"
        debug="debug" ;;

      --without-dynamic-ffi | --with-dynamic-ffi=no | --with-no-dynamic-ffi)
        do_ffi="no" ;;

      --with-dynamic-modules | --with-dynamic-modules=yes)
        makemake_args="--with-dynamic-modules ${makemake_args}" ;;

      --with-mingw | --with-no-cygwin | --without-cygwin | --with-cygwin=no)
        CC="${CC:-gcc} -mno-cygwin"; export CC;
        makemake_args="$makemake_args --win32gcc" ;;

      --with-* | --without-*)
        subdir_configure_args="$subdir_configure_args $arg"
        makemake_args="$makemake_args $arg" ;;

      --enable-* | --disable-*)
        subdir_configure_args="$subdir_configure_args $arg"
        makemake_args="$makemake_args $arg" ;;

      --*)
        echo "$0: invalid argument $arg" 1>&2
        echo "$0: Try \`$0 --help'" 1>&2
        exit 1 ;;

      *) # Everything else counts as a positional argument
        argcount=`expr $argcount + 1`
        eval "POSARG$argcount=\$arg" ;;

    esac

  fi
done
if test -n "$prev"; then
  echo "$0: missing argument to $prev" 1>&2
  echo "$0: Try \`$0 --help'" 1>&2
  exit 1
fi

DIRNAME=$POSARG1
COMPILER=$POSARG2 # deprecated

if test -z "$do_config" -a -z "$do_build" -a -z "$do_install"; then
  # Default is --config
  do_config=1
fi

# checking how to copy files
echo "blabla" > conftest.x
err=`/bin/sh -c "cp -p conftest.x conftest.y 2>&1 ; exit 0"`
if test -z "$err"; then
  CP='cp -p'
else
  CP='cp'
fi
rm -f conftest*

# get the absolute pathname from a possibly relative one
abs_pwd () { cd "$1" > /dev/null; pwd; }

# link FILE1 FILE2  is like `ln', but chooses the cheapest alternative:
# hard link if FILE1 and FILE2 on the same disk, else symbolic link if the
# system supports that, else file copy.
link () {
rm -f "$2";
# Note: With some versions of "ln" this does not work if FILE2 is a symlink.
if ln "$1" "$2" 2>/dev/null; then
  :
else
  srcfile_dirname=`echo "$1" | sed -e 's,/[^/]*$,,'`
  test -n "$srcfile_dirname" || srcfile_dirname='/'
  srcfile_basename=`echo "$1" | sed -e 's,^.*/,,'`
  srcfile_absdirname=`abs_pwd "$srcfile_dirname"`
  if ln -s "$srcfile_absdirname/$srcfile_basename" "$2" 2>/dev/null; then
    :
  else
    $CP "$1" "$2"
  fi
fi
}
maybe_link () { if [ -f "$1" ]; then link "$1" "$2"; fi; }

conf_dir () {
  cd $1; shift;
  echo "executing `pwd`/configure $*"
  ${CONFIG_SHELL-/bin/sh} configure $*;
  cd ..;
}

# Note that we would need to call `/bin/pwd` if we wanted to compare two
# directories for equality. But here we only need to get _some_ absolute
# pathnames, hence `pwd` is enough.

if test -f /bin/pwd ; then
  ABSPATHPWD=/bin/pwd
else
  ABSPATHPWD=pwd
fi

abs_path_pwd () { cd "$1" > /dev/null; ${ABSPATHPWD}; }

maybe_mkdir() { test -d "$1" || mkdir -p "$1"; }

INPLACE=''
if test -n "$srcdir" ; then
  if test ! -d "$srcdir" ; then
    echo "$0: srcdir: ($srcdir) nonexistent" 1>&2
    exit 1
  fi
  ABS_SRCDIR=`abs_pwd "$srcdir"`;
  if [ "$DIRNAME" = "" ] ; then
    DIRNAME='.'
  fi
  maybe_mkdir "${DIRNAME}";
  REL_SRCDIR="$ABS_SRCDIR"
else
  if test -f ./ANNOUNCE -a -f ./SUMMARY; then
    srcdir='.'
    ABS_SRCDIR=`abs_pwd "$srcdir"`
    if [ "$DIRNAME" = "" ] ; then
      DIRNAME=src
    fi
  else
    if test -f ../ANNOUNCE -a -f ../SUMMARY; then
      srcdir='..'
      ABS_SRCDIR=`abs_pwd "$srcdir"`
      if [ "$DIRNAME" = "" ] ; then
        DIRNAME='.'
      fi
    else
      echo "$0: source directory not found, use --srcdir option" 1>&2
      exit 1
    fi
  fi
  maybe_mkdir "${DIRNAME}";
  if test `abs_path_pwd "$DIRNAME"/..` = `abs_path_pwd "$srcdir"` ; then
    REL_SRCDIR='..'
  else
    REL_SRCDIR="$ABS_SRCDIR"
  fi
fi
ABS_DIRNAME=`abs_pwd "$DIRNAME"`;
if test `abs_path_pwd "$DIRNAME"` = `abs_path_pwd "$srcdir"/src` ; then
  INPLACE=yes
fi
case "$REL_SRCDIR" in
  /*) RREL_SRCDIR="$REL_SRCDIR";;
  *)  RREL_SRCDIR="../$REL_SRCDIR";;
esac

# srcdir        top level source directory
#               (i.e. this script is $srcdir/configure)
# ABS_SRCDIR    absolute srcdir
# REL_SRCDIR    srcdir, relative to $DIRNAME
# RREL_SRCDIR   srcdir, relative to $DIRNAME/anysubdir
# DIRNAME       directory in which to build
# ABS_DIRNAME   absolute DIRNAME
# INPLACE       set if DIRNAME is the source directory, hence no links needed

if test -n "$do_config"; then

  cd "$ABS_SRCDIR"

  if [ "$COMPILER" != "" ] ; then
    CC="$COMPILER"
    export CC
  fi
  if test -z "$INPLACE"; then
    # Create subdirectories for: po
    # and fill them.
    # - po: Because the Makefile carefully uses $(srcdir), only
    #   a few files need to be linked over.
    for subdir in po; do
      if [ -d src/$subdir ] ; then
        maybe_mkdir "${ABS_DIRNAME}/${subdir}";
      fi
    done
    for f in po; do
      if [ -d src/$f ] ; then
        maybe_mkdir "${ABS_DIRNAME}/${f}";
        ( cd src
          for g in $f/* ; do maybe_link $g $ABS_DIRNAME/$g; done;
        )
      fi
    done
    for f in configure unixconf.h.in makemake.in version.h ; do
      maybe_link src/$f $ABS_DIRNAME/$f;
    done
  fi
  # Create subdirectories for the modules parts, and fill them.
  # The modules outright assume that $(srcdir)='.',
  # hence all files need to be linked over.
  #for subdir in `cd modules > /dev/null ; find . -type d -print`; do
  #  maybe_mkdir "${ABS_DIRNAME}/${f}";
  #done
  #for f in `cd modules > /dev/null ; find . '!' -type d -print`; do
  #  link $f $ABS_DIRNAME/$f
  #done
  cd modules;
  for d in *; do
    if [ "$d" != CVS ] ; then
      if [ -d "$d" ]; then ../src/lndir "$d" "$ABS_DIRNAME/$d"
      # else link "$d" "$ABS_DIRNAME/$d"
      fi
    fi
  done
  cd ..;
  FFI_DIRS="";
  if [ "$do_ffi" = "yes" ]; then
    FFI_DIRS="avcall callback";
    # Create subdirectories for the ffcall parts, and fill them.
    # The Makefiles carefully use $(srcdir).
    # Need to link over only a few files.
    for subdir in ${FFI_DIRS}; do
      if [ -d ffcall/$subdir ] ; then
        maybe_mkdir "${ABS_DIRNAME}/${subdir}";
      fi
    done
    for subdir in ${FFI_DIRS}; do
      f=$subdir/configure
      maybe_link ffcall/$f $ABS_DIRNAME/$f
    done
  fi # do_ffi
  # Similarly for libcharset.
  for subdir in libcharset; do
    if [ -d $subdir ] ; then
      maybe_mkdir "${ABS_DIRNAME}/${subdir}";
    fi
  done
  for subdir in libcharset; do
    f=$subdir/configure
    maybe_link $f $ABS_DIRNAME/$f
  done
  # Prepare the configure files.
  chmod a+x $ABS_DIRNAME/configure
  for subdir in ${FFI_DIRS} libcharset; do
    if test -d $ABS_DIRNAME/$subdir; then
      chmod a+x $ABS_DIRNAME/$subdir/configure
    fi
  done
  # Start the configurations.
  if test -n "$INPLACE"; then
    subdir_srcdir_args=''
  else
    subdir_srcdir_args="--srcdir=$REL_SRCDIR/src"
  fi
  conf_dir $ABS_DIRNAME $subdir_srcdir_args \
    $subdir_configure_args --cache-file=config.cache
  cd $ABS_DIRNAME;
  if [ "$do_ffi" = "yes" ]; then
    for subdir in ${FFI_DIRS}; do
      if test -d $subdir; then
        conf_dir $subdir --srcdir="$RREL_SRCDIR/ffcall/$subdir" \
          $subdir_configure_args --cache-file=../config.cache
      fi
    done
  fi # do_ffi
  for subdir in libcharset; do
    if test -d $subdir; then
      # We use --disable-shared because libtool support for shared libraries is
      # flaky: On HP-UX 10 with gcc-2.95.2, libtool fails to pass -fPIC to gcc,
      # and on cygwin and mingw it causes a link error regarding _WinMain@16.
      conf_dir $subdir --srcdir="$RREL_SRCDIR/$subdir" --disable-shared \
        $subdir_configure_args --cache-file=../config.cache
    fi
  done
  cd ..
fi

have_ffi=no
if test -d $ABS_DIRNAME/avcall -a -d $ABS_DIRNAME/callback; then
  if (cd $ABS_DIRNAME/avcall && make) &&
     (cd $ABS_DIRNAME/callback && make) &&
     (cd $ABS_DIRNAME/avcall && make check) &&
     (cd $ABS_DIRNAME/callback && make check); then
    makemake_args="--with-dynamic-ffi $makemake_args"
    have_ffi=yes
  fi
fi

makemake_args="${makemake_args} ${subdir_srcdir_args} ${target} ${debug}";

. ${ABS_DIRNAME}/config.cache
cat <<EOF
Configure findings:
  FFI:        ${have_ffi}
  readline:   ${ac_cv_use_readline}
  libsigsegv: ${cl_cv_lib_sigsegv}
EOF

if test -z "$do_build"; then

  echo
  echo "To continue building CLISP, the following commands are recommended"
  echo "  (cf. unix/INSTALL step 4):"
  if test "$DIRNAME" != "."; then
    echo "    cd $DIRNAME"
  fi
  echo "    ./makemake $makemake_args > Makefile"
  echo "    make config.lisp"
  echo "    ${EDITOR:-vi} config.lisp"
  stacksizelimit=`ulimit -s 2>/dev/null || :` # cygwin /bin/sh ulimit is broken
  if test -z "$stacksizelimit" || { test "$stacksizelimit" != unlimited && test "$stacksizelimit" -lt 8192; }; then
    cat <<EOF
# The default stack size on your platform is insufficient
# and must be increased to at least 8192.  You must do either
#    'ulimit -s 8192' (for Bourne shell derivatives, e.g., bash and zsh) or
#    'limit stacksize 8192' (for C shell derivarives, e.g., tcsh)
EOF
  fi
  echo "    make"
  echo "    make check"

else

  cd $ABS_DIRNAME
  echo "./makemake $makemake_args > Makefile"
  ./makemake $makemake_args > Makefile
  if [ -n "${edit_config}" ]; then
    make config.lisp;
    ${EDITOR:-vi} config.lisp;
  fi
  # ulimit: just to make sure, should not hurt
  #         cygwin /bin/sh ulimit is broken
  set +e; ulimit -s 8192 2>/dev/null; set -e;
  make
  make check
  cd ..

fi

if test -n "$do_install"; then

  cd $ABS_DIRNAME
  make install
  cd ..

fi