diff options
author | usa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2012-10-12 07:24:42 +0000 |
---|---|---|
committer | usa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2012-10-12 07:24:42 +0000 |
commit | 2efac157b8e70e6be734caefe8a0a823e40ae4a1 (patch) | |
tree | 194407056d4a9a59f37533e22b27e0cb6901fed4 /configure.in | |
parent | c171c834852bf9d124b56e1d6d4cb1ff865280db (diff) |
merge revision(s) 36847,36873: [Backport #7115]
* configure.in (LIBDIR_BASENAME): use configured libdir value to fix
--enable-load-relative on systems where libdir is not default value,
overridden in config.site files. [ruby-core:47267] [Bug #6903]
* ruby.c (ruby_init_loadpath_safe): ditto.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_3@37155 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'configure.in')
-rw-r--r-- | configure.in | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/configure.in b/configure.in index bd6cf62bcd..1d727e4161 100644 --- a/configure.in +++ b/configure.in @@ -2355,6 +2355,13 @@ AS_CASE("$enable_shared", [yes], [ if test "$rb_cv_binary_elf" = yes; then SOLIBS='$(LIBS)' fi + # libdir can be overridden in config.site file (on OpenSUSE at least). + libdir_basename=lib + if test "$bindir" = '${exec_prefix}/bin'; then + AS_CASE(["$libdir"], ['${exec_prefix}/'*], [libdir_basename=`basename "$libdir"`]) + fi + AC_DEFINE_UNQUOTED(LIBDIR_BASENAME, ["${libdir_basename}"]) + AS_CASE(["$target_os"], [sunos4*], [ LIBRUBY_ALIASES='lib$(RUBY_SO_NAME).so.$(MAJOR).$(MINOR) lib$(RUBY_SO_NAME).so' @@ -2363,7 +2370,7 @@ AS_CASE("$enable_shared", [yes], [ LIBRUBY_DLDFLAGS='-Wl,-soname,lib$(RUBY_SO_NAME).so.$(MAJOR).$(MINOR)' LIBRUBY_ALIASES='lib$(RUBY_SO_NAME).so.$(MAJOR).$(MINOR) lib$(RUBY_SO_NAME).so' if test "$load_relative" = yes; then - LIBRUBY_RPATHFLAGS="'-Wl,-rpath,\$\${ORIGIN}/../lib'" + LIBRUBY_RPATHFLAGS="'-Wl,-rpath,\$\${ORIGIN}/../${libdir_basename}'" LIBRUBY_RELATIVE=yes fi ], @@ -2420,7 +2427,7 @@ AS_CASE("$enable_shared", [yes], [ RUBY_SO_NAME="$RUBY_SO_NAME"'.$(MAJOR).$(MINOR).$(TEENY)' LIBRUBY_LDSHARED='$(CC) -dynamiclib' if test "$load_relative" = yes; then - libprefix='@executable_path/../lib' + libprefix="@executable_path/../${libdir_basename}" LIBRUBY_RELATIVE=yes fi LIBRUBY_DLDFLAGS="$LIBRUBY_DLDFLAGS "'-install_name '${libprefix}'/$(LIBRUBY_SO)' |