e2fb3c4054
to LIBS even if --with-bproc isn't given This commit was SVN r6424.
55 строки
2.1 KiB
Bash
55 строки
2.1 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$
|
|
#
|
|
|
|
|
|
# OMPI_CHECK_BPROC(prefix, [action-if-found], [action-if-not-found])
|
|
# --------------------------------------------------------
|
|
AC_DEFUN([OMPI_CHECK_BPROC],[
|
|
AC_ARG_WITH([bproc],
|
|
[AC_HELP_STRING([--with-bproc],
|
|
[Directory where the BProc software is installed])])
|
|
|
|
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"])
|
|
|
|
CPPFLAGS="$ompi_check_bproc_save_CPPFLAGS"
|
|
LDFLAGS="$ompi_check_bproc_save_LDFLAGS"
|
|
LIBS="$ompi_check_bproc_save_LIBS"
|
|
|
|
AS_IF([test "$ompi_check_bproc_happy" = "yes"],
|
|
[AS_IF([test ! -z "$with_bproc"],
|
|
[$1_CPPFLAGS="$$1_CPPFLAGS -I$with_bproc/include"
|
|
$1_LDFLAGS="$$1_LDFLAGS -L$with_bproc/lib"])
|
|
$1_LIBS="$$1_LIBS -lbproc"
|
|
$2],
|
|
[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.])])
|
|
$3])
|
|
])
|