-
Notifications
You must be signed in to change notification settings - Fork 0
/
autogen.sh
executable file
·78 lines (48 loc) · 1.28 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
#! /bin/sh
# just to help us differentiate messages
ECHO() {
echo "[AUTOGEN]" $*
}
quiet_test() {
sh -c "$*" >/dev/null 2>&1
return $?
}
# OSX has glibtoolize, everywhere else is just libtoolize
if test -z "${LTIZE}" ; then
ECHO "Trying to find a libtoolize"
if quiet_test "libtoolize --version" ; then
LTIZE=libtoolize
elif quiet_test "glibtoolize --version" ; then
LTIZE=glibtoolize
fi
fi
if test -z "${LTIZE}" ; then
ECHO "Couldn't figure out a libtoolize to use. Specify one with LTIZE"
else
ECHO "Running $LTIZE --force"
$LTIZE --force || exit $?
fi
# let's make sure we can find our aclocal macros
if test -d /usr/local/share/aclocal ; then
ACLOCAL_FLAGS="-I /usr/local/share/aclocal"
fi
ECHO "Running aclocal $ACLOCAL_FLAGS"
ECHO "(please ignore any non-fatal errors)"
aclocal $ACLOCAL_FLAGS || exit $?
# ECHO "Running autoheader"
# autoheader || exit $?
# put in license and stuff if necessary
if test -z "$AUTOMAKE_FLAGS" ; then
AUTOMAKE_FLAGS="--add-missing --copy"
fi
ECHO "Running automake $AUTOMAKE_FLAGS"
automake $AUTOMAKE_FLAGS
ECHO "Running autoconf"
autoconf || exit $?
ECHO "Running automake"
automake || exit $?
automake Makefile 2> /dev/null
ECHO "Running ./configure $@"
./configure $@
ECHO "Done"
# The End