Fixed Part#get_drag_value.
[ruby-edje.git] / autogen.sh
1 #! /bin/sh
2 # Run this to generate all the initial makefiles, etc.
3
4 # Stolen from the GNU Midnight Commander. Customized for giFTcurs. Stolen from
5 # giFTcurs. Customized for giFT. Stolen from giFT.
6 # Customized for $this_project.
7
8 # Make it possible to specify path in the environment
9 : ${AUTOCONF=autoconf}
10 : ${AUTOHEADER=autoheader}
11 : ${AUTOMAKE=automake}
12 : ${ACLOCAL=aclocal}
13 : ${LIBTOOLIZE=libtoolize}
14
15 srcdir=`dirname $0`
16 test -z "$srcdir" && srcdir=.
17
18 (
19 cd $srcdir
20
21 # The autoconf cache (version after 2.52) is not reliable yet.
22 rm -rf autom4te.cache
23
24 rm -f aclocal.m4
25 ACLOCAL_INCLUDES="-I m4"
26
27 # Some old version of GNU build tools fail to set error codes.
28 # Check that they generate some of the files they should.
29
30 echo "Running $ACLOCAL..."
31 $ACLOCAL $ACLOCAL_INCLUDES $ACLOCAL_FLAGS || exit 1
32 test -f aclocal.m4 || \
33   { echo "aclocal failed to generate aclocal.m4" 2>&1; exit 1; }
34
35 echo "Running $AUTOHEADER..."
36 $AUTOHEADER || exit 1
37 test -f config.h.in || \
38   { echo "autoheader failed to generate config.h.in" 2>&1; exit 1; }
39
40 echo "Running $AUTOCONF..."
41 $AUTOCONF || exit 1
42 test -f configure || \
43   { echo "autoconf failed to generate configure" 2>&1; exit 1; }
44
45 # hack hack hack...i hate autotools.
46 echo "Running $LIBTOOLIZE --automake..."
47 $LIBTOOLIZE --automake || exit 1
48 test -f ltmain.sh || \
49   { echo "libtoolize failed to generate ltmain.sh" 2>&1; exit 1; }
50
51 # Workaround for Automake 1.5 to ensure that depcomp is distributed.
52 echo "Running $AUTOMAKE..."
53 $AUTOMAKE -c -a src/Makefile || exit 1
54 $AUTOMAKE -c -a || exit 1
55 test -f Makefile.in || \
56   { echo "automake failed to generate Makefile.in" 2>&1; exit 1; }
57
58 ) || exit 1
59
60 echo
61 echo "Type './configure' to configure ruby-edje."
62 echo