summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorIvan Maidanski <ivmai@mail.ru>2017-06-09 19:42:54 +0300
committerIvan Maidanski <ivmai@mail.ru>2017-06-09 19:42:54 +0300
commitbfd8345dce69ea363a25a5824c7544db3b4aa8ce (patch)
tree6d40a9aacec9611ac0a3e7f823a363a1489d52a2 /configure.ac
parent4530166b0b4befe5e9a68be632c847b95aaf7627 (diff)
downloadbdwgc-bfd8345dce69ea363a25a5824c7544db3b4aa8ce.tar.gz
Compile checksums.c only if --with-checksums is given (configure)
New configure option (--with-checksums) is added, mainly to workaround 'checksums.a has no symbols' link warning (observed on Darwin). * Makefile.am [!SINGLE_GC_OBJ] (libgc_la_SOURCES): Do not add checksums.c unless CHECKSUMS. * configure.ac (checksums): New AC_ARG_WITH. * configure.ac [with_checksums && (enable_munmap || THREADS!=none)]: Issue AC_MSG_ERROR. * configure.ac (CHECKSUMS): New AC_DEFINE and AM_CONDITIONAL if with_checksums.
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac16
1 files changed, 16 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
index 309fb702..603773d5 100644
--- a/configure.ac
+++ b/configure.ac
@@ -908,6 +908,22 @@ else
fi
fi
+AC_ARG_WITH([checksums],
+ [AS_HELP_STRING([--with-checksums],
+ [Report on erroneously cleared dirty bits and
+ unexpectedly altered stubborn objects, at
+ substantial performance cost; use only for debugging
+ of the incremental collector])])
+if test x$with_checksums = xyes; then
+ if test x$enable_munmap != x -o x$THREADS != xnone; then
+ AC_MSG_ERROR([CHECKSUMS not compatible with USE_MUNMAP or threads])
+ fi
+ AC_DEFINE([CHECKSUMS], 1,
+ [Erroneously cleared dirty bits checking. Use only for
+ debugging of the incremental collector.])
+fi
+AM_CONDITIONAL([CHECKSUMS], test x$with_checksums = xyes)
+
AM_CONDITIONAL(USE_LIBDIR, test -z "$with_cross_host")
AC_ARG_ENABLE(werror, [--enable-werror Pass -Werror to the C compiler],