From 0fe77570979bfd1322cc5f91dd00849b1e742cbf Mon Sep 17 00:00:00 2001 From: Gilles Gouaillardet Date: Fri, 1 Sep 2017 09:08:26 +0900 Subject: [PATCH] configury: revamp opal_setup_wrappers.m4 Define OPAL_EVAL_LIBTOOL() macro and factorize some code Signed-off-by: Gilles Gouaillardet --- config/opal_setup_wrappers.m4 | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/config/opal_setup_wrappers.m4 b/config/opal_setup_wrappers.m4 index e14368511b..646f6e7ed3 100644 --- a/config/opal_setup_wrappers.m4 +++ b/config/opal_setup_wrappers.m4 @@ -142,7 +142,10 @@ AC_DEFUN([OPAL_SETUP_WRAPPER_INIT],[ [AC_MSG_ERROR([--enable-wrapper-runpath cannot be selected with --disable-wrapper-rpath])]) ]) -AC_DEFUN([OPAL_EVAL_LIBTOOL],[ +# OPAL_LIBTOOL_CONFIG(libtool-variable, result-variable, +# libtool-tag, extra-code) +# Retrieve information from the generated libtool +AC_DEFUN([OPAL_LIBTOOL_CONFIG],[ OPAL_VAR_SCOPE_PUSH([rpath_script rpath_outfile]) # Output goes into globally-visible variable. Run this in a # sub-process so that we don't pollute the current process @@ -185,11 +188,11 @@ EOF AC_DEFUN([OPAL_SETUP_RPATH],[ OPAL_VAR_SCOPE_PUSH([rpath_libdir_save]) AC_MSG_CHECKING([if linker supports RPATH]) - OPAL_EVAL_LIBTOOL([hardcode_libdir_flag_spec],[rpath_args],[],[libdir=LIBDIR]) + OPAL_LIBTOOL_CONFIG([hardcode_libdir_flag_spec],[rpath_args],[],[libdir=LIBDIR]) AS_IF([test -n "$rpath_args"], [WRAPPER_RPATH_SUPPORT=rpath - OPAL_EVAL_LIBTOOL([hardcode_libdir_flag_spec],[rpath_fc_args],[--tag=FC],[libdir=LIBDIR]) + OPAL_LIBTOOL_CONFIG([hardcode_libdir_flag_spec],[rpath_fc_args],[--tag=FC],[libdir=LIBDIR]) AC_MSG_RESULT([yes ($rpath_args + $rpath_fc_args)])], [WRAPPER_RPATH_SUPPORT=unnecessary AC_MSG_RESULT([yes (no extra flags needed)])]) @@ -225,7 +228,7 @@ AC_DEFUN([OPAL_SETUP_RUNPATH],[ [AC_MSG_RESULT([no])]) AC_LANG_POP([C])]) m4_ifdef([project_ompi],[ - OPAL_EVAL_LIBTOOL([wl],[wl_fc],[--tag=FC],[]) + OPAL_LIBTOOL_CONFIG([wl],[wl_fc],[--tag=FC],[]) LDFLAGS="$LDFLAGS_save ${wl_fc}--enable-new-dtags" AC_LANG_PUSH([Fortran])