-
Notifications
You must be signed in to change notification settings - Fork 20
/
autogen.sh
executable file
·61 lines (48 loc) · 1.41 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
#!/bin/sh
srcdir=`dirname $0`
test -z "$srcdir" && srcdir=.
__intltoolize() {
if test -d "po"; then
echo "Running: intltoolize -f -c ..." \
&& intltoolize --force --copy \
&& cp /usr/share/aclocal/intltool.m4 m4/ || exit 1
fi
}
__autogen_verbose() {
test -d "m4" || mkdir m4
echo "Running: libtoolize -f -i -r -c ..." \
&& libtoolize --force --verbose --install --recursive --copy || exit 1
__intltoolize
echo "Running: aclocal -I m4 ..." \
&& aclocal --force --verbose -W all -I m4 \
&& echo "Running: automake -g -a -c ..." \
&& automake --gnu --add-missing --copy --verbose -W all \
&& echo "Running: autoconf -f ..." \
&& autoconf --force --verbose -W all || exit 1
}
__autogen() {
test -d "m4" || mkdir m4
echo "Running: libtoolize -f -i -r -c ..." \
&& libtoolize --force --install --recursive --copy || exit 1
__intltoolize
echo "Running: aclocal -I m4 ..." \
&& aclocal --force -W all -I m4 \
&& echo "Running: automake -g -a -c ..." \
&& automake --gnu --add-missing --copy -W all \
&& echo "Running: autoconf -f ..." \
&& autoconf --force -W all || exit 1
}
# Options
case "$1" in
-h|--help) echo "$0 [--help] [--version] [--verbose]"; exit;
;;
-v|--verbose) __autogen_verbose || exit 1;
;;
-V|--version) echo "$0 3.0.0"; exit;
;;
-*) echo "$0 [--help] [--version] [--verbose]"; exit 1;
;;
*) __autogen || exit 1;
;;
esac
exit