Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo


[9116e0]: configure Maximize Restore History

Download this file

configure    67 lines (62 with data), 2.4 kB

# This is just a driver for configure, the real configure is in src.
# This script identifies the machine, and creates a directory for
# the installation, where it runs ${srcdir}/configure.

#if uname -a | grep -i 'mingw32' > /dev/null; then
#  srcdir=`pwd -W`/src;
#  srcdir=`pwd`/src

if [ ! -d ${buildir} ] ; then
   echo Creating directory "\`${buildir}'"
   mkdir ${buildir}

echo Switching to directory "\`${buildir}'" to continue configuration.

# There are two ways to configure ECL. If we use our own version of GMP,
# we let it configure itself and later on retrieve the appropiate flags
if ( echo $* | grep guess-host-cflags ); then
  # In some architectures/OS, a flag is required to select the ABI. GMP
  # guesses these flags, and stores them in CFLAGS and GMP_LDFLAGS.
  echo ====
  echo ==== Using the configuration process of GMP to retrieve the best
  echo ==== flags and a precise host type.
  echo ====
  cd ${buildir}
  rm -rf tmp; mkdir tmp; cd tmp;
  ${srcdir}/gmp/configure --srcdir=${srcdir}/gmp --prefix=${builddir}
  CFLAGS=`grep '^s,@CFLAGS@' config.status| sed 's&s,@CFLAGS@,\(.*\),;t t&\1&'`
  GMP_LDFLAGS=`grep '^s,@GMP_LDFLAGS@' config.status| sed 's&s,@GMP_LDFLAGS@,\(.*\),;t t&\1&'`;
  # Notice that GMP_LDFLAGS is designed to be passed to libtool, and therefore
  # some options could be prefixed by -Wc, which means "flag for the compiler".
  LDFLAGS=`grep '^s,@LDFLAGS@' config.status| sed 's&s,@LDFLAGS@,\(.*\),;t t&\1&'`;
  LDFLAGS=`echo ${LDFLAGS} ${GMP_LDFLAGS} | sed 's%-Wc,%%'`
  #host=`grep '^s,@host@' config.status | sed 's&s,@host@,\(.*\),;t t&\1&'`
  echo Guessed values:
  echo CFLAGS:  ${CFLAGS}
  #echo host:    ${host}
  cd .. && rm -rf tmp
  echo ====
  echo ==== Configuring ECL
  echo ====
  # GMP knows more chiptset names than usual FSF configuration tools. We
  # therefore need to use its config* files when configuring either ECL
  # or the Boehm-Weiser garbage collector.
  #for i in config.sub configfsf.sub config.guess configfsf.guess; do
  #    cp ${srcdir}/gmp/$i ${srcdir}/
  #    cp ${srcdir}/gmp/$i ${srcdir}/gc/
  ${srcdir}/configure --srcdir=${srcdir} $*
  cd ${buildir}
  ${srcdir}/configure --srcdir=${srcdir} $*
echo Configuration complete. To build ECL, issue 'make' in this directory.