summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKarel Zak2019-07-15 15:32:49 +0200
committerKarel Zak2019-07-15 15:32:49 +0200
commitb1062292066e0568adbbdbb104b7afdcc5dac25f (patch)
treeaec50925d260ae682ed319bdba9af08a85f20d19
parentbuild-sys: add UL_REQUIRES_ARCH() (diff)
downloadkernel-qcow2-util-linux-b1062292066e0568adbbdbb104b7afdcc5dac25f.tar.gz
kernel-qcow2-util-linux-b1062292066e0568adbbdbb104b7afdcc5dac25f.tar.xz
kernel-qcow2-util-linux-b1062292066e0568adbbdbb104b7afdcc5dac25f.zip
build-sys: improve hwclock CMOS dependences
Let's use standard UL_* macros to check for dependencies (architectures and hwclock). Signed-off-by: Karel Zak <kzak@redhat.com>
-rw-r--r--configure.ac19
1 files changed, 9 insertions, 10 deletions
diff --git a/configure.ac b/configure.ac
index 8aa2fed38..3bec9769b 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1516,17 +1516,16 @@ UL_BUILD_INIT([hwclock])
UL_REQUIRES_HAVE([hwclock], [io, linuxdummy], [ioperm iopl function or Linux])
AM_CONDITIONAL([BUILD_HWCLOCK], [test "x$build_hwclock" = xyes])
-
-AC_ARG_ENABLE([hwclock-cmos],
+AC_ARG_ENABLE([hwclock_cmos],
AS_HELP_STRING([--disable-hwclock-cmos], [do not use CMOS clock]),
- [], [use_hwclock_cmos="$build_hwclock"]
-)
-
-AS_IF([test "x$use_hwclock_cmos" = xyes], [
- AM_CONDITIONAL([USE_HWCLOCK_CMOS], [true])
- AC_DEFINE([USE_HWCLOCK_CMOS], [1], [Define to 1 if want to use CMOS clock.])
-],[
- AM_CONDITIONAL([USE_HWCLOCK_CMOS], [false])
+ [], [enable_hwclock_cmos=check]
+)
+UL_BUILD_INIT([hwclock_cmos])
+UL_REQUIRES_BUILD([hwclock_cmos], [hwclock])
+UL_REQUIRES_ARCH([hwclock_cmos], [i?86-*,x86_64*])
+AM_CONDITIONAL([USE_HWCLOCK_CMOS], [test "x$build_hwclock_cmos" = xyes])
+AS_IF([test "x$build_hwclock_cmos" = xyes ], [
+ AC_DEFINE([USE_HWCLOCK_CMOS], [1], [Define to 1 if want to use CMOS clock.])
])