# func_trace_sed macro configure.ac
# traces an Autoconf macro call and outputs the arguments to stdout,
-# using sed.
+# using sed. For a macro call without arguments, print just a blank line.
func_trace_sed ()
{
sed_extract_arguments='
-s,#.*$,,; s,^dnl .*$,,; s, dnl .*$,,;
+s,#.*$,,
+s,^dnl .*$,,
+s, dnl .*$,,
/'"$1"'(/ {
ta
:a
:b
s,^.*'"$1"'([[ ]*\([^]"$`\\)]*\).*$,\1,p
}
+/'"$1"'[^A-Za-z0-9_(]/ s,^.*$,,p
+/'"$1"'$/ s,^.*$,,p
d'
sed -e "$sed_extract_arguments" "$2"
}
AC_OUTPUT
EOF
-$gettext_datadir/autopoint 2>&1 | grep 'Missing version' 2>&1 >/dev/null \
- || Exit 1
+$gettext_datadir/autopoint || Exit 1
test ! -d intl || Exit 1
-test ! -d m4 || Exit 1
-test ! -d po || Exit 1
-
-# VERSION specified through intl/VERSION file, but in wrong format
-cat <<\EOF >configure.ac
-AC_INIT
-AC_CONFIG_SRCDIR(hello.c)
-
-AC_PROG_CC
-
-AC_CONFIG_FILES([Makefile])
-AC_OUTPUT
-EOF
-
-test -d intl || mkdir intl
-echo bogus-version > intl/VERSION
-
-$gettext_datadir/autopoint 2>&1 | grep 'Missing version' 2>&1 >/dev/null \
- || Exit 1
-
-test ! -d m4 || Exit 1
-test ! -d po || Exit 1
+test -d m4 || Exit 1
+test -d po || Exit 1
+rm -rf ABOUT-NLS config.rpath m4 po
# VERSION specified through intl/VERSION file
cat <<\EOF >configure.ac
AC_CONFIG_SRCDIR(hello.c)
AC_PROG_CC
+AM_GNU_GETTEXT
AC_CONFIG_FILES([Makefile])
AC_OUTPUT