Added Spanish translation
[empathy-mirror.git] / autogen.sh
blobc5d70012189cbc0732e6718bf6f89f9323caf428
1 #!/bin/sh
2 # Run this to generate all the initial makefiles, etc.
4 : ${AUTOCONF=autoconf}
5 : ${AUTOHEADER=autoheader}
6 : ${AUTOMAKE=automake-1.9}
7 : ${ACLOCAL=aclocal-1.9}
8 : ${LIBTOOLIZE=libtoolize}
9 : ${INTLTOOLIZE=intltoolize}
10 : ${LIBTOOL=libtool}
11 : ${GNOME_DOC_PREPARE=gnome-doc-prepare}
13 srcdir=`dirname $0`
14 test -z "$srcdir" && srcdir=.
16 ORIGDIR=`pwd`
17 cd $srcdir
18 PROJECT="empathy"
19 TEST_TYPE=-f
20 FILE=src/empathy-main.c
21 CONFIGURE=configure.ac
23 DIE=0
25 ($AUTOCONF --version) < /dev/null > /dev/null 2>&1 || {
26 echo
27 echo "You must have autoconf installed to compile $PROJECT."
28 echo "Download the appropriate package for your distribution,"
29 echo "or get the source tarball at ftp://ftp.gnu.org/pub/gnu/"
30 DIE=1
33 (grep "^AC_PROG_INTLTOOL" $srcdir/$CONFIGURE >/dev/null) && {
34 ($INTLTOOLIZE --version) < /dev/null > /dev/null 2>&1 || {
35 echo
36 echo "You must have \`intltoolize' installed to compile $PROJECT."
37 echo "Get ftp://ftp.gnome.org/pub/GNOME/stable/sources/intltool/intltool-0.35.tar.gz"
38 echo "(or a newer version if it is available)"
39 DIE=1
43 (grep "^GNOME_DOC_INIT" $srcdir/$CONFIGURE >/dev/null) && {
44 ($GNOME_DOC_PREPARE --version) < /dev/null > /dev/null 2>&1 || {
45 echo
46 echo "You must have \`gnome-doc-prepare' installed to compile $PROJECT."
47 DIE=1
51 ($AUTOMAKE --version) < /dev/null > /dev/null 2>&1 || {
52 echo
53 echo "You must have automake 1.9 installed to compile $PROJECT."
54 echo "Get ftp://ftp.gnu.org/pub/gnu/automake/automake-1.9.6.tar.gz"
55 echo "(or a newer version of 1.9.x if it is available)"
56 DIE=1
59 (grep "^AM_PROG_LIBTOOL" $CONFIGURE >/dev/null) && {
60 ($LIBTOOL --version) < /dev/null > /dev/null 2>&1 || {
61 echo
62 echo "**Error**: You must have \`libtool' installed to compile $PROJECT."
63 echo "Get ftp://ftp.gnu.org/pub/gnu/libtool/libtool-1.5.22.tar.gz"
64 echo "(or a newer version if it is available)"
65 DIE=1
69 if grep "^AM_[A-Z0-9_]\{1,\}_GETTEXT" "$CONFIGURE" >/dev/null; then
70 if grep "sed.*POTFILES" "$CONFIGURE" >/dev/null; then
71 GETTEXTIZE=""
72 else
73 if grep "^AM_GLIB_GNU_GETTEXT" "$CONFIGURE" >/dev/null; then
74 GETTEXTIZE="glib-gettextize"
75 GETTEXTIZE_URL="ftp://ftp.gtk.org/pub/gtk/v2.0/glib-2.0.0.tar.gz"
76 else
77 GETTEXTIZE="gettextize"
78 GETTEXTIZE_URL="ftp://alpha.gnu.org/gnu/gettext-0.10.35.tar.gz"
81 $GETTEXTIZE --version < /dev/null > /dev/null 2>&1
82 if test $? -ne 0; then
83 echo
84 echo "**Error**: You must have \`$GETTEXTIZE' installed to compile $PKG_NAME."
85 echo "Get $GETTEXTIZE_URL"
86 echo "(or a newer version if it is available)"
87 DIE=1
92 if test "$DIE" -eq 1; then
93 exit 1
96 test $TEST_TYPE $FILE || {
97 echo "You must run this script in the top-level $PROJECT directory"
98 exit 1
101 #if test -z "$*"; then
102 # echo "I am going to run ./configure with no arguments - if you wish "
103 # echo "to pass any to it, please specify them on the $0 command line."
106 case $CC in
107 *xlc | *xlc\ * | *lcc | *lcc\ *) am_opt=--include-deps;;
108 esac
110 for coin in .
112 dr=`dirname $coin`
113 if test -f $dr/NO-AUTO-GEN; then
114 echo skipping $dr -- flagged as no auto-gen
115 else
116 echo processing $dr
117 macrodirs= #`sed -n -e 's,AM_ACLOCAL_INCLUDE(\(.*\)),\1,gp' < $coin`
118 ( cd $dr
119 aclocalinclude="$ACLOCAL_FLAGS"
120 for k in $macrodirs; do
121 if test -d $k; then
122 aclocalinclude="$aclocalinclude -I $k"
123 ##else
124 ## echo "**Warning**: No such directory \`$k'. Ignored."
126 done
127 if grep "^AM_GLIB_GNU_GETTEXT" $CONFIGURE >/dev/null; then
128 if grep "sed.*POTFILES" $CONFIGURE >/dev/null; then
129 : do nothing -- we still have an old unmodified $CONFIGURE
130 else
131 echo "Creating $dr/aclocal.m4 ..."
132 test -r $dr/aclocal.m4 || touch $dr/aclocal.m4
133 echo "Running glib-gettextize... Ignore non-fatal messages."
134 echo "no" | glib-gettextize --force --copy
135 echo "Making $dr/aclocal.m4 writable ..."
136 test -r $dr/aclocal.m4 && chmod u+w $dr/aclocal.m4
139 if grep "^IT_PROG_INTLTOOL" $CONFIGURE >/dev/null; then
140 echo "Running intltoolize..."
141 intltoolize --copy --force --automake
143 if grep "^GNOME_DOC_INIT" $CONFIGURE >/dev/null; then
144 echo "Running $GNOME_DOC_PREPARE..."
145 $GNOME_DOC_PREPARE --force --copy || exit 1
147 if grep "^AM_PROG_LIBTOOL" $CONFIGURE >/dev/null; then
148 echo "Running $LIBTOOLIZE..."
149 $LIBTOOLIZE --force --copy
151 echo "Running $ACLOCAL $aclocalinclude ..."
152 $ACLOCAL $aclocalinclude
153 if grep "^AM_CONFIG_HEADER" $CONFIGURE >/dev/null; then
154 echo "Running $AUTOHEADER..."
155 $AUTOHEADER
157 echo "Running $AUTOMAKE --gnu $am_opt ..."
158 $AUTOMAKE --add-missing --gnu $am_opt
159 echo "Running $AUTOCONF ..."
160 $AUTOCONF
163 done
165 conf_flags="--enable-maintainer-mode"
167 cd "$ORIGDIR"
169 if test x$NOCONFIGURE = x; then
170 echo Running $srcdir/configure $conf_flags "$@" ...
171 $srcdir/configure $conf_flags "$@" \
172 && echo Now type \`make\' to compile $PROJECT || exit 1
173 else
174 echo Skipping configure process.