[24596] | 1 | #!/bin/bash
|
---|
| 2 | set -eu
|
---|
| 3 |
|
---|
| 4 | #Version numbers
|
---|
| 5 | M4_VER="1.4.18"
|
---|
| 6 | AUTOCONF_VER="2.69"
|
---|
| 7 | AUTOMAKE_VER="1.16.1"
|
---|
| 8 | LIBTOOL_VER="2.4.2"
|
---|
| 9 |
|
---|
| 10 | # Clean up existing directories
|
---|
| 11 | rm -rf install src
|
---|
| 12 |
|
---|
| 13 | # Set up for installation
|
---|
| 14 | mkdir install
|
---|
| 15 | export PATH="$ISSM_DIR/externalpackages/autotools/install/bin:$PATH"
|
---|
| 16 |
|
---|
| 17 | # Install m4
|
---|
| 18 | echo " === INSTALLING M4 =="
|
---|
| 19 | $ISSM_DIR/scripts/DownloadExternalPackage.sh "https://issm.ess.uci.edu/files/externalpackages/m4-$M4_VER.tar.gz" "m4-$M4_VER.tar.gz"
|
---|
| 20 | tar -zxvf m4-$M4_VER.tar.gz
|
---|
| 21 | mv m4-$M4_VER src
|
---|
| 22 | cd src
|
---|
| 23 |
|
---|
| 24 | ## Fixes required by glibc-2.28
|
---|
| 25 | #
|
---|
| 26 | # Source: http://www.linuxfromscratch.org/lfs/view/development/chapter06/m4.html
|
---|
| 27 | #
|
---|
| 28 | sed -i 's/IO_ftrylockfile/IO_EOF_SEEN/' lib/*.c
|
---|
| 29 | echo "#define _IO_IN_BACKUP 0x100" >> lib/stdio-impl.h
|
---|
| 30 |
|
---|
| 31 | ./configure --prefix="$ISSM_DIR/externalpackages/autotools/install"
|
---|
| 32 | make
|
---|
| 33 | make install
|
---|
| 34 | cd ..
|
---|
| 35 |
|
---|
| 36 | # Install autoconf
|
---|
| 37 | echo " === INSTALLING AUTOCONF =="
|
---|
| 38 | rm -rf src
|
---|
| 39 | $ISSM_DIR/scripts/DownloadExternalPackage.sh "https://issm.ess.uci.edu/files/externalpackages/autoconf-$AUTOCONF_VER.tar.gz" "autoconf-$AUTOCONF_VER.tar.gz"
|
---|
| 40 | tar -zxvf autoconf-$AUTOCONF_VER.tar.gz
|
---|
| 41 | mv autoconf-$AUTOCONF_VER src
|
---|
| 42 | cd src
|
---|
| 43 | ./configure --prefix="$ISSM_DIR/externalpackages/autotools/install"
|
---|
| 44 | make
|
---|
| 45 | make install
|
---|
| 46 | cd ..
|
---|
| 47 |
|
---|
| 48 | #install automake
|
---|
| 49 | echo " === INSTALLING AUTOMAKE =="
|
---|
| 50 | rm -rf src
|
---|
| 51 | $ISSM_DIR/scripts/DownloadExternalPackage.sh "https://issm.ess.uci.edu/files/externalpackages/automake-$AUTOMAKE_VER.tar.gz" "automake-$AUTOMAKE_VER.tar.gz"
|
---|
| 52 | tar -zxvf automake-$AUTOMAKE_VER.tar.gz
|
---|
| 53 | mv automake-$AUTOMAKE_VER src
|
---|
| 54 | cd src
|
---|
| 55 | ./configure --prefix="$ISSM_DIR/externalpackages/autotools/install"
|
---|
| 56 | make
|
---|
| 57 | make install
|
---|
| 58 | cd ..
|
---|
| 59 |
|
---|
| 60 | # Install libtool
|
---|
| 61 | echo " === INSTALLING LIBTOOL =="
|
---|
| 62 | rm -rf src
|
---|
| 63 | $ISSM_DIR/scripts/DownloadExternalPackage.sh "https://issm.ess.uci.edu/files/externalpackages/libtool-$LIBTOOL_VER.tar.gz" "libtool-$LIBTOOL_VER.tar.gz"
|
---|
| 64 | tar -zxvf libtool-$LIBTOOL_VER.tar.gz
|
---|
| 65 | rm libtool-$LIBTOOL_VER.tar.gz
|
---|
| 66 | mv libtool-$LIBTOOL_VER src
|
---|
| 67 | cd src
|
---|
| 68 | ./configure --prefix="$ISSM_DIR/externalpackages/autotools/install"
|
---|
| 69 | make
|
---|
| 70 | make install
|
---|
| 71 | cd ..
|
---|