diff options
author | Karel Zak | 2014-05-21 12:57:13 +0200 |
---|---|---|
committer | Karel Zak | 2014-05-21 12:57:13 +0200 |
commit | 62b2c024213855a15f8cce809e6d240e6ade374c (patch) | |
tree | 2a9e223c2ca8b7dc22ed971be2be47da07a8adfa | |
parent | build-sys: add BUILD_{SFDISK,BLOCKDEV,MKSWAP,IOSIZE,MKFS} (diff) | |
download | kernel-qcow2-util-linux-62b2c024213855a15f8cce809e6d240e6ade374c.tar.gz kernel-qcow2-util-linux-62b2c024213855a15f8cce809e6d240e6ade374c.tar.xz kernel-qcow2-util-linux-62b2c024213855a15f8cce809e6d240e6ade374c.zip |
build-sys: add UL_EXCLUDE_ARCH()
Signed-off-by: Karel Zak <kzak@redhat.com>
-rw-r--r-- | configure.ac | 3 | ||||
-rw-r--r-- | m4/ul.m4 | 29 |
2 files changed, 31 insertions, 1 deletions
diff --git a/configure.ac b/configure.ac index 79de3c7a3..8d537de32 100644 --- a/configure.ac +++ b/configure.ac @@ -829,7 +829,8 @@ UL_REQUIRES_BUILD([fdisk], [libfdisk]) AM_CONDITIONAL([BUILD_FDISK], [test "x$build_fdisk" = xyes]) -UL_BUILD_INIT([sfdisk], [yes]) +UL_BUILD_INIT([sfdisk], [check]) +UL_EXCLUDE_ARCH([sfdisk], [spark*]) AM_CONDITIONAL([BUILD_SFDISK], [test "x$build_sfdisk" = xyes]) @@ -154,6 +154,35 @@ AC_DEFUN([UL_REQUIRES_LINUX], [ fi ]) + +dnl UL_EXCLUDE_ARCH(NAME, ARCH, VARSUFFIX = $1]) +dnl +dnl Modifies $build_<name> variable according to $enable_<name> and $host. The +dnl $enable_<name> could be "yes", "no" and "check". If build_<name> is "no" then +dnl all checks are skiped. +dnl +dnl The default <name> for $build_ and $enable_ could be overwrited by option $3. +dnl +AC_DEFUN([UL_EXCLUDE_ARCH], [ + m4_define([suffix], m4_default([$3],$1)) + if test "x$[build_]suffix" != xno; then + AC_REQUIRE([AC_CANONICAL_HOST]) + case $[enable_]suffix:"$host" in #( + no:*) + [build_]suffix=no ;; + yes:$2) + AC_MSG_ERROR([$1 selected for unsupported architecture]);; + yes:*) + [build_]suffix=yes ;; + check:$2) + AC_MSG_WARN([exclude for $host architecture; do not build $1]) + [build_]suffix=no ;; + check:*) + [build_]suffix=yes ;; + esac + fi +]) + dnl UL_REQUIRES_HAVE(NAME, HAVENAME, HAVEDESC [VARSUFFIX=$1]) dnl dnl Modifies $build_<name> variable according to $enable_<name> and |