diff options
author | Benedikt Meurer <benny@xfce.org> | 2003-04-03 22:08:48 +0000 |
---|---|---|
committer | Benedikt Meurer <benny@xfce.org> | 2003-04-03 22:08:48 +0000 |
commit | cca65aa1b5805230399bd60836900cfd09d81ec1 (patch) | |
tree | f97ecd05016a4ba3702610158dd7a1ae7f9b5bda /m4 | |
parent | cf258819c0d6eac226c2a0e3e7914d9fe7bd7006 (diff) | |
download | xfwm4-cca65aa1b5805230399bd60836900cfd09d81ec1.tar.gz |
Updated BM_DEPEND_CHECK to make it possible to disable the test
(Old svn revision: 11038)
Diffstat (limited to 'm4')
-rw-r--r-- | m4/depends.m4 | 23 |
1 files changed, 15 insertions, 8 deletions
diff --git a/m4/depends.m4 b/m4/depends.m4 index 10253c5dd..dcee10cdc 100644 --- a/m4/depends.m4 +++ b/m4/depends.m4 @@ -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 ]) |