2005-07-09 22:52:53 +04:00
|
|
|
# -*- 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$
|
|
|
|
#
|
|
|
|
|
2005-07-23 02:41:35 +04:00
|
|
|
# new bproc is LANL versions >= 3.2.0
|
|
|
|
# old bproc is all Scyld versions and LANL version < 3.2.0
|
|
|
|
# OMPI_CHECK_BPROC(prefix, [action-if-new-bproc], [action-if-old-bproc],
|
|
|
|
# [action-if-not-found])
|
2005-07-09 22:52:53 +04:00
|
|
|
# --------------------------------------------------------
|
|
|
|
AC_DEFUN([OMPI_CHECK_BPROC],[
|
|
|
|
AC_ARG_WITH([bproc],
|
|
|
|
[AC_HELP_STRING([--with-bproc],
|
2005-07-12 02:50:28 +04:00
|
|
|
[Directory where the BProc software is installed])])
|
2005-07-09 22:52:53 +04:00
|
|
|
|
2005-08-22 07:47:48 +04:00
|
|
|
AS_IF([test ! -z "$with_bproc" -a "$with_bproc" = "no"],[$4], [
|
2005-07-23 02:41:35 +04:00
|
|
|
ompi_check_bproc_save_CPPFLAGS="$CPPFLAGS"
|
|
|
|
ompi_check_bproc_save_LDFLAGS="$LDFLAGS"
|
|
|
|
ompi_check_bproc_save_LIBS="$LIBS"
|
|
|
|
|
|
|
|
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],
|
|
|
|
[ompi_check_bproc_happy="yes"],
|
|
|
|
[ompi_check_bproc_happy="no"])],
|
|
|
|
[ompi_check_bproc_happy="no"])
|
2005-07-09 22:52:53 +04:00
|
|
|
|
2005-07-23 02:41:35 +04:00
|
|
|
# Check for Scyld bproc or an old version of LANL Bproc (pre 3.2.0)
|
|
|
|
AS_IF([test "$ompi_check_bproc_happy" = "yes"],
|
|
|
|
[AC_CHECK_HEADERS([sys/bproc_common.h],[ompi_check_bproc_happy="new"],
|
|
|
|
[ompi_check_bproc_happy="old"],
|
|
|
|
[#include <stdint.h>
|
|
|
|
#include <sys/socket.h>])])
|
2005-07-09 22:52:53 +04:00
|
|
|
|
2005-07-23 02:41:35 +04:00
|
|
|
CPPFLAGS="$ompi_check_bproc_save_CPPFLAGS"
|
|
|
|
LDFLAGS="$ompi_check_bproc_save_LDFLAGS"
|
|
|
|
LIBS="$ompi_check_bproc_save_LIBS"
|
2005-07-09 22:52:53 +04:00
|
|
|
|
2005-07-23 02:41:35 +04:00
|
|
|
AS_IF([test "$ompi_check_bproc_happy" != "no"],
|
2005-07-26 02:21:40 +04:00
|
|
|
[AS_IF([test ! -z "$with_bproc" -a "$with_bproc" != "yes"],
|
2005-07-23 02:41:35 +04:00
|
|
|
[$1_CPPFLAGS="$$1_CPPFLAGS -I$with_bproc/include"
|
|
|
|
$1_LDFLAGS="$$1_LDFLAGS -L$with_bproc/lib"])
|
|
|
|
$1_LIBS="$$1_LIBS -lbproc"
|
|
|
|
AS_IF([test "$ompi_check_bproc_happy" = "new"], [$2], [$3])],
|
|
|
|
[AS_IF([test ! -z "$with_bproc"],
|
|
|
|
[AC_MSG_ERROR([BProc support request but not found. Perhaps
|
2005-07-12 02:50:28 +04:00
|
|
|
you need to specify the location of the BProc libraries.])])
|
2005-07-23 02:41:35 +04:00
|
|
|
$4])
|
|
|
|
])
|
2005-07-09 22:52:53 +04:00
|
|
|
])
|