From 62b2c024213855a15f8cce809e6d240e6ade374c Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Wed, 21 May 2014 12:57:13 +0200 Subject: build-sys: add UL_EXCLUDE_ARCH() Signed-off-by: Karel Zak --- m4/ul.m4 | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) (limited to 'm4/ul.m4') diff --git a/m4/ul.m4 b/m4/ul.m4 index d18f45914..9d4dc5619 100644 --- a/m4/ul.m4 +++ b/m4/ul.m4 @@ -154,6 +154,35 @@ AC_DEFUN([UL_REQUIRES_LINUX], [ fi ]) + +dnl UL_EXCLUDE_ARCH(NAME, ARCH, VARSUFFIX = $1]) +dnl +dnl Modifies $build_ variable according to $enable_ and $host. The +dnl $enable_ could be "yes", "no" and "check". If build_ is "no" then +dnl all checks are skiped. +dnl +dnl The default 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_ variable according to $enable_ and -- cgit v1.2.3-55-g7522