forked from dreamcat4/php-fpm
-
Notifications
You must be signed in to change notification settings - Fork 0
/
generate-autotools
executable file
·44 lines (38 loc) · 1.3 KB
/
generate-autotools
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
#! /bin/sh
#
# generate-autotools - Determine the correct versions for autoconf, automake, libtool.
# Download and install them into ./autotools
#
# Usage: ./generate-autotools
#
BASEDIR="$PWD"
AUTOTOOLS="$BASEDIR/autotools"
# Create autotools directory
mkdir -p "$AUTOTOOLS"
## Install autoconf
AC_VER=`head ./configure | grep -i autoconf | sed -e 's/.*toconf //' -e 's/ .*//' -e 's/\.$//'`
wget http://ftp.gnu.org/gnu/autoconf/autoconf-$AC_VER.tar.gz
tar -zxvf autoconf-$AC_VER.tar.gz
cd autoconf-$AC_VER/
./configure --prefix="$AUTOTOOLS" && make && make install
if [ "$?" != "0" ]; then exit 1; fi
cd ..
rm -Rf autoconf-$AC_VER*
## Install automake
AM_VER=`head ./Makefile.in | grep -i automake | sed -e 's/.*tomake //' -e 's/ .*//' -e 's/\.$//'`
wget http://ftp.gnu.org/gnu/automake/automake-$AM_VER.tar.gz
tar -zxvf automake-$AM_VER.tar.gz
cd automake-$AM_VER/
./configure --prefix="$AUTOTOOLS" && make && make install
if [ "$?" != "0" ]; then exit 1; fi
cd ..
rm -Rf automake-$AM_VER*
## Install libtool
LT_VER=`head -50 ./ltmain.sh | grep "VERSION=" | sed -e 's/^VERSION=//'`
wget http://ftp.gnu.org/gnu/libtool/libtool-$LT_VER.tar.gz
tar -zxvf libtool-$LT_VER.tar.gz
cd libtool-$LT_VER/
./configure --prefix="$AUTOTOOLS" && make && make install
if [ "$?" != "0" ]; then exit 1; fi
cd ..
rm -Rf libtool-$LT_VER*