-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathautogen.sh
executable file
·54 lines (40 loc) · 1.1 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
#!/bin/sh
# ============================================================================
# (C) Copyright IBM Corp. 2005
die()
{
test "$1" && echo "$1" >&2
exit 1
}
curdir=$(pwd)
test "$curdir" || curdir=.
srcdir=$(dirname "$0")
test "$srcdir" || srcdir=.
cd "$srcdir" || die "Failed to cd into $srcdir"
echo "Running libtool ..."
libtoolize --copy --force --automake || die
echo "Running aclocal ..."
aclocal --force || die
echo "Running autoheader ..."
autoheader --force || die
echo "Running automake ..."
automake -i --add-missing --copy --foreign || die
echo "Running autoconf ..."
autoconf --force || die
if test -x $(which git); then
git rev-parse --short HEAD > .changeset
git rev-list HEAD | wc -l > .revision
else
echo "Unknown" > .changeset
echo "0" > .revision
fi
cd "$curdir" || die "Failed to cd into $curdir"
if test "$#" -eq 0; then
echo "Running configure without arguments ..."
echo "(If you want to pass any, specify them on the $0 command line)"
else
echo "Running configure with $@ ..."
fi
"$srcdir/configure" "$@" || die
echo
echo "You may now run make"