1
1
openmpi/config/opal_check_withdir.m4
Gilles Gouaillardet fec973efda configury: test portability
replace test ... -o ... with test ... || test ...
and test ... -a ... with test ... && test ...
2015-12-28 13:58:45 +09:00

39 строки
1.5 KiB
Bash

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-2009 Cisco Systems, Inc. All rights reserved.
dnl Copyright (c) 2015 Research Organization for Information Science
dnl and Technology (RIST). All rights reserved.
dnl $COPYRIGHT$
dnl
dnl Additional copyrights may follow
dnl
dnl $HEADER$
dnl
# OPAL_CHECK_WITHDIR(with_option_name, dir_value, file_in_dir)
# ----------------------------------------------------
AC_DEFUN([OPAL_CHECK_WITHDIR],[
AC_MSG_CHECKING([--with-$1 value])
AS_IF([test "$2" = "yes" || test "$2" = "no" || test "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 2> /dev/null`" = "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