From 72f2602fb70c2409a54dcf6b9a91f684ef07c177 Mon Sep 17 00:00:00 2001 From: wl Date: Thu, 27 Oct 2005 21:30:29 +0000 Subject: * aclocal.m4 (GROFF_MAKEINFO): New function for checking whether makeinfo 4.8 or newer is available. * configure.ac: Call GROFF_MAKEINFO. * configure: Regenerated. * Makefile.in (MAKEINFO): Use autoconf variable. (MDEFINES): Add MAKEINFO. * doc/Makefile.in (MAKEINFO): Use autoconf variable. * doc/Makefile.sub (MAKEINFO): Remove. --- aclocal.m4 | 51 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 51 insertions(+) (limited to 'aclocal.m4') diff --git a/aclocal.m4 b/aclocal.m4 index 7e22633e..80872a77 100644 --- a/aclocal.m4 +++ b/aclocal.m4 @@ -57,6 +57,57 @@ AC_DEFUN([GROFF_PRINT], AC_DEFUN([GROFF_PROG_YACC], [AC_CHECK_PROGS([YACC], [byacc 'bison -y'], [yacc])]) +# We need makeinfo 4.8 or newer. + +AC_DEFUN([GROFF_MAKEINFO], + [missing= + AC_CHECK_PROG([MAKEINFO], [makeinfo], [makeinfo]) + if test -z "$MAKEINFO"; then + missing="\`makeinfo' is missing." + else + # We need an additional level of quoting to make sed's regexps work. + [makeinfo_version=`$MAKEINFO --version 2>&1 \ + | sed '1 {s/^.* \([^ ]\+\)$/\1/;q}'`] + # Consider only the first two numbers in version number string. + [makeinfo_version_major=`echo $makeinfo_version \ + | sed 's/^\([0-9]*\).*$/\1/'`] + if test -z "$makeinfo_version_major"; then + makeinfo_version_major=0 + makeinfo_version_minor=0 + else + [makeinfo_version_minor=`echo $makeinfo_version \ + | sed 's/^[^.]\+\(.*\)$/\1/'`] + # No minor version number at all? + if test -z "$makeinfo_version_minor"; then + makeinfo_version_minor=0 + else + [makeinfo_version_minor=`echo $makeinfo_version_minor \ + | sed 's/\.\([0-9]*\).*$/\1/'`] + if test -z "$makeinfo_version_minor"; then + makeinfo_version_minor=0 + fi + fi + fi + fi + makeinfo_version_numeric=`expr $makeinfo_version_major '*' 1000 \ + '+' $makeinfo_version_minor` + if test $makeinfo_version_numeric -lt 4008; then + missing="\`makeinfo' is too old." + fi + + if test -n "$missing"; then + if test ! -f doc/groff \ + || test ${srcdir}/doc/groff.texinfo -nt doc/groff; then + AC_MSG_ERROR($missing +[Get the `texinfo' package version 4.8 or newer.]) + else + AC_MSG_WARN($missing +[Get the `texinfo' package version 4.8 or newer if you want to convert +`groff.texinfo' into a PDF or HTML document.]) + fi + fi + AC_SUBST([MAKEINFO])]) + # The following programs are needed for grohtml. AC_DEFUN([GROFF_HTML_PROGRAMS], -- cgit v1.2.1