forked from afedchin/xbmc-addon-iptvsimple
-
Notifications
You must be signed in to change notification settings - Fork 0
/
autogen.sh
75 lines (57 loc) · 1.4 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
found_bin=""
checkbin() {
echo -n "Checking for $1 ... "
found_bin=`which $1`
if [ "x$found_bin" != "x" ] ; then
echo $found_bin
return 0
fi
echo "not found !"
return 1
}
# check for libtoolize
checkbin libtoolize || {
checkbin glibtoolize || {
echo "neither \"libtoolize\" nor \"glibtoolize\" found !"
exit 1
}
}
LIBTOOLIZE=$found_bin
# check for aclocal
checkbin aclocal || {
exit 1
}
ACLOCAL=$found_bin
# check for automake
checkbin automake || {
exit 1
}
AUTOMAKE=$found_bin
# check for autoconf
checkbin autoconf || {
exit 1
}
AUTOCONF=$found_bin
echo
echo "Generating build information ..."
cd `dirname $0`
aclocalinclude="$ACLOCAL_FLAGS"
mkdir -p autotools
echo "Running libtoolize ..."
$LIBTOOLIZE --copy --force --automake || exit 1
echo "Running aclocal $aclocalinclude ..."
$ACLOCAL $aclocalinclude || {
echo
echo "**Error**: aclocal failed. This may mean that you have not"
echo "installed all of the packages you need, or you may need to"
echo "set ACLOCAL_FLAGS to include \"-I \$prefix/share/aclocal\""
echo "for the prefix where you installed the packages whose"
echo "macros were not found"
exit 1
}
echo "Running automake ..."
$AUTOMAKE -c -a --foreign || ( echo "***ERROR*** automake failed." ; exit 1 )
echo "Running autoconf ..."
$AUTOCONF || ( echo "***ERROR*** autoconf failed." ; exit 1 )
echo
echo "Please run ./configure now."