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

* configure.in (LIBRUBY_RELATIVE): use rpath token expansion.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29703 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
nobu 2010-11-05 22:28:45 +00:00
parent 6d9cd4840d
commit 41a25b855a
2 changed files with 13 additions and 1 deletions

View file

@ -1,3 +1,7 @@
Sat Nov 6 07:28:39 2010 Nobuyoshi Nakada <nobu@ruby-lang.org>
* configure.in (LIBRUBY_RELATIVE): use rpath token expansion.
Sat Nov 6 07:24:01 2010 Nobuyoshi Nakada <nobu@ruby-lang.org>
* template/ruby.pc.in (arch, sitearch): reordered.

View file

@ -2192,6 +2192,7 @@ AC_ARG_ENABLE(shared,
AS_HELP_STRING([--enable-shared], [build a shared library for Ruby]),
[enable_shared=$enableval])
libprefix='$(libdir)'
LIBRUBY_RELATIVE=no
AS_CASE("$enable_shared", [yes], [
LIBRUBY='$(LIBRUBY_SO)'
LIBRUBYARG_SHARED='-l$(RUBY_SO_NAME)'
@ -2208,6 +2209,10 @@ AS_CASE("$enable_shared", [yes], [
[linux* | gnu* | k*bsd*-gnu | atheos* | kopensolaris*-gnu], [
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_RELATIVE=yes
fi
],
[freebsd*|dragonfly*], [
SOLIBS='$(LIBS)'
@ -2261,6 +2266,7 @@ AS_CASE("$enable_shared", [yes], [
LIBRUBY_LDSHARED='$(CC) -dynamiclib'
if test "$load_relative" = yes; then
libprefix='@executable_path/../lib'
LIBRUBY_RELATIVE=yes
fi
LIBRUBY_DLDFLAGS="$LIBRUBY_DLDFLAGS "'-install_name '${libprefix}'/$(LIBRUBY_SO)'
LIBRUBY_DLDFLAGS="$LIBRUBY_DLDFLAGS "'-current_version $(MAJOR).$(MINOR).$(TEENY)'
@ -2280,10 +2286,12 @@ AS_CASE("$enable_shared", [yes], [
LIBRUBYARG_SHARED=
])
if test "$enable_rpath" = yes; then
LIBRUBY_RPATHFLAGS="${linker_flag}-R ${linker_flag}${libprefix} -L\$(libdir)"
test -z "$LIBRUBY_RPATHFLAGS" || LIBRUBY_RPATHFLAGS="$LIBRUBY_RPATHFLAGS "
LIBRUBY_RPATHFLAGS="$LIBRUBY_RPATHFLAGS${linker_flag}-R ${linker_flag}${libprefix} -L\$(libdir)"
LIBRUBYARG_SHARED="$LIBRUBY_RPATHFLAGS $LIBRUBYARG_SHARED"
LIBRUBYARG_STATIC="$LIBRUBY_RPATHFLAGS $LIBRUBYARG_STATIC"
fi
AC_SUBST(LIBRUBY_RELATIVE)
LDFLAGS="-L. $LDFLAGS"
AC_SUBST(ARCHFILE)