Skip to content
Snippets Groups Projects
Commit 58011815 authored by Benedikt Meurer's avatar Benedikt Meurer
Browse files

Updated BM_DEPEND_CHECK to make it possible to disable the test

(Old svn revision: 684)
parent 453612f1
No related branches found
No related tags found
No related merge requests found
......@@ -10,17 +10,24 @@ AC_DEFUN([BM_DEPEND],
])
dnl
dnl BM_DEPEND_CHECK(var, pkg, version)
dnl BM_DEPEND_CHECK(var, pkg, version, name, helpstring)
dnl
AC_DEFUN([BM_DEPEND_CHECK],
[
AC_MSG_CHECKING([for $2 >= $3])
if $PKG_CONFIG --atleast-version=$3 $2 2> /dev/null; then
AC_MSG_RESULT([yes])
BM_DEPEND([$1], [$2], [$3])
AC_DEFINE([HAVE_$1], [1], [Define if you have $2 >= $3])
else
AC_MSG_RESULT([no])
AC_ARG_ENABLE([$4-check],
AC_HELP_STRING([--enable-$4-check], [Enable checking for $5 (default)])
AC_HELP_STRING([--disable-$4-check], [Disable checking for $5]),
[ac_cv_$1_check=$enableval], [ac_cv_$1_check=yes])
if test x"$ac_cv_$1_check" = x"yes"; then
AC_MSG_CHECKING([for $2 >= $3])
if $PKG_CONFIG --atleast-version=$3 $2 2> /dev/null; then
AC_MSG_RESULT([yes])
BM_DEPEND([$1], [$2], [$3])
AC_DEFINE([HAVE_$1], [1], [Define if you have $2 >= $3])
else
AC_MSG_RESULT([no])
fi
fi
])
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment