groff-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[groff] 37/50: [build]: Refactor libgroff allocator config.


From: G. Branden Robinson
Subject: [groff] 37/50: [build]: Refactor libgroff allocator config.
Date: Sat, 21 May 2022 12:17:29 -0400 (EDT)

gbranden pushed a commit to branch master
in repository groff.

commit 6ad1adaab46968855a92465a27cc1ffc6ea6e5b3
Author: G. Branden Robinson <g.branden.robinson@gmail.com>
AuthorDate: Fri May 20 07:52:14 2022 -0500

    [build]: Refactor libgroff allocator config.
    
    Trivially refactor libgroff allocator configuration.
    
    * m4/groff.m4 (GROFF_USE_GROFF_ALLOCATOR): Update description of
      configuration flag to clarify that it's implemented in a library.
      Rename shell variable to prefix it with "groff_", putting it in an ad
      hoc name space as with other variables.  If feature disabled, set
      variable to literal "no".
    
    * configure.ac: Use renamed variable and interpolate it directly into
      configuration report, simplifying shell logic.
    
    Make code style more readable.
---
 ChangeLog    | 12 ++++++++++++
 configure.ac | 13 +++----------
 m4/groff.m4  | 12 ++++++------
 3 files changed, 21 insertions(+), 16 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index ee2e5ecb..8714e188 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,15 @@
+2022-05-20  G. Branden Robinson <g.branden.robinson@gmail.com>
+
+       Trivially refactor libgroff allocator configuration.
+
+       * m4/groff.m4 (GROFF_USE_GROFF_ALLOCATOR): Update description of
+       configuration flag to clarify that it's implemented in a
+       library.  Rename shell variable to prefix it with "groff_",
+       putting it in an ad hoc name space as with other variables.  If
+       feature disabled, set variable to literal "no".
+       * configure.ac: Use renamed variable and interpolate it directly
+       into configuration report, simplifying shell logic.
+
 2022-05-20  G. Branden Robinson <g.branden.robinson@gmail.com>
 
        * configure.ac: Revise configuration report for intelligibility.
diff --git a/configure.ac b/configure.ac
index 7993558b..9f8cce48 100644
--- a/configure.ac
+++ b/configure.ac
@@ -198,7 +198,7 @@ AM_CONDITIONAL([USEPROGRAMPREFIX], [test x$g = xg])
 
 AM_CONDITIONAL([BUILD_HTML], [test -n "$make_htmldoc"])
 AM_CONDITIONAL([BUILD_PDFDOC], [test -n "$make_pdfdoc"])
-AM_CONDITIONAL([USE_GROFF_ALLOCATOR], [test "x$use_groff_allocator" = "xyes"])
+AM_CONDITIONAL([USE_GROFF_ALLOCATOR], [test "x$groff_use_own_allocator" = 
"xyes"])
 AM_CONDITIONAL([HAVE_PDFTOOLS], [test "x$groff_have_pdftools" = "xyes" ])
 AM_CONDITIONAL([HAVE_TEXI2DVI], [test "x$groff_have_texi2dvi" = "xyes" ])
 
@@ -210,15 +210,8 @@ echo "
 ${PACKAGE_NAME} version ${PACKAGE_VERSION}
 ----------------------------------------------------------------------
  installation prefix              : ${prefix}
- C++ compiler                     : ${CXX} ${CXXFLAGS} ${CPPFLAGS}"
-if test "x$use_groff_allocator" = "xyes"; then
-echo "\
- use libgroff's memory allocator  : yes"
-else
-echo "\
- use libgroff's memory allocator  : no"
-fi
-echo "\
+ C++ compiler                     : ${CXX} ${CXXFLAGS} ${CPPFLAGS}
+ use libgroff's memory allocator  : $groff_use_own_allocator
  C compiler                       : ${CC} ${CFLAGS} ${CPPFLAGS}
  Perl interpreter version         : $perl_version"
 if test "x$groff_no_x" = "xyes"; then
diff --git a/m4/groff.m4 b/m4/groff.m4
index 0ba7c3c6..4c026fff 100644
--- a/m4/groff.m4
+++ b/m4/groff.m4
@@ -1658,10 +1658,10 @@ AC_DEFUN([GROFF_PDFTOOLS],
    fi
    ])
 
-AC_DEFUN([GROFF_USE_GROFF_ALLOCATOR],
-  [AC_ARG_ENABLE([groff-allocator],
-   [AS_HELP_STRING([--enable-groff-allocator], [enable groff's own \
+AC_DEFUN([GROFF_USE_GROFF_ALLOCATOR], [
+  AC_ARG_ENABLE([groff-allocator],
+    [AS_HELP_STRING([--enable-groff-allocator], [enable libgroff's \
 allocator for C++ new/delete])],
-   [test "$enableval" = yes && use_groff_allocator=yes],
-   [use_groff_allocator=]
-)])
+    [test "$enableval" = yes && groff_use_own_allocator=yes],
+    [groff_use_own_allocator=no])
+])



reply via email to

[Prev in Thread] Current Thread [Next in Thread]