From: Arun Raghavan Date: Thu, 8 Dec 2011 08:45:06 +0000 (+0530) Subject: build-sys: Fix building without NLS X-Git-Tag: 1.0_branch~173 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=30d6303abff107ea0661af8cf2ae4e0abad8d73e;p=profile%2Fivi%2Fpulseaudio.git build-sys: Fix building without NLS --- diff --git a/configure.ac b/configure.ac index e3ce987..fbc7276 100644 --- a/configure.ac +++ b/configure.ac @@ -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 #### diff --git a/src/pulsecore/i18n.c b/src/pulsecore/i18n.c index 7f25b20..b4f0a66 100644 --- a/src/pulsecore/i18n.c +++ b/src/pulsecore/i18n.c @@ -28,11 +28,12 @@ #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 } diff --git a/src/pulsecore/i18n.h b/src/pulsecore/i18n.h index d828bec..b206867 100644 --- a/src/pulsecore/i18n.h +++ b/src/pulsecore/i18n.h @@ -26,12 +26,12 @@ 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 #define _(String) dgettext(GETTEXT_PACKAGE, String) diff --git a/src/pulsecore/proplist-util.c b/src/pulsecore/proplist-util.c index bec857a..f447431 100644 --- a/src/pulsecore/proplist-util.c +++ b/src/pulsecore/proplist-util.c @@ -25,7 +25,10 @@ #include #include + +#ifdef ENABLE_NLS #include +#endif #ifdef __APPLE__ #include