[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH groff] Allow building groff without makeinfo
From: |
onf |
Subject: |
[PATCH groff] Allow building groff without makeinfo |
Date: |
Fri, 22 Nov 2024 23:00:21 +0100 |
* ./configure no longer fails if makeinfo is outdated or missing
* building the Texinfo manual (doc/groff.texi.in) is no longer attempted
if up-to-date makeinfo isn't available
* a new notice is added to ./configure to warn the user that the manual
will not be built
---
configure.ac | 3 +++
doc/doc.am | 5 +++++
m4/groff.m4 | 24 +++++++++++++++++++++---
3 files changed, 29 insertions(+), 3 deletions(-)
diff --git a/configure.ac b/configure.ac
index c30dd9a39..ac37d08eb 100644
--- a/configure.ac
+++ b/configure.ac
@@ -196,6 +196,7 @@ AM_CONDITIONAL([USE_GROFF_ALLOCATOR],
AM_CONDITIONAL([HAVE_GHOSTSCRIPT], [test "$GHOSTSCRIPT" != no \
&& test "$GHOSTSCRIPT" != missing])
AM_CONDITIONAL([HAVE_URW_FONTS], [test "$groff_have_urw_fonts" = yes ])
+AM_CONDITIONAL([HAVE_MAKEINFO], [test "$groff_have_makeinfo" = yes ])
AM_CONDITIONAL([HAVE_TEXI2DVI], [test "$groff_have_texi2dvi" = yes ])
AM_CONDITIONAL([USE_TEX], [test "$groff_use_tex" = yes ])
@@ -243,6 +244,7 @@ then
fi
echo "\
preconv can use uchardet library : $groff_have_uchardet
+ can build texinfo manual : $groff_have_makeinfo
can build groff.dvi, groff.pdf : $groff_use_tex
----------------------------------------------------------------------"
@@ -252,4 +254,5 @@ GROFF_GHOSTSCRIPT_VERSION_NOTICE
GROFF_URW_FONTS_NOTICE
GROFF_UCHARDET_NOTICE
GROFF_GROHTML_PROGRAM_NOTICE
+GROFF_MAKEINFO_PROGRAM_NOTICE
GROFF_GROPDF_PROGRAM_NOTICE
diff --git a/doc/doc.am b/doc/doc.am
index 49da8f26a..bb586f3e1 100644
--- a/doc/doc.am
+++ b/doc/doc.am
@@ -542,6 +542,9 @@ endif
#info_TEXINFOS = doc/groff.texi
#doc_groff_TEXINFOS = doc/fdl.texi
+# Do not generate the manual if 'makeinfo' is not functional.
+if HAVE_MAKEINFO
+
if USE_TEX
GROFF_DVI = doc/groff.dvi
GROFF_PDF = doc/groff.pdf
@@ -744,6 +747,8 @@ uninstall-html:
uninstall-txt:
$(RM) $(DESTDIR)$(docdir)/groff.txt
+endif # HAVE_MAKEINFO
+
# An image of a gnu in enscapsulated PostScript is generated during the
# build process if necessary. Our configure script assumes pnmdepth is
# available if xpmtoppm is (see macro "GROFF_PROG_XPMTOPPM").
diff --git a/m4/groff.m4 b/m4/groff.m4
index 164c5065a..3659c931b 100644
--- a/m4/groff.m4
+++ b/m4/groff.m4
@@ -164,20 +164,21 @@ AC_DEFUN([GROFF_PROG_MAKEINFO], [
expr ${makeinfo_version_major}000 + $makeinfo_version_minor`
if test $makeinfo_version_numeric -lt 5000
then
- missing="'makeinfo' is too old."
+ missing="'makeinfo' is too old; version 5.0 or newer needed"
MAKEINFO=
fi
fi
+ groff_have_makeinfo=yes
if test -n "$missing"
then
+ groff_have_makeinfo=no
infofile=doc/groff.info
test -f $infofile || infofile="$srcdir"/$infofile
if test ! -f $infofile \
|| test "$srcdir"/doc/groff.texi -nt $infofile
then
- AC_MSG_ERROR($missing
-[Get the 'texinfo' package version 5.0 or newer.])
+ AC_MSG_WARN($missing)
fi
fi
AC_SUBST([MAKEINFO])
@@ -290,6 +291,23 @@ AC_DEFUN([GROFF_GROPDF_DEPENDENCIES_CHECK], [
AC_SUBST([use_gropdf])
])
+AC_DEFUN([GROFF_MAKEINFO_PROGRAM_NOTICE], [
+ AC_REQUIRE([GROFF_PROG_MAKEINFO])
+
+ if test "$groff_have_makeinfo" = no
+ then
+ AC_MSG_NOTICE([texinfo documentation will not be generated.
+
+ Because 'makeinfo' is either outdated or missing, the Texinfo manual
+ will not be generated in any of its output formats (texinfo, html,
+ txt, dvi, pdf).
+
+ Get the 'texinfo' package version 5.0 or newer to build the manual.
+])
+ fi
+])
+
+
AC_DEFUN([GROFF_GROPDF_PROGRAM_NOTICE], [
AC_REQUIRE([GROFF_GROPDF_DEPENDENCIES_CHECK])
--
2.47.0
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [PATCH groff] Allow building groff without makeinfo,
onf <=