AC_CONFIG_MACRO_DIR([m4])
AC_CONFIG_SRCDIR(GUILE-VERSION)
-AM_INIT_AUTOMAKE([gnu no-define -Wall -Wno-override])
+dnl `AM_SUBST_NOTMAKE' was introduced in Automake 1.11.
+AM_INIT_AUTOMAKE([1.11 gnu no-define -Wall -Wno-override dist-xz])
m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])], [AC_SUBST([AM_DEFAULT_VERBOSITY],1)])
AC_COPYRIGHT(GUILE_CONFIGURE_COPYRIGHT)
gl_INIT
dnl FIXME: remove me and the acinclude.m4 code when clock-gettime is
dnl fixed for clock_getcpuclockid and can be imported normally from
-dnl gnulib.
+dnl gnulib. See
+dnl <http://lists.gnu.org/archive/html/bug-gnulib/2011-06/msg00227.html>
+dnl for details.
gl_CLOCK_TIME
AC_PROG_CC_C89
if test "$use_modules" != no; then
AC_LIBOBJ([dynl])
+ AC_DEFINE([HAVE_MODULES], 1,
+ [Define this if you want support for dynamically loaded modules in Guile.])
fi
if test "$enable_posix" = yes; then
#
# Which way does the stack grow?
#
-# Following code comes from Autoconf 2.61's internal _AC_LIBOBJ_ALLOCA
+# Following code comes from Autoconf 2.69's internal _AC_LIBOBJ_ALLOCA
# macro (/usr/share/autoconf/autoconf/functions.m4). Gnulib has
# very similar code, so in future we could look at using that.
#
AC_RUN_IFELSE([AC_LANG_SOURCE(
[AC_INCLUDES_DEFAULT
int
-find_stack_direction ()
+find_stack_direction (int *addr, int depth)
{
- static char *addr = 0;
- auto char dummy;
- if (addr == 0)
- {
- addr = &dummy;
- return find_stack_direction ();
- }
- else
- return (&dummy > addr) ? 1 : -1;
+ int dir, dummy = 0;
+ if (! addr)
+ addr = &dummy;
+ *addr = addr < &dummy ? 1 : addr == &dummy ? 0 : -1;
+ dir = depth ? find_stack_direction (addr, depth - 1) : 0;
+ return dir + dummy;
}
int
-main ()
+main (int argc, char **argv)
{
- return find_stack_direction () < 0;
+ return find_stack_direction (0, argc + !argv + 20) < 0;
}])],
[SCM_I_GSC_STACK_GROWS_UP=1],
[],
LIBS="$BDW_GC_LIBS $LIBS"
CFLAGS="$BDW_GC_CFLAGS $CFLAGS"
-AC_CHECK_FUNCS([GC_do_blocking GC_call_with_gc_active GC_pthread_exit GC_pthread_cancel GC_allow_register_threads GC_pthread_sigmask GC_set_start_callback])
+AC_CHECK_FUNCS([GC_do_blocking GC_call_with_gc_active GC_pthread_exit GC_pthread_cancel GC_allow_register_threads GC_pthread_sigmask GC_set_start_callback GC_get_heap_usage_safe GC_get_free_space_divisor])
# Though the `GC_do_blocking ()' symbol is present in GC 7.1, it is not
# declared, and has a different type (returning void instead of
HOST_CC="$CC_FOR_BUILD"
AC_SUBST(HOST_CC)
-if test "$cross_compiling" = "yes"; then
- AC_MSG_CHECKING(guile for build)
- GUILE_FOR_BUILD="${GUILE_FOR_BUILD-guile}"
-else
- GUILE_FOR_BUILD='this-value-will-never-be-used'
-fi
-
-## AC_MSG_CHECKING("if we are cross compiling")
-## AC_MSG_RESULT($cross_compiling)
-if test "$cross_compiling" = "yes"; then
- AC_MSG_RESULT($GUILE_FOR_BUILD)
-fi
-AC_ARG_VAR(GUILE_FOR_BUILD,[guile for build system])
-AM_SUBST_NOTMAKE(GUILE_FOR_BUILD)
+GUILE_CHECK_GUILE_FOR_BUILD
## If we're using GCC, ask for aggressive warnings.
GCC_CFLAGS=""
sitedir="$pkgdatadir/site/$GUILE_EFFECTIVE_VERSION"
AC_SUBST([sitedir])
+dnl Name of the `guile' program.
+guile_program_name="`echo guile | "$SED" "$program_transform_name"`"
+AC_SUBST([guile_program_name])
+
# Additional SCM_I_GSC definitions are above.
AC_SUBST([SCM_I_GSC_GUILE_DEBUG])
AC_SUBST([SCM_I_GSC_ENABLE_DEPRECATED])