summaryrefslogtreecommitdiffstats
path: root/m4
diff options
context:
space:
mode:
authorKarel Zak2013-01-24 19:22:40 +0100
committerKarel Zak2013-01-24 19:22:53 +0100
commit916268221039ff2e1c05a695f5a5ddb8413b0360 (patch)
treef47b1749d39c0a538173af9c2fae9a029e80d9a7 /m4
parenttests: add ionice(1) check (diff)
downloadkernel-qcow2-util-linux-916268221039ff2e1c05a695f5a5ddb8413b0360.tar.gz
kernel-qcow2-util-linux-916268221039ff2e1c05a695f5a5ddb8413b0360.tar.xz
kernel-qcow2-util-linux-916268221039ff2e1c05a695f5a5ddb8413b0360.zip
build-sys: support list of variables for UL_REQUIRES_HAVE macro
Signed-off-by: Karel Zak <kzak@redhat.com>
Diffstat (limited to 'm4')
-rw-r--r--m4/ul.m413
1 files changed, 12 insertions, 1 deletions
diff --git a/m4/ul.m4 b/m4/ul.m4
index 2109aaa9b..a6e7d0608 100644
--- a/m4/ul.m4
+++ b/m4/ul.m4
@@ -160,13 +160,24 @@ dnl Modifies $build_<name> variable according to $enable_<name> and
dnl $have_<havename>. The <havedesc> is description used ifor warning/error
dnl message (e.g. "function").
dnl
+dnl The <havename> maybe a list, then at least one of the items in the list
+dnl have to exist, for example: [ncurses, tinfo] means that have_ncurser=yes
+dnl *or* have_tinfo=yes must be defined.
+dnl
dnl The default <name> for $build_ and $enable_ could be overwrited by option $3.
dnl
AC_DEFUN([UL_REQUIRES_HAVE], [
m4_define([suffix], m4_default([$4],$1))
if test "x$[build_]suffix" != xno; then
- case $[enable_]suffix:$[have_]$2 in #(
+
+ m4_foreach([onehave], [$2], [
+ if test "x$[have_]onehave" = xyes; then
+ [ul_haveone_]suffix=yes
+ fi
+ ])dnl
+
+ case $[enable_]suffix:$[ul_haveone_]suffix in #(
no:*)
[build_]suffix=no ;;
yes:yes)