[MPlayer-cvslog] r29363 - trunk/configure
diego
subversion at mplayerhq.hu
Sun Jun 14 16:55:02 CEST 2009
Author: diego
Date: Sun Jun 14 16:55:01 2009
New Revision: 29363
Log:
Overhaul translation handling completely and add options to install specific
documentation and man page translations.
Modified:
trunk/configure
Modified: trunk/configure
==============================================================================
--- trunk/configure Sun Jun 14 15:25:54 2009 (r29362)
+++ trunk/configure Sun Jun 14 16:55:01 2009 (r29363)
@@ -425,6 +425,20 @@ Audio output:
--disable-coreaudio disable CoreAudio audio output [autodetect]
--disable-select disable using select() on the audio device [enable]
+Language options:
+ --charset=charset convert the console messages to this character set
+ --language-doc=lang language to use for the documentation [en]
+ --language-man=lang language to use for the man pages [en]
+ --language-msg=lang language to use for the messages and the GUI [en]
+ --language=lang default language to use [en]
+Specific options override --language. You can pass a list of languages separated
+by whitespace or commas instead of a single language. Nonexisting translations
+will be dropped from each list. All documentation and man page translations
+available in the list will be installed, for the messages the first available
+translation will be used. The value "all" will activate all translations. The
+LINGUAS environment variable is honored. In all cases the fallback is English.
+Available values are: all $msg_lang_all
+
Miscellaneous options:
--enable-runtime-cpudetection enable runtime CPU detection [disable]
--enable-cross-compile enable cross-compilation [autodetect]
@@ -438,12 +452,6 @@ Miscellaneous options:
--windres=WINDRES windres to build MPlayer [windres]
--target=PLATFORM target platform (i386-linux, arm-linux, etc)
--enable-static build a statically linked binary
- --charset=charset convert the console messages to this character set
- --language-msg=LINGUA language used for messages and the GUI [en]
- --language=list a white space or comma separated list of languages for
- translated man pages (the environment variable
- \$LINGUAS is also honored) [en]
- (Available: all $msg_lang_all)
--with-install=PATH path to a custom install program
Advanced options:
@@ -849,6 +857,12 @@ for ac_option do
--charset=*)
_charset=$(echo $ac_option | cut -d '=' -f 2)
;;
+ --language-doc=*)
+ language_doc=$(echo $ac_option | cut -d '=' -f 2)
+ ;;
+ --language-man=*)
+ language_man=$(echo $ac_option | cut -d '=' -f 2)
+ ;;
--language-msg=*)
language_msg=$(echo $ac_option | cut -d '=' -f 2)
;;
@@ -2793,41 +2807,40 @@ echores "$_langinfo"
echocheck "language"
+# Set preferred languages, "all" uses English as main language.
test -z "$language" && language=$LINGUAS
-test -z "$language_msg" && language_msg=$LINGUAS
-language=$(echo $language | tr , " ")
+test -z "$language_doc" && language_doc=$language
+test -z "$language_man" && language_man=$language
+test -z "$language_msg" && language_msg=$language
+language_doc=$(echo $language_doc | tr , " ")
+language_man=$(echo $language_man | tr , " ")
language_msg=$(echo $language_msg | tr , " ")
-if $(echo $language | grep -q all) ; then
- doc_lang=en ; doc_langs=$doc_lang_all
- man_lang=en ; man_langs=$man_lang_all
-else
- for lang in $language ; do
- if test -d DOCS/man/$lang ; then
- tmp_man_langs="$tmp_man_langs $lang"
- fi
- if test -d DOCS/xml/$lang ; then
- tmp_doc_langs="$tmp_doc_langs $lang"
- fi
- done
- man_langs=$tmp_man_langs
- doc_langs=$tmp_man_langs
- for lang in $language_msg ; do
- if test -f "help/help_mp-${lang}.h" ; then
- msg_lang=$lang
- break
- else
- echo ${_echo_n} "$lang not found, ${_echo_c}"
- language_msg=$(echo $language_msg | sed "s/$lang *//")
- fi
- done
-fi
-test -z "$doc_langs" && doc_langs=en
-test -z "$man_langs" && man_langs=en
-test -z "$doc_lang" && doc_lang=$(echo $doc_langs | cut -f1 -d" ")
-test -z "$man_lang" && man_lang=$(echo $man_langs | cut -f1 -d" ")
-test -z "$msg_lang" && msg_lang=en
-_mp_help="help/help_mp-${msg_lang}.h"
-echores "messages: $msg_lang - man pages: $man_langs - documentation: $doc_langs"
+
+test "$language_doc" = "all" && language_doc=$doc_lang_all
+test "$language_man" = "all" && language_man=$man_lang_all
+test "$language_msg" = "all" && language_msg=en
+
+# Prune non-existing translations from language lists.
+# Set message translation to the first available language.
+# Fall back on English.
+for lang in $language_doc ; do
+ test -d DOCS/xml/$lang && tmp_language_doc="$tmp_language_doc $lang"
+done
+language_doc=$tmp_language_doc
+test -z "language_doc" && language_doc=en
+
+for lang in $language_man ; do
+ test -d DOCS/man/$lang && tmp_language_man="$tmp_language_man $lang"
+done
+language_man=$tmp_language_man
+test -z "language_man" && language_man=en
+
+for lang in $language_msg ; do
+ test -f "help/help_mp-${lang}.h" && language_msg=$lang && break
+done
+test -z "language_msg" && language_msg=en
+_mp_help="help/help_mp-${language_msg}.h"
+echores "messages: $language_msg - man pages: $language_man - documentation: $language_doc"
echocheck "enable sighandler"
@@ -8113,10 +8126,8 @@ export LC_ALL = C
CONFIGURATION = $_configuration
CHARSET = $_charset
-DOC_LANG = $doc_lang
DOC_LANGS = $doc_langs
DOC_LANG_ALL = $doc_lang_all
-MAN_LANG = $man_lang
MAN_LANGS = $man_langs
MAN_LANG_ALL = $man_lang_all
@@ -8910,8 +8921,9 @@ Config files successfully generated by .
Optimizing for: $_optimizing
Languages:
- Messages/GUI: $msg_lang
- Manual pages: $man_langs
+ Messages/GUI: $language_msg
+ Manual pages: $language_man
+ Documentation: $language_doc
Enabled optional drivers:
Input: $_inputmodules
More information about the MPlayer-cvslog
mailing list