@@ -15,6 +15,8 @@ dnl Copyright (c) 2009-2016 Cisco Systems, Inc. All rights reserved.
1515dnl Copyright (c) 2015-2017 Research Organization for Information Science
1616dnl and Technology (RIST). All rights reserved.
1717dnl Copyright (c) 2016 IBM Corporation. All rights reserved.
18+ dnl Copyright (c) 2020 Triad National Security, LLC. All rights
19+ dnl reserved.
1820dnl $COPYRIGHT $
1921dnl
2022dnl Additional copyrights may follow
@@ -216,6 +218,7 @@ AC_DEFUN([OPAL_SETUP_RUNPATH],[
216218
217219 # Set the output in $runpath_args
218220 runpath_args=
221+ runpath_fc_args=
219222 LDFLAGS_save= $LDFLAGS
220223 LDFLAGS= " $LDFLAGS -Wl,--enable-new-dtags"
221224 AS_IF([test x" $enable_wrapper_runpath " = x" yes" ],
@@ -226,17 +229,17 @@ AC_DEFUN([OPAL_SETUP_RUNPATH],[
226229 runpath_args= " -Wl,--enable-new-dtags"
227230 AC_MSG_RESULT([yes (-Wl,--enable-new-dtags)])],
228231 [AC_MSG_RESULT([no])])
229- AC_LANG_POP([C])])
230- m4_ifdef([project_ompi],[
231- OPAL_LIBTOOL_CONFIG([wl],[wl_fc],[--tag= FC],[])
232-
233- LDFLAGS = " $LDFLAGS_save ${wl_fc} --enable-new-dtags "
234- AC_LANG_PUSH([Fortran])
235- AC_LINK_IFELSE([AC_LANG_SOURCE([[program test
236- end program] ])],
237- [runpath_fc_args = " ${wl_fc} --enable-new-dtags " ],
238- [runpath_fc_args = " " ])
239- AC_LANG_POP([Fortran])])
232+ AC_LANG_POP([C])
233+ m4_ifdef([project_ompi],
234+ [ OPAL_LIBTOOL_CONFIG([wl],[wl_fc],[--tag= FC],[])
235+ LDFLAGS = " $LDFLAGS_save ${wl_fc} --enable-new-dtags "
236+ AC_LANG_PUSH([Fortran])
237+ AC_LINK_IFELSE([AC_LANG_SOURCE([[program test end program]])],
238+ [runpath_fc_args = " ${wl_fc} --enable-new-dtags "
239+ AC_MSG_RESULT([yes (-Wl,--enable-new-dtags) ])],
240+ [AC_MSG_RESULT([no])])
241+ AC_LANG_POP([Fortran])]) ])
242+
240243 LDFLAGS= $LDFLAGS_save
241244
242245 OPAL_VAR_SCOPE_POP
0 commit comments