1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

configure.in: libdir_basename for -rpath and -install_name

* configure.in (libdir_basename): also -rpath and -install_name flags
  are affected when libruby directory changes.  [Bug #7874]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39345 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
nobu 2013-02-21 00:51:11 +00:00
parent e908adc12a
commit 22b51faf7e
3 changed files with 12 additions and 2 deletions

View file

@ -1,3 +1,8 @@
Thu Feb 21 09:51:05 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
* configure.in (libdir_basename): also -rpath and -install_name flags
are affected when libruby directory changes. [Bug #7874]
Wed Feb 20 19:27:02 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
* include/ruby/ruby.h (HAVE_RB_SCAN_ARGS_OPTIONAL_HASH): for

View file

@ -34,6 +34,7 @@ exec_prefix = @exec_prefix@
bindir = @bindir@
sbindir = @sbindir@
libdir = @libdir@
libdir_basename = @libdir_basename@
libexecdir = @libexecdir@
datarootdir = @datarootdir@
datadir = @datadir@

View file

@ -2699,6 +2699,7 @@ AS_CASE("$enable_shared", [yes], [
AS_CASE(["$libdir"], ['${exec_prefix}/'*], [libdir_basename=`basename "$libdir"`])
fi
AC_DEFINE_UNQUOTED(LIBDIR_BASENAME, ["${libdir_basename}"])
AC_SUBST(libdir_basename)
AS_CASE(["$target_os"],
[freebsd*|dragonfly*], [],
@ -2719,7 +2720,7 @@ AS_CASE("$enable_shared", [yes], [
LIBRUBY_DLDFLAGS='-Wl,-soname,lib$(RUBY_SO_NAME).so.$(MAJOR).$(MINOR)'" $LDFLAGS_OPTDIR"
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}/../${libdir_basename}'"
LIBRUBY_RPATHFLAGS="'-Wl,-rpath,\$\${ORIGIN}/../\${libdir_basename}'"
LIBRUBY_RELATIVE=yes
fi
],
@ -2776,7 +2777,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/../${libdir_basename}"
libprefix='@executable_path/../${libdir_basename}'
LIBRUBY_RELATIVE=yes
fi
LIBRUBY_DLDFLAGS="$LIBRUBY_DLDFLAGS "'-install_name '${libprefix}'/$(LIBRUBY_SO)'
@ -3236,6 +3237,9 @@ archlibdir='${libdir}/${arch}'
sitearchlibdir='${libdir}/${sitearch}'
archincludedir='${includedir}/${arch}'
sitearchincludedir='${includedir}/${sitearch}'
if test ${libdir_basename+set}; then
libdir_basename="${libdir_basename}"${multiarch+'/${arch}'}
fi
shvar_to_cpp() {
local var="$1" val="$2"