You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
infer_clone/m4/ac_check_python_module.m4

22 lines
628 B

dnl Copyright (c) Facebook, Inc. and its affiliates.
dnl
dnl This source code is licensed under the MIT license found in the
dnl LICENSE file in the root directory of this source tree.
dnl AC_CHECK_PYTHON_MODULE([python],[module])
dnl
dnl checks if the given module is available from the given Python interpreter
AC_DEFUN([AC_CHECK_PYTHON_MODULE],
[dnl
AC_MSG_CHECKING([for Python module $2])
if printf "import %s" $2 | $1 - 1> /dev/null 2> /dev/null; then
AC_MSG_RESULT([ok])
AS_TR_SH([PYTHON_$2])=yes
else
AC_MSG_RESULT([unavailable])
AS_TR_SH([PYTHON_$2])=no
fi
AC_SUBST(AS_TR_SH([PYTHON_$2]))
])