mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-06-18 17:50:29 +02:00
fix --disable-modules build
* configure.ac (HAVE_MODULES): Define HAVE_MODULES iff --enable-modules. * libguile/deprecated.c (scm_dynamic_args_call) * libguile/extensions.c (load_extension): * libguile/init.c (scm_i_init_guile): Use HAVE_MODULES in a few places.
This commit is contained in:
parent
1fa542989a
commit
08969a2407
4 changed files with 20 additions and 2 deletions
|
@ -234,6 +234,8 @@ dnl files which are destined for separate modules.
|
|||
|
||||
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
|
||||
|
|
|
@ -1898,7 +1898,15 @@ SCM_DEFINE (scm_dynamic_args_call, "dynamic-args-call", 3, 0, 0,
|
|||
char **argv;
|
||||
|
||||
if (scm_is_string (func))
|
||||
{
|
||||
#if HAVE_MODULES
|
||||
func = scm_dynamic_func (func, dobj);
|
||||
#else
|
||||
scm_misc_error ("dynamic-args-call",
|
||||
"dynamic-func not available to resolve ~S",
|
||||
scm_list_1 (func));
|
||||
#endif
|
||||
}
|
||||
SCM_VALIDATE_POINTER (SCM_ARG1, func);
|
||||
|
||||
fptr = SCM_POINTER_VALUE (func);
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/* extensions.c - registering and loading extensions.
|
||||
*
|
||||
* Copyright (C) 2001, 2006, 2009, 2010 Free Software Foundation, Inc.
|
||||
* Copyright (C) 2001, 2006, 2009, 2010, 2011 Free Software Foundation, Inc.
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public License
|
||||
|
@ -111,7 +111,13 @@ load_extension (SCM lib, SCM init)
|
|||
}
|
||||
|
||||
/* Dynamically link the library. */
|
||||
#if HAVE_MODULES
|
||||
scm_dynamic_call (init, scm_dynamic_link (lib));
|
||||
#else
|
||||
scm_misc_error ("load-extension",
|
||||
"extension ~S:~S not registered and dynamic-link disabled",
|
||||
scm_list_2 (init, lib));
|
||||
#endif
|
||||
}
|
||||
|
||||
void
|
||||
|
|
|
@ -501,7 +501,9 @@ scm_i_init_guile (void *base)
|
|||
scm_init_debug (); /* Requires macro smobs */
|
||||
scm_init_random (); /* Requires smob_prehistory */
|
||||
scm_init_simpos ();
|
||||
#if HAVE_MODULES
|
||||
scm_init_dynamic_linking (); /* Requires smob_prehistory */
|
||||
#endif
|
||||
scm_bootstrap_i18n ();
|
||||
scm_init_script ();
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue