diff options
author | Charles Kerr <charles.kerr@canonical.com> | 2014-06-10 23:04:52 -0500 |
---|---|---|
committer | Charles Kerr <charles.kerr@canonical.com> | 2014-06-10 23:04:52 -0500 |
commit | 3f7fad001e4fe74a89b60d2e217750baaf3b0392 (patch) | |
tree | 0815572c8e67e0920e08b3f98277fab30a19b380 /src/main.cpp | |
parent | 49772635dc8dddeaea5a8f209bd7aac030a8a132 (diff) | |
download | ayatana-indicator-datetime-3f7fad001e4fe74a89b60d2e217750baaf3b0392.tar.gz ayatana-indicator-datetime-3f7fad001e4fe74a89b60d2e217750baaf3b0392.tar.bz2 ayatana-indicator-datetime-3f7fad001e4fe74a89b60d2e217750baaf3b0392.zip |
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.
Diffstat (limited to 'src/main.cpp')
-rw-r--r-- | src/main.cpp | 10 |
1 files changed, 9 insertions, 1 deletions
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 <datetime/timezone-file.h> #include <datetime/timezones-live.h> #include <datetime/wakeup-timer-mainloop.h> -#include <datetime/wakeup-timer-uha.h> + +#ifdef HAVE_UBUNTU_HW_ALARM_H + #warning using hw alarms + #include <datetime/wakeup-timer-uha.h> +#else + #warning not using hw arlarms +#endif #include <glib/gi18n.h> // bindtextdomain() #include <gio/gio.h> @@ -64,9 +70,11 @@ namespace { std::shared_ptr<WakeupTimer> wakeup_timer; +#ifdef HAVE_UBUNTU_HW_ALARM_H if (UhaWakeupTimer::is_supported()) // prefer to use the platform API wakeup_timer = std::make_shared<UhaWakeupTimer>(clock); else +#endif wakeup_timer = std::make_shared<MainloopWakeupTimer>(clock); return wakeup_timer; |