Imported Upstream version 2.81
[platform/upstream/libbullet.git] / autogen.sh
1 #! /bin/sh
2
3 if [ "$USER" = "root" ]; then
4         echo "*** You cannot do this as "$USER" please use a normal user account."
5         exit 1
6 fi
7 if test ! -f configure.ac ; then
8         echo "*** Please invoke this script from directory containing configure.ac."
9         exit 1
10 fi
11
12 echo "running aclocal"
13 aclocal
14 rc=$?
15
16 if test $rc -eq 0; then
17         echo "running libtool"
18         libtoolize --force --automake --copy
19         rc=$?
20 else
21         echo "An error occured, autogen.sh stopping."
22         exit $rc
23 fi
24
25 if test $rc -eq 0; then
26         echo "libtool worked."
27 else
28         echo "libtool not found. trying glibtool."
29         glibtoolize --force --automake --copy
30         rc=$?
31 fi
32
33 if test $rc -eq 0; then
34         echo "running automake"
35         automake --add-missing --copy
36         rc=$?
37 else
38         echo "An error occured, autogen.sh stopping."
39         exit $rc
40 fi
41
42 if test $rc -eq 0; then
43         echo "running autoheader"
44         autoheader
45         rc=$?
46 else
47         echo "An error occured, autogen.sh stopping."
48         exit $rc
49 fi
50
51 if test $rc -eq 0; then
52         echo "running autoconf"
53         autoconf
54         rc=$?
55 else
56         echo "An error occured, autogen.sh stopping."
57         exit $rc
58 fi
59
60 echo "autogen.sh complete"
61 exit $rc