2009-11-17 Robert Millan <rmh.grub@aybabtu.com>

* configure.ac: Call AM_GNU_GETTEXT() (defines localedir, among
        other things).
        * Makefile.in (CPPFLAGS): Add `-DLOCALEDIR=\"$(localedir)\"'.
        * util/i386/pc/grub-mkimage.c (main): Issue setlocale() and
        bindtextdomain() calls for gettext initialization.
This commit is contained in:
Robert Millan 2009-11-17 10:47:22 +00:00
parent 1608391625
commit 336262f829
4 changed files with 12 additions and 1 deletions

View file

@ -1,3 +1,11 @@
2009-11-17 Robert Millan <rmh.grub@aybabtu.com>
* configure.ac: Call AM_GNU_GETTEXT() (defines localedir, among
other things).
* Makefile.in (CPPFLAGS): Add `-DLOCALEDIR=\"$(localedir)\"'.
* util/i386/pc/grub-mkimage.c (main): Issue setlocale() and
bindtextdomain() calls for gettext initialization.
2009-11-17 Robert Millan <rmh.grub@aybabtu.com>
* gnulib/progname.c: New file (imported from Gnulib).

View file

@ -72,7 +72,7 @@ CFLAGS = @CFLAGS@
ASFLAGS = @ASFLAGS@
LDFLAGS = @LDFLAGS@
CPPFLAGS = @CPPFLAGS@ -I$(builddir) -I$(builddir)/include -I$(srcdir)/gnulib -I$(srcdir)/include -Wall -W \
-DGRUB_LIBDIR=\"$(pkglibdir)\"
-DGRUB_LIBDIR=\"$(pkglibdir)\" -DLOCALEDIR=\"$(localedir)\"
TARGET_CC = @TARGET_CC@
TARGET_CFLAGS = @TARGET_CFLAGS@
TARGET_ASFLAGS = @TARGET_ASFLAGS@

View file

@ -33,6 +33,7 @@ dnl type.
AC_INIT([GRUB],[1.97],[bug-grub@gnu.org])
AM_INIT_AUTOMAKE()
AM_GNU_GETTEXT()
AC_PREREQ(2.59d)
AC_CONFIG_SRCDIR([include/grub/dl.h])
AC_CONFIG_HEADER([config.h])

View file

@ -351,6 +351,8 @@ main (int argc, char *argv[])
FILE *fp = stdout;
set_program_name (argv[0]);
setlocale (LC_ALL, "");
bindtextdomain (PACKAGE, LOCALEDIR);
textdomain (PACKAGE);
while (1)