Index: configure =================================================================== RCS file: /cvsroot/mplayer/main/configure,v retrieving revision 1.710 diff -u -r1.710 configure --- configure 21 May 2003 21:15:46 -0000 1.710 +++ configure 23 May 2003 13:53:19 -0000 @@ -1092,6 +1092,7 @@ _macosx=auto _sortsub=yes _freetypeconfig='freetype-config' +_gnu_bindtextdomain=auto _fribidi=no _fribidiconfig='fribidi-config' _inet6=auto @@ -1679,6 +1680,23 @@ echores "$_setlocale" +echocheck "GNU bindtextdomain()" +if test "$_gnu_bindtextdomain" = auto ; then + cat > $TMPC < +int main(void) { printf("%s\n", bindtextdomain( "no","yes" )); return 0; } +EOF + cc_check $_i18n_libs && _gnu_bindtextdomain=`$TMPO` +fi +if test "$_gnu_bindtextdomain" = yes ; then + _def_gnu_bindtextdomain='#define HAVE_GNU_BINDTEXTDOMAIN' +else + _gnu_bindtextdomain=no + _def_gnu_bindtextdomain='#undef HAVE_GNU_BINDTEXTDOMAIN' +fi +echores "$_gnu_bindtextdomain" + + echocheck "language" test -z "$_language" && _language=$LINGUAS _language=`echo $_language | sed 's/,/ /g'` @@ -5355,6 +5373,9 @@ /* use setlocale() function */ $_def_setlocale + +/* have GNU bindtextdomain */ +$_def_gnu_bindtextdomain /* Runtime CPU detection */ $_def_runtime_cpudetection Index: mp_msg.c =================================================================== RCS file: /cvsroot/mplayer/main/mp_msg.c,v retrieving revision 1.22 diff -u -r1.22 mp_msg.c --- mp_msg.c 27 Dec 2002 16:17:57 -0000 1.22 +++ mp_msg.c 23 May 2003 13:53:19 -0000 @@ -33,12 +33,16 @@ #ifdef USE_I18N fprintf(stdout, "Using GNU internationalization\n"); fprintf(stdout, "Original domain: %s\n", textdomain(NULL)); +#ifdef HAVE_GNU_BINDTEXTDOMAIN fprintf(stdout, "Original dirname: %s\n", bindtextdomain(textdomain(NULL),NULL)); +#endif setlocale(LC_ALL, ""); /* set from the environment variables */ bindtextdomain("mplayer", PREFIX"/share/locale"); textdomain("mplayer"); fprintf(stdout, "Current domain: %s\n", textdomain(NULL)); +#ifdef HAVE_GNU_BINDTEXTDOMAIN fprintf(stdout, "Current dirname: %s\n", bindtextdomain(textdomain(NULL),NULL)); +#endif #endif mp_msg_set_level(MSGL_STATUS); }