Programs built by this compiler make use of the libga68 run-time
library.
+Dependencies
+============
+
+The Algol 68 run-time relies on the Boehm-Demers-Weiser conservative
+garbage collector libgc, version 7.6.2 or later. If for whatever
+reason a recent enough of libgc is not available for some target then
+you can configure GCC with --disable-algol68-gc.
+
Building
========
_ACEOF
if ac_fn_c_try_link "$LINENO"; then :
- if test "$cross_compiling" = yes; then :
+ if test "$cross_compiling" = yes; then :
system_bdw_gc_found=no
else
#include <gc/gc.h>
int main() {
- GC_init();
+ if (!GC_is_init_called ())
+ GC_init();
return 0;
}
CFLAGS=$save_CFLAGS
LIBS=$save_LIBS
if test x$enable_algol68_gc = xauto && test x$system_bdw_gc_found = xno; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: system bdw-gc not found, building libga68 with no GC support" >&5
-$as_echo "$as_me: WARNING: system bdw-gc not found, building libga68 with no GC support" >&2;}
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: usable system bdw-gc not found, building libga68 with no GC support" >&5
+$as_echo "$as_me: WARNING: usable system bdw-gc not found, building libga68 with no GC support" >&2;}
use_bdw_gc=no
elif test x$enable_algol68_gc = xyes && test x$system_bdw_gc_found = xno; then
- as_fn_error $? "system bdw-gc required but not found" "$LINENO" 5
+ as_fn_error $? "usable system bdw-gc required but not found" "$LINENO" 5
else
use_bdw_gc=yes
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: found" >&5
AC_LINK_IFELSE(
[AC_LANG_PROGRAM([#include <gc/gc.h>],[GC_init()])],
[
+ dnl Make sure to include GC_is_init_called and any other
+ dnl feature that may require a "recent" libgc.
AC_RUN_IFELSE([AC_LANG_SOURCE([[
#include <gc/gc.h>
int main() {
- GC_init();
+ if (!GC_is_init_called ())
+ GC_init();
return 0;
}
]])],
CFLAGS=$save_CFLAGS
LIBS=$save_LIBS
if test x$enable_algol68_gc = xauto && test x$system_bdw_gc_found = xno; then
- AC_MSG_WARN([system bdw-gc not found, building libga68 with no GC support])
+ AC_MSG_WARN([usable system bdw-gc not found, building libga68 with no GC support])
use_bdw_gc=no
elif test x$enable_algol68_gc = xyes && test x$system_bdw_gc_found = xno; then
- AC_MSG_ERROR([system bdw-gc required but not found])
+ AC_MSG_ERROR([usable system bdw-gc required but not found])
else
use_bdw_gc=yes
AC_MSG_RESULT([found])