From 41ed829ac66ec6a64b5963f746edcb8f3f622d69 Mon Sep 17 00:00:00 2001 From: J-Donald Tournier Date: Wed, 5 Jun 2013 06:59:43 +0000 Subject: [PATCH] changes to support for configuring and building R-compatible dynamic libraries --- build | 4 ++-- configure | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/build b/build index 33b79ea0c9..5ac9f0eb31 100755 --- a/build +++ b/build @@ -242,7 +242,7 @@ class Entry: self.deps = self.deps.union (list_lib_deps()) self.cmd = fillin (ld, { - 'LDFLAGS': fillin (ld_flags, { 'LIBNAME': [ os.path.basename (self.name) ] }) + flags, + 'LDFLAGS': [ s.replace ('LIBNAME', os.path.basename (self.name)) for s in ld_flags ] + flags, 'OBJECTS': self.deps, 'EXECUTABLE': [ self.name ] }) @@ -297,7 +297,7 @@ class Entry: self.deps = list_lib_deps() self.cmd = fillin (ld_lib, { - 'LDLIB_FLAGS': fillin (ld_lib_flags, { 'LIBNAME': [ os.path.basename (self.name) ] }), + 'LDLIB_FLAGS': [ s.replace ('LIBNAME', os.path.basename (self.name) for s in ld_lib_flags ], 'OBJECTS': [ item for item in self.deps ], 'LIB': [ self.name ] }) diff --git a/configure b/configure index 0dee8b22c4..edbcf8fc4a 100755 --- a/configure +++ b/configure @@ -391,7 +391,7 @@ elif system == 'windows': ld_lib_flags += [ '-shared' ] elif system == 'darwin': cpp_flags += [ '-DMACOSX', '-fPIC' ] - ld_lib_flags += [ '-dynamiclib', '-install_name', '@rpath/LIBNAME' ] + ld_lib_flags += [ '-dynamiclib', '-install_name', '@rpath/../'+lib_dir+'/LIBNAME' ] lib_suffix = '.dylib'