test -f po/Makefile.in.in || Exit 1
test -f build-aux/config.rpath || Exit 1
-rm -fr m4 po
+rm -fr m4 po ABOUT-NLS build-aux/config.rpath
-# Check for copying libintl source.
+# Check for copying libintl source of the current version.
cat <<EOF >configure.ac
AC_INIT
AC_CONFIG_SRCDIR(hello.c)
AC_OUTPUT
EOF
+$gettext_datadir/autopoint >/dev/null 2>autopoint.err
+test $? = 1 || { cat autopoint.err; Exit 1; }
+
+rm -fr intl m4 po ABOUT-NLS config.rpath
+
+# Check for copying libintl source of an older version.
+cat <<EOF >configure.ac
+AC_INIT
+AC_CONFIG_SRCDIR(hello.c)
+
+AC_PROG_CC
+AM_GNU_GETTEXT
+AM_GNU_GETTEXT_VERSION([0.19])
+
+AC_CONFIG_FILES([Makefile])
+AC_CONFIG_FILES([po/Makefile.in])
+AC_OUTPUT
+EOF
+
$gettext_datadir/autopoint >/dev/null 2>autopoint.err
test $? = 0 || { cat autopoint.err; Exit 1; }
test -f m4/po.m4 || Exit 1
test -f po/Makefile.in.in || Exit 1
-rm -fr intl m4 po
+rm -fr intl m4 po ABOUT-NLS config.rpath
# Check for custom macro directory.
cat <<EOF >configure.ac
test -f gettext-m4/po.m4 || Exit 1
test -f po/Makefile.in.in || Exit 1
-rm -fr gettext-m4 po
+rm -fr gettext-m4 po ABOUT-NLS config.rpath
# Check for multiple arguments to AM_GNU_GETTEXT
# <https://savannah.gnu.org/bugs/?40082>
test -f m4/po.m4 || Exit 1
test -f po/Makefile.in.in || Exit 1
-rm -fr m4 po
+rm -fr m4 po ABOUT-NLS config.rpath
# Check for certain built-in macros are not in effect when tracing:
# <https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=764580>
test -f m4/po.m4 || Exit 1
test -f po/Makefile.in.in || Exit 1
-rm -fr m4 po
+rm -fr m4 po ABOUT-NLS config.rpath
# Check for AM_GNU_GETTEXT_REQUIRE_VERSION.
cat <<EOF >configure.ac
test -f po/Makefile.in.in || Exit 1
# Check for the case where both AM_GNU_GETTEXT_REQUIRE_VERSION and
-# AM_GNU_GETTEXT_VERSION are used.
+# AM_GNU_GETTEXT_VERSION are used. Once with libintl source.
cat <<EOF >configure.ac
AC_INIT
AC_CONFIG_SRCDIR(hello.c)
AC_OUTPUT
EOF
+$gettext_datadir/autopoint >autopoint.out 2>autopoint.err
+test $? = 1 || { cat autopoint.err; Exit 1; }
+
+# Check for the case where both AM_GNU_GETTEXT_REQUIRE_VERSION and
+# AM_GNU_GETTEXT_VERSION are used. Once without libintl source.
+cat <<EOF >configure.ac
+AC_INIT
+AC_CONFIG_SRCDIR(hello.c)
+
+AC_PROG_CC
+AM_GNU_GETTEXT([external])
+AM_GNU_GETTEXT_REQUIRE_VERSION([0.19])
+# This shall be ignored when AM_GNU_GETTEXT_REQUIRE_VERSION is defined
+AM_GNU_GETTEXT_VERSION([0.19])
+
+AC_CONFIG_MACRO_DIR([m4])
+
+AC_CONFIG_FILES([Makefile])
+AC_CONFIG_FILES([po/Makefile.in])
+AC_OUTPUT
+EOF
+
$gettext_datadir/autopoint >autopoint.out 2>autopoint.err
test $? = 0 || { cat autopoint.err; Exit 1; }
grep 'using AM_GNU_GETTEXT_REQUIRE_VERSION' autopoint.out 2>&1 >/dev/null || Exit 1
-test -d intl || Exit 1
+test ! -d intl || Exit 1
test -d m4 || Exit 1
test -d po || Exit 1
-cat >autopoint.ver <<EOF
-GNU gettext library from gettext-$ARCHIVE_VERSION
-EOF
-: ${DIFF=diff}
-${DIFF} autopoint.ver intl/VERSION || Exit 1
test -f m4/po.m4 || Exit 1
test -f po/Makefile.in.in || Exit 1
rm -f configure.ac Makefile.am
-: ${LIBTOOLIZE=libtoolize}
-${LIBTOOLIZE} --version >/dev/null 2>/dev/null \
- || { echo "Skipping test: libtoolize not found"; Exit 77; }
-
: ${MAKE=make}
${MAKE} --version >/dev/null 2>/dev/null \
|| { echo "Skipping test: make not found"; Exit 77; }
AC_CONFIG_MACRO_DIR([m4])
AC_PROG_CC
-AM_GNU_GETTEXT([use-libtool])
+AM_GNU_GETTEXT([external])
AM_GNU_GETTEXT_VERSION([$ARCHIVE_VERSION])
AC_CONFIG_HEADERS([config.h])
AC_CONFIG_FILES([Makefile])
-AC_CONFIG_FILES([intl/Makefile])
AC_CONFIG_FILES([po/Makefile.in])
AC_OUTPUT
EOF
# Makefile configuration - processed by automake.
# The list of subdirectories containing Makefiles.
-SUBDIRS = intl po
+SUBDIRS = po
# The list of programs that are built.
bin_PROGRAMS = hello
$gettext_datadir/autopoint -f >/dev/null 2>autopoint.err
test $? = 0 || { cat autopoint.err; Exit 1; }
-test -d intl || Exit 1
+test ! -d intl || Exit 1
test -d m4 || Exit 1
test -d po || Exit 1
cp -p po/Makevars.template po/Makevars
echo hello.c > po/POTFILES.in
-${LIBTOOLIZE} -f -i >/dev/null 2>autopoint.err
-test $? = 0 || { cat autopoint.err; Exit 1; }
-
${ACLOCAL} -I m4 >/dev/null 2>autopoint.err
test $? = 0 || { cat autopoint.err; Exit 1; }
${AUTOMAKE} -a -c >/dev/null 2>autopoint.err
test $? = 0 || { cat autopoint.err; Exit 1; }
-# Check if libintl compiles.
+# Check that it all compiles.
: ${CONFIG_SHELL=${SHELL-/bin/sh}}
-${CONFIG_SHELL} ./configure --with-included-gettext >/dev/null 2>autpoint.err
+${CONFIG_SHELL} ./configure >/dev/null 2>autpoint.err
test $? = 0 || { cat autopoint.err; Exit 1; }
${MAKE} >/dev/null 2>autopoint.err