aboutsummaryrefslogtreecommitdiffstats
path: root/configure.in
diff options
context:
space:
mode:
Diffstat (limited to 'configure.in')
-rw-r--r--configure.in19
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