2008-10-28 20:22:29 +03:00
|
|
|
# -*- shell-script -*-
|
|
|
|
#
|
|
|
|
# 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.
|
|
|
|
# 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.
|
2009-10-24 05:04:35 +04:00
|
|
|
# Copyright (c) 2009 Cisco Systems, Inc. All rights reserved.
|
2008-10-28 20:22:29 +03:00
|
|
|
# $COPYRIGHT$
|
|
|
|
#
|
|
|
|
# Additional copyrights may follow
|
|
|
|
#
|
|
|
|
# $HEADER$
|
|
|
|
#
|
|
|
|
|
2009-10-24 05:04:35 +04:00
|
|
|
# ORTE_CHECK_SLURM(prefix, [action-if-found], [action-if-not-found])
|
2008-10-28 20:22:29 +03:00
|
|
|
# --------------------------------------------------------
|
2009-10-24 05:04:35 +04:00
|
|
|
AC_DEFUN([ORTE_CHECK_SLURM],[
|
2008-10-28 20:22:29 +03:00
|
|
|
AC_ARG_WITH([slurm],
|
|
|
|
[AC_HELP_STRING([--with-slurm],
|
|
|
|
[Build SLURM scheduler component (default: yes)])])
|
|
|
|
|
|
|
|
if test "$with_slurm" = "no" ; then
|
2009-10-24 05:04:35 +04:00
|
|
|
orte_check_slurm_happy="no"
|
2008-10-28 20:22:29 +03:00
|
|
|
elif test "$with_slurm" = "" ; then
|
|
|
|
# unless user asked, only build slurm component on linux, AIX,
|
|
|
|
# and OS X systems (these are the platforms that SLURM
|
|
|
|
# supports)
|
|
|
|
case $host in
|
|
|
|
*-linux*|*-aix*|*-apple-darwin*)
|
2009-10-24 05:04:35 +04:00
|
|
|
orte_check_slurm_happy="yes"
|
2008-10-28 20:22:29 +03:00
|
|
|
;;
|
|
|
|
*)
|
|
|
|
AC_MSG_CHECKING([for SLURM srun in PATH])
|
2010-11-13 02:22:11 +03:00
|
|
|
OPAL_WHICH([srun], [ORTE_CHECK_SLURM_SRUN])
|
2009-10-24 05:04:35 +04:00
|
|
|
if test "$ORTE_CHECK_SLURM_SRUN" = ""; then
|
|
|
|
orte_check_slurm_happy="no"
|
2008-10-28 20:22:29 +03:00
|
|
|
else
|
2009-10-24 05:04:35 +04:00
|
|
|
orte_check_slurm_happy="yes"
|
2008-10-28 20:22:29 +03:00
|
|
|
fi
|
2009-10-24 05:04:35 +04:00
|
|
|
AC_MSG_RESULT([$orte_check_slurm_happy])
|
2008-10-28 20:22:29 +03:00
|
|
|
;;
|
|
|
|
esac
|
|
|
|
else
|
2009-10-24 05:04:35 +04:00
|
|
|
orte_check_slurm_happy="yes"
|
2008-10-28 20:22:29 +03:00
|
|
|
fi
|
|
|
|
|
2009-10-24 05:04:35 +04:00
|
|
|
AS_IF([test "$orte_check_slurm_happy" = "yes"],
|
2008-10-28 20:22:29 +03:00
|
|
|
[AC_CHECK_FUNC([fork],
|
2009-10-24 05:04:35 +04:00
|
|
|
[orte_check_slurm_happy="yes"],
|
|
|
|
[orte_check_slurm_happy="no"])])
|
2008-10-28 20:22:29 +03:00
|
|
|
|
2009-10-24 05:04:35 +04:00
|
|
|
AS_IF([test "$orte_check_slurm_happy" = "yes"],
|
2008-10-28 20:22:29 +03:00
|
|
|
[AC_CHECK_FUNC([execve],
|
2009-10-24 05:04:35 +04:00
|
|
|
[orte_check_slurm_happy="yes"],
|
|
|
|
[orte_check_slurm_happy="no"])])
|
2008-10-28 20:22:29 +03:00
|
|
|
|
2009-10-24 05:04:35 +04:00
|
|
|
AS_IF([test "$orte_check_slurm_happy" = "yes"],
|
2008-10-28 20:22:29 +03:00
|
|
|
[AC_CHECK_FUNC([setpgid],
|
2009-10-24 05:04:35 +04:00
|
|
|
[orte_check_slurm_happy="yes"],
|
|
|
|
[orte_check_slurm_happy="no"])])
|
2008-10-28 20:22:29 +03:00
|
|
|
|
2009-10-24 05:04:35 +04:00
|
|
|
AS_IF([test "$orte_check_slurm_happy" = "yes"],
|
2008-10-28 20:22:29 +03:00
|
|
|
[$2],
|
|
|
|
[$3])
|
|
|
|
])
|