2011-01-21 00:06:59 +00:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
|
|
|
|
# Installation script to build the autotools toolchain.
|
2011-03-04 15:35:09 +00:00
|
|
|
# Christoph Niethammer <niethammer@hlrs.de> (C) 2011
|
2011-01-21 00:06:59 +00:00
|
|
|
|
|
|
|
set -e
|
2014-05-26 11:49:21 +00:00
|
|
|
#set -x
|
2011-01-21 00:06:59 +00:00
|
|
|
|
2011-03-23 11:27:26 +00:00
|
|
|
source "functions.sh"
|
|
|
|
|
2011-01-21 00:06:59 +00:00
|
|
|
export ORIGDIR=`pwd`
|
|
|
|
export SIT_DIR=$(dirname "$ORIGDIR/$0")
|
|
|
|
echo $SIT_DIR
|
|
|
|
|
|
|
|
export SRC_POOL=${HOME}/src
|
2011-02-09 09:03:13 +00:00
|
|
|
export WORKDIR_BASE=${HOME}/work
|
2011-01-21 00:06:59 +00:00
|
|
|
|
2011-02-12 03:55:14 +00:00
|
|
|
#PREFIX=$HOME/bin/local
|
2012-06-15 11:11:27 +00:00
|
|
|
PREFIX=${PREFIX:=/opt/amtopt/autotools/local}
|
2011-01-21 00:06:59 +00:00
|
|
|
MAKEOPTS="-j4"
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-06-15 11:11:27 +00:00
|
|
|
#module load compiler/gnu/4.4.3
|
2011-01-21 00:06:59 +00:00
|
|
|
|
2014-05-26 11:49:21 +00:00
|
|
|
M4_VERSION=1.4.16
|
2012-06-15 11:11:27 +00:00
|
|
|
BISON_VERSION=2.4.3
|
2014-05-26 11:49:21 +00:00
|
|
|
LIBTOOL_VERSION=2.4.2
|
|
|
|
AUTOCONF_VERSION=2.69
|
|
|
|
AUTOMAKE_VERSION=1.13.4
|
2011-01-21 00:06:59 +00:00
|
|
|
|
|
|
|
|
|
|
|
function sit_auto_install() {
|
2011-02-09 09:03:13 +00:00
|
|
|
export WORKDIR=$WORKDIR_BASE/${P}
|
|
|
|
export SRCDIR=${WORKDIR}/${P}
|
|
|
|
export BUILDDIR=${WORKDIR}/build
|
2011-01-21 00:06:59 +00:00
|
|
|
if [ -d ${WORKDIR} ]
|
|
|
|
then
|
|
|
|
rm -rf ${WORKDIR}
|
|
|
|
fi
|
|
|
|
mkdir -p ${WORKDIR}
|
|
|
|
mkdir -p ${BUILDDIR}
|
2011-03-23 11:27:26 +00:00
|
|
|
mkdir -p ${PREFIX}
|
2011-01-21 00:06:59 +00:00
|
|
|
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}
|
2014-05-26 11:49:21 +00:00
|
|
|
A=${P}.tar.gz
|
2011-01-21 00:06:59 +00:00
|
|
|
sit_auto_install
|
|
|
|
|
2011-02-12 03:55:14 +00:00
|
|
|
export PATH=$PREFIX/bin:$PATH
|
|
|
|
export LD_LIBRARY_PATH=$PREFIX/lib:$LD_LIBRARY_PATH
|
2011-01-21 00:06:59 +00:00
|
|
|
# install automake
|
|
|
|
P=automake-${AUTOMAKE_VERSION}
|
2014-05-26 11:49:21 +00:00
|
|
|
A=${P}.tar.gz
|
2011-01-21 00:06:59 +00:00
|
|
|
sit_auto_install
|
|
|
|
|
|
|
|
exit 0
|