2005-07-09 22:52:53 +04:00
|
|
|
# -*- shell-script -*-
|
|
|
|
#
|
2005-11-05 22:57:48 +03:00
|
|
|
# Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana
|
|
|
|
# University Research and Technology
|
|
|
|
# Corporation. All rights reserved.
|
|
|
|
# Copyright (c) 2004-2005 The University of Tennessee and The University
|
|
|
|
# of Tennessee Research Foundation. All rights
|
|
|
|
# reserved.
|
2005-07-09 22:52:53 +04:00
|
|
|
# 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.
|
2006-05-19 01:03:38 +04:00
|
|
|
# Copyright (c) 2006 Cisco Systems, Inc. All rights reserved.
|
2005-07-09 22:52:53 +04:00
|
|
|
# $COPYRIGHT$
|
|
|
|
#
|
|
|
|
# Additional copyrights may follow
|
|
|
|
#
|
|
|
|
# $HEADER$
|
|
|
|
#
|
|
|
|
|
|
|
|
|
|
|
|
# OMPI_CHECK_TM(prefix, [action-if-found], [action-if-not-found])
|
|
|
|
# --------------------------------------------------------
|
|
|
|
AC_DEFUN([OMPI_CHECK_TM],[
|
|
|
|
AC_ARG_WITH([tm],
|
|
|
|
[AC_HELP_STRING([--with-tm],
|
|
|
|
[Directory where the tm software is installed])])
|
|
|
|
|
2005-11-07 16:21:46 +03:00
|
|
|
AS_IF([test "$with_tm" = "no"],
|
2006-10-20 03:35:14 +04:00
|
|
|
[ompi_check_tm_happy="no"],
|
2005-11-07 16:21:46 +03:00
|
|
|
[ompi_check_tm_happy="yes"
|
|
|
|
AS_IF([test ! -z "$with_tm" -a "$with_tm" != "yes"],
|
|
|
|
[ompi_check_tm_dir="$with_tm"],
|
|
|
|
[ompi_check_tm_dir=""])])
|
|
|
|
|
2006-05-19 01:03:38 +04:00
|
|
|
# Note that Torque 2.1.0 changed the name of their back-end
|
|
|
|
# library to "libtorque". So we have to check for both libpbs and
|
|
|
|
# libtorque. First, check for libpbs.
|
|
|
|
|
2005-11-07 16:21:46 +03:00
|
|
|
AS_IF([test "$ompi_check_tm_happy" = "yes"],
|
|
|
|
[OMPI_CHECK_PACKAGE([$1],
|
|
|
|
[tm.h],
|
|
|
|
[pbs],
|
|
|
|
[tm_init],
|
|
|
|
[],
|
|
|
|
[$ompi_check_tm_dir],
|
|
|
|
[],
|
|
|
|
[ompi_check_tm_happy="yes"],
|
|
|
|
[ompi_check_tm_happy="no"])])
|
|
|
|
|
2006-05-19 01:03:38 +04:00
|
|
|
# If that failed, check for libtorque. Admittedly, this is
|
|
|
|
# sub-optimal -- the above may have failed because tm.h was not
|
|
|
|
# found. If so, we'll check for it again. Life is hard.
|
|
|
|
|
|
|
|
AS_IF([test "$ompi_check_tm_happy" = "no"],
|
|
|
|
[OMPI_CHECK_PACKAGE([$1],
|
|
|
|
[tm.h],
|
|
|
|
[torque],
|
|
|
|
[tm_finalize],
|
|
|
|
[],
|
|
|
|
[$ompi_check_tm_dir],
|
|
|
|
[],
|
|
|
|
[ompi_check_tm_happy="yes"],
|
|
|
|
[ompi_check_tm_happy="no"])])
|
|
|
|
|
2005-11-07 16:21:46 +03:00
|
|
|
AS_IF([test "$ompi_check_tm_happy" = "yes"],
|
|
|
|
[$2],
|
|
|
|
[AS_IF([test ! -z "$with_tm" -a "$with_tm" != "no"],
|
|
|
|
[AC_MSG_ERROR([TM support requested but not found. Aborting])])
|
|
|
|
$3])
|
2005-07-09 22:52:53 +04:00
|
|
|
])
|