From bfd8345dce69ea363a25a5824c7544db3b4aa8ce Mon Sep 17 00:00:00 2001 From: Ivan Maidanski Date: Fri, 9 Jun 2017 19:42:54 +0300 Subject: 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. --- Makefile.am | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'Makefile.am') diff --git a/Makefile.am b/Makefile.am index c2c5402a..4d0174b6 100644 --- a/Makefile.am +++ b/Makefile.am @@ -69,7 +69,7 @@ else EXTRA_DIST += extra/gc.c libgc_la_SOURCES = \ - allchblk.c alloc.c blacklst.c checksums.c dbg_mlc.c \ + allchblk.c alloc.c blacklst.c dbg_mlc.c \ dyn_load.c finalize.c gc_dlopen.c gcj_mlc.c headers.c \ mach_dep.c malloc.c mallocx.c mark.c mark_rts.c misc.c new_hblk.c \ obj_map.c os_dep.c ptr_chck.c reclaim.c specific.c stubborn.c typd_mlc.c @@ -99,6 +99,10 @@ if MAKE_BACK_GRAPH libgc_la_SOURCES += backgraph.c endif +if CHECKSUMS +libgc_la_SOURCES += checksums.c +endif + if ENABLE_DISCLAIM libgc_la_SOURCES += fnlz_mlc.c endif -- cgit v1.2.1