forked from stepmania/stepmania
-
Notifications
You must be signed in to change notification settings - Fork 0
/
autogen.sh
executable file
·101 lines (84 loc) · 2.59 KB
/
autogen.sh
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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
#!/bin/sh
# Run this to generate configure, the initial makefiles, etc.
#
# Source (non-SVN) distributions should come with a "configure" script
# already generated--people simply compiling the program shouldn't
# need autoconf and friends installed.
#
# SVN only contains the source files: Makefile.am, configure.ac, and
# so on.
srcdir=`dirname $0`
test -z "$srcdir" && srcdir=.
PKG_NAME="stepmania"
AUTOHEADER=autoheader
ACLOCAL_OPTIONS="-I autoconf/m4/"
AUTOMAKE_OPTIONS=-a
AUTOCONF=autoconf
(test -f $srcdir/configure.ac \
&& test -d $srcdir/src) || {
echo -n "**Error**: Directory \"$srcdir\" does not look like the"
echo " top-level $PKG_NAME directory"
exit 1
}
DIE=0
($AUTOCONF --version) > /dev/null 2>&1 || {
echo
echo "**Error**: You must have \`autoconf' installed to compile $PKG_NAME."
echo "Download the appropriate package for your distribution,"
echo "or get the source tarball at ftp://ftp.gnu.org/pub/gnu/autoconf/"
DIE=1
}
# Try automake-1.7 and up.
if automake-1.11 --version > /dev/null 2>&1; then
ACLOCAL=aclocal-1.11
AUTOMAKE=automake-1.11
elif automake-1.10 --version > /dev/null 2>&1; then
ACLOCAL=aclocal-1.10
AUTOMAKE=automake-1.10
elif automake-1.9 --version > /dev/null 2>&1; then
ACLOCAL=aclocal-1.9
AUTOMAKE=automake-1.9
elif automake-1.8 --version > /dev/null 2>&1; then
ACLOCAL=aclocal-1.8
AUTOMAKE=automake-1.8
elif automake-1.7 --version > /dev/null 2>&1; then
ACLOCAL=aclocal-1.7
AUTOMAKE=automake-1.7
fi
# If none of those were found, check if "automake" exists, and check the version.
if test -z "$AUTOMAKE" && automake --version > /dev/null 2>&1; then
version=`automake --version 2>/dev/null|head -1|sed -e 's/.* \([0-9]\+\.[0-9]\+\).*$/\1/'`
IFS=.
set $version
if test -z "$version"; then
echo "\`automake' appears to be installed, but the version string could not"
echo "be parsed. Proceeding anyway ..."
elif test $1 -lt 1 -o $2 -lt 7; then
echo "\`automake' appears to be installed, but is not recent enough. Automake"
echo "1.7 or newer is required."
exit 1
fi
unset IFS
ACLOCAL=aclocal
AUTOMAKE=automake
fi
if test -z "$AUTOMAKE"; then
echo
echo "**Error**: You must have \`automake' installed to compile $PKG_NAME."
DIE=1
NO_AUTOMAKE=yes
fi
# if no automake, don't bother testing for aclocal
test -n "$NO_AUTOMAKE" || ($ACLOCAL --version) < /dev/null > /dev/null 2>&1 || {
echo
echo "**Error**: Missing \`aclocal'. The version of \`automake'"
echo "installed doesn't appear recent enough."
DIE=1
}
if test "$DIE" -eq 1; then
exit 1
fi
$ACLOCAL $ACLOCAL_OPTIONS
$AUTOCONF
$AUTOHEADER
$AUTOMAKE $AUTOMAKE_OPTIONS