From 3f7fad001e4fe74a89b60d2e217750baaf3b0392 Mon Sep 17 00:00:00 2001 From: Charles Kerr Date: Tue, 10 Jun 2014 23:04:52 -0500 Subject: Don't build the hw-alarms pieces if ubuntu/hardware/alarm.h can't be found. Don't require libplatform-hardware-api-* unless the arch is armhf, i386, or amd64. --- src/main.cpp | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'src/main.cpp') diff --git a/src/main.cpp b/src/main.cpp index e35c5da..adbd371 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -32,7 +32,13 @@ #include #include #include -#include + +#ifdef HAVE_UBUNTU_HW_ALARM_H + #warning using hw alarms + #include +#else + #warning not using hw arlarms +#endif #include // bindtextdomain() #include @@ -64,9 +70,11 @@ namespace { std::shared_ptr wakeup_timer; +#ifdef HAVE_UBUNTU_HW_ALARM_H if (UhaWakeupTimer::is_supported()) // prefer to use the platform API wakeup_timer = std::make_shared(clock); else +#endif wakeup_timer = std::make_shared(clock); return wakeup_timer; -- cgit v1.2.3