32b2bde4bcba21d75855ee47f12bcfb772e5e758
[modest] / autogen.sh
1 #!/bin/sh
2 # Run this to generate all the initial makefiles, etc.
3
4 srcdir=`dirname $0`
5 test -z "$srcdir" && srcdir=.
6 REQUIRED_AUTOMAKE_VERSION=1.8
7 PKG_NAME=modest
8
9 (test -f $srcdir/configure.ac \
10   && test -f $srcdir/src/modest-main.c) || {
11     echo -n "**Error**: Directory "\`$srcdir\'" does not look like the"
12     echo " top-level $PKG_NAME directory"
13     exit 1
14 }
15
16 which gnome-autogen.sh || {
17     echo "You need to install gnome-common from GNOME CVS"
18     exit 1
19 }
20 export USE_GNOME2_MACROS=1
21
22 gnome-autogen.sh || {
23         echo "gnome autoconf does not work, trying the other way..."
24
25         glib-gettextize --copy --force
26         libtoolize --automake --copy --force
27         intltoolize --automake --copy --force
28         aclocal-1.8
29         autoconf --force
30         autoheader --force
31         automake-1.8 --add-missing --copy --force-missing --foreign
32         ./configure $@
33 }