summaryrefslogtreecommitdiff
path: root/configure.in
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-08-29 06:03:09 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-08-29 06:03:09 +0000
commit22c81db9d8bd5087e4c1a0d4771873ad7d58ad88 (patch)
tree5f457f8dbb7d5b15dfb9e365b67e3dbcde2499c6 /configure.in
parent06d98b4d4dfa2f4d61373a4fe06a4fdaaedc9452 (diff)
configure.in: use configured libdir value
* 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/trunk@36847 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'configure.in')
-rw-r--r--configure.in11
1 files changed, 9 insertions, 2 deletions
diff --git a/configure.in b/configure.in
index 9a01b70521..3235470908 100644
--- a/configure.in
+++ b/configure.in
@@ -2569,6 +2569,13 @@ AS_CASE("$enable_shared", [yes], [
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(LIBDIR_BASENAME, ["${libdir_basename}"])
+
AS_CASE(["$target_os"],
[freebsd*|dragonfly*], [],
[
@@ -2588,7 +2595,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
],
@@ -2645,7 +2652,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)'