Suppresses copying the gettext macro files if they are already avalable to aclocal.

Reported by Petr Kozelka <pkozelka@centrum.cz>
This commit is contained in:
Pavel Roskin 2002-01-21 07:41:47 +00:00
parent 3e8ada15be
commit 5faeab492b
1 changed files with 18 additions and 13 deletions

View File

@ -31,23 +31,28 @@ $GETTEXTIZE --copy --force >tmpout || exit 1
rm -f po/ChangeLog rm -f po/ChangeLog
mv po/ChangeLog~ po/ChangeLog mv po/ChangeLog~ po/ChangeLog
# Ugly way to parse the instructions gettexize gives us.
m4files="`cat tmpout | sed -n -e '/^Please/,/^from/s/^ *//p'`"
fromdir=`cat tmpout | sed -n -e '/^Please/,/^from/s/^from the \([^ ]*\) .*$/\1/p'`
rm tmpout
rm -rf gettext.m4
mkdir gettext.m4
for i in $m4files; do
cp -f $fromdir/$i gettext.m4
done
if test ! -d config; then if test ! -d config; then
mkdir config || exit 1 mkdir config || exit 1
fi fi
$ACLOCAL -I gettext.m4 $ACLOCAL_FLAGS || \ if test -f `aclocal --print-ac-dir`/gettext.m4; then
$ACLOCAL $ACLOCAL_FLAGS || \ # gettext macro files are available to aclocal.
exit 1 $ACLOCAL $ACLOCAL_FLAGS || exit 1
else
# gettext macro files are not available.
# Find them and copy to a local directory.
# Ugly way to parse the instructions gettexize gives us.
m4files="`cat tmpout | sed -n -e '/^Please/,/^from/s/^ *//p'`"
fromdir=`cat tmpout | sed -n -e '/^Please/,/^from/s/^from the \([^ ]*\) .*$/\1/p'`
rm tmpout
rm -rf gettext.m4
mkdir gettext.m4
for i in $m4files; do
cp -f $fromdir/$i gettext.m4
done
$ACLOCAL -I gettext.m4 $ACLOCAL_FLAGS || exit 1
fi
$AUTOHEADER || exit 1 $AUTOHEADER || exit 1
$AUTOCONF || exit 1 $AUTOCONF || exit 1