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
char **argv;
if (scm_is_string (func))
- func = scm_dynamic_func (func, dobj);
+ {
+#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);
/* 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
}
/* 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
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 ();