summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorG. Branden Robinson <g.branden.robinson@gmail.com>2021-11-09 08:36:19 +1100
committerG. Branden Robinson <g.branden.robinson@gmail.com>2021-11-09 10:50:07 +1100
commit5151526cfd1aec0222ec2b03ddc725ac9eb803d0 (patch)
tree726e0d62e8a9a3c402f26858b288aa3747acec9b /configure.ac
parent3dd2e30c124033de7f3caebc09e4a66f3d83a919 (diff)
downloadgroff-git-5151526cfd1aec0222ec2b03ddc725ac9eb803d0.tar.gz
[libgroff]: Make allocator replacement optional.
Switch it off by default, relying on C++ runtime new/delete support. * configure.ac: Call new `GROFF_USE_GROFF_ALLOCATOR` m4 macro. Use `AM_CONDITIONAL` to set Automake variable `USE_GROFF_ALLOCATOR` if appropriate. Report whether the allocator is used in configure script output summary. * m4/groff.m4 (GROFF_USE_GROFF_ALLOCATOR): Define new macro to collect user preference. The default is off. * src/libs/libgroff/libgroff.am (libgroff_a_SOURCES): Build and link new.cpp only if `USE_GROFF_ALLOCATOR`. * NEWS: Add item.
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac11
1 files changed, 11 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
index f9963a9cc..cdc425b04 100644
--- a/configure.ac
+++ b/configure.ac
@@ -152,6 +152,9 @@ GROFF_WCOREFLAG
# URW fonts extra dir
GROFF_URW_FONTS_PATH
+# use groff's own malloc-based allocator for C++ new/delete operators
+GROFF_USE_GROFF_ALLOCATOR
+
# other random stuff
GROFF_BROKEN_SPOOLER_FLAGS
GROFF_PAGE
@@ -199,6 +202,7 @@ AM_CONDITIONAL([BUILD_PDFDOC], [test -n "$make_pdfdoc"])
AM_CONDITIONAL([BUILD_PDFEXAMPLES], [test -n "$make_pdfexamples"])
AM_CONDITIONAL([BUILD_OTHERDOC], [test -n "$make_otherdoc"])
AM_CONDITIONAL([BUILD_EXAMPLES], [test -n "$make_examples"])
+AM_CONDITIONAL([USE_GROFF_ALLOCATOR], [test "x$use_groff_allocator" = "xyes"])
AM_CONDITIONAL([INSTALL_SHIPPED_HTML], [test -n "$make_install_shipped_htmldoc"])
AM_CONDITIONAL([HAVE_PDFTOOLS], [test "x$groff_have_pdftools" = "xyes" ])
AM_CONDITIONAL([HAVE_TEXI2DVI], [test "x$groff_have_texi2dvi" = "xyes" ])
@@ -212,6 +216,13 @@ ${PACKAGE_NAME} version ${PACKAGE_VERSION}
----------------------------------------------------------------------
Prefix : ${prefix}
Compiler : ${CC} ${CFLAGS} ${CPPFLAGS}"
+if test "x$use_groff_allocator" = "xyes"; then
+echo "\
+ Use groff allocator : yes"
+else
+echo "\
+ Use groff allocator : no"
+fi
if test "x$groff_no_x" = "xyes"; then
echo "\
X11 support : no"