* configure.in (enable_rpath): use rpath flag to embed the library

path into extensions on ELF environment.  [ruby-dev:25035]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7598 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
nobu 2004-12-19 08:25:36 +00:00
Родитель 8c299e6e26
Коммит a965236490
2 изменённых файлов: 31 добавлений и 23 удалений

Просмотреть файл

@ -1,3 +1,8 @@
Sun Dec 19 17:24:59 2004 Nobuyoshi Nakada <nobu@ruby-lang.org>
* configure.in (enable_rpath): use rpath flag to embed the library
path into extensions on ELF environment. [ruby-dev:25035]
Sun Dec 19 11:01:25 2004 Nobuyoshi Nakada <nobu@ruby-lang.org>
* lib/test/unit.rb: use standalone runner for -e.

Просмотреть файл

@ -785,14 +785,6 @@ linux* | gnu* | k*bsd*-gnu)
else
LDFLAGS="$LDFLAGS -rdynamic"
fi;;
netbsd*|openbsd*)
if [[ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]]
then
netbsd_elf=yes
else
netbsd_elf=no
fi
;;
esac
LIBEXT=a
@ -860,8 +852,11 @@ if test "$with_dln_a_out" != yes; then
rb_cv_dlopen=yes ;;
osf*) : ${LDSHARED="ld -shared -expect_unresolved \"*\""}
rb_cv_dlopen=yes ;;
linux* | gnu* | k*bsd*-gnu)
: ${LDSHARED="$CC -shared"}
linux* | gnu* | k*bsd*-gnu | netbsd*)
: ${LDSHARED='${CC} -shared'}
if test "$rb_cv_binary_elf" = yes; then
LDFLAGS="$LDFLAGS -Wl,-export-dynamic"
fi
rb_cv_dlopen=yes ;;
interix*) : ${LDSHARED="$CC -shared"}
XLDFLAGS="$XLDFLAGS -Wl,-E"
@ -875,13 +870,6 @@ if test "$with_dln_a_out" != yes; then
test "$GCC" = yes && test "$rb_cv_prog_gnu_ld" = yes || LDSHARED="ld -Bshareable"
fi
rb_cv_dlopen=yes ;;
netbsd*) : ${LDSHARED='${CC} -shared'}
if test "$rb_cv_binary_elf" = yes; then
LDFLAGS="$LDFLAGS -Wl,-export-dynamic"
LIBPATHFLAG=" -L'%1\$-s'"
RPATHFLAG=" -Wl,-R'%1\$-s'"
fi
rb_cv_dlopen=yes ;;
openbsd*) : ${LDSHARED="\$(CC) -shared ${CCDLFLAGS}"}
if test "$rb_cv_binary_elf" = yes; then
LDFLAGS="$LDFLAGS -Wl,-E"
@ -952,6 +940,14 @@ if test "$with_dln_a_out" != yes; then
*) : ${LDSHARED='ld'} ;;
esac
AC_MSG_RESULT($rb_cv_dlopen)
AC_ARG_ENABLE(rpath,
[ --disable-rpath embedd run path.],
[enable_rpath=$enableval], [enable_rpath="$rb_cv_binary_elf"])
if test "$enable_rpath" = yes; then
LIBPATHFLAG=" -L'%1\$-s'"
RPATHFLAG=" -Wl,-R'%1\$-s'"
fi
fi
AC_SUBST(LINK_SO)
AC_SUBST(LIBPATHFLAG)
@ -1162,7 +1158,7 @@ if test "$enable_shared" = 'yes'; then
sunos4*)
LIBRUBY_ALIASES='lib$(RUBY_SO_NAME).so.$(MAJOR).$(MINOR) lib$(RUBY_SO_NAME).so'
;;
linux* | gnu* | k*bsd*-gnu)
linux* | gnu* | k*bsd*-gnu | atheos*)
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'
;;
@ -1178,7 +1174,6 @@ if test "$enable_shared" = 'yes'; then
SOLIBS='$(LIBS)'
LIBRUBY_SO='lib$(RUBY_SO_NAME).so.$(MAJOR)$(MINOR).$(TEENY)'
LIBRUBY_DLDFLAGS='-Wl,-soname,lib$(RUBY_SO_NAME).so.$(MAJOR)$(MINOR)'
LIBRUBYARG_SHARED='-Wl,-R -Wl,${libdir} -L${libdir} -L. -l$(RUBY_SO_NAME)'
if test "$rb_cv_binary_elf" = yes; then # ELF platforms
LIBRUBY_ALIASES='lib$(RUBY_SO_NAME).so.$(MAJOR)$(MINOR) lib$(RUBY_SO_NAME).so'
else # a.out platforms
@ -1190,6 +1185,14 @@ if test "$enable_shared" = 'yes'; then
LIBRUBY_SO='lib$(RUBY_INSTALL_NAME).so.$(MAJOR).'`expr ${MINOR} \* 10 + ${TEENY}`
;;
solaris*)
SOLIBS='$(LIBS)'
LIBRUBY_SO='lib$(RUBY_SO_NAME).so.$(MAJOR)'
LIBRUBY_ALIASES='lib$(RUBY_SO_NAME).so.$(MAJOR).$(MINOR).$(TEENY) lib$(RUBY_SO_NAME).so'
if test "$GCC" = yes; then
LIBRUBY_DLDFLAGS="$DLDFLAGS "'-Wl,-h,$(@F)'
else
enable_rpath=no
fi
XLDFLAGS="$XLDFLAGS "'-R${libdir}'
;;
hpux*)
@ -1221,10 +1224,6 @@ if test "$enable_shared" = 'yes'; then
LIBRUBY_DLDFLAGS='-install_name $(libdir)/lib$(RUBY_SO_NAME).dylib -current_version $(MAJOR).$(MINOR).$(TEENY) -compatibility_version $(MAJOR).$(MINOR)'
LIBRUBY_ALIASES='lib$(RUBY_SO_NAME).$(MAJOR).$(MINOR).dylib lib$(RUBY_SO_NAME).dylib'
;;
atheos*)
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'
;;
interix*)
LIBRUBYARG_SHARED='-L${libdir} -L. -l$(RUBY_SO_NAME)'
;;
@ -1232,6 +1231,10 @@ if test "$enable_shared" = 'yes'; then
;;
esac
fi
if test "$enable_rpath" = yes; then
LIBRUBYARG_SHARED='-Wl,-R -Wl,$(libdir) -L$(libdir) -L. '"$LIBRUBYARG_SHARED"
fi
XLDFLAGS="$XLDFLAGS -L."
AC_SUBST(ARCHFILE)