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
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
mkdir config || exit 1
fi
$ACLOCAL -I gettext.m4 $ACLOCAL_FLAGS || \
$ACLOCAL $ACLOCAL_FLAGS || \
exit 1
if test -f `aclocal --print-ac-dir`/gettext.m4; then
# gettext macro files are available to aclocal.
$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
$AUTOCONF || exit 1