]> code.delx.au - pulseaudio/commitdiff
build-sys: Fix building without NLS
authorArun Raghavan <arun.raghavan@collabora.co.uk>
Thu, 8 Dec 2011 08:45:06 +0000 (14:15 +0530)
committerArun Raghavan <arun.raghavan@collabora.co.uk>
Tue, 13 Dec 2011 03:33:58 +0000 (09:03 +0530)
configure.ac
src/pulsecore/i18n.c
src/pulsecore/i18n.h
src/pulsecore/proplist-util.c

index e3ce9874e5bd6f32a5aad456d538f24fd37b6e4a..fbc7276ab37ef601d831bb82e4e0b6484884b697 100644 (file)
@@ -95,6 +95,7 @@ PKG_PROG_PKG_CONFIG
 
 # gettext
 
+if test "x$enable_nls" != "xno"; then
 IT_PROG_INTLTOOL([0.35.0])
 GETTEXT_PACKAGE=pulseaudio
 AC_SUBST([GETTEXT_PACKAGE])
@@ -103,6 +104,7 @@ AM_GLIB_GNU_GETTEXT
 
 pulselocaledir='${prefix}/${DATADIRNAME}/locale'
 AX_DEFINE_DIR(PULSE_LOCALEDIR, pulselocaledir, [Gettext locale dir])
+fi
 
 
 #### Determine host OS ####
index 7f25b20d475e766f9932a267b293b730a328b4cf..b4f0a666151d575bb72c80bcddba3bd8b0fbcac0 100644 (file)
 #include "i18n.h"
 
 void pa_init_i18n(void) {
-
+#ifdef ENABLE_NLS
     PA_ONCE_BEGIN {
 
         bindtextdomain(GETTEXT_PACKAGE, PULSE_LOCALEDIR);
         bind_textdomain_codeset(GETTEXT_PACKAGE, "UTF-8");
 
     } PA_ONCE_END;
+#endif
 }
index d828becda81ec2f0a6896f3da6909d2947afa9f8..b206867e33a0b0af0f8435737bb1702670b96e46 100644 (file)
 
 PA_C_DECL_BEGIN
 
+#ifdef ENABLE_NLS
+
 #if !defined(GETTEXT_PACKAGE)
 #error "Something is very wrong here, config.h needs to be included first"
 #endif
 
-#ifdef ENABLE_NLS
-
 #include <libintl.h>
 
 #define _(String) dgettext(GETTEXT_PACKAGE, String)
index bec857a4bbea752ab9d2e46b0fbae67a26456e2c..f4474310b9cddb2d8e77fe50e1f934997db49ddc 100644 (file)
 
 #include <string.h>
 #include <locale.h>
+
+#ifdef ENABLE_NLS
 #include <libintl.h>
+#endif
 
 #ifdef __APPLE__
 #include <crt_externs.h>