mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-06-24 20:30:28 +02:00
add the libdir to the ltdl lib search path
* libguile/Makefile.am (libpath.h): Fix pkgdatadir, pkglibdir, and pkgincludedir entries. Add a new define, SCM_LIB_DIR. * libguile/dynl.c (sysdep_dynl_init): Add the libdir to the libltdl search path. Should fix http://thread.gmane.org/gmane.lisp.guile.bugs/4289/focus=4296 -- that is, it should allow guile to be invoked from whereever it is installed, without munging LTDL_LIBRARY_PATH or the like variables. There is a trick though -- during the build, we don't want to be looking in the $libdir for loadable modules. So as with GUILE_SYSTEM_PATH, we have GUILE_SYSTEM_LTDL_PATH. * meta/uninstalled-env.in: Set GUILE_SYSTEM_LTDL_PATH to "" when building.
This commit is contained in:
parent
db723980a4
commit
eb350124a8
3 changed files with 23 additions and 3 deletions
|
@ -597,6 +597,7 @@ libpath.h: $(srcdir)/Makefile.in $(top_builddir)/config.status
|
|||
@echo '#define SCM_PKGDATA_DIR "$(pkgdatadir)"' >> libpath.tmp
|
||||
@echo '#define SCM_LIBRARY_DIR "$(pkgdatadir)/$(GUILE_EFFECTIVE_VERSION)"'>>libpath.tmp
|
||||
@echo '#define SCM_SITE_DIR "$(pkgdatadir)/site"' >> libpath.tmp
|
||||
@echo '#define SCM_LIB_DIR "$(pkglibdir)"' >> libpath.tmp
|
||||
@echo '#define SCM_CCACHE_DIR "$(pkglibdir)/$(GUILE_EFFECTIVE_VERSION)/ccache"' >> libpath.tmp
|
||||
@echo '#define SCM_EFFECTIVE_VERSION "$(GUILE_EFFECTIVE_VERSION)"' >> libpath.tmp
|
||||
@echo '#define SCM_BUILD_INFO { \' >> libpath.tmp
|
||||
|
@ -616,9 +617,9 @@ libpath.h: $(srcdir)/Makefile.in $(top_builddir)/config.status
|
|||
@echo ' { "infodir", "@infodir@" }, \' >> libpath.tmp
|
||||
@echo ' { "mandir", "@mandir@" }, \' >> libpath.tmp
|
||||
@echo ' { "includedir", "@includedir@" }, \' >> libpath.tmp
|
||||
@echo ' { "pkgdatadir", "@pkgdatadir@" }, \' >> libpath.tmp
|
||||
@echo ' { "pkglibdir", "@pkglibdir@" }, \' >> libpath.tmp
|
||||
@echo ' { "pkgincludedir", "@pkgincludedir@" }, \' \
|
||||
@echo ' { "pkgdatadir", "$(pkgdatadir)" }, \' >> libpath.tmp
|
||||
@echo ' { "pkglibdir", "$(pkglibdir)" }, \' >> libpath.tmp
|
||||
@echo ' { "pkgincludedir", "$(pkgincludedir)" }, \' \
|
||||
>> libpath.tmp
|
||||
@echo ' { "guileversion", "@GUILE_VERSION@" }, \' >> libpath.tmp
|
||||
@echo ' { "libguileinterface", "@LIBGUILE_INTERFACE@" }, \' \
|
||||
|
|
|
@ -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,21 @@ sysdep_dynl_func (const char *symb, void *handle, const char *subr)
|
|||
static void
|
||||
sysdep_dynl_init ()
|
||||
{
|
||||
char *env;
|
||||
|
||||
lt_dlinit ();
|
||||
|
||||
env = getenv ("GUILE_SYSTEM_LTDL_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)
|
||||
lt_dladdsearchdir (env);
|
||||
#ifdef SCM_LIB_DIR
|
||||
else
|
||||
lt_dladdsearchdir (SCM_LIB_DIR);
|
||||
#endif
|
||||
}
|
||||
|
||||
scm_t_bits scm_tc16_dynamic_obj;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue