2 . "${srcdir=.}/init.sh"; path_prepend_ . ../src
4 # Test for sanity checks.
7 ${AUTOCONF} --version >/dev/null 2>/dev/null \
8 || { echo "Skipping test: autoconf not found"; exit 77; }
10 cat <<\EOF >configure.ac
14 ${AUTOCONF} >/dev/null 2>/dev/null \
15 || { echo "Skipping test: autoconf version too old"; exit 77; }
19 gettext_datadir=$top_builddir/misc
20 export gettext_datadir
22 # Check if sanity checks are actually working.
25 $gettext_datadir/autopoint 2>&1 | grep 'Missing configure.in or configure.ac' 2>&1 >/dev/null \
28 test ! -d intl || exit 1
29 test ! -d m4 || exit 1
30 test ! -d po || exit 1
32 # configure.ac without AM_GNU_GETTEXT_VERSION
33 cat <<\EOF >configure.ac
35 AC_CONFIG_SRCDIR(hello.c)
39 AC_CONFIG_FILES([Makefile])
43 $gettext_datadir/autopoint 2>&1 | grep 'Missing version' 2>&1 >/dev/null \
46 test ! -d intl || exit 1
47 test ! -d m4 || exit 1
48 test ! -d po || exit 1
50 # VERSION specified through intl/VERSION file, but in wrong format
51 cat <<\EOF >configure.ac
53 AC_CONFIG_SRCDIR(hello.c)
57 AC_CONFIG_FILES([Makefile])
61 test -d intl || mkdir intl
62 echo bogus-version > intl/VERSION
64 $gettext_datadir/autopoint 2>&1 | grep 'Missing version' 2>&1 >/dev/null \
67 test ! -d m4 || exit 1
68 test ! -d po || exit 1
70 # VERSION specified through intl/VERSION file
71 cat <<\EOF >configure.ac
73 AC_CONFIG_SRCDIR(hello.c)
77 AC_CONFIG_FILES([Makefile])
81 test -d intl || mkdir intl
83 echo gettext-0.15 > intl/VERSION
85 # For further investigation, autopoint keeps autopoint.diff in $TMPDIR
86 # if there is a mismatch. Set TMPDIR not to pollute /tmp.
87 TMPDIR="$PWD" $gettext_datadir/autopoint 2>&1 | grep 'locally modified' 2>&1 >/dev/null || exit 1
89 test ! -d m4 || exit 1
90 test ! -d po || exit 1
92 echo 'GNU gettext library from gettext-0.15' > intl/VERSION
94 TMPDIR="$PWD" $gettext_datadir/autopoint 2>&1 || exit 1