#!/usr/bin/env bash # Installation script to build the autotools toolchain. # Christoph Niethammer (C) 2011 set -e #set -x source "functions.sh" export ORIGDIR=`pwd` export SIT_DIR=$(dirname "$ORIGDIR/$0") echo $SIT_DIR export SRC_POOL=${HOME}/src export WORKDIR_BASE=${HOME}/work #PREFIX=$HOME/bin/local PREFIX=${PREFIX:=/opt/amtopt/autotools/local} MAKEOPTS="-j4" #module load compiler/gnu/4.4.3 M4_VERSION=1.4.16 BISON_VERSION=2.4.3 LIBTOOL_VERSION=2.4.2 AUTOCONF_VERSION=2.69 AUTOMAKE_VERSION=1.13.4 function sit_auto_install() { export WORKDIR=$WORKDIR_BASE/${P} export SRCDIR=${WORKDIR}/${P} export BUILDDIR=${WORKDIR}/build if [ -d ${WORKDIR} ] then rm -rf ${WORKDIR} fi mkdir -p ${WORKDIR} mkdir -p ${BUILDDIR} mkdir -p ${PREFIX} cd ${WORKDIR} sit_unpack sit_configure sit_build sit_install } # install m4 P=m4-${M4_VERSION} A=${P}.tar.bz2 sit_auto_install # install bison P=bison-${BISON_VERSION} A=${P}.tar.bz2 sit_auto_install # install libtool P=libtool-${LIBTOOL_VERSION} A=${P}.tar.gz sit_auto_install # install autoconf P=autoconf-${AUTOCONF_VERSION} A=${P}.tar.gz sit_auto_install export PATH=$PREFIX/bin:$PATH export LD_LIBRARY_PATH=$PREFIX/lib:$LD_LIBRARY_PATH # install automake P=automake-${AUTOMAKE_VERSION} A=${P}.tar.gz sit_auto_install exit 0