diff options
author | wyhaines <wyhaines@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2010-06-11 22:35:55 +0000 |
---|---|---|
committer | wyhaines <wyhaines@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2010-06-11 22:35:55 +0000 |
commit | 987c782a42834a9714c5ce402e479e448a9b55ba (patch) | |
tree | b4bb84a0b460faadb06fe0397ba3a5186f9f3dbf /configure.in | |
parent | deed6fbb6dba5082ab5627e0181598761cccb081 (diff) |
configure.in: Backport #1710 [ruby-core:24104]; backport of r20573 to clean up handling of LIBPATHFLAG.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8_6@28291 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'configure.in')
-rw-r--r-- | configure.in | 23 |
1 files changed, 14 insertions, 9 deletions
diff --git a/configure.in b/configure.in index c13a09168e..434916fb03 100644 --- a/configure.in +++ b/configure.in @@ -1031,7 +1031,6 @@ AC_SUBST(DLEXT2)dnl AC_SUBST(LIBEXT)dnl STATIC= -: ${LIBPATHFLAG=' -L%s'} : ${PATHFLAG=''} if test "$with_dln_a_out" != yes; then @@ -1056,6 +1055,14 @@ if test "$with_dln_a_out" != yes; then esac fi + + AC_ARG_ENABLE(rpath, + [ --disable-rpath embed run path into extension libraries.], + [enable_rpath=$enableval], [enable_rpath="$rb_cv_binary_elf"]) + if test "$enable_rpath" = yes; then + RPATHFLAG=" ${linker_flag}-R%1\$-s" + fi + case "$target_os" in hpux*) DLDFLAGS="$DLDFLAGS -E" : ${LDSHARED='ld -b'} @@ -1170,15 +1177,13 @@ if test "$with_dln_a_out" != yes; then *) : ${LDSHARED='ld'} ;; esac AC_MSG_RESULT($rb_cv_dlopen) - - AC_ARG_ENABLE(rpath, - [ --disable-rpath embed run path into extension libraries.], - [enable_rpath=$enableval], [enable_rpath="$rb_cv_binary_elf"]) - if test "$enable_rpath" = yes; then - LIBPATHFLAG=" -L%1\$-s" - RPATHFLAG=" ${linker_flag}-R%1\$-s" - fi fi +case ${RPATHFLAG} in +*'%1$'*) + : ${LIBPATHFLAG=' -L%1$-s'};; +*) + : ${LIBPATHFLAG=' -L%s'};; +esac AC_SUBST(LINK_SO) AC_SUBST(LIBPATHFLAG) AC_SUBST(RPATHFLAG) |