[gnome-calendar] build: define first week day in the build script
- From: Georges Basile Stavracas Neto <gbsneto src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-calendar] build: define first week day in the build script
- Date: Sun, 8 May 2016 17:30:29 +0000 (UTC)
commit 5e05f998761c669e3e995051d658268b3d8e3a0d
Author: Isaque Galdino <igaldino gmail com>
Date: Tue Apr 26 23:14:32 2016 -0300
build: define first week day in the build script
Calendar is not handling locale correctly, e.g. user’ set language to
English (en-us) and format to Norwegian (nb-no), but Calendar assumes
English format rather than Norwegian.
Calendar code was ready to use the correct format, just like Shell and
GtkCalendar. The issue was in the build script which was setting the
correct locale variable responsible to make that code work.
This patch fixes the build script.
https://bugzilla.gnome.org/show_bug.cgi?id=762428
configure.ac | 11 +++++++++++
src/gcal-utils.c | 2 ++
2 files changed, 13 insertions(+), 0 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index c631758..815260e 100644
--- a/configure.ac
+++ b/configure.ac
@@ -26,6 +26,17 @@ AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE,"$GETTEXT_PACKAGE", [GETTEXT package name])
AS_IF([test "x$USE_NLS" != "xno"],
[AC_DEFINE([ENABLE_NLS], [1], [Native language support is enabled])])
+# _NL_TIME_FIRST_WEEKDAY is an enum and not a define
+AC_MSG_CHECKING([for _NL_TIME_FIRST_WEEKDAY])
+AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <langinfo.h>]],
+ [[nl_langinfo(_NL_TIME_FIRST_WEEKDAY);]])],
+ [langinfo_ok=yes], [langinfo_ok=no])
+AC_MSG_RESULT($langinfo_ok)
+if test "$langinfo_ok" = "yes"; then
+ AC_DEFINE([HAVE__NL_TIME_FIRST_WEEKDAY], [1],
+ [Define if _NL_TIME_FIRST_WEEKDAY is available])
+fi
+
## don't rerun to this point if we abort
AC_CACHE_SAVE
diff --git a/src/gcal-utils.c b/src/gcal-utils.c
index 267f192..9b66437 100644
--- a/src/gcal-utils.c
+++ b/src/gcal-utils.c
@@ -18,6 +18,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
+#include "config.h"
+
#include "gcal-utils.h"
#include "gcal-event-widget.h"
#include "gcal-view.h"
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]