1
1
Brian Barrett 2852772b32 * add a bunch of svn:ignored files
* Add Portals UTCP reference sds for when we are using the portals
  reference implementation without the ORTE starters (when we want to
  pretend like we're on Red Storm, only with a debugger and valgrind and
  possibly even a printf that actually works...)
* Add super-secret --with flag to cnos rml to enable the cnos rml but
  disable cnos_barrier (for use with portals utcp reference implementation)

This commit was SVN r6642.
2005-07-28 06:23:34 +00:00

85 строки
3.0 KiB
Bash

# -*- shell-script -*-
#
# Copyright (c) 2004-2005 The Trustees of Indiana University.
# All rights reserved.
# Copyright (c) 2004-2005 The Trustees of the University of Tennessee.
# All rights reserved.
# Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
# University of Stuttgart. All rights reserved.
# Copyright (c) 2004-2005 The Regents of the University of California.
# All rights reserved.
# $COPYRIGHT$
#
# Additional copyrights may follow
#
# $HEADER$
#
# MCA_sds_portals_utcp_CONFIG(action-if-can-compile,
# [action-if-cant-compile])
# ------------------------------------------------
AC_DEFUN([MCA_sds_portals_utcp_CONFIG],[
# save compiler flags so that we don't alter them for later
# components.
sds_portals_utcp_save_CPPFLAGS="$CPPFLAGS"
sds_portals_utcp_save_LDFLAGS="$LDFLAGS"
sds_portals_utcp_save_LIBS="$LIBS"
# allow user a way to say where the Portals installation is
AC_ARG_WITH(btl-portals,
AC_HELP_STRING([--with-btl-portals=DIR],
[Specify the installation directory of PORTALS]))
AS_IF([test -n "$with_btl_portals"],
[AS_IF([test -d "$with_btl_portals/include"],
[sds_portals_utcp_CPPFLAGS="-I$with_btl_portals/include"
CPPFLAGS="$CPPFLAGS $sds_portals_utcp_CPPFLAGS"], [])
AS_IF([test -d "$with_btl_portals/lib"],
[sds_portals_utcp_LDFLAGS="-L$with_btl_portals/lib"
LDFLAGS="$LDFLAGS $sds_portals_utcp_LDFLAGS"], [])])
# Try to find all the portals libraries (this is not fun!)
AC_ARG_WITH(btl-portals-libs,
AC_HELP_STRING([--with-btl-portals-libs=LIBS],
[Libraries to link with for portals]))
if test -n "$with_btl_portals_libs" ; then
sds_portals_utcp_LIBS=""
for lib in $with_btl_portals_libs ; do
sds_portals_utcp_LIBS="$sds_portals_utcp_LIBS -l$lib"
done
fi
sds_portals_utcp_LIBS="-lutcpapi -lutcplib -lp3api -lp3lib -lp3rt"
# check for portals
LIBS="$LIBS $sds_portals_utcp_LIBS"
AC_MSG_CHECKING([for PtlGetRank])
AC_LINK_IFELSE([AC_LANG_PROGRAM([#include <portals3.h>
#include <stdio.h>
#include <p3nal_utcp.h>
#include <p3rt/p3rt.h>
#include <p3api/debug.h>
FILE *utcp_api_out;
FILE *utcp_lib_out;],
[unsigned int nprocs, rank;
int dummy;
PtlInit(&dummy);
PtlNIInit(PTL_IFACE_DEFAULT, PTL_PID_ANY, NULL, NULL, NULL);
PtlGetRank(&rank, &nprocs);])],
[AC_MSG_RESULT([yes])
$1],
[AC_MSG_RESULT([no])
$2])
# substitute in the things needed to build Portals
AC_SUBST([sds_portals_utcp_CPPFLAGS])
AC_SUBST([sds_portals_utcp_LDFLAGS])
AC_SUBST([sds_portals_utcp_LIBS])
# reset the flags for the next test
CPPFLAGS="$sds_portals_utcp_save_CPPFLAGS"
LDFLAGS="$sds_portals_utcp_save_LDFLAGS"
LIBS="$sds_portals_utcp_save_LIBS"
])dnl