diff options
author | wl <wl> | 2005-10-27 21:30:29 +0000 |
---|---|---|
committer | wl <wl> | 2005-10-27 21:30:29 +0000 |
commit | 72f2602fb70c2409a54dcf6b9a91f684ef07c177 (patch) | |
tree | cc336b7b4182923ce639141f25f9b3a969a1d815 /aclocal.m4 | |
parent | 130e9255cef8fb14d74d4812bf27bf2822de91c5 (diff) | |
download | groff-72f2602fb70c2409a54dcf6b9a91f684ef07c177.tar.gz |
* 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.
Diffstat (limited to 'aclocal.m4')
-rw-r--r-- | aclocal.m4 | 51 |
1 files changed, 51 insertions, 0 deletions
@@ -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], |