summaryrefslogtreecommitdiff
path: root/autogen.sh
blob: 69204b247f99536be84bca58934cb750bdce5e10 (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
#!/bin/sh

srcdir=`dirname $0`
test -z "$srcdir" && srcdir=.

ORIGDIR=`pwd`
cd $srcdir

test -z "$VALAC" && VALAC=valac
if ! $VALAC --version | sed -e 's/^Vala \([0-9]\+\.[0-9]\+\).*$/\1/' | grep -vq '^0\.\([0-9]\|1[0-5]\)$'
then
    echo "**Error**: You must have valac >= 0.16.1 installed"
    echo "  to build vala. Download the appropriate package"
    echo "  from your distribution or get the source tarball at"
    echo "  https://download.gnome.org/sources/vala/"
    exit 1
fi

# Automake requires that ChangeLog exist.
touch ChangeLog
mkdir -p m4

rm -f .version
autoreconf -v --install || exit 1
cd $ORIGDIR || exit $?

if test -z "$NOCONFIGURE"; then
    $srcdir/configure "$@"
fi