medit/autogen.sh

74 lines
1.6 KiB
Bash
Raw Normal View History

2005-06-22 11:20:32 -07:00
#! /bin/sh
builddir=`pwd`
2006-10-12 19:38:13 -07:00
rel_srcdir=`dirname $0`
test -z "$rel_srcdir" && rel_srcdir=.
2005-06-22 11:20:32 -07:00
2006-10-12 19:38:13 -07:00
srcdir=`cd $rel_srcdir && pwd`
2007-05-12 21:23:56 -07:00
echo "srcdir="$srcdir
2006-08-26 02:46:14 -07:00
2008-08-15 23:05:22 -07:00
aclocal_extra=
for d in m4 moo/m4 ugly/m4; do
if [ -d $rel_srcdir/$d ]; then
aclocal_extra="$aclocal_extra -I $d"
fi
done
cd $srcdir
echo "Generating configuration files..."
ACLOCAL=${ACLOCAL:-aclocal-1.10}
ACLOCAL_FLAGS="$aclocal_extra $ACLOCAL_FLAGS"
AUTOMAKE=${AUTOMAKE:-automake-1.10}
2005-11-03 14:56:53 -08:00
AUTOHEADER=${AUTOHEADER:-autoheader}
AUTOCONF=${AUTOCONF:-autoconf}
LIBTOOLIZE=${LIBTOOLIZE:-libtoolize}
2008-08-15 23:05:22 -07:00
UGLY=${UGLY:-./ugly/ugly}
if [ -f Makefile.ug ]; then
echo $UGLY
$UGLY || exit $?
fi
if grep AC_PROG_LIBTOOL configure.ac; then
echo $LIBTOOLIZE --automake --copy --force
$LIBTOOLIZE --automake --copy --force || exit $?
fi
2005-11-03 14:56:53 -08:00
if [ -d po ]; then
echo glib-gettextize --force --copy
glib-gettextize --force --copy || exit $?
echo intltoolize --automake --force --copy
intltoolize --automake --force --copy || exit $?
fi
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-02 22:39:06 -07:00
2006-05-05 11:31:37 -07:00
echo $ACLOCAL $ACLOCAL_FLAGS
$ACLOCAL $ACLOCAL_FLAGS || exit $?
2005-11-03 14:56:53 -08:00
echo $AUTOHEADER
$AUTOHEADER || exit $?
2008-05-22 20:40:19 -07:00
echo $AUTOMAKE --add-missing --copy
$AUTOMAKE --add-missing --copy || exit $?
2005-11-03 14:56:53 -08:00
echo $AUTOCONF
$AUTOCONF || exit $?
2005-10-30 13:16:22 -08:00
if test -z $1; then
echo
2006-10-12 19:38:13 -07:00
echo "run '$rel_srcdir/configure ; make ; make install'"
echo
else
if test $1 = "do" -o $1 = "--do"; then
shift
fi
cd $builddir
$srcdir/configure $*
fi