-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathautogen.sh
executable file
·72 lines (58 loc) · 953 Bytes
/
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
#!/bin/sh
usage()
{
echo "Usage: autogen.sh [--clean]"
exit 1
}
clean()
{
make maintainer-clean
exit 0
}
check()
{
STATUS=0
(aclocal --version) < /dev/null > /dev/null 2>&1 || {
echo "Error: Couldn't find aclocal."
STATUS=1
}
(autoheader --version) < /dev/null > /dev/null 2>&1 || {
echo "Error: Couldn't find autoheader."
STATUS=1
}
(automake --version) < /dev/null > /dev/null 2>&1 || {
echo "Error: Couldn't find automake."
STATUS=1
}
(autoconf --version) < /dev/null > /dev/null 2>&1 || {
echo "Error: Couldn't find autoconf."
STATUS=1
}
if [ $STATUS -ne 0 ]; then
exit 1
fi
}
run()
{
echo "aclocal..."
aclocal -I. -Iscripts
echo "autoheader..."
autoheader
echo "automake..."
automake --gnu --add-missing --force-missing --copy
echo "autoconf..."
autoconf
exit 0
}
if [ $# -gt 1 ]; then
usage
elif [ $# -eq 1 ]; then
if [ $1 = "--clean" ]; then
clean
else
usage
fi
else
check
run
fi