diff options
author | Karel Zak | 2012-05-31 10:02:52 +0200 |
---|---|---|
committer | Karel Zak | 2012-06-26 20:48:22 +0200 |
commit | a9e48470be8a52175149bf79627d79f51858dec9 (patch) | |
tree | b56bef677fe97644e9ad65fd329d8400b0576443 /m4/ul.m4 | |
parent | mount: (old) remove hybrid libmount code (diff) | |
download | kernel-qcow2-util-linux-a9e48470be8a52175149bf79627d79f51858dec9.tar.gz kernel-qcow2-util-linux-a9e48470be8a52175149bf79627d79f51858dec9.tar.xz kernel-qcow2-util-linux-a9e48470be8a52175149bf79627d79f51858dec9.zip |
build-sys: add UL_CONFLICTS_BUILD m4 macro
Signed-off-by: Karel Zak <kzak@redhat.com>
Diffstat (limited to 'm4/ul.m4')
-rw-r--r-- | m4/ul.m4 | 30 |
1 files changed, 30 insertions, 0 deletions
@@ -182,6 +182,36 @@ AC_DEFUN([UL_REQUIRES_HAVE], [ fi ]) + +dnl +dnl UL_CONFLICTS_BUILD(NAME, ANOTHER, ANOTHERDESC [VARSUFFIX=$1]) +dnl +dnl - ends with error if $enable_<name> and $build_<another> +dnl are both set to 'yes' +dnl - sets $build_<name> to 'no' if $build_<another> is 'yes' and +dnl $enable_<name> is 'check' or 'no' +dnl +dnl The <havedesc> is description used for warning/error +dnl message (e.g. "function"). +dnl +dnl The default <name> for $build_ and $enable_ could be overwrited by option $3. +dnl +AC_DEFUN([UL_CONFLICTS_BUILD], [ + m4_define([suffix], m4_default([$4],$1)) + + if test "x$[build_]suffix" != xno; then + case $[enable_]suffix:$[build_]$2 in #( + no:*) + [build_]suffix=no ;; + check:yes) + [build_]suffix=no ;; + yes:yes) + AC_MSG_ERROR([$1 selected, but it conflicts with $3]);; + esac + fi +]) + + dnl UL_REQUIRES_BUILD(NAME, BUILDNAME, [VARSUFFIX=$1]) dnl dnl Modifies $build_<name> variable according to $enable_<name> and $have_funcname. |