41 lines
1.4 KiB
Diff
41 lines
1.4 KiB
Diff
diff --git core/Model/CalendarModel.vala core/Model/CalendarModel.vala
|
|
index 3e3b8cbd..b33f75f8 100644
|
|
--- core/Model/CalendarModel.vala
|
|
+++ core/Model/CalendarModel.vala
|
|
@@ -68,7 +68,11 @@ public class Maya.Model.CalendarModel : Object {
|
|
}
|
|
|
|
private CalendarModel () {
|
|
+#if HAVE_NL_TIME_FIRST_WEEKDAY
|
|
int week_start = Posix.NLTime.FIRST_WEEKDAY.to_string ().data[0];
|
|
+#else
|
|
+ int week_start = 0;
|
|
+#endif
|
|
if (week_start >= 1 && week_start <= 7) {
|
|
week_starts_on = (Maya.Settings.Weekday)week_start-1;
|
|
}
|
|
diff --git meson.build meson.build
|
|
index 1f83be6d..480706a1 100644
|
|
--- meson.build
|
|
+++ meson.build
|
|
@@ -31,13 +31,18 @@ folks_dep = dependency('folks')
|
|
geocode_glib_dep = dependency('geocode-glib-1.0')
|
|
gclue_dep = dependency('libgeoclue-2.0')
|
|
|
|
-m_dep = meson.get_compiler('c').find_library('m', required : false)
|
|
+cc = meson.get_compiler('c')
|
|
+m_dep = cc.find_library('m', required : false)
|
|
libnotify_dep = dependency('libnotify', required: false)
|
|
|
|
if libnotify_dep.found()
|
|
add_project_arguments('--define=HAVE_LIBNOTIFY', language: 'vala')
|
|
endif
|
|
|
|
+if cc.has_header_symbol('langinfo.h', '_NL_TIME_FIRST_WEEKDAY')
|
|
+ add_project_arguments('--define=HAVE_NL_TIME_FIRST_WEEKDAY', language: 'vala')
|
|
+endif
|
|
+
|
|
gresource_calendar = gnome.compile_resources(
|
|
'gresource_calendar',
|
|
'data/maya.gresource.xml',
|