@@ -130,6 +130,16 @@ AC_DEFUN([OPAL_SETUP_WRAPPER_INIT],[
130
130
[enable rpath/runpath support in the wrapper compilers (default=yes)])])
131
131
AS_IF([test " $enable_wrapper_rpath " != " no" ], [enable_wrapper_rpath= yes])
132
132
AC_MSG_RESULT([$enable_wrapper_rpath ])
133
+
134
+ AC_MSG_CHECKING([if want wrapper compiler runpath support])
135
+ AC_ARG_ENABLE([wrapper-runpath],
136
+ [AS_HELP_STRING([--enable--wrapper-runpath],
137
+ [enable runpath in the wrapper compilers if linker supports it (default: enabled, unless wrapper-rpath is disabled).])])
138
+ AS_IF([test " $enable_wrapper_runpath " != " no" ], [enable_wrapper_runpath= yes])
139
+ AC_MSG_RESULT([$enable_wrapper_runpath ])
140
+
141
+ AS_IF([test " $enable_wrapper_rpath " = " no" && test " $enable_wrapper_runpath " = " yes" ],
142
+ [AC_MSG_ERROR([--enable-wrapper-runpath cannot be selected with --disable-wrapper-rpath])])
133
143
])
134
144
135
145
# Check to see whether the linker supports DT_RPATH. We'll need to
@@ -220,18 +230,19 @@ EOF
220
230
AC_DEFUN([OPAL_SETUP_RUNPATH],[
221
231
OPAL_VAR_SCOPE_PUSH([LDFLAGS_save rpath_script rpath_outfile wl_fc])
222
232
223
- AC_MSG_CHECKING([if linker supports RUNPATH])
224
233
# Set the output in $runpath_args
225
234
runpath_args=
226
235
LDFLAGS_save= $LDFLAGS
227
236
LDFLAGS= " $LDFLAGS -Wl,--enable-new-dtags"
228
- AC_LANG_PUSH([C])
229
- AC_LINK_IFELSE([AC_LANG_PROGRAM([], [return 7; ])],
230
- [WRAPPER_RPATH_SUPPORT= runpath
231
- runpath_args= " -Wl,--enable-new-dtags"
232
- AC_MSG_RESULT([yes (-Wl,--enable-new-dtags)])],
233
- [AC_MSG_RESULT([no])])
234
- AC_LANG_POP([C])
237
+ AS_IF([test x" $enable_wrapper_runpath " = x" yes" ],
238
+ [AC_LANG_PUSH([C])
239
+ AC_MSG_CHECKING([if linker supports RUNPATH])
240
+ AC_LINK_IFELSE([AC_LANG_PROGRAM([], [return 7; ])],
241
+ [WRAPPER_RPATH_SUPPORT= runpath
242
+ runpath_args= " -Wl,--enable-new-dtags"
243
+ AC_MSG_RESULT([yes (-Wl,--enable-new-dtags)])],
244
+ [AC_MSG_RESULT([no])])
245
+ AC_LANG_POP([C])])
235
246
m4_ifdef([project_ompi],[
236
247
# Output goes into globally-visible $rpath_args. Run this in a
237
248
# sub-process so that we don't pollute the current process
0 commit comments