~ubuntu-branches/ubuntu/utopic/glib2.0/utopic

« back to all changes in this revision

Viewing changes to autogen.sh

Tags: upstream-2.12.12
ImportĀ upstreamĀ versionĀ 2.12.12

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#!/bin/sh
 
2
# Run this to generate all the initial makefiles, etc.
 
3
 
 
4
srcdir=`dirname $0`
 
5
test -z "$srcdir" && srcdir=.
 
6
 
 
7
ORIGDIR=`pwd`
 
8
cd $srcdir
 
9
PROJECT=GLib
 
10
TEST_TYPE=-f
 
11
FILE=glib/glib.h
 
12
 
 
13
DIE=0
 
14
 
 
15
have_libtool=false
 
16
if libtoolize --version < /dev/null > /dev/null 2>&1 ; then
 
17
        libtool_version=`libtoolize --version | sed 's/^[^0-9]*\([0-9.][0-9.]*\).*/\1/'`
 
18
        case $libtool_version in
 
19
            1.4*|1.5*)
 
20
                have_libtool=true
 
21
                ;;
 
22
        esac
 
23
fi
 
24
if $have_libtool ; then : ; else
 
25
        echo
 
26
        echo "You must have libtool 1.4 installed to compile $PROJECT."
 
27
        echo "Install the appropriate package for your distribution,"
 
28
        echo "or get the source tarball at http://ftp.gnu.org/gnu/libtool/"
 
29
        DIE=1
 
30
fi
 
31
 
 
32
(gtkdocize --version) < /dev/null > /dev/null 2>&1 || {
 
33
        echo
 
34
        echo "You must have gtk-doc installed to compile $PROJECT."
 
35
        echo "Install the appropriate package for your distribution,"
 
36
        echo "or get the source tarball at ftp://ftp.gnome.org/pub/GNOME/sources/gtk-doc/"
 
37
        DIE=1
 
38
}
 
39
 
 
40
(autoconf --version) < /dev/null > /dev/null 2>&1 || {
 
41
        echo
 
42
        echo "You must have autoconf installed to compile $PROJECT."
 
43
        echo "Install the appropriate package for your distribution,"
 
44
        echo "or get the source tarball at http://ftp.gnu.org/gnu/autoconf/"
 
45
        DIE=1
 
46
}
 
47
 
 
48
if automake-1.7 --version < /dev/null > /dev/null 2>&1 ; then
 
49
    AUTOMAKE=automake-1.7
 
50
    ACLOCAL=aclocal-1.7
 
51
else
 
52
        echo
 
53
        echo "You must have automake 1.7.x installed to compile $PROJECT."
 
54
        echo "Install the appropriate package for your distribution,"
 
55
        echo "or get the source tarball at http://ftp.gnu.org/gnu/automake/"
 
56
        DIE=1
 
57
fi
 
58
 
 
59
if test "$DIE" -eq 1; then
 
60
        exit 1
 
61
fi
 
62
 
 
63
test $TEST_TYPE $FILE || {
 
64
        echo "You must run this script in the top-level $PROJECT directory"
 
65
        exit 1
 
66
}
 
67
 
 
68
if test -z "$AUTOGEN_SUBDIR_MODE"; then
 
69
        if test -z "$*"; then
 
70
                echo "I am going to run ./configure with no arguments - if you wish "
 
71
                echo "to pass any to it, please specify them on the $0 command line."
 
72
        fi
 
73
fi
 
74
 
 
75
rm -rf autom4te.cache
 
76
 
 
77
# README and INSTALL are required by automake, but may be deleted by clean
 
78
# up rules. to get automake to work, simply touch these here, they will be
 
79
# regenerated from their corresponding *.in files by ./configure anyway.
 
80
touch README INSTALL
 
81
 
 
82
$ACLOCAL $ACLOCAL_FLAGS || exit $?
 
83
 
 
84
libtoolize --force || exit $?
 
85
gtkdocize || exit $?
 
86
 
 
87
autoheader || exit $?
 
88
 
 
89
$AUTOMAKE --add-missing || exit $?
 
90
autoconf || exit $?
 
91
cd $ORIGDIR || exit $?
 
92
 
 
93
if test -z "$AUTOGEN_SUBDIR_MODE"; then
 
94
        $srcdir/configure --enable-maintainer-mode $AUTOGEN_CONFIGURE_ARGS "$@" || exit $?
 
95
 
 
96
        echo 
 
97
        echo "Now type 'make' to compile $PROJECT."
 
98
fi