[vlc-devel] [PATCH] Allow to build without locale support
Ismael Luceno
ismael.luceno at gmail.com
Mon May 14 05:58:29 CEST 2012
Signed-off-by: Ismael Luceno <ismael.luceno at gmail.com>
---
configure.ac | 5 +++++
src/Makefile.am | 7 ++++++-
src/config/file.c | 2 ++
3 files changed, 13 insertions(+), 1 deletion(-)
diff --git a/configure.ac b/configure.ac
index 62d13ad..a561096 100644
--- a/configure.ac
+++ b/configure.ac
@@ -4157,6 +4157,11 @@ AM_CONDITIONAL(BUILD_MACOSX_VLC_APP, [test "${enable_macosx_vlc_app}" != "no" &&
(test "${SYS}" = "darwin" || test "${enable_macosx_vlc_app}" = "yes") ])
dnl
+dnl Variable to be used in Makefile.am
+dnl
+AM_CONDITIONAL([ENABLE_NLS], [test "${enable_nls}" != "no"])
+
+dnl
dnl Stuff used by the program
dnl
VERSION_MESSAGE="${VERSION} ${CODENAME}"
diff --git a/src/Makefile.am b/src/Makefile.am
index d6d083e..feffd55 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -395,7 +395,6 @@ SOURCES_libvlc_common = \
network/udp.c \
network/rootbind.c \
network/tls.c \
- text/charset.c \
text/strings.c \
text/unicode.c \
text/filesystem.c \
@@ -454,6 +453,12 @@ SOURCES_libvlc_common = \
misc/subpicture.h \
$(NULL)
+if ENABLE_NLS
+SOURCES_libvlc_common += \
+ text/charset.c
+endif
+
+
SOURCES_libvlc_httpd = \
network/httpd.c \
$(NULL)
diff --git a/src/config/file.c b/src/config/file.c
index 81d5faa..a19e90d 100644
--- a/src/config/file.c
+++ b/src/config/file.c
@@ -30,11 +30,13 @@
#include <limits.h>
#include <fcntl.h>
#include <sys/stat.h>
+#ifdef ENABLE_NLS
#ifdef __APPLE__
# include <xlocale.h>
#elif defined(HAVE_USELOCALE)
#include <locale.h>
#endif
+#endif
#ifdef HAVE_UNISTD_H
# include <unistd.h>
#endif
--
1.7.10
More information about the vlc-devel
mailing list