1
1

From Jeff's pen, answering a problem cited by me:

If someone specifies a directory for a config option, then we should respect that designation and error out if the directory isn't found. Implemented first for the --with-openib options.

This commit was SVN r20045.
This commit is contained in:
Ralph Castain 2008-12-01 23:53:18 +00:00
parent 35d10a4794
commit bb25d4e3f3
2 changed files with 38 additions and 0 deletions

View File

@ -36,9 +36,11 @@ AC_DEFUN([OMPI_CHECK_OPENIB],[
AC_ARG_WITH([openib],
[AC_HELP_STRING([--with-openib(=DIR)],
[Build OpenFabrics support, searching for libraries in DIR])])
OMPI_CHECK_WITHDIR([openib], [$with_openib], [include/verbs.h])
AC_ARG_WITH([openib-libdir],
[AC_HELP_STRING([--with-openib-libdir=DIR],
[Search for OpenFabrics libraries in DIR])])
OMPI_CHECK_WITHDIR([openib-libdir], [$with_openib_libdir], [libibverbs.*])
#
# ConnectX XRC support

View File

@ -0,0 +1,36 @@
dnl -*- shell-script -*-
dnl
dnl Copyright (c) 2004-2006 The Trustees of Indiana University and Indiana
dnl University Research and Technology
dnl Corporation. All rights reserved.
dnl Copyright (c) 2006 Los Alamos National Security, LLC. All rights
dnl reserved.
dnl Copyright (c) 2008 Cisco Systems, Inc. All rights reserved.
dnl $COPYRIGHT$
dnl
dnl Additional copyrights may follow
dnl
dnl $HEADER$
dnl
# OMPI_CHECK_WITHDIR(with_option_name, dir_value, file_in_dir)
# ----------------------------------------------------
AC_DEFUN([OMPI_CHECK_WITHDIR],[
AC_MSG_CHECKING([--with-$1 value])
AS_IF([test "$2" = "yes" -o "$2" = "no" -o "x$2" = "x"],
[AC_MSG_RESULT([simple ok (unspecified)])],
[AS_IF([test ! -d "$2"],
[AC_MSG_RESULT([not found])
AC_MSG_WARN([Directory $2 not found])
AC_MSG_ERROR([Cannot continue])]
[AS_IF([test "x`ls $2/$3`" = "x"],
[AC_MSG_RESULT([not found])
AC_MSG_WARN([Expected file $2/$3 not found])
AC_MSG_ERROR([Cannot continue])],
[AC_MSG_RESULT([sanity check ok ($2)])]
)
]
)
]
)
])dnl