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-01-29 20:59:04 +03:00
|
|
|
# Copyright (c) 2009 Cisco Systems, Inc. All rights reserved.
|
2008-10-28 20:22:29 +03:00
|
|
|
# $COPYRIGHT$
|
|
|
|
#
|
|
|
|
# Additional copyrights may follow
|
|
|
|
#
|
|
|
|
# $HEADER$
|
|
|
|
#
|
|
|
|
|
|
|
|
# new bproc is LANL versions >= 3.2.0
|
|
|
|
# old bproc is all Scyld versions and LANL version < 3.2.0
|
2009-10-24 05:04:35 +04:00
|
|
|
# ORTE_CHECK_BPROC(prefix, [action-if-new-bproc], [action-if-old-bproc],
|
2008-10-28 20:22:29 +03:00
|
|
|
# [action-if-not-found])
|
|
|
|
# --------------------------------------------------------
|
2009-10-24 05:04:35 +04:00
|
|
|
AC_DEFUN([ORTE_CHECK_BPROC],[
|
2008-10-28 20:22:29 +03:00
|
|
|
AC_ARG_WITH([bproc],
|
2009-01-29 20:59:04 +03:00
|
|
|
[AC_HELP_STRING([--with-bproc(=DIR)],
|
2009-04-11 02:32:00 +04:00
|
|
|
[Build BProc support, optionally adding DIR/include, DIR/lib, and DIR/lib64 to the search path for headers and libraries])])
|
2009-01-29 20:59:04 +03:00
|
|
|
OMPI_CHECK_WITHDIR([bproc], [$with_bproc], [include/sys/bproc.h])
|
2008-10-28 20:22:29 +03:00
|
|
|
|
|
|
|
AS_IF([test ! -z "$with_bproc" -a "$with_bproc" = "no"],[$4], [
|
2009-10-24 05:04:35 +04:00
|
|
|
orte_check_bproc_save_CPPFLAGS="$CPPFLAGS"
|
|
|
|
orte_check_bproc_save_LDFLAGS="$LDFLAGS"
|
|
|
|
orte_check_bproc_save_LIBS="$LIBS"
|
2008-10-28 20:22:29 +03:00
|
|
|
|
|
|
|
AS_IF([test ! -z "$with_bproc" -a "$with_bproc" != "yes"],
|
|
|
|
[CPPFLAGS="$CPPFLAGS -I$with_bproc/include"
|
|
|
|
LDFLAGS="$LDFLAGS -L$with_bproc/lib"])
|
|
|
|
AC_CHECK_HEADERS([sys/bproc.h],
|
|
|
|
[AC_CHECK_LIB([bproc],
|
|
|
|
[bproc_numnodes],
|
2009-10-24 05:04:35 +04:00
|
|
|
[orte_check_bproc_happy="yes"],
|
|
|
|
[orte_check_bproc_happy="no"])],
|
|
|
|
[orte_check_bproc_happy="no"])
|
2008-10-28 20:22:29 +03:00
|
|
|
|
|
|
|
# Check for Scyld bproc or an old version of LANL Bproc (pre 3.2.0)
|
2009-10-24 05:04:35 +04:00
|
|
|
AS_IF([test "$orte_check_bproc_happy" = "yes"],
|
|
|
|
[AC_CHECK_HEADERS([sys/bproc_common.h],[orte_check_bproc_happy="new"],
|
|
|
|
[orte_check_bproc_happy="old"],
|
2008-10-28 20:22:29 +03:00
|
|
|
[#include <stdint.h>
|
|
|
|
#include <sys/socket.h>])])
|
|
|
|
|
2009-10-24 05:04:35 +04:00
|
|
|
CPPFLAGS="$orte_check_bproc_save_CPPFLAGS"
|
|
|
|
LDFLAGS="$orte_check_bproc_save_LDFLAGS"
|
|
|
|
LIBS="$orte_check_bproc_save_LIBS"
|
2008-10-28 20:22:29 +03:00
|
|
|
|
2009-10-24 05:04:35 +04:00
|
|
|
AS_IF([test "$orte_check_bproc_happy" != "no"],
|
2008-10-28 20:22:29 +03:00
|
|
|
[AS_IF([test ! -z "$with_bproc" -a "$with_bproc" != "yes"],
|
|
|
|
[$1_CPPFLAGS="$$1_CPPFLAGS -I$with_bproc/include"
|
|
|
|
$1_LDFLAGS="$$1_LDFLAGS -L$with_bproc/lib"])
|
|
|
|
$1_LIBS="$$1_LIBS -lbproc"
|
2009-10-24 05:04:35 +04:00
|
|
|
AS_IF([test "$orte_check_bproc_happy" = "new"], [$2], [$3])],
|
2008-10-28 20:22:29 +03:00
|
|
|
[AS_IF([test ! -z "$with_bproc"],
|
|
|
|
[AC_MSG_ERROR([BProc support request but not found. Perhaps
|
|
|
|
you need to specify the location of the BProc libraries.])])
|
|
|
|
$4])
|
|
|
|
])
|
|
|
|
])
|