[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[groff] 40/50: Check for m4 program at configuration time.
From: |
G. Branden Robinson |
Subject: |
[groff] 40/50: Check for m4 program at configuration time. |
Date: |
Sat, 21 May 2022 12:17:29 -0400 (EDT) |
gbranden pushed a commit to branch master
in repository groff.
commit ffb985975130d2d94a7f6ac287dc373c2e60fc34
Author: G. Branden Robinson <g.branden.robinson@gmail.com>
AuthorDate: Fri May 20 08:29:51 2022 -0500
Check for m4 program at configuration time.
* m4/groff.m4 (GROFF_PROG_M4): Define new macro to perform the check and
error out if the program is missing.
* configure.ac: Call the new macro.
* tmac/tmac.am (tmac/groff_man.7.man,
tmac/groff_man_style.7.man): Use the new implicitly AC_SUBST-ed
variable `M4` to run the program.
* NEWS: Document build dependency.
---
ChangeLog | 11 +++++++++++
NEWS | 4 ++++
configure.ac | 1 +
m4/groff.m4 | 9 +++++++++
tmac/tmac.am | 4 ++--
5 files changed, 27 insertions(+), 2 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index b4ba6d06..9a9ca6c9 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,14 @@
+2022-05-20 G. Branden Robinson <g.branden.robinson@gmail.com>
+
+ Check for m4 program at configuration time.
+
+ * m4/groff.m4 (GROFF_PROG_M4): Define new macro to perform the
+ check and error out if the program is missing.
+ * configure.ac: Call the new macro.
+ * tmac/tmac.am (tmac/groff_man.7.man,
+ tmac/groff_man_style.7.man): Use the new implicitly AC_SUBST-ed
+ variable `M4` to run the program.
+
2022-05-20 G. Branden Robinson <g.branden.robinson@gmail.com>
* m4/groff.m4 (GROFF_PROG_YACC): Update wording of error
diff --git a/NEWS b/NEWS
index 052b6985..b84902e6 100644
--- a/NEWS
+++ b/NEWS
@@ -423,6 +423,10 @@ o Because all generated forms of groff's Texinfo manual
are now included
o Building groff from its distribution archive no longer requires byacc
(or GNU Bison) to be installed.
+o m4 is now required to build. Any m4 that implements the features
+ documented in the Version 7 Unix m4(1) man page, and the `-D` option,
+ should suffice.
+
o New 'configure' options --{en,dis}able-groff-allocator control whether
groff uses its own malloc/free-wrapping allocator to implement all C++
new/delete operations. groff has used this allocator for over 30
diff --git a/configure.ac b/configure.ac
index 9b69b41d..eea5a847 100644
--- a/configure.ac
+++ b/configure.ac
@@ -65,6 +65,7 @@ GROFF_PRINT
GROFF_REFERDIR_DEFAULT
AC_PROG_EGREP
GROFF_PROG_YACC
+GROFF_PROG_M4
GROFF_MAKEINFO
GROFF_TEXI2DVI
AC_PROG_RANLIB
diff --git a/m4/groff.m4 b/m4/groff.m4
index cc8fa515..f6719195 100644
--- a/m4/groff.m4
+++ b/m4/groff.m4
@@ -73,6 +73,15 @@ AC_DEFUN([GROFF_PERL],
AX_PROG_PERL_VERSION([$PERLVERSION], true, \
AC_MSG_ERROR([perl version is too old], 1))])
+# We need m4 to generate some man pages.
+
+AC_DEFUN([GROFF_PROG_M4], [
+ AC_CHECK_PROGS([M4], [m4], [missing])
+ if test "$M4" = missing
+ then
+ AC_MSG_ERROR([could not find 'm4'], 1)
+ fi
+])
# We need makeinfo from Texinfo 5.0 or newer, for @codequoteundirected.
# The minor version checking logic is present for future needs.
diff --git a/tmac/tmac.am b/tmac/tmac.am
index c1a428e0..c79b38ad 100644
--- a/tmac/tmac.am
+++ b/tmac/tmac.am
@@ -231,11 +231,11 @@ $(M4CHECK): tmac/groff_man.7.man.in
$(tmac_srcdir)/groff_man.7.man.in > $@
tmac/groff_man.7.man: tmac/groff_man.7.man.in $(M4CHECK)
- $(AM_V_GEN)m4 -D_groff_man_not_style \
+ $(AM_V_GEN)$(M4) -D_groff_man_not_style \
$(tmac_srcdir)/groff_man.7.man.in > $@
tmac/groff_man_style.7.man: tmac/groff_man.7.man.in $(M4CHECK)
- $(AM_V_GEN)m4 -D_groff_man_style \
+ $(AM_V_GEN)$(M4) -D_groff_man_style \
$(tmac_srcdir)/groff_man.7.man.in > $@
# The installation of groff compatibility wrappers for vendor-provided
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [groff] 40/50: Check for m4 program at configuration time.,
G. Branden Robinson <=