This is the mail archive of the
java-patches@sourceware.cygnus.com
mailing list for the Java project.
Patch: libltdl -vs- GC
- To: Java Patch List <java-patches at sourceware dot cygnus dot com>
- Subject: Patch: libltdl -vs- GC
- From: Tom Tromey <tromey at cygnus dot com>
- Date: 14 Feb 2000 14:58:00 -0700
- Reply-To: tromey at cygnus dot com
I'm committing the appended patch. It changes libltdl to notice when
we are using the Boehm GC, and then include <gc.h> accordingly. This
is a bit of a hack, but it is required on systems where the GC
redefines dlopen.
2000-02-14 Tom Tromey <tromey@cygnus.com>
* ltdl.c: If HAVE_BOEHM_GC defined, includ gc.h.
* Makefile.in: Rebuilt.
* Makefile.am (INCLUDES): New macro.
* config.h.in, configure: Rebuilt.
* acconfig.h (HAVE_BOEHM_GC): Define.
* configure.in: Handle --enable-java-gc.
Tom
Index: ChangeLog
===================================================================
RCS file: ChangeLog
diff -N ChangeLog
--- /dev/null Mon Dec 31 20:00:00 1979
+++ ChangeLog Mon Feb 14 13:27:42 2000
@@ -0,0 +1,9 @@
+2000-02-14 Tom Tromey <tromey@cygnus.com>
+
+ * ltdl.c: If HAVE_BOEHM_GC defined, includ gc.h.
+ * Makefile.in: Rebuilt.
+ * Makefile.am (INCLUDES): New macro.
+ * config.h.in, configure: Rebuilt.
+ * acconfig.h (HAVE_BOEHM_GC): Define.
+ * configure.in: Handle --enable-java-gc.
+
Index: Makefile.am
===================================================================
RCS file: /cvs/cvsfiles/devo/libjava/libltdl/Makefile.am,v
retrieving revision 1.1.1.1
diff -u -r1.1.1.1 Makefile.am
--- Makefile.am 2000/01/17 19:02:33 1.1.1.1
+++ Makefile.am 2000/02/14 21:27:42
@@ -2,6 +2,8 @@
AUTOMAKE_OPTIONS = no-dependencies foreign
+INCLUDES = $(GCINCS)
+
if INSTALL_LTDL
include_HEADERS = ltdl.h
lib_LTLIBRARIES = libltdl.la
Index: acconfig.h
===================================================================
RCS file: /cvs/cvsfiles/devo/libjava/libltdl/acconfig.h,v
retrieving revision 1.1.1.1
diff -u -r1.1.1.1 acconfig.h
--- acconfig.h 2000/01/17 19:02:33 1.1.1.1
+++ acconfig.h 2000/02/14 21:27:45
@@ -10,3 +10,6 @@
/* Define if you have the shl_load function. */
#undef HAVE_SHL_LOAD
+
+/* Define if you are using the Boehm GC. */
+#undef HAVE_BOEHM_GC
Index: configure.in
===================================================================
RCS file: /cvs/cvsfiles/devo/libjava/libltdl/configure.in,v
retrieving revision 1.1.1.1
diff -u -r1.1.1.1 configure.in
--- configure.in 2000/01/17 19:02:33 1.1.1.1
+++ configure.in 2000/02/14 21:28:15
@@ -27,6 +27,22 @@
AC_ARG_ENABLE(ltdl-install,
[ --enable-ltdl-install install libltdl])
+AC_MSG_CHECKING([for garbage collector to use])
+AC_ARG_ENABLE(java-gc,
+changequote(<<,>>)dnl
+<< --enable-java-gc=TYPE choose garbage collector [boehm]>>,
+changequote([,])
+ GC=$enableval,
+ GC=boehm)
+
+GCINCS=
+if test "$GC" = "boehm"; then
+ GCINCS='-I$(top_srcdir)/../../boehm-gc -I$(top_builddir)/../../boehm-gc'
+ GCINCS="$GCINCS `cat ../../boehm-gc/boehm-cflags`"
+ AC_DEFINE(HAVE_BOEHM_GC)
+fi
+AC_SUBST(GCINCS)
+
AM_CONDITIONAL(INSTALL_LTDL, test x"${enable_ltdl_install-no}" != xno)
AM_CONDITIONAL(CONVENIENCE_LTDL, test x"${enable_ltdl_convenience-no}" != xno)
Index: ltdl.c
===================================================================
RCS file: /cvs/cvsfiles/devo/libjava/libltdl/ltdl.c,v
retrieving revision 1.1.1.1
diff -u -r1.1.1.1 ltdl.c
--- ltdl.c 2000/01/17 19:02:33 1.1.1.1
+++ ltdl.c 2000/02/14 21:28:48
@@ -58,6 +58,10 @@
#include <stdio.h>
#endif
+#if HAVE_BOEHM_GC
+#include <gc.h>
+#endif
+
#include "ltdl.h"
/* max. filename length */