diff options
Diffstat (limited to 'libguile/dynl.c')
-rw-r--r-- | libguile/dynl.c | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/libguile/dynl.c b/libguile/dynl.c index dc98e7d17..52c43e542 100644 --- a/libguile/dynl.c +++ b/libguile/dynl.c @@ -48,6 +48,7 @@ maybe_drag_in_eprintf () #include <string.h> #include "libguile/_scm.h" +#include "libguile/libpath.h" #include "libguile/dynl.h" #include "libguile/smob.h" #include "libguile/keywords.h" @@ -113,7 +114,24 @@ sysdep_dynl_func (const char *symb, void *handle, const char *subr) static void sysdep_dynl_init () { + char *env; + lt_dlinit (); + + env = getenv ("GUILE_SYSTEM_EXTENSIONS_PATH"); + if (env && strcmp (env, "") == 0) + /* special-case interpret system-ltdl-path=="" as meaning no system path, + which is the case during the build */ + ; + else if (env) + /* FIXME: should this be a colon-separated path? Or is the only point to + allow the build system to turn off the installed extensions path? */ + lt_dladdsearchdir (env); + else + { + lt_dladdsearchdir (SCM_LIB_DIR); + lt_dladdsearchdir (SCM_EXTENSIONS_DIR); + } } scm_t_bits scm_tc16_dynamic_obj; |