2008-12-02 02:53:18 +03:00
|
|
|
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
|
2015-06-24 06:59:57 +03:00
|
|
|
dnl reserved.
|
2009-01-17 03:15:42 +03:00
|
|
|
dnl Copyright (c) 2008-2009 Cisco Systems, Inc. All rights reserved.
|
2015-12-28 07:22:46 +03:00
|
|
|
dnl Copyright (c) 2015 Research Organization for Information Science
|
|
|
|
dnl and Technology (RIST). All rights reserved.
|
2017-09-13 00:35:08 +03:00
|
|
|
dnl Copyright (c) 2017 IBM Corporation. All rights reserved.
|
2008-12-02 02:53:18 +03:00
|
|
|
dnl $COPYRIGHT$
|
2015-06-24 06:59:57 +03:00
|
|
|
dnl
|
2008-12-02 02:53:18 +03:00
|
|
|
dnl Additional copyrights may follow
|
2015-06-24 06:59:57 +03:00
|
|
|
dnl
|
2008-12-02 02:53:18 +03:00
|
|
|
dnl $HEADER$
|
|
|
|
dnl
|
|
|
|
|
2014-05-01 19:38:07 +04:00
|
|
|
# OPAL_CHECK_WITHDIR(with_option_name, dir_value, file_in_dir)
|
2008-12-02 02:53:18 +03:00
|
|
|
# ----------------------------------------------------
|
2014-05-01 19:38:07 +04:00
|
|
|
AC_DEFUN([OPAL_CHECK_WITHDIR],[
|
2008-12-02 02:53:18 +03:00
|
|
|
AC_MSG_CHECKING([--with-$1 value])
|
2017-09-13 00:35:08 +03:00
|
|
|
AS_IF([test "$2" = "no" ],
|
|
|
|
[AC_MSG_RESULT([simple no (specified --without-$1)])],
|
|
|
|
[AS_IF([test "$2" = "yes" || test "x$2" = "x"],
|
|
|
|
[AC_MSG_RESULT([simple ok (unspecified value)])],
|
|
|
|
[AS_IF([test ! -d "$2"],
|
2008-12-02 02:53:18 +03:00
|
|
|
[AC_MSG_RESULT([not found])
|
2017-09-13 00:35:08 +03:00
|
|
|
AC_MSG_WARN([Directory $2 not found])
|
2008-12-02 02:53:18 +03:00
|
|
|
AC_MSG_ERROR([Cannot continue])],
|
2017-09-13 00:35:08 +03:00
|
|
|
[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)])]
|
|
|
|
)
|
|
|
|
]
|
2008-12-02 02:53:18 +03:00
|
|
|
)
|
|
|
|
]
|
|
|
|
)
|
|
|
|
]
|
|
|
|
)
|
|
|
|
])dnl
|