mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-10-29 05:40:23 -04:00
build-sys: Fix building without NLS
This commit is contained in:
parent
8942d2369d
commit
30d6303abf
4 changed files with 9 additions and 3 deletions
|
|
@ -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 ####
|
||||
|
|
|
|||
|
|
@ -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
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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 <libintl.h>
|
||||
|
||||
#define _(String) dgettext(GETTEXT_PACKAGE, String)
|
||||
|
|
|
|||
|
|
@ -25,7 +25,10 @@
|
|||
|
||||
#include <string.h>
|
||||
#include <locale.h>
|
||||
|
||||
#ifdef ENABLE_NLS
|
||||
#include <libintl.h>
|
||||
#endif
|
||||
|
||||
#ifdef __APPLE__
|
||||
#include <crt_externs.h>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue