Mercurial > mplayer.hg
comparison configure @ 2151:a9d91476085a
modifications to use iconv(3) function to recode text of subs (autodetect)
added option -subcp <cpname> # for example cp1250, latin2 etc.
author | atlka |
---|---|
date | Wed, 10 Oct 2001 13:07:42 +0000 |
parents | 6358db6ad3d0 |
children | 5c80d1b16523 |
comparison
equal
deleted
inserted
replaced
2150:93e0ed86705e | 2151:a9d91476085a |
---|---|
158 | 158 |
159 --enable-termcap use termcap database for key codes | 159 --enable-termcap use termcap database for key codes |
160 --enable-xmmp use XMMP audio drivers | 160 --enable-xmmp use XMMP audio drivers |
161 --enable-lirc enable LIRC (remote control) support | 161 --enable-lirc enable LIRC (remote control) support |
162 | 162 |
163 --disable-iconv do not use iconv(3) function [autodetect] | |
163 --disable-ossaudio disable OSS sound support [autodetect] | 164 --disable-ossaudio disable OSS sound support [autodetect] |
164 --disable-alsa disable alsa sound support [autodetect] | 165 --disable-alsa disable alsa sound support [autodetect] |
165 --disable-esd disable esd sound support [autodetect] | 166 --disable-esd disable esd sound support [autodetect] |
166 --disable-sunaudio disable Sun sound support [autodetect] | 167 --disable-sunaudio disable Sun sound support [autodetect] |
167 | 168 |
901 else | 902 else |
902 $_cc $TMPC -o $TMPO $_x11libdir -lX11 -lXext -lGL -lm $_socklib > /dev/null 2>&1 && _gl=yes | 903 $_cc $TMPC -o $TMPO $_x11libdir -lX11 -lXext -lGL -lm $_socklib > /dev/null 2>&1 && _gl=yes |
903 fi | 904 fi |
904 | 905 |
905 cat > $TMPC << EOF | 906 cat > $TMPC << EOF |
907 #include <stdio.h> | |
908 #include <unistd.h> | |
909 #include <iconv.h> | |
910 | |
911 #define INBUFSIZE 1024 | |
912 #define OUTBUFSIZE 4096 | |
913 | |
914 char inbuffer[INBUFSIZE]; | |
915 char outbuffer[OUTBUFSIZE]; | |
916 | |
917 main() | |
918 { ssize_t numread; | |
919 iconv_t icdsc; | |
920 char *tocode="UTF-8"; | |
921 char *fromcode="cp1250"; | |
922 if ((icdsc = iconv_open (tocode, fromcode)) != (iconv_t)(-1)){ | |
923 while ((numread = read (0, inbuffer, INBUFSIZE))){ | |
924 char *iptr=inbuffer; | |
925 char *optr=outbuffer; | |
926 size_t inleft=numread; | |
927 size_t outleft=OUTBUFSIZE; | |
928 if (iconv (icdsc, | |
929 (const char **)&iptr, &inleft, &optr, &outleft) | |
930 !=(size_t)(-1)){ | |
931 write (1, outbuffer, OUTBUFSIZE - outleft); | |
932 } | |
933 } | |
934 if (iconv_close (icdsc) == -1) ; | |
935 } | |
936 } | |
937 | |
938 EOF | |
939 _iconv=yes | |
940 $_cc $TMPC -o $TMPO -lm > /dev/null 2>&1 || \ | |
941 { _iconv=no ; echo "iconv(3) function not detected!" ;} | |
942 cat > $TMPC << EOF | |
906 #include <GL/gl.h> | 943 #include <GL/gl.h> |
907 int main( void ) { return 0; } | 944 int main( void ) { return 0; } |
908 EOF | 945 EOF |
909 # this is not yet checked with OpenBSD - atmos | 946 # this is not yet checked with OpenBSD - atmos |
910 if [ "$system_name" = "FreeBSD" -o "$system_name" = "OpenBSD" ]; then | 947 if [ "$system_name" = "FreeBSD" -o "$system_name" = "OpenBSD" ]; then |
1214 _syncfb=yes | 1251 _syncfb=yes |
1215 ;; | 1252 ;; |
1216 --enable-fbdev) | 1253 --enable-fbdev) |
1217 _fbdev=yes | 1254 _fbdev=yes |
1218 ;; | 1255 ;; |
1256 --enable-iconv) | |
1257 _iconv=yes | |
1258 ;; | |
1219 --enable-mlib) | 1259 --enable-mlib) |
1220 _mlib=yes | 1260 _mlib=yes |
1221 ;; | 1261 ;; |
1222 --enable-vorbis) | 1262 --enable-vorbis) |
1223 _vorbis=yes | 1263 _vorbis=yes |
1323 --disable-dga2) | 1363 --disable-dga2) |
1324 _dga2=no | 1364 _dga2=no |
1325 ;; | 1365 ;; |
1326 --disable-fbdev) | 1366 --disable-fbdev) |
1327 _fbdev=no | 1367 _fbdev=no |
1368 ;; | |
1369 --disable-iconv) | |
1370 _iconv=no | |
1328 ;; | 1371 ;; |
1329 --disable-termcap) | 1372 --disable-termcap) |
1330 _termcap=no | 1373 _termcap=no |
1331 ;; | 1374 ;; |
1332 --disable-select) | 1375 --disable-select) |
1583 echo "Checking for DVDread support ... $_dvdread" | 1626 echo "Checking for DVDread support ... $_dvdread" |
1584 echo "Checking for PNG support ... $_png" | 1627 echo "Checking for PNG support ... $_png" |
1585 echo "Checking for OggVorbis support ... $_vorbis" | 1628 echo "Checking for OggVorbis support ... $_vorbis" |
1586 echo "Checking for Win32 DLL support ... $_win32dll" | 1629 echo "Checking for Win32 DLL support ... $_win32dll" |
1587 echo "Checking for DirectShow ... $_dshow" | 1630 echo "Checking for DirectShow ... $_dshow" |
1631 echo "Checking for iconv function ... $_iconv" | |
1588 | 1632 |
1589 # check if compiler supports C++ and C++-libs are installed correctly | 1633 # check if compiler supports C++ and C++-libs are installed correctly |
1590 if [ $_win32dll = yes -a $_dshow = yes ] ; then | 1634 if [ $_win32dll = yes -a $_dshow = yes ] ; then |
1591 cat > $TMPCPP << EOF | 1635 cat > $TMPCPP << EOF |
1592 /* very useful C++ test program by atmos */ | 1636 /* very useful C++ test program by atmos */ |
1840 if [ "$_xmmp" = "yes" ]; then | 1884 if [ "$_xmmp" = "yes" ]; then |
1841 _xmmpaudio='#define USE_XMMP_AUDIO' | 1885 _xmmpaudio='#define USE_XMMP_AUDIO' |
1842 _xmmplibs='-Llibxmm -lxmm' | 1886 _xmmplibs='-Llibxmm -lxmm' |
1843 else | 1887 else |
1844 _xmmpaudio='#undef USE_XMMP_AUDIO' | 1888 _xmmpaudio='#undef USE_XMMP_AUDIO' |
1889 fi | |
1890 | |
1891 if [ "$_iconv" = "yes" ]; then | |
1892 _iconv='#define USE_ICONV' | |
1893 else | |
1894 _iconv='#undef USE_ICONV' | |
1845 fi | 1895 fi |
1846 | 1896 |
1847 if [ "$_lirc" = "yes" ]; then | 1897 if [ "$_lirc" = "yes" ]; then |
1848 _lircdefs='#define HAVE_LIRC' | 1898 _lircdefs='#define HAVE_LIRC' |
1849 _lirclibs='-llirc_client' | 1899 _lirclibs='-llirc_client' |
2276 | 2326 |
2277 /* Undefine this if your soundcard driver has no working select(). | 2327 /* Undefine this if your soundcard driver has no working select(). |
2278 If you have kernel Oops, player hangups, or just no audio, you should | 2328 If you have kernel Oops, player hangups, or just no audio, you should |
2279 try to recompile MPlayer with this option disabled! */ | 2329 try to recompile MPlayer with this option disabled! */ |
2280 $_select | 2330 $_select |
2331 | |
2332 /* define this to use iconv(3) function to codepage conversions */ | |
2333 $_iconv | |
2281 | 2334 |
2282 /* XMMP support: (test code) */ | 2335 /* XMMP support: (test code) */ |
2283 $_xmmpaudio | 2336 $_xmmpaudio |
2284 #define LIBDIR "/usr/local/lib" | 2337 #define LIBDIR "/usr/local/lib" |
2285 #define PLUGINDIR LIBDIR "/xmmp/Plugins" | 2338 #define PLUGINDIR LIBDIR "/xmmp/Plugins" |