From 88bc304ba815e21b09373cfec4e2f1f087482214 Mon Sep 17 00:00:00 2001 From: Carlos Santos Date: Wed, 3 Jul 2019 13:31:34 -0300 Subject: hwclock: use CMOS clock only if available - Add --disable-hwclock-cmos configuration argument - Add USE_HWCLOCK_CMOS (enabled by default for i386/x86_64) - Add define(USE_HWCLOCK_CMOS) - Compile hwclock-cmos.c only if USE_HWCLOCK_CMOS is true - Remove all unnecessary #ifdefs from hwclock-cmos.c - Add #ifdef USE_HWCLOCK_CMOS around the determine_clock_access_method() call in hwclock.c Signed-off-by: Carlos Santos --- configure.ac | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'configure.ac') diff --git a/configure.ac b/configure.ac index 997b6388c..8aa2fed38 100644 --- a/configure.ac +++ b/configure.ac @@ -1517,6 +1517,19 @@ 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], + 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]) +]) + + UL_BUILD_INIT([mkfs], [yes]) AM_CONDITIONAL([BUILD_MKFS], [test "x$build_mkfs" = xyes]) -- cgit v1.2.3-55-g7522