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

View File

@ -31,6 +31,16 @@ $GETTEXTIZE --copy --force >tmpout || exit 1
rm -f po/ChangeLog
mv po/ChangeLog~ po/ChangeLog
if test ! -d config; then
mkdir config || exit 1
fi
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'`
@ -40,14 +50,9 @@ mkdir gettext.m4
for i in $m4files; do
cp -f $fromdir/$i gettext.m4
done
if test ! -d config; then
mkdir config || exit 1
$ACLOCAL -I gettext.m4 $ACLOCAL_FLAGS || exit 1
fi
$ACLOCAL -I gettext.m4 $ACLOCAL_FLAGS || \
$ACLOCAL $ACLOCAL_FLAGS || \
exit 1
$AUTOHEADER || exit 1
$AUTOCONF || exit 1