summaryrefslogtreecommitdiffstats
path: root/bootstrap
blob: 941991d8d7a134af00ac12c874c1af6e9bfddc62 (plain)
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
#! /bin/bash
ACLOCAL=${ACLOCAL:=aclocal}
AUTOHEADER=${AUTOHEADER:=autoheader}
AUTOMAKE=${AUTOMAKE:=automake}
AUTOCONF=${AUTOCONF:=autoconf}

echo use aclocal: $ACLOCAL
echo use autoheader: $AUTOHEADER
echo use automake: $AUTOMAKE
echo use autoconf: $AUTOCONF

aclocal_version=$($ACLOCAL --version | awk '{if ($1 == "aclocal") {print $4}}')
automake_version=$($AUTOMAKE --version | awk '{if ($1 == "automake") {print $4}}')

# check if versions are older than aclocal/automake 1.7
aclocal_vers_old=$(echo -n -e "$aclocal_version\n1.7\n" | sort --version-sort | head -n 1)
automake_vers_old=$(echo -n -e "$automake_version\n1.7\n" | sort --version-sort | head -n 1)

if [ "$aclocal_vers_old" != "1.7" ]; then
	echo "aclocal $aclocal_version older than 1.7. This may result in errors."
fi

if [ "$automake_vers_old" != "1.7" ]; then
	echo "automake $automake_version older than 1.7. This may result in errors."
fi

libtoolize --copy && \
$ACLOCAL && \
$AUTOHEADER && \
$AUTOMAKE --gnu --add-missing && \
$AUTOCONF