summaryrefslogtreecommitdiff
path: root/configure.in
diff options
context:
space:
mode:
Diffstat (limited to 'configure.in')
-rw-r--r--configure.in8
1 files changed, 6 insertions, 2 deletions
diff --git a/configure.in b/configure.in
index e1fcdb3055..028ae413a0 100644
--- a/configure.in
+++ b/configure.in
@@ -1293,7 +1293,6 @@ AC_SUBST(DLEXT2)dnl
AC_SUBST(LIBEXT)dnl
STATIC=
-: ${LIBPATHFLAG=' -L%s'}
: ${PATHFLAG=''}
if test "$with_dln_a_out" != yes; then
@@ -1323,7 +1322,6 @@ if test "$with_dln_a_out" != yes; then
[ --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
@@ -1449,6 +1447,12 @@ if test "$with_dln_a_out" != yes; then
rb_cv_dlopen=yes;;
cygwin*|mingw*) : ${LDSHARED="${CC} -shared "'$(if $(filter-out -g -g0,$(debugflags)),,-s)'}
XLDFLAGS="$XLDFLAGS -Wl,--stack,0x00200000,--enable-auto-import"
+case ${RPATHFLAG} in
+*'%1$'*)
+ : ${LIBPATHFLAG=' -L%1$-s'};;
+*)
+ : ${LIBPATHFLAG=' -L%s'};;
+esac
DLDFLAGS="${DLDFLAGS} -Wl,--enable-auto-image-base,--enable-auto-import,--export-all"
: ${LIBPATHENV=""}
rb_cv_dlopen=yes ;;