2005-06-22 18:20:32 +00:00
|
|
|
#! /bin/sh
|
|
|
|
|
2006-03-29 02:25:00 -06:00
|
|
|
builddir=`pwd`
|
|
|
|
|
2006-10-12 21:38:13 -05:00
|
|
|
rel_srcdir=`dirname $0`
|
|
|
|
test -z "$rel_srcdir" && rel_srcdir=.
|
2005-06-22 18:20:32 +00:00
|
|
|
|
2006-10-12 21:38:13 -05:00
|
|
|
srcdir=`cd $rel_srcdir && pwd`
|
2007-05-12 23:23:56 -05:00
|
|
|
echo "srcdir="$srcdir
|
2006-08-26 04:46:14 -05:00
|
|
|
|
2008-08-16 01:05:22 -05:00
|
|
|
aclocal_extra=
|
2008-09-16 10:10:42 -05:00
|
|
|
for d in m4 moo/m4 ugly/m4 intltool/aclocal; do
|
2008-08-16 01:05:22 -05:00
|
|
|
if [ -d $rel_srcdir/$d ]; then
|
|
|
|
aclocal_extra="$aclocal_extra -I $d"
|
|
|
|
fi
|
|
|
|
done
|
2005-06-24 02:18:15 +00:00
|
|
|
|
2006-03-29 02:25:00 -06:00
|
|
|
cd $srcdir
|
|
|
|
echo "Generating configuration files..."
|
|
|
|
|
2007-06-30 01:56:49 -05:00
|
|
|
ACLOCAL=${ACLOCAL:-aclocal-1.10}
|
2007-06-20 21:35:02 -06:00
|
|
|
ACLOCAL_FLAGS="$aclocal_extra $ACLOCAL_FLAGS"
|
2007-06-30 01:56:49 -05:00
|
|
|
AUTOMAKE=${AUTOMAKE:-automake-1.10}
|
2005-11-03 22:56:53 +00:00
|
|
|
AUTOHEADER=${AUTOHEADER:-autoheader}
|
|
|
|
AUTOCONF=${AUTOCONF:-autoconf}
|
2008-06-15 01:12:24 -05:00
|
|
|
LIBTOOLIZE=${LIBTOOLIZE:-libtoolize}
|
2008-08-16 01:05:22 -05:00
|
|
|
UGLY=${UGLY:-./ugly/ugly}
|
|
|
|
|
|
|
|
if [ -f Makefile.ug ]; then
|
|
|
|
echo $UGLY
|
|
|
|
$UGLY || exit $?
|
|
|
|
fi
|
2005-06-24 02:18:15 +00:00
|
|
|
|
2008-06-15 01:12:24 -05:00
|
|
|
if grep AC_PROG_LIBTOOL configure.ac; then
|
|
|
|
echo $LIBTOOLIZE --automake --copy --force
|
|
|
|
$LIBTOOLIZE --automake --copy --force || exit $?
|
|
|
|
fi
|
2005-11-03 22:56:53 +00:00
|
|
|
|
2008-06-15 01:12:24 -05:00
|
|
|
if [ -d po ]; then
|
|
|
|
echo glib-gettextize --force --copy
|
|
|
|
glib-gettextize --force --copy || exit $?
|
2008-09-16 10:10:42 -05:00
|
|
|
|
|
|
|
if [ -d intltool ]; then
|
|
|
|
for f in intltool-extract.in intltool-merge.in intltool-update.in; do
|
|
|
|
echo "rm -f $f && ln -s intltool/intltool/$f $f"
|
|
|
|
rm -f $f || exit $?
|
|
|
|
ln -s intltool/intltool/$f $f || exit $?
|
|
|
|
done
|
|
|
|
echo "rm -f po/Makefile.in.in && cp intltool/intltool/Makefile.in.in po/Makefile.in.in"
|
|
|
|
rm -f po/Makefile.in.in || exit $?
|
|
|
|
cp intltool/intltool/Makefile.in.in po/Makefile.in.in || exit $?
|
|
|
|
else
|
|
|
|
echo intltoolize --automake --force --copy
|
|
|
|
intltoolize --automake --force --copy || exit $?
|
|
|
|
fi
|
2008-06-15 01:12:24 -05:00
|
|
|
fi
|
2007-06-20 21:35:02 -06:00
|
|
|
|
|
|
|
if [ -d po-gsv ] ; then
|
|
|
|
echo sed 's/@GETTEXT_PACKAGE@/@GETTEXT_PACKAGE@-gsv/' po/Makefile.in.in '>' po-gsv/Makefile.in.in
|
|
|
|
sed 's/@GETTEXT_PACKAGE@/@GETTEXT_PACKAGE@-gsv/' po/Makefile.in.in > po-gsv/Makefile.in.in || exit $?
|
|
|
|
fi
|
2006-08-03 00:39:06 -05:00
|
|
|
|
2006-05-05 13:31:37 -05:00
|
|
|
echo $ACLOCAL $ACLOCAL_FLAGS
|
|
|
|
$ACLOCAL $ACLOCAL_FLAGS || exit $?
|
2005-11-03 22:56:53 +00:00
|
|
|
|
|
|
|
echo $AUTOHEADER
|
|
|
|
$AUTOHEADER || exit $?
|
|
|
|
|
2008-05-22 22:40:19 -05:00
|
|
|
echo $AUTOMAKE --add-missing --copy
|
|
|
|
$AUTOMAKE --add-missing --copy || exit $?
|
2005-11-03 22:56:53 +00:00
|
|
|
|
|
|
|
echo $AUTOCONF
|
|
|
|
$AUTOCONF || exit $?
|
2005-10-30 21:16:22 +00:00
|
|
|
|
2006-03-29 02:25:00 -06:00
|
|
|
if test -z $1; then
|
|
|
|
echo
|
2006-10-12 21:38:13 -05:00
|
|
|
echo "run '$rel_srcdir/configure ; make ; make install'"
|
2006-03-29 02:25:00 -06:00
|
|
|
echo
|
|
|
|
else
|
2006-04-28 16:06:26 -05:00
|
|
|
if test $1 = "do" -o $1 = "--do"; then
|
|
|
|
shift
|
|
|
|
fi
|
2006-03-29 02:25:00 -06:00
|
|
|
cd $builddir
|
|
|
|
$srcdir/configure $*
|
|
|
|
fi
|