1
1

Cleanup the alps configure logic so we only add the pmi support libs once

This commit was SVN r25747.
Этот коммит содержится в:
Ralph Castain 2012-01-19 22:10:03 +00:00
родитель f5c43e8d60
Коммит d643882f89

Просмотреть файл

@ -21,6 +21,7 @@
# ORTE_CHECK_ALPS(prefix, [action-if-found], [action-if-not-found]) # ORTE_CHECK_ALPS(prefix, [action-if-found], [action-if-not-found])
# -------------------------------------------------------- # --------------------------------------------------------
AC_DEFUN([ORTE_CHECK_ALPS],[ AC_DEFUN([ORTE_CHECK_ALPS],[
if test -z "$orte_check_alps_happy"; then
# require that we check for pmi support request first so # require that we check for pmi support request first so
# we can get the static library ordering correct # we can get the static library ordering correct
AC_REQUIRE([ORTE_CHECK_PMI]) AC_REQUIRE([ORTE_CHECK_PMI])
@ -30,15 +31,34 @@ AC_DEFUN([ORTE_CHECK_ALPS],[
[Build ALPS scheduler component (default: no)])]) [Build ALPS scheduler component (default: no)])])
if test "$with_alps" = "yes" ; then if test "$with_alps" = "yes" ; then
orte_check_alps_happy="yes" orte_check_alps_happy="yes"
# if pmi support is requested, then ORTE_CHECK_PMI will # Only need to do these tests once (this macro is invoked
# have added the -lpmi flag to LIBS. We then need to # from multiple different components' configure.m4 scripts
# add a couple of alps libs to support static builds if test -z "$orte_check_alps_pmi_happy"; then
# if pmi support is requested, then ORTE_CHECK_PMI
# will have added the -lpmi flag to LIBS. We then need
# to add a couple of alps libs to support static
# builds
orte_check_alps_pmi_happy=no
if test "$orte_enable_pmi" = 1 ; then if test "$orte_enable_pmi" = 1 ; then
LDFLAGS="$LDFLAGS -L/usr/lib/alps" AC_MSG_CHECKING([for /usr/lib/alps])
LIBS="$LIBS -lalpslli -lalpsutil" AS_IF([test -d /usr/lib/alps],
[AC_MSG_RESULT([found])
orte_check_alps_pmi_happy=yes],
[AC_MSG_RESULT([not found])])
AS_IF([test "$orte_check_alps_pmi_happy" == "yes"],
[WRAPPER_EXTRA_LDFLAGS="$WRAPPER_EXTRA_LDFLAGS -L/usr/lib/alps"
WRAPPER_EXTRA_LIBS="$WRAPPER_EXTRA_LIBS -lalpslli -lalpsutil"],
[AC_MSG_WARN([PMI support for Alps requested but not found])
AC_MSG_ERROR([Cannot continue])])
fi fi
fi fi
else
orte_check_alps_happy="no"
fi
fi
AS_IF([test "$orte_check_alps_happy" = "yes"], AS_IF([test "$orte_check_alps_happy" = "yes"],
[$2], [$2],
[$3]) [$3])
]) ])