diff --git a/Makefile.am b/Makefile.am index 2fd5ae05b..500238698 100644 --- a/Makefile.am +++ b/Makefile.am @@ -1,3 +1,3 @@ AUTOMAKE_OPTIONS = foreign -SUBDIRS = ac core +SUBDIRS = ac core locale diff --git a/configure.ac b/configure.ac index ca06c9904..c44c2593d 100644 --- a/configure.ac +++ b/configure.ac @@ -6,6 +6,8 @@ AC_CONFIG_HEADER([core/posix/acconf.h]) AC_CANONICAL_HOST +AM_GNU_GETTEXT + AC_DEFUN([AC_C_FLAG], [{ AC_LANG_PUSH(C) ac_c_flag_save="$CFLAGS" @@ -139,6 +141,7 @@ AC_HEADER_STDBOOL AC_OUTPUT([ Makefile ac/Makefile + locale/Makefile core/Makefile core/posix/Makefile core/bitmaps/Makefile diff --git a/locale/Makefile.am b/locale/Makefile.am new file mode 100644 index 000000000..4c0c533f9 --- /dev/null +++ b/locale/Makefile.am @@ -0,0 +1,13 @@ +LANGS=de es fr it ko pt_BR ru +localedir = $(datadir)/locale + +%.gmo: %/aegisub.po + $(MSGFMT) -o $@ $< + +all-am: $(foreach lang,$(LANGS),$(lang).gmo) + +install-data-am: all-am + for lang in $(LANGS); do \ + $(install_sh_DATA) $${lang}.gmo $(DESTDIR)$(localedir)/$${lang}/LC_MESSAGES/aegisub.mo; \ + done +