]> git.sesse.net Git - vlc/commitdiff
* configure.ac: added an --enable-utf8 option (default enabled on osx/beos/win32).
authorGildas Bazin <gbazin@videolan.org>
Sun, 22 Feb 2004 15:03:33 +0000 (15:03 +0000)
committerGildas Bazin <gbazin@videolan.org>
Sun, 22 Feb 2004 15:03:33 +0000 (15:03 +0000)
* src/libvlc.c, modules/gui/wxwindows/wxwindows.h: use #ifdef ENABLE_UTF8

configure.ac
modules/gui/wxwindows/wxwindows.h
src/libvlc.c

index 0f1ffbc640d2e3c9c6f8931fcde0e72eaeaa1a43..aaae5a61cf301c53d2d37668529ae9a227b12ace 100644 (file)
@@ -1,5 +1,5 @@
 dnl Autoconf settings for vlc
-dnl $Id: configure.ac,v 1.183 2004/02/22 00:15:33 gbazin Exp $
+dnl $Id: configure.ac,v 1.184 2004/02/22 15:03:33 gbazin Exp $
 
 AC_INIT(vlc,0.7.1-test2)
 
@@ -204,6 +204,14 @@ fi
 AM_CONDITIONAL(BUILD_INTL, test "${nls_cv_force_use_gnu_gettext}" = "yes")
 XGETTEXT="${XGETTEXT} --keyword=_NS --keyword=_ANS"
 
+AC_ARG_ENABLE(utf8,
+  [  --enable-utf8           unicode utf8 support (default enabled on darwin/beos/win32)])
+if test "${enable_utf8}" = "yes" || (test "${enable_utf8}" != "no" && (test "${SYS}" = "mingw32" || test "${SYS}" = "beos" || test "${SYS}" = "darwin" ) )
+then
+  AC_DEFINE(ENABLE_UTF8, 1,
+            Define if you want utf8 support)
+fi
+
 AC_MSG_CHECKING(for suffix of libraries)
 AC_MSG_RESULT(${LIBEXT})
 
index 214f4967782b24ed3cf276d3467f4c8ed733c307..fbf7be1a8db05f1ef8a80aa916dfb22cd5a698c3 100644 (file)
@@ -2,7 +2,7 @@
  * wxwindows.h: private wxWindows interface description
  *****************************************************************************
  * Copyright (C) 1999-2004 VideoLAN
- * $Id: wxwindows.h,v 1.89 2004/02/16 17:14:39 zorglub Exp $
+ * $Id: wxwindows.h,v 1.90 2004/02/22 15:03:33 gbazin Exp $
  *
  * Authors: Gildas Bazin <gbazin@netcourrier.com>
  *
@@ -53,8 +53,7 @@ class FileInfo;
 #define SLIDER_MAX_POS 10000
 
 /* wxU is used to convert ansi/utf8 strings to unicode strings (wchar_t) */
-#if defined( ENABLE_NLS ) && defined( HAVE_GETTEXT ) && \
-    defined( WIN32 ) && !defined( HAVE_INCLUDED_GETTEXT )
+#if defined( ENABLE_NLS ) && defined( ENABLE_UTF8 )
 #if wxUSE_UNICODE
 #   define wxU(utf8) wxString(utf8, wxConvUTF8)
 #else
@@ -62,7 +61,7 @@ class FileInfo;
 #endif
 #define ISUTF8 1
 
-#else // ENABLE_NLS && HAVE_GETTEXT && WIN32 && !HAVE_INCLUDED_GETTEXT
+#else // ENABLE_NLS && ENABLE_UTF8
 #if wxUSE_UNICODE
 #   define wxU(ansi) wxString(ansi, *wxConvCurrent)
 #else
index e06d88c043b15fd8e0222830c1cc6a4e4602c741..20530526d8a805b82eb2f12182367000575e865c 100644 (file)
@@ -2,7 +2,7 @@
  * libvlc.c: main libvlc source
  *****************************************************************************
  * Copyright (C) 1998-2004 VideoLAN
- * $Id: libvlc.c,v 1.115 2004/01/29 17:51:08 zorglub Exp $
+ * $Id: libvlc.c,v 1.116 2004/02/22 15:03:33 gbazin Exp $
  *
  * Authors: Vincent Seguin <seguin@via.ecp.fr>
  *          Samuel Hocevar <sam@zoy.org>
@@ -371,10 +371,7 @@ int VLC_Init( int i_object, int i_argc, char *ppsz_argv[] )
 
         textdomain( PACKAGE );
 
-#if defined( SYS_BEOS ) || defined ( SYS_DARWIN ) || \
-    ( defined( WIN32 ) && !defined( HAVE_INCLUDED_GETTEXT ) )
-        /* BeOS only support UTF8 strings */
-        /* Mac OS X prefers UTF8 */
+#if defined( ENABLE_UTF8 )
         bind_textdomain_codeset( PACKAGE, "UTF-8" );
 #endif
 
@@ -1209,10 +1206,7 @@ static void SetLanguage ( char const *psz_lang )
     /* Set the default domain */
     textdomain( PACKAGE );
 
-#if defined( SYS_BEOS ) || defined ( SYS_DARWIN ) || \
-    ( defined( WIN32 ) && !defined( HAVE_INCLUDED_GETTEXT ) )
-    /* BeOS only support UTF8 strings */
-    /* Mac OS X prefers UTF8 */
+#if defined( ENABLE_UTF8 )
     bind_textdomain_codeset( PACKAGE, "UTF-8" );
 #endif