-# older autopoint (< 0.12) has a tendency to complain about mkinstalldirs
-if test -x mkinstalldirs; then rm mkinstalldirs; fi
-# first remove patch if necessary, then run autopoint, then reapply
-# if test -f po/Makefile.in.in;
-# then
-# patch -p0 -R < common/gettext.patch
-# fi
-# tool_run "$autopoint --force"
-# patch -p0 < common/gettext.patch
-
-tool_run "$aclocal" "-I m4 -I common/m4 $ACLOCAL_FLAGS"
-tool_run "$libtoolize" "--copy --force"
-tool_run "$autoheader"
-
-# touch the stamp-h.in build stamp so we don't re-run autoheader in maintainer mode -- wingo
-echo timestamp > stamp-h.in 2> /dev/null
-
-tool_run "$autoconf"
-tool_run "$automake" "-a -c"
-
-# if enable exists, add an -enable option for each of the lines in that file
-if test -f enable; then
- for a in `cat enable`; do
- CONFIGURE_FILE_OPT="--enable-$a"
- done
+if test -d po && grep ^AM_GNU_GETTEXT_VERSION configure.ac >/dev/null ; then
+ tool_run "autopoint" "--force"