2 # Run this to generate all the initial makefiles, etc.
5 : ${AUTOHEADER=autoheader}
6 : ${AUTOMAKE=automake-1.9}
7 : ${ACLOCAL=aclocal-1.9}
8 : ${LIBTOOLIZE=libtoolize}
9 : ${INTLTOOLIZE=intltoolize}
11 : ${GNOME_DOC_PREPARE=gnome-doc-prepare}
14 test -z "$srcdir" && srcdir=.
20 FILE=src/empathy-main.c
21 CONFIGURE=configure.ac
25 ($AUTOCONF --version) < /dev/null > /dev/null 2>&1 || {
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/"
33 (grep "^AC_PROG_INTLTOOL" $srcdir/$CONFIGURE >/dev/null) && {
34 ($INTLTOOLIZE --version) < /dev/null > /dev/null 2>&1 || {
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)"
43 (grep "^GNOME_DOC_INIT" $srcdir/$CONFIGURE >/dev/null) && {
44 ($GNOME_DOC_PREPARE --version) < /dev/null > /dev/null 2>&1 || {
46 echo "You must have \`gnome-doc-prepare' installed to compile $PROJECT."
51 ($AUTOMAKE --version) < /dev/null > /dev/null 2>&1 || {
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)"
59 (grep "^AM_PROG_LIBTOOL" $CONFIGURE >/dev/null) && {
60 ($LIBTOOL --version) < /dev/null > /dev/null 2>&1 || {
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)"
69 if grep "^AM_[A-Z0-9_]\{1,\}_GETTEXT" "$CONFIGURE" >/dev/null; then
70 if grep "sed.*POTFILES" "$CONFIGURE" >/dev/null; then
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"
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
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)"
92 if test "$DIE" -eq 1; then
96 test $TEST_TYPE $FILE || {
97 echo "You must run this script in the top-level $PROJECT directory"
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."
107 *xlc | *xlc\ * | *lcc | *lcc\ *) am_opt=--include-deps;;
113 if test -f $dr/NO-AUTO-GEN; then
114 echo skipping $dr -- flagged as no auto-gen
117 macrodirs= #`sed -n -e 's,AM_ACLOCAL_INCLUDE(\(.*\)),\1,gp' < $coin`
119 aclocalinclude="$ACLOCAL_FLAGS"
120 for k in $macrodirs; do
122 aclocalinclude="$aclocalinclude -I $k"
124 ## echo "**Warning**: No such directory \`$k'. Ignored."
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
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..."
157 echo "Running $AUTOMAKE --gnu $am_opt ..."
158 $AUTOMAKE --add-missing --gnu $am_opt
159 echo "Running $AUTOCONF ..."
165 conf_flags="--enable-maintainer-mode"
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
174 echo Skipping configure process.