diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2014-03-15 02:03:25 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2014-03-15 02:03:25 +0000 |
commit | 1eaddcaffaf984a2934b1497013921fca3e1e7bc (patch) | |
tree | 020971b7acd55bda5263621c527b64dad8cac85a /configure.in | |
parent | 1b9ff04f650d3ec600c3f3db7abbcf98912e4eff (diff) | |
download | ruby-1eaddcaffaf984a2934b1497013921fca3e1e7bc.tar.gz |
configure.in: check symbol resolution options
* configure.in (DLDFLAGS): check for each options to control
symbol resolution. [ruby-core:61429] [Bug #9624]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45339 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'configure.in')
-rw-r--r-- | configure.in | 19 |
1 files changed, 15 insertions, 4 deletions
diff --git a/configure.in b/configure.in index 71377a6ddb..d949498dd9 100644 --- a/configure.in +++ b/configure.in @@ -2702,10 +2702,6 @@ if test "$with_dln_a_out" != yes; then fi rb_cv_dlopen=yes], [darwin*], [ : ${LDSHARED='$(CC) -dynamic -bundle'} - RUBY_APPEND_OPTIONS(DLDFLAGS, [ \ - "${linker_flag}-undefined${linker_flag:+,}dynamic_lookup" \ - "${linker_flag}-multiply_defined${linker_flag:+,}suppress" \ - ]) : ${LDFLAGS=""} : ${LIBPATHENV=DYLD_LIBRARY_PATH} # /usr/local/include is always searched for @@ -2772,6 +2768,21 @@ if test "$with_dln_a_out" != yes; then [ : ${LDSHARED='$(LD)'}]) AC_MSG_RESULT($rb_cv_dlopen) + if test "$rb_cv_dlopen" = yes; then + AS_CASE(["$target_os"], + [darwin*] [ + for flag in \ + "${linker_flag}-undefined${linker_flag:+,}dynamic_lookup" \ + "${linker_flag}-multiply_defined${linker_flag:+,}suppress" \ + ; do + RUBY_TRY_LDFLAGS([$flag], [], [flag=]) + if test "x$flag" != x; then + RUBY_APPEND_OPTIONS(DLDFLAGS, [$flag]) + fi + done + ]) + fi + if test "$enable_rpath" = yes; then if test x"${RPATHFLAG}" = x; then for rpathflag in -R "-rpath "; do |