[gtranslator] Add gettext libs



commit 8f7b035db9b45b8e7c81d340da7bca2d4791b220
Author: Ignacio Casal Quinteiro <icq gnome org>
Date:   Fri Apr 20 17:43:53 2012 +0200

    Add gettext libs

 configure.ac    |    7 +++++++
 src/Makefile.am |    4 ++--
 2 files changed, 9 insertions(+), 2 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index e34887e..83cadce 100644
--- a/configure.ac
+++ b/configure.ac
@@ -108,6 +108,13 @@ PKG_CHECK_MODULES(GTRANSLATOR, [
 AC_SUBST(GTRANSLATOR_CFLAGS)
 AC_SUBST(GTRANSLATOR_LIBS)
 
+dnl gettext library
+AC_CHECK_LIB([gettextpo], [po_message_is_format],
+             [GETTEXT_LIBS=-lgettextpo], [
+              AC_MSG_ERROR(Missing gettext library)])
+
+AC_SUBST([GETTEXT_LIBS])
+
 dnl ------------------------
 dnl Check for win32 platform
 dnl ------------------------
diff --git a/src/Makefile.am b/src/Makefile.am
index 9b09243..9bb820b 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -32,7 +32,7 @@ gtranslator_LDADD =			\
 	$(GTKSPELL_LIBS)		\
 	$(INTLLIBS)			\
 	$(INTROSPECTION_LIBS)		\
-	-lgettextpo
+	$(GETTEXT_LIBS)
 
 if PLATFORM_WIN32
 gtranslator_LDFLAGS = -Wl,--export-all-symbols -mwindows -Wl,--out-implib,libgtranslator-$(GTR_API_VERSION).a
@@ -161,7 +161,7 @@ libgtranslator_la_LIBADD = \
 	toolbareditor/libtoolbareditor.la \
 	$(GTRANSLATOR_LIBS)
 
-libgtranslator_private_la_LIBADD = libgtranslator.la $(GTRANSLATOR_LIBS)
+libgtranslator_private_la_LIBADD = libgtranslator.la $(GTRANSLATOR_LIBS) $(GETTEXT_LIBS)
 
 gtr-enum-types.h: gtr-enum-types.h.template $(INST_H_FILES) $(GLIB_MKENUMS)
 	$(AM_V_GEN) (cd $(srcdir) && $(GLIB_MKENUMS) --template gtr-enum-types.h.template $(INST_H_FILES)) > $@



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]