guile-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Guile-commits] GNU Guile branch, master, updated. release_1-9-3-1-geb35


From: Andy Wingo
Subject: [Guile-commits] GNU Guile branch, master, updated. release_1-9-3-1-geb35012
Date: Wed, 16 Sep 2009 16:21:10 +0000

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU Guile".

http://git.savannah.gnu.org/cgit/guile.git/commit/?id=eb350124a85dd4daf39bacbdc50452ef87a33a43

The branch, master has been updated
       via  eb350124a85dd4daf39bacbdc50452ef87a33a43 (commit)
      from  db723980a4b1e4d4d4d665283d1bc0b792c751bf (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit eb350124a85dd4daf39bacbdc50452ef87a33a43
Author: Andy Wingo <address@hidden>
Date:   Wed Sep 16 18:10:19 2009 +0200

    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.

-----------------------------------------------------------------------

Summary of changes:
 libguile/Makefile.am    |    7 ++++---
 libguile/dynl.c         |   15 +++++++++++++++
 meta/uninstalled-env.in |    4 ++++
 3 files changed, 23 insertions(+), 3 deletions(-)

diff --git a/libguile/Makefile.am b/libguile/Makefile.am
index f4f1282..8f4b976 100644
--- a/libguile/Makefile.am
+++ b/libguile/Makefile.am
@@ -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@" }, \' \
diff --git a/libguile/dynl.c b/libguile/dynl.c
index dc98e7d..6b13e65 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,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;
diff --git a/meta/uninstalled-env.in b/meta/uninstalled-env.in
index 9a62272..649d1fc 100644
--- a/meta/uninstalled-env.in
+++ b/meta/uninstalled-env.in
@@ -88,6 +88,10 @@ export GUILE_LOAD_COMPILED_PATH
 if ( env | grep -v -q -E '^GUILE_SYSTEM_COMPILED_PATH=' ); then
   export GUILE_SYSTEM_COMPILED_PATH=
 fi
+# Don't look in installed dirs for dlopen-able modules
+if ( env | grep -v -q -E '^GUILE_SYSTEM_LTDL_PATH=' ); then
+  export GUILE_SYSTEM_LTDL_PATH=
+fi
 
 # handle LTDL_LIBRARY_PATH (no clobber)
 ltdl_prefix=""


hooks/post-receive
-- 
GNU Guile




reply via email to

[Prev in Thread] Current Thread [Next in Thread]