Commit 29670af1 authored by Sam Hocevar's avatar Sam Hocevar

  * Changed debian/control to fix Debian bug #83707
  * Added a --disable-css configure option
  * Moved some code here and there in the DVD plugin to make it easier
    for me to build the Debian CSS-free packages.
parent 4ebb78dd
......@@ -487,7 +487,7 @@ show:
# ugliest of all, but I have no time to do it -- sam
snapshot:
rm -rf /tmp/vlc-@VLC_VERSION@ /tmp/vlc-@VLC_VERSION@nocss
rm -rf /tmp/vlc-@VLC_VERSION@* /tmp/vlc-@VLC_VERSION@nocss*
# copy archive in /tmp
find -type d | while read i ; \
do mkdir -p /tmp/vlc-@VLC_VERSION@/$$i ; \
......@@ -507,7 +507,7 @@ snapshot:
Makefile.in Makefile.dep configure configure.in install-sh \
config.sub config.guess todo.pl \
/tmp/vlc-@VLC_VERSION@/
for file in control vlc-gnome.menu vlc.copyright vlc.docs changelog \
for file in control vlc-gtk.menu vlc.copyright vlc.docs changelog \
rules vlc.1 vlc.dirs vlc.menu ; do \
cp debian/$$file /tmp/vlc-@VLC_VERSION@/debian/ ; done
for file in default8x16.psf default8x9.psf gvlc.png vlc.png ; do \
......@@ -521,28 +521,28 @@ snapshot:
mv /tmp/vlc-@VLC_VERSION@.tar.gz /tmp/vlc-@VLC_VERSION@.tar.bz2 ..
# removing CSS stuff
# find /tmp/vlc-@VLC_VERSION@ -type f -name '*css*' | xargs rm -f
# for x in Makefile.in src/input/input_dvd.c src/input/input_dvd.h ; do \
# rm -f /tmp/vlc-@VLC_VERSION@/$$x ; \
# perl -ne 'if (/^#e(lse|ndif)/) { $$i=0; } \
# if (/^#if.*DVD/) { $$i=1; print "#if 0\n"; } \
# elsif (!$$i || /^#/) { print $$_; }' \
# < $$x | grep -vi css >| /tmp/vlc-@VLC_VERSION@/$$x ; \
# done
# rm -f /tmp/vlc-@VLC_VERSION@/debian/changelog
# sed 's/\(^vlc ([^-]*\)-/\1nocss-/' < debian/changelog \
# > /tmp/vlc-@VLC_VERSION@/debian/changelog
#
# # build nocss archives
# (cd /tmp ; mv vlc-@VLC_VERSION@ vlc-@VLC_VERSION@nocss ; \
# tar cf vlc-@VLC_VERSION@nocss.tar vlc-@VLC_VERSION@nocss ; \
# bzip2 -f -9 < vlc-@VLC_VERSION@nocss.tar \
# > vlc-@VLC_VERSION@nocss.tar.bz2 ; \
# gzip -f -9 vlc-@VLC_VERSION@nocss.tar )
# mv /tmp/vlc-@VLC_VERSION@nocss.tar.gz \
# /tmp/vlc-@VLC_VERSION@nocss.tar.bz2 ..
#
# # clean up
for x in plugins/dvd/dvd.c plugins/dvd/dvd_css.c ; do \
rm -f /tmp/vlc-@VLC_VERSION@/$$x ; \
perl -ne 'if (/^#e(lse|ndif).*HAVE_CSS/) { $$i=0; } \
if (/^#if.*HAVE_CSS/) { $$i=1; } \
elsif (!$$i && !/^#.*HAVE_CSS/) { print $$_; }' \
< $$x >| /tmp/vlc-@VLC_VERSION@/$$x ; \
done
rm -f /tmp/vlc-@VLC_VERSION@/plugins/dvd/dvd_csstables.c
rm -f /tmp/vlc-@VLC_VERSION@/debian/changelog
sed 's/\(^vlc ([^-]*\)-/\1nocss-/' < debian/changelog \
> /tmp/vlc-@VLC_VERSION@/debian/changelog
# build nocss archives
(cd /tmp ; mv vlc-@VLC_VERSION@ vlc-@VLC_VERSION@nocss ; \
tar cf vlc-@VLC_VERSION@nocss.tar vlc-@VLC_VERSION@nocss ; \
bzip2 -f -9 < vlc-@VLC_VERSION@nocss.tar \
> vlc-@VLC_VERSION@nocss.tar.bz2 ; \
gzip -f -9 vlc-@VLC_VERSION@nocss.tar )
mv /tmp/vlc-@VLC_VERSION@nocss.tar.gz \
/tmp/vlc-@VLC_VERSION@nocss.tar.bz2 ..
# clean up
rm -rf /tmp/vlc-@VLC_VERSION@*
plugins: $(PLUGINS:%=lib/%.so)
......
......@@ -15,6 +15,8 @@ ac_help="$ac_help
--disable-ppro Disable PentiumPro optimizations (default enabled for x86)"
ac_help="$ac_help
--disable-mmx Disable MMX optimizations (default enabled for x86)"
ac_help="$ac_help
--disable-css Disable DVD CSS decryption (default enabled)"
ac_help="$ac_help
--enable-debug Enable debug mode (default disabled)"
ac_help="$ac_help
......@@ -587,7 +589,7 @@ else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
fi
echo $ac_n "checking host system type""... $ac_c" 1>&6
echo "configure:591: checking host system type" >&5
echo "configure:593: checking host system type" >&5
host_alias=$host
case "$host_alias" in
......@@ -614,7 +616,7 @@ VLC_CODENAME=Urumov
echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
echo "configure:618: checking whether ${MAKE-make} sets \${MAKE}" >&5
echo "configure:620: checking whether ${MAKE-make} sets \${MAKE}" >&5
set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
......@@ -644,7 +646,7 @@ if test -z "$CC"; then
# Extract the first word of "gcc", so it can be a program name with args.
set dummy gcc; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:648: checking for $ac_word" >&5
echo "configure:650: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
......@@ -674,7 +676,7 @@ if test -z "$CC"; then
# Extract the first word of "cc", so it can be a program name with args.
set dummy cc; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:678: checking for $ac_word" >&5
echo "configure:680: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
......@@ -725,7 +727,7 @@ fi
# Extract the first word of "cl", so it can be a program name with args.
set dummy cl; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:729: checking for $ac_word" >&5
echo "configure:731: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
......@@ -757,7 +759,7 @@ fi
fi
echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
echo "configure:761: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
echo "configure:763: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
ac_ext=c
# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
......@@ -768,12 +770,12 @@ cross_compiling=$ac_cv_prog_cc_cross
cat > conftest.$ac_ext << EOF
#line 772 "configure"
#line 774 "configure"
#include "confdefs.h"
main(){return(0);}
EOF
if { (eval echo configure:777: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
if { (eval echo configure:779: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
ac_cv_prog_cc_works=yes
# If we can't run a trivial program, we are probably using a cross compiler.
if (./conftest; exit) 2>/dev/null; then
......@@ -799,12 +801,12 @@ if test $ac_cv_prog_cc_works = no; then
{ echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
fi
echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
echo "configure:803: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
echo "configure:805: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
cross_compiling=$ac_cv_prog_cc_cross
echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
echo "configure:808: checking whether we are using GNU C" >&5
echo "configure:810: checking whether we are using GNU C" >&5
if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
......@@ -813,7 +815,7 @@ else
yes;
#endif
EOF
if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:817: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:819: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
ac_cv_prog_gcc=yes
else
ac_cv_prog_gcc=no
......@@ -832,7 +834,7 @@ ac_test_CFLAGS="${CFLAGS+set}"
ac_save_CFLAGS="$CFLAGS"
CFLAGS=
echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
echo "configure:836: checking whether ${CC-cc} accepts -g" >&5
echo "configure:838: checking whether ${CC-cc} accepts -g" >&5
if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
......@@ -866,7 +868,7 @@ fi
fi
if test -z "$CPP"; then
echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
echo "configure:870: checking how to run the C preprocessor" >&5
echo "configure:872: checking how to run the C preprocessor" >&5
# On Suns, sometimes $CPP names a directory.
if test -n "$CPP" && test -d "$CPP"; then
CPP=
......@@ -881,13 +883,13 @@ else
# On the NeXT, cc -E runs the code through the compiler's parser,
# not just through cpp.
cat > conftest.$ac_ext <<EOF
#line 885 "configure"
#line 887 "configure"
#include "confdefs.h"
#include <assert.h>
Syntax Error
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:891: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
{ (eval echo configure:893: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
:
......@@ -898,13 +900,13 @@ else
rm -rf conftest*
CPP="${CC-cc} -E -traditional-cpp"
cat > conftest.$ac_ext <<EOF
#line 902 "configure"
#line 904 "configure"
#include "confdefs.h"
#include <assert.h>
Syntax Error
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:908: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
{ (eval echo configure:910: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
:
......@@ -915,13 +917,13 @@ else
rm -rf conftest*
CPP="${CC-cc} -nologo -E"
cat > conftest.$ac_ext <<EOF
#line 919 "configure"
#line 921 "configure"
#include "confdefs.h"
#include <assert.h>
Syntax Error
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:925: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
{ (eval echo configure:927: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
:
......@@ -959,7 +961,7 @@ fi
# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
# ./install, which can be erroneously created by make from ./install.sh.
echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
echo "configure:963: checking for a BSD compatible install" >&5
echo "configure:965: checking for a BSD compatible install" >&5
if test -z "$INSTALL"; then
if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
......@@ -1013,12 +1015,12 @@ test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
echo $ac_n "checking for working const""... $ac_c" 1>&6
echo "configure:1017: checking for working const" >&5
echo "configure:1019: checking for working const" >&5
if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 1022 "configure"
#line 1024 "configure"
#include "confdefs.h"
int main() {
......@@ -1067,7 +1069,7 @@ ccp = (char const *const *) p;
; return 0; }
EOF
if { (eval echo configure:1071: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
if { (eval echo configure:1073: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_c_const=yes
else
......@@ -1088,14 +1090,14 @@ EOF
fi
echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
echo "configure:1092: checking whether byte ordering is bigendian" >&5
echo "configure:1094: checking whether byte ordering is bigendian" >&5
if eval "test \"`echo '$''{'ac_cv_c_bigendian'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
ac_cv_c_bigendian=unknown
# See if sys/param.h defines the BYTE_ORDER macro.
cat > conftest.$ac_ext <<EOF
#line 1099 "configure"
#line 1101 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <sys/param.h>
......@@ -1106,11 +1108,11 @@ int main() {
#endif
; return 0; }
EOF
if { (eval echo configure:1110: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
if { (eval echo configure:1112: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
# It does; now see whether it defined to BIG_ENDIAN or not.
cat > conftest.$ac_ext <<EOF
#line 1114 "configure"
#line 1116 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <sys/param.h>
......@@ -1121,7 +1123,7 @@ int main() {
#endif
; return 0; }
EOF
if { (eval echo configure:1125: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
if { (eval echo configure:1127: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_c_bigendian=yes
else
......@@ -1141,7 +1143,7 @@ if test "$cross_compiling" = yes; then
{ echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
else
cat > conftest.$ac_ext <<EOF
#line 1145 "configure"
#line 1147 "configure"
#include "confdefs.h"
main () {
/* Are we little or big endian? From Harbison&Steele. */
......@@ -1154,7 +1156,7 @@ main () {
exit (u.c[sizeof (long) - 1] == 1);
}
EOF
if { (eval echo configure:1158: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
if { (eval echo configure:1160: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
ac_cv_c_bigendian=no
else
......@@ -1179,9 +1181,9 @@ fi
echo $ac_n "checking whether compiler accepts bswap x86 instruction""... $ac_c" 1>&6
echo "configure:1183: checking whether compiler accepts bswap x86 instruction" >&5
echo "configure:1185: checking whether compiler accepts bswap x86 instruction" >&5
cat > conftest.$ac_ext <<EOF
#line 1185 "configure"
#line 1187 "configure"
#include "confdefs.h"
unsigned int foo( unsigned int x )
{ __asm__("bswap %0" : "=r" (x) : "0" (x)); return x; }
......@@ -1189,7 +1191,7 @@ int main() {
; return 0; }
EOF
if { (eval echo configure:1193: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
if { (eval echo configure:1195: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
cat >> confdefs.h <<\EOF
#define HAVE_X86_BSWAP 1
......@@ -1206,12 +1208,12 @@ rm -f conftest*
for ac_func in gettimeofday select strerror strtod strtol
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
echo "configure:1210: checking for $ac_func" >&5
echo "configure:1212: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 1215 "configure"
#line 1217 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
......@@ -1234,7 +1236,7 @@ $ac_func();
; return 0; }
EOF
if { (eval echo configure:1238: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
if { (eval echo configure:1240: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
......@@ -1261,12 +1263,12 @@ done
for ac_func in setenv putenv
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
echo "configure:1265: checking for $ac_func" >&5
echo "configure:1267: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 1270 "configure"
#line 1272 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
......@@ -1289,7 +1291,7 @@ $ac_func();
; return 0; }
EOF
if { (eval echo configure:1293: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
if { (eval echo configure:1295: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
......@@ -1314,12 +1316,12 @@ fi
done
echo $ac_n "checking for connect""... $ac_c" 1>&6
echo "configure:1318: checking for connect" >&5
echo "configure:1320: checking for connect" >&5
if eval "test \"`echo '$''{'ac_cv_func_connect'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 1323 "configure"
#line 1325 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char connect(); below. */
......@@ -1342,7 +1344,7 @@ connect();
; return 0; }
EOF
if { (eval echo configure:1346: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
if { (eval echo configure:1348: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_connect=yes"
else
......@@ -1360,7 +1362,7 @@ if eval "test \"`echo '$ac_cv_func_'connect`\" = yes"; then
else
echo "$ac_t""no" 1>&6
echo $ac_n "checking for connect in -lsocket""... $ac_c" 1>&6
echo "configure:1364: checking for connect in -lsocket" >&5
echo "configure:1366: checking for connect in -lsocket" >&5
ac_lib_var=`echo socket'_'connect | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
......@@ -1368,7 +1370,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lsocket $LIBS"
cat > conftest.$ac_ext <<EOF
#line 1372 "configure"
#line 1374 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
......@@ -1379,7 +1381,7 @@ int main() {
connect()
; return 0; }
EOF
if { (eval echo configure:1383: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
if { (eval echo configure:1385: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
......@@ -1409,12 +1411,12 @@ fi
fi
echo $ac_n "checking for gethostbyname""... $ac_c" 1>&6
echo "configure:1413: checking for gethostbyname" >&5
echo "configure:1415: checking for gethostbyname" >&5
if eval "test \"`echo '$''{'ac_cv_func_gethostbyname'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 1418 "configure"
#line 1420 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char gethostbyname(); below. */
......@@ -1437,7 +1439,7 @@ gethostbyname();
; return 0; }
EOF
if { (eval echo configure:1441: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
if { (eval echo configure:1443: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_gethostbyname=yes"
else
......@@ -1455,7 +1457,7 @@ if eval "test \"`echo '$ac_cv_func_'gethostbyname`\" = yes"; then
else
echo "$ac_t""no" 1>&6
echo $ac_n "checking for gethostbyname in -lnsl""... $ac_c" 1>&6
echo "configure:1459: checking for gethostbyname in -lnsl" >&5
echo "configure:1461: checking for gethostbyname in -lnsl" >&5
ac_lib_var=`echo nsl'_'gethostbyname | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
......@@ -1463,7 +1465,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lnsl $LIBS"
cat > conftest.$ac_ext <<EOF
#line 1467 "configure"
#line 1469 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
......@@ -1474,7 +1476,7 @@ int main() {
gethostbyname()
; return 0; }
EOF
if { (eval echo configure:1478: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
if { (eval echo configure:1480: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
......@@ -1504,12 +1506,12 @@ fi
fi
echo $ac_n "checking for nanosleep""... $ac_c" 1>&6
echo "configure:1508: checking for nanosleep" >&5
echo "configure:1510: checking for nanosleep" >&5
if eval "test \"`echo '$''{'ac_cv_func_nanosleep'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 1513 "configure"
#line 1515 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char nanosleep(); below. */
......@@ -1532,7 +1534,7 @@ nanosleep();
; return 0; }
EOF
if { (eval echo configure:1536: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
if { (eval echo configure:1538: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_nanosleep=yes"
else
......@@ -1550,7 +1552,7 @@ if eval "test \"`echo '$ac_cv_func_'nanosleep`\" = yes"; then
else
echo "$ac_t""no" 1>&6
echo $ac_n "checking for nanosleep in -lrt""... $ac_c" 1>&6
echo "configure:1554: checking for nanosleep in -lrt" >&5
echo "configure:1556: checking for nanosleep in -lrt" >&5
ac_lib_var=`echo rt'_'nanosleep | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
......@@ -1558,7 +1560,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lrt $LIBS"
cat > conftest.$ac_ext <<EOF
#line 1562 "configure"
#line 1564 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
......@@ -1569,7 +1571,7 @@ int main() {
nanosleep()
; return 0; }
EOF
if { (eval echo configure:1573: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
if { (eval echo configure:1575: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
......@@ -1595,7 +1597,7 @@ EOF
else
echo "$ac_t""no" 1>&6
echo $ac_n "checking for nanosleep in -lposix4""... $ac_c" 1>&6
echo "configure:1599: checking for nanosleep in -lposix4" >&5
echo "configure:1601: checking for nanosleep in -lposix4" >&5
ac_lib_var=`echo posix4'_'nanosleep | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
......@@ -1603,7 +1605,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lposix4 $LIBS"
cat > conftest.$ac_ext <<EOF
#line 1607 "configure"
#line 1609 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
......@@ -1614,7 +1616,7 @@ int main() {
nanosleep()
; return 0; }
EOF
if { (eval echo configure:1618: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
if { (eval echo configure:1620: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
......@@ -1648,12 +1650,12 @@ fi
for ac_func in usleep
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
echo "configure:1652: checking for $ac_func" >&5
echo "configure:1654: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 1657 "configure"
#line 1659 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
......@@ -1676,7 +1678,7 @@ $ac_func();
; return 0; }
EOF
if { (eval echo configure:1680: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
if { (eval echo configure:1682: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
......@@ -1701,12 +1703,12 @@ fi
done
echo $ac_n "checking for inet_aton""... $ac_c" 1>&6
echo "configure:1705: checking for inet_aton" >&5
echo "configure:1707: checking for inet_aton" >&5
if eval "test \"`echo '$''{'ac_cv_func_inet_aton'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 1710 "configure"
#line 1712 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char inet_aton(); below. */
......@@ -1729,7 +1731,7 @@ inet_aton();
; return 0; }
EOF
if { (eval echo configure:1733: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
if { (eval echo configure:1735: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_inet_aton=yes"
else
......@@ -1747,7 +1749,7 @@ if eval "test \"`echo '$ac_cv_func_'inet_aton`\" = yes"; then
else
echo "$ac_t""no" 1>&6
echo $ac_n "checking for inet_aton in -lresolv""... $ac_c" 1>&6
echo "configure:1751: checking for inet_aton in -lresolv" >&5
echo "configure:1753: checking for inet_aton in -lresolv" >&5
ac_lib_var=`echo resolv'_'inet_aton | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
......@@ -1755,7 +1757,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lresolv $LIBS"
cat > conftest.$ac_ext <<EOF
#line 1759 "configure"
#line 1761 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
......@@ -1766,7 +1768,7 @@ int main() {
inet_aton()
; return 0; }
EOF
if { (eval echo configure:1770: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
if { (eval echo configure:1772: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
......@@ -1798,12 +1800,12 @@ fi
for ac_func in vasprintf
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
echo "configure:1802: checking for $ac_func" >&5
echo "configure:1804: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 1807 "configure"
#line 1809 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
......@@ -1826,7 +1828,7 @@ $ac_func();
; return 0; }
EOF
if { (eval echo configure:1830: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
if { (eval echo configure:1832: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
......@@ -1854,17 +1856,17 @@ for ac_hdr in unistd.h
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
echo "configure:1858: checking for $ac_hdr" >&5
echo "configure:1860: checking for $ac_hdr" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 1863 "configure"
#line 1865 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:1868: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
{ (eval echo configure:1870: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
......@@ -1893,12 +1895,12 @@ done
for ac_func in getpagesize
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
echo "configure:1897: checking for $ac_func" >&5
echo "configure:1899: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 1902 "configure"
#line 1904 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
......@@ -1921,7 +1923,7 @@ $ac_func();
; return 0; }
EOF
if { (eval echo configure:1925: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
if { (eval echo configure:1927: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
......@@ -1946,7 +1948,7 @@ fi
done
echo $ac_n "checking for working mmap""... $ac_c" 1>&6
echo "configure:1950: checking for working mmap" >&5
echo "configure:1952: checking for working mmap" >&5
if eval "test \"`echo '$''{'ac_cv_func_mmap_fixed_mapped'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
......@@ -1954,7 +1956,7 @@ else
ac_cv_func_mmap_fixed_mapped=no
else
cat > conftest.$ac_ext <<EOF
#line 1958 "configure"
#line 1960 "configure"
#include "confdefs.h"
/* Thanks to Mike Haertel and Jim Avera for this test.
......@@ -2094,7 +2096,7 @@ main()
}
EOF
if { (eval echo configure:2098: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
if { (eval echo configure:2100: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
ac_cv_func_mmap_fixed_mapped=yes
else
......@@ -2117,12 +2119,12 @@ EOF
fi
echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
echo "configure:2121: checking return type of signal handlers" >&5
echo "configure:2123: checking return type of signal handlers" >&5
if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 2126 "configure"
#line 2128 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <signal.h>
......@@ -2139,7 +2141,7 @@ int main() {
int i;
; return 0; }
EOF
if { (eval echo configure:2143: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
if { (eval echo configure:2145: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_type_signal=void
else
......@@ -2158,7 +2160,7 @@ EOF
echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
echo "configure:2162: checking for dlopen in -ldl" >&5
echo "configure:2164: checking for dlopen in -ldl" >&5
ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
......@@ -2166,7 +2168,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-ldl $LIBS"
cat > conftest.$ac_ext <<EOF
#line 2170 "configure"
#line 2172 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
......@@ -2177,7 +2179,7 @@ int main() {
dlopen()
; return 0; }
EOF
if { (eval echo configure:2181: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
if { (eval echo configure:2183: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
......@@ -2205,7 +2207,7 @@ else
fi
echo $ac_n "checking for optarg in -lgnugetopt""... $ac_c" 1>&6
echo "configure:2209: checking for optarg in -lgnugetopt" >&5
echo "configure:2211: checking for optarg in -lgnugetopt" >&5
ac_lib_var=`echo gnugetopt'_'optarg | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
......@@ -2213,7 +2215,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lgnugetopt $LIBS"
cat > conftest.$ac_ext <<EOF
#line 2217 "configure"
#line 2219 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
......@@ -2224,7 +2226,7 @@ int main() {
optarg()
; return 0; }
EOF
if { (eval echo configure:2228: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
if { (eval echo configure:2230: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
......@@ -2252,7 +2254,7 @@ else
fi
echo $ac_n "checking for _ in -lbe""... $ac_c" 1>&6
echo "configure:2256: checking for _ in -lbe" >&5
echo "configure:2258: checking for _ in -lbe" >&5
ac_lib_var=`echo be'_'_ | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
......@@ -2260,7 +2262,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lbe $LIBS"
cat > conftest.$ac_ext <<EOF
#line 2264 "configure"
#line 2266 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
......@@ -2271,7 +2273,7 @@ int main() {
_()
; return 0; }
EOF
if { (eval echo configure:2275: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
if { (eval echo configure:2277: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
......@@ -2299,7 +2301,7 @@ else
fi
echo $ac_n "checking for _ in -lgame""... $ac_c" 1>&6
echo "configure:2303: checking for _ in -lgame" >&5
echo "configure:2305: checking for _ in -lgame" >&5
ac_lib_var=`echo game'_'_ | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
......@@ -2307,7 +2309,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lgame $LIBS"
cat > conftest.$ac_ext <<EOF
#line 2311 "configure"
#line 2313 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
......@@ -2318,7 +2320,7 @@ int main() {
_()
; return 0; }
EOF
if { (eval echo configure:2322: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
if { (eval echo configure:2324: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
......@@ -2346,7 +2348,7 @@ else
fi
echo $ac_n "checking for _ in -lroot""... $ac_c" 1>&6
echo "configure:2350: checking for _ in -lroot" >&5
echo "configure:2352: checking for _ in -lroot" >&5
ac_lib_var=`echo root'_'_ | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
......@@ -2354,7 +2356,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lroot $LIBS"
cat > conftest.$ac_ext <<EOF
#line 2358 "configure"
#line 2360 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
......@@ -2365,7 +2367,7 @@ int main() {
_()
; return 0; }
EOF
if { (eval echo configure:2369: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
if { (eval echo configure:2371: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
......@@ -2393,7 +2395,7 @@ else
fi
echo $ac_n "checking for powl in -lm""... $ac_c" 1>&6
echo "configure:2397: checking for powl in -lm" >&5
echo "configure:2399: checking for powl in -lm" >&5
ac_lib_var=`echo m'_'powl | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
......@@ -2401,7 +2403,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lm $LIBS"
cat > conftest.$ac_ext <<EOF
#line 2405 "configure"
#line 2407 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
......@@ -2412,7 +2414,7 @@ int main() {
powl()
; return 0; }
EOF
if { (eval echo configure:2416: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
if { (eval echo configure:2418: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
......@@ -2440,7 +2442,7 @@ else
fi
echo $ac_n "checking for pthread_create in -lpthread""... $ac_c" 1>&6
echo "configure:2444: checking for pthread_create in -lpthread" >&5
echo "configure:2446: checking for pthread_create in -lpthread" >&5
ac_lib_var=`echo pthread'_'pthread_create | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
......@@ -2448,7 +2450,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lpthread $LIBS"
cat > conftest.$ac_ext <<EOF
#line 2452 "configure"
#line 2454 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
......@@ -2459,7 +2461,7 @@ int main() {
pthread_create()
; return 0; }
EOF
if { (eval echo configure:2463: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
if { (eval echo configure:2465: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
......@@ -2487,7 +2489,7 @@ else
fi
echo $ac_n "checking for thread_create in -lthreads""... $ac_c" 1>&6
echo "configure:2491: checking for thread_create in -lthreads" >&5
echo "configure:2493: checking for thread_create in -lthreads" >&5
ac_lib_var=`echo threads'_'thread_create | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
......@@ -2495,7 +2497,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lthreads $LIBS"
cat > conftest.$ac_ext <<EOF
#line 2499 "configure"
#line 2501 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
......@@ -2506,7 +2508,7 @@ int main() {
thread_create()
; return 0; }
EOF
if { (eval echo configure:2510: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
if { (eval echo configure:2512: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
......@@ -2535,12 +2537,12 @@ fi
echo $ac_n "checking for getopt_long""... $ac_c" 1>&6
echo "configure:2539: checking for getopt_long" >&5
echo "configure:2541: checking for getopt_long" >&5
if eval "test \"`echo '$''{'ac_cv_func_getopt_long'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 2544 "configure"
#line 2546 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char getopt_long(); below. */
......@@ -2563,7 +2565,7 @@ getopt_long();
; return 0; }
EOF
if { (eval echo configure:2567: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
if { (eval echo configure:2569: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_getopt_long=yes"
else
......@@ -2590,17 +2592,17 @@ for ac_hdr in stddef.h
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
echo "configure:2594: checking for $ac_hdr" >&5
echo "configure:2596: checking for $ac_hdr" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 2599 "configure"
#line 2601 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:2604: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
{ (eval echo configure:2606: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
......@@ -2630,17 +2632,17 @@ for ac_hdr in getopt.h
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
echo "configure:2634: checking for $ac_hdr" >&5
echo "configure:2636: checking for $ac_hdr" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 2639 "configure"
#line 2641 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:2644: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
{ (eval echo configure:2646: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
......@@ -2670,17 +2672,17 @@ for ac_hdr in sys/sockio.h
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
echo "configure:2674: checking for $ac_hdr" >&5
echo "configure:2676: checking for $ac_hdr" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 2679 "configure"
#line 2681 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:2684: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
{ (eval echo configure:2686: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
......@@ -2710,17 +2712,17 @@ for ac_hdr in fcntl.h sys/time.h unistd.h
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
echo "configure:2714: checking for $ac_hdr" >&5
echo "configure:2716: checking for $ac_hdr" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 2719 "configure"
#line 2721 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:2724: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
{ (eval echo configure:2726: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
......@@ -2750,17 +2752,17 @@ for ac_hdr in sys/soundcard.h machine/soundcard.h
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
echo "configure:2754: checking for $ac_hdr" >&5
echo "configure:2756: checking for $ac_hdr" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 2759 "configure"
#line 2761 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:2764: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
{ (eval echo configure:2766: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
......@@ -2790,17 +2792,17 @@ for ac_hdr in dlfcn.h image.h
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
echo "configure:2794: checking for $ac_hdr" >&5
echo "configure:2796: checking for $ac_hdr" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 2799 "configure"
#line 2801 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:2804: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
{ (eval echo configure:2806: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
......@@ -2830,17 +2832,17 @@ for ac_hdr in arpa/inet.h net/if.h netinet/in.h sys/socket.h
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
echo "configure:2834: checking for $ac_hdr" >&5
echo "configure:2836: checking for $ac_hdr" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 2839 "configure"
#line 2841 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:2844: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
{ (eval echo configure:2846: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
......@@ -2870,17 +2872,17 @@ for ac_hdr in machine/param.h
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
echo "configure:2874: checking for $ac_hdr" >&5
echo "configure:2876: checking for $ac_hdr" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 2879 "configure"
#line 2881 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:2884: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
{ (eval echo configure:2886: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
......@@ -2911,17 +2913,17 @@ for ac_hdr in cthreads.h pthread.h kernel/scheduler.h kernel/OS.h
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
echo "configure:2915: checking for $ac_hdr" >&5
echo "configure:2917: checking for $ac_hdr" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 2920 "configure"
#line 2922 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:2925: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
{ (eval echo configure:2927: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
......@@ -2952,9 +2954,9 @@ save_CFLAGS=$CFLAGS
CFLAGS="${CFLAGS} -Wall -Werror"
echo $ac_n "checking for ntohl in sys/param.h""... $ac_c" 1>&6
echo "configure:2956: checking for ntohl in sys/param.h" >&5
echo "configure:2958: checking for ntohl in sys/param.h" >&5
cat > conftest.$ac_ext <<EOF
#line 2958 "configure"
#line 2960 "configure"
#include "confdefs.h"
#include <sys/param.h>
void foo() { int meuh; ntohl(meuh); }
......@@ -2962,7 +2964,7 @@ int main() {
; return 0; }
EOF
if { (eval echo configure:2966: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
if { (eval echo configure:2968: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
cat >> confdefs.h <<\EOF
#define NTOHL_IN_SYS_PARAM_H 1
......@@ -2979,16 +2981,16 @@ rm -f conftest*
CFLAGS="${CFLAGS} -rdynamic"
echo $ac_n "checking if \$CC accepts -rdynamic""... $ac_c" 1>&6
echo "configure:2983: checking if \$CC accepts -rdynamic" >&5
echo "configure:2985: checking if \$CC accepts -rdynamic" >&5
cat > conftest.$ac_ext <<EOF
#line 2985 "configure"
#line 2987 "configure"
#include "confdefs.h"
int main() {
; return 0; }
EOF
if { (eval echo configure:2992: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
if { (eval echo configure:2994: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
DYNAMIC_FLAG="-rdynamic"
echo "$ac_t""yes" 1>&6
......@@ -3003,9 +3005,9 @@ rm -f conftest*
CFLAGS=$save_CFLAGS
echo $ac_n "checking for boolean_t in sys/types.h""... $ac_c" 1>&6
echo "configure:3007: checking for boolean_t in sys/types.h" >&5
echo "configure:3009: checking for boolean_t in sys/types.h" >&5
cat > conftest.$ac_ext <<EOF
#line 3009 "configure"
#line 3011 "configure"
#include "confdefs.h"
#include <sys/types.h>
void quux() { boolean_t foo; }
......@@ -3013,7 +3015,7 @@ int main() {
; return 0; }
EOF
if { (eval echo configure:3017: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
if { (eval echo configure:3019: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
cat >> confdefs.h <<\EOF
#define BOOLEAN_T_IN_SYS_TYPES_H 1
......@@ -3029,12 +3031,12 @@ fi
rm -f conftest*
echo $ac_n "checking for working const""... $ac_c" 1>&6
echo "configure:3033: checking for working const" >&5
echo "configure:3035: checking for working const" >&5
if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 3038 "configure"
#line 3040 "configure"
#include "confdefs.h"
int main() {
......@@ -3083,7 +3085,7 @@ ccp = (char const *const *) p;
; return 0; }
EOF
if { (eval echo configure:3087: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
if { (eval echo configure:3089: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_c_const=yes
else
......@@ -3104,12 +3106,12 @@ EOF
fi
echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
echo "configure:3108: checking for ANSI C header files" >&5
echo "configure:3110: checking for ANSI C header files" >&5
if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 3113 "configure"
#line 3115 "configure"
#include "confdefs.h"
#include <stdlib.h>
#include <stdarg.h>
......@@ -3117,7 +3119,7 @@ else
#include <float.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:3121: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
{ (eval echo configure:3123: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
......@@ -3134,7 +3136,7 @@ rm -f conftest*
if test $ac_cv_header_stdc = yes; then
# SunOS 4.x string.h does not declare mem*, contrary to ANSI.
cat > conftest.$ac_ext <<EOF
#line 3138 "configure"
#line 3140 "configure"
#include "confdefs.h"
#include <string.h>
EOF
......@@ -3152,7 +3154,7 @@ fi
if test $ac_cv_header_stdc = yes; then
# ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
cat > conftest.$ac_ext <<EOF
#line 3156 "configure"
#line 3158 "configure"
#include "confdefs.h"
#include <stdlib.h>
EOF
......@@ -3173,7 +3175,7 @@ if test "$cross_compiling" = yes; then
:
else
cat > conftest.$ac_ext <<EOF
#line 3177 "configure"
#line 3179 "configure"
#include "confdefs.h"
#include <ctype.h>
#define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
......@@ -3184,7 +3186,7 @@ if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
exit (0); }
EOF
if { (eval echo configure:3188: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
if { (eval echo configure:3190: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
:
else
......@@ -3208,12 +3210,12 @@ EOF
fi
echo $ac_n "checking for size_t""... $ac_c" 1>&6
echo "configure:3212: checking for size_t" >&5
echo "configure:3214: checking for size_t" >&5
if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 3217 "configure"
#line 3219 "configure"
#include "confdefs.h"
#include <sys/types.h>
#if STDC_HEADERS
......@@ -3241,12 +3243,12 @@ EOF
fi
echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
echo "configure:3245: checking whether time.h and sys/time.h may both be included" >&5
echo "configure:3247: checking whether time.h and sys/time.h may both be included" >&5
if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 3250 "configure"
#line 3252 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <sys/time.h>
......@@ -3255,7 +3257,7 @@ int main() {
struct tm *tp;
; return 0; }
EOF
if { (eval echo configure:3259: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
if { (eval echo configure:3261: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_header_time=yes
else
......@@ -3287,17 +3289,17 @@ for ac_hdr in sys/ioctl.h
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
echo "configure:3291: checking for $ac_hdr" >&5
echo "configure:3293: checking for $ac_hdr" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 3296 "configure"
#line 3298 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:3301: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
{ (eval echo configure:3303: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
......@@ -3322,17 +3324,17 @@ EOF
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
echo "configure:3326: checking for $ac_hdr" >&5
echo "configure:3328: checking for $ac_hdr" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 3331 "configure"
#line 3333 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:3336: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
{ (eval echo configure:3338: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
......@@ -3359,7 +3361,7 @@ fi
done
cat > conftest.$ac_ext <<EOF
#line 3363 "configure"
#line 3365 "configure"
#include "confdefs.h"
#include <linux/cdrom.h>
EOF
......@@ -3396,6 +3398,18 @@ else
if test x${host_cpu} = xi686 -o x${host_cpu} = xi586; then ARCH=${ARCH}" mmx"; PLUGINS=${PLUGINS}${ACCEL_PLUGINS}; fi
fi
# Check whether --enable-css or --disable-css was given.
if test "${enable_css+set}" = set; then
enableval="$enable_css"
if test x$enableval = xyes; then CSS=1; else CSS=0; fi
else
CSS=1;
fi
if test x${CSS} = x1; then cat >> confdefs.h <<\EOF
#define HAVE_CSS 1
EOF
fi
# Check whether --enable-debug or --disable-debug was given.
if test "${enable_debug+set}" = set; then
enableval="$enable_debug"
......@@ -3540,17 +3554,17 @@ if test "${enable_alsa+set}" = set; then
enableval="$enable_alsa"
if test x$enable_alsa = xyes; then ac_safe=`echo "sys/asoundlib.h" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for sys/asoundlib.h""... $ac_c" 1>&6
echo "configure:3544: checking for sys/asoundlib.h" >&5
echo "configure:3558: checking for sys/asoundlib.h" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 3549 "configure"
#line 3563 "configure"
#include "confdefs.h"
#include <sys/asoundlib.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:3554: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
{ (eval echo configure:3568: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
......@@ -3567,7 +3581,7 @@ fi
if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
echo "$ac_t""yes" 1>&6
echo $ac_n "checking for main in -lasound""... $ac_c" 1>&6
echo "configure:3571: checking for main in -lasound" >&5
echo "configure:3585: checking for main in -lasound" >&5
ac_lib_var=`echo asound'_'main | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
......@@ -3575,14 +3589,14 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lasound $LIBS"
cat > conftest.$ac_ext <<EOF
#line 3579 "configure"
#line 3593 "configure"
#include "confdefs.h"
int main() {
main()
; return 0; }
EOF
if { (eval echo configure:3586: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
if { (eval echo configure:3600: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
......@@ -3628,6 +3642,7 @@ fi
trap '' 1 2 15
cat > confcache <<\EOF
# This file is a shell script that caches the results of configure
......@@ -3782,6 +3797,7 @@ s%@ALIASES@%$ALIASES%g
s%@DEBUG@%$DEBUG%g
s%@STATS@%$STATS%g
s%@OPTIMS@%$OPTIMS%g
s%@CSS@%$CSS%g
s%@DYNAMIC_FLAG@%$DYNAMIC_FLAG%g
s%@LIB_SDL@%$LIB_SDL%g
s%@LIB_GLIDE@%$LIB_GLIDE%g
......@@ -4015,6 +4031,7 @@ architecture : ${ARCH}
debug mode : ${DEBUG}
statistics : ${STATS}
optimizations : ${OPTIMS}
CSS decryption : ${CSS}
plugins : ${PLUGINS}
vlc aliases : ${ALIASES}
"
......
......@@ -123,6 +123,10 @@ AC_ARG_ENABLE(mmx,
[ --disable-mmx Disable MMX optimizations (default enabled for x86)],
[ if test x$enableval = xyes; then ARCH=${ARCH}" mmx"; PLUGINS=${PLUGINS}${ACCEL_PLUGINS}; fi ],
[ if test x${host_cpu} = xi686 -o x${host_cpu} = xi586; then ARCH=${ARCH}" mmx"; PLUGINS=${PLUGINS}${ACCEL_PLUGINS}; fi ])
AC_ARG_ENABLE(css,
[ --disable-css Disable DVD CSS decryption (default enabled)],
[ if test x$enableval = xyes; then CSS=1; else CSS=0; fi ], [ CSS=1; ])
if test x${CSS} = x1; then AC_DEFINE(HAVE_CSS, 1, Define if you want DVD CSS decryption.) fi
AC_ARG_ENABLE(debug,
[ --enable-debug Enable debug mode (default disabled)],
[ if test x$enableval = xyes; then DEBUG=1; fi ])
......@@ -225,6 +229,7 @@ AC_SUBST(ALIASES)
AC_SUBST(DEBUG)
AC_SUBST(STATS)
AC_SUBST(OPTIMS)
AC_SUBST(CSS)
AC_SUBST(DYNAMIC_FLAG)
AC_SUBST(LIB_SDL)
AC_SUBST(LIB_GLIDE)
......@@ -241,6 +246,7 @@ architecture : ${ARCH}
debug mode : ${DEBUG}
statistics : ${STATS}
optimizations : ${OPTIMS}
CSS decryption : ${CSS}
plugins : ${PLUGINS}
vlc aliases : ${ALIASES}
"
......
......@@ -2,7 +2,7 @@ Source: vlc
Section: graphics
Priority: optional
Maintainer: Samuel Hocevar <sam@zoy.org>
Build-Depends: debhelper (>=2.2.0), xlib6g-dev, libgnome-dev, libggi2-dev, libglide-dev, libesd0-dev, libsdl1.1-dev, alsa-headers
Build-Depends: debhelper (>=2.2.0), xlib6g-dev, libgnome-dev, libggi2-dev, libglide-dev [i386], libesd0-dev, libsdl1.1-dev, alsa-headers
Standards-Version: 3.0.1
Package: vlc
......
......@@ -163,3 +163,6 @@
/* DVD support for linux */
#undef LINUX_DVD
/* Define if you want DVD CSS decryption. */
#undef HAVE_CSS
......@@ -62,7 +62,11 @@ void _M( input_getfunctions )( function_list_t * p_function_list );
MODULE_INIT
{
p_module->psz_name = MODULE_STRING;
p_module->psz_longname = "DVD input module";
#ifdef HAVE_CSS
p_module->psz_longname = "full DVD input module with CSS decryption";
#else
p_module->psz_longname = "DVD input module, CSS decryption disabled";
#endif
p_module->psz_version = VERSION;
p_module->i_capabilities = MODULE_CAPABILITY_NULL
......
......@@ -2,14 +2,14 @@
* dvd_css.c: Functions for DVD authentification and unscrambling
*****************************************************************************
* Copyright (C) 1999-2001 VideoLAN
* $Id: dvd_css.c,v 1.15 2001/02/22 08:44:45 stef Exp $
* $Id: dvd_css.c,v 1.16 2001/03/02 13:47:01 sam Exp $
*
* Author: Stphane Borel <stef@via.ecp.fr>
*
* based on:
* - css-auth by Derek Fawcus <derek@spider.com>
* - DVD CSS ioctls example program by Andrew T. Veliath <andrewtv@usa.net>
* - The Divide and conquer attack by Frank A. Stevenson<frank@funcom.com>
* - The Divide and conquer attack by Frank A. Stevenson <frank@funcom.com>
* - DeCSSPlus by Ethan Hawke
* - DecVOB
* see http://www.lemuria.org/DeCSS/ by Tom Vogt for more information.
......@@ -54,854 +54,142 @@
#include "intf_msg.h"
#include "dvd_css.h"
#ifdef HAVE_CSS
#include "dvd_csstables.h"
#endif /* HAVE_CSS */
#include "dvd_ioctl.h"
#include "dvd_ifo.h"
#include "input_dvd.h"
/*****************************************************************************
* CSS tables
* Local prototypes
*****************************************************************************/
static u8 pi_css_tab1[256]=
{ 0x33, 0x73, 0x3b, 0x26, 0x63, 0x23,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 0xe0, 0xf1,
0x5d, 0x1d, 0x55, 0x84, 0xcd, 0x8d, 0xc5, 0x14,
0x5c, 0x1c, 0x54, 0x85, 0xcc, 0x8c, 0xc4, 0x15,
0xbd, 0xfd, 0xb5, 0xa4, 0xed, 0xad, 0xe5, 0xf4,
0xbc, 0xfc, 0xb4, 0xa5, 0xec, 0xac, 0xe4, 0xf5,
0x39, 0x79, 0x31, 0x20, 0x69, 0x29, 0x61, 0x70,
0x38, 0x78, 0x30, 0x21, 0x68, 0x28, 0x60, 0x71,
0xb7, 0xf7, 0xbf, 0xa2, 0xe7, 0xa7, 0xef, 0xf2,
0xba, 0xfa, 0xb2, 0xaf, 0xea, 0xaa, 0xe2, 0xff
};
static u8 pi_css_tab2[256]=
{ 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07,
0x09, 0x08, 0x0b, 0x0a, 0x0d, 0x0c, 0x0f, 0x0e,
0x12, 0x13, 0x10, 0x11, 0x16, 0x17, 0x14, 0x15,
0x1b, 0x1a, 0x19, 0x18, 0x1f, 0x1e, 0x1d, 0x1c,
0x24, 0x25, 0x26, 0x27, 0x20, 0x21, 0x22, 0x23,
0x2d, 0x2c, 0x2f, 0x2e, 0x29, 0x28, 0x2b, 0x2a,
0x36, 0x37, 0x34, 0x35, 0x32, 0x33, 0x30, 0x31,
0x3f, 0x3e, 0x3d, 0x3c, 0x3b, 0x3a, 0x39, 0x38,
0x49, 0x48, 0x4b, 0x4a, 0x4d, 0x4c, 0x4f, 0x4e,
0x40, 0x41, 0x42, 0x43, 0x44, 0x45, 0x46, 0x47,
0x5b, 0x5a, 0x59, 0x58, 0x5f, 0x5e, 0x5d, 0x5c,
0x52, 0x53, 0x50, 0x51, 0x56, 0x57, 0x54, 0x55,
0x6d, 0x6c, 0x6f, 0x6e, 0x69, 0x68, 0x6b, 0x6a,
0x64, 0x65, 0x66, 0x67, 0x60, 0x61, 0x62, 0x63,
0x7f, 0x7e, 0x7d, 0x7c, 0x7b, 0x7a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, 0x24, 0x49, 0x6d, 0x92, 0xb6, 0xdb, 0xff,
0x00, 0x24, 0x49, 0x6d, 0x92, 0xb6, 0xdb, 0xff,
0x00, 0x24, 0x49, 0x6d, 0x92, 0xb6, 0xdb, 0xff,
0x00, 0x24, 0x49, 0x6d, 0x92, 0xb6, 0xdb, 0xff,
0x00, 0x24, 0x49, 0x6d, 0x92, 0xb6, 0xdb, 0xff,
0x00, 0x24, 0x49, 0x6d, 0x92, 0xb6, 0xdb, 0xff,
0x00, 0x24, 0x49, 0x6d, 0x92, 0xb6, 0xdb, 0xff,
0x00, 0x24, 0x49, 0x6d, 0x92, 0xb6, 0xdb, 0xff,
0x00, 0x24, 0x49, 0x6d, 0x92, 0xb6, 0xdb, 0xff,
0x00, 0x24, 0x49, 0x6d, 0x92, 0xb6, 0xdb, 0xff,
0x00, 0x24, 0x49, 0x6d, 0x92, 0xb6, 0xdb, 0xff,
0x00, 0x24, 0x49, 0x6d, 0x92, 0xb6, 0xdb, 0xff,
0x00, 0x24, 0x49, 0x6d, 0x92, 0xb6, 0xdb, 0xff,
0x00, 0x24, 0x49, 0x6d, 0x92, 0xb6, 0xdb, 0xff,
0x00, 0x24, 0x49, 0x6d, 0x92, 0xb6, 0xdb, 0xff,
0x00, 0x24, 0x49, 0x6d, 0x92, 0xb6, 0xdb, 0xff,
0x00, 0x24, 0x49, 0x6d, 0x92, 0xb6, 0xdb, 0xff,
0x00, 0x24, 0x49, 0x6d, 0x92, 0xb6, 0xdb, 0xff,
0x00, 0x24, 0x49, 0x6d, 0x92, 0xb6, 0xdb, 0xff,
0x00, 0x24, 0x49, 0x6d, 0x92, 0xb6, 0xdb, 0xff,
0x00, 0x24, 0x49, 0x6d, 0x92, 0xb6, 0xdb, 0xff,
0x00, 0x24, 0x49, 0x6d, 0x92, 0xb6, 0xdb, 0xff,
0x00, 0x24, 0x49, 0x6d, 0x92, 0xb6, 0xdb, 0xff,
0x00, 0x24, 0x49, 0x6d, 0x92, 0xb6, 0xdb, 0xff,
0x00, 0x24, 0x49, 0x6d, 0x92, 0xb6, 0xdb, 0xff,
0x00, 0x24, 0x49, 0x6d, 0x92, 0xb6, 0xdb, 0xff,
0x00, 0x24, 0x49, 0x6d, 0x92, 0xb6, 0xdb, 0xff,
0x00, 0x24, 0x49, 0x6d, 0x92, 0xb6, 0xdb, 0xff,
0x00, 0x24, 0x49, 0x6d, 0x92, 0xb6, 0xdb, 0xff,
0x00, 0x24, 0x49, 0x6d, 0x92, 0xb6, 0xdb, 0xff,
0x00, 0x24, 0x49, 0x6d, 0x92, 0xb6, 0xdb, 0xff,
0x00, 0x24, 0x49, 0x6d, 0x92, 0xb6, 0xdb, 0xff,
0x00, 0x24, 0x49, 0x6d, 0x92, 0xb6, 0xdb, 0xff,
0x00, 0x24, 0x49, 0x6d, 0x92, 0xb6, 0xdb, 0xff,
0x00, 0x24, 0x49, 0x6d, 0x92, 0xb6, 0xdb, 0xff,
0x00, 0x24, 0x49, 0x6d, 0x92, 0xb6, 0xdb, 0xff,
0x00, 0x24, 0x49, 0x6d, 0x92, 0xb6, 0xdb, 0xff,
0x00, 0x24, 0x49, 0x6d, 0x92, 0xb6, 0xdb, 0xff,
0x00, 0x24, 0x49, 0x6d, 0x92, 0xb6, 0xdb, 0xff,
0x00, 0x24, 0x49, 0x6d, 0x92, 0xb6, 0xdb, 0xff,
0x00, 0x24, 0x49, 0x6d, 0x92, 0xb6, 0xdb, 0xff,
0x00, 0x24, 0x49, 0x6d, 0x92, 0xb6, 0xdb, 0xff,
0x00, 0x24, 0x49, 0x6d, 0x92, 0xb6, 0xdb, 0xff,
0x00, 0x24, 0x49, 0x6d, 0x92, 0xb6, 0xdb, 0xff,
0x00, 0x24, 0x49, 0x6d, 0x92, 0xb6, 0xdb, 0xff,
0x00, 0x24, 0x49, 0x6d, 0x92, 0xb6, 0xdb, 0xff,
0x00, 0x24, 0x49, 0x6d, 0x92, 0xb6, 0xdb, 0xff,
0x00, 0x24, 0x49, 0x6d, 0x92, 0xb6, 0xdb, 0xff,
0x00, 0x24, 0x49, 0x6d, 0x92, 0xb6, 0xdb, 0xff,
0x00, 0x24, 0x49, 0x6d, 0x92, 0xb6, 0xdb, 0xff,
0x00, 0x24, 0x49, 0x6d, 0x92, 0xb6, 0xdb, 0xff,
0x00, 0x24, 0x49, 0x6d, 0x92, 0xb6, 0xdb, 0xff,
0x00, 0x24, 0x49, 0x6d, 0x92, 0xb6, 0xdb, 0xff,
0x00, 0x24, 0x49, 0x6d, 0x92, 0xb6, 0xdb, 0xff,
0x00, 0x24, 0x49, 0x6d, 0x92, 0xb6, 0xdb, 0xff,
0x00, 0x24, 0x49, 0x6d, 0x92, 0xb6, 0xdb, 0xff,
0x00, 0x24, 0x49, 0x6d, 0x92, 0xb6, 0xdb, 0xff,
0x00, 0x24, 0x49, 0x6d, 0x92, 0xb6, 0xdb, 0xff,
0x00, 0x24, 0x49, 0x6d, 0x92, 0xb6, 0xdb, 0xff
};
static u8 pi_css_tab4[256]=
{ 0x00, 0x80, 0x40, 0xc0, 0x20, 0xa0, 0x60, 0xe0,
0x10, 0x90, 0x50, 0xd0, 0x30, 0xb0, 0x70, 0xf0,
0x08, 0x88, 0x48, 0xc8, 0x28, 0xa8, 0x68, 0xe8,
0x18, 0x98, 0x58, 0xd8, 0x38, 0xb8, 0x78, 0xf8,
0x04, 0x84, 0x44, 0xc4, 0x24, 0xa4, 0x64, 0xe4,
0x14, 0x94, 0x54, 0xd4, 0x34, 0xb4, 0x74, 0xf4,
0x0c, 0x8c, 0x4c, 0xcc, 0x2c, 0xac, 0x6c, 0xec,
0x1c, 0x9c, 0x5c, 0xdc, 0x3c, 0xbc, 0x7c, 0xfc,
0x02, 0x82, 0x42, 0xc2, 0x22, 0xa2, 0x62, 0xe2,
0x12, 0x92, 0x52, 0xd2, 0x32, 0xb2, 0x72, 0xf2,
0x0a, 0x8a, 0x4a, 0xca, 0x2a, 0xaa, 0x6a, 0xea,
0x1a, 0x9a, 0x5a, 0xda, 0x3a, 0xba,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, 0x00, 0x00, 0x00,
0x33, 0x72, 0x39, 0x25, 0x67, 0x26, 0x6D, 0x71,
0x36, 0x77, 0x3C, 0x20, 0x62, 0x23, 0x68, 0x74,
0xC3, 0x82, 0xC9, 0x15, 0x57, 0x16, 0x5D, 0x81};
/*
* Local functions
*/
#ifdef HAVE_CSS
static int CSSGetASF ( int i_fd );
static void CSSCryptKey ( int i_key_type, int i_varient,
u8 const * pi_challenge, u8* pi_key );
static int CSSCracker ( int i_start, unsigned char * p_crypted,
unsigned char * p_decrypted,
dvd_key_t * p_sector_key, dvd_key_t * p_key );
#endif /* HAVE_CSS */
/*****************************************************************************
* CSSGetASF : Get Authentification success flag
* ---
* Returns :
* -1 on ioctl error,
* 0 if the device needs to be authenticated,
* 1 either.
* CSSTest : check if the disc is encrypted or not
*****************************************************************************/
static int CSSGetASF( int i_fd )
int CSSTest( int i_fd )
{
dvd_authinfo auth_info;
dvd_struct dvd;
auth_info.type = DVD_LU_SEND_ASF;
auth_info.lsasf.asf = 0;
dvd.type = DVD_STRUCT_COPYRIGHT;
dvd.copyright.layer_num = 0;
for( auth_info.lsasf.agid = 0 ; auth_info.lsasf.agid < 4 ;
auth_info.lsasf.agid++ )
if( dvd_ioctl( i_fd, DVD_READ_STRUCT, &dvd ) < 0 )
{
if( !( dvd_ioctl( i_fd, DVD_AUTH, &auth_info ) ) )
{
intf_WarnMsg( 3, "CSS: %sAuthenticated",
( auth_info.lsasf.asf ) ? "" : "not " );
return auth_info.lsasf.asf;
}
intf_ErrMsg( "css error: DVD ioctl failed" );
return -1;
}
/* The ioctl process has failed */
intf_ErrMsg( "CSS: GetASF Fatal Error" );
return -1;
return dvd.copyright.cpst;
}
/*****************************************************************************
* CSSCryptKey : shuffles bits and unencrypt keys.
* Used during authentication and disc key negociation in CSSInit.
* ---
* i_key_type : 0->key1, 1->key2, 2->buskey.
* i_varient : between 0 and 31.
* CSSInit : CSS Structure initialisation and DVD authentication.
*****************************************************************************
* It simulates the mutual authentication between logical unit and host.
* Since we don't need the disc key to find the title key, we just run the
* basic unavoidable commands to authenticate device and disc.
*****************************************************************************/
static void CSSCryptKey( int i_key_type, int i_varient,
u8 const * pi_challenge, u8* pi_key )
css_t CSSInit( int i_fd )
{
/* Permutation table for challenge */
u8 ppi_perm_challenge[3][10] =
{ { 1, 3, 0, 7, 5, 2, 9, 6, 4, 8 },
{ 6, 1, 9, 3, 8, 5, 7, 4, 0, 2 },
{ 4, 0, 3, 5, 7, 2, 8, 6, 1, 9 } };
/* Permutation table for varient table for key2 and buskey */
u8 ppi_perm_varient[2][32] =
{ { 0x0a, 0x08, 0x0e, 0x0c, 0x0b, 0x09, 0x0f, 0x0d,
0x1a, 0x18, 0x1e, 0x1c, 0x1b, 0x19, 0x1f, 0x1d,
0x02, 0x00, 0x06, 0x04, 0x03, 0x01, 0x07, 0x05,
0x12, 0x10, 0x16, 0x14, 0x13, 0x11, 0x17, 0x15 },
{ 0x12, 0x1a, 0x16, 0x1e, 0x02, 0x0a, 0x06, 0x0e,
0x10, 0x18, 0x14, 0x1c, 0x00, 0x08, 0x04, 0x0c,
0x13, 0x1b, 0x17, 0x1f, 0x03, 0x0b, 0x07, 0x0f,
0x11, 0x19, 0x15, 0x1d, 0x01, 0x09, 0x05, 0x0d } };
u8 pi_varients[32] =
{ 0xB7, 0x74, 0x85, 0xD0, 0xCC, 0xDB, 0xCA, 0x73,
0x03, 0xFE, 0x31, 0x03, 0x52, 0xE0, 0xB7, 0x42,
0x63, 0x16, 0xF2, 0x2A, 0x79, 0x52, 0xFF, 0x1B,
0x7A, 0x11, 0xCA, 0x1A, 0x9B, 0x40, 0xAD, 0x01 };
/* The "secret" key */
u8 pi_secret[5] = { 0x55, 0xD6, 0xC4, 0xC5, 0x28 };
css_t css;
u8 pi_bits[30];
u8 pi_scratch[10];
u8 pi_tmp1[5];
u8 pi_tmp2[5];
u8 i_lfsr0_o; /* 1 bit used */
u8 i_lfsr1_o; /* 1 bit used */
u32 i_lfsr0;
u32 i_lfsr1;
u8 i_css_varient;
u8 i_cse;
u8 i_index;
u8 i_combined;
u8 i_carry;
u8 i_val = 0;
int i_term = 0;
int i_bit;
int i;
#ifdef HAVE_CSS
/* structures defined in cdrom.h or dvdio.h */
dvd_struct dvd;
dvd_authinfo auth_info;
for (i = 9; i >= 0; --i)
pi_scratch[i] = pi_challenge[ppi_perm_challenge[i_key_type][i]];
int i_error = -1;
int i;
i_css_varient = ( i_key_type == 0 ) ? i_varient :
ppi_perm_varient[i_key_type-1][i_varient];
css.i_fd = i_fd;
css.b_error = 0;
/*
* This encryption engine implements one of 32 variations
* one the same theme depending upon the choice in the
* varient parameter (0 - 31).
*
* The algorithm itself manipulates a 40 bit input into
* a 40 bit output.
* The parameter 'input' is 80 bits. It consists of
* the 40 bit input value that is to be encrypted followed
* by a 40 bit seed value for the pseudo random number
* generators.
*/
memset( &auth_info, 0, sizeof(auth_info) );
/* Feed the secret into the input values such that
* we alter the seed to the LFSR's used above, then
* generate the bits to play with.
*/
for( i = 5 ; --i >= 0 ; )
/* Test authentication success */
switch( CSSGetASF( i_fd ) )
{
pi_tmp1[i] = pi_scratch[5 + i] ^ pi_secret[i] ^ pi_crypt_tab2[i];
case -1:
css.b_error = 1;
case 1:
return css;
case 0:
intf_WarnMsg( 3, "css info: authenticating" );
}
/*
* We use two LFSR's (seeded from some of the input data bytes) to
* generate two streams of pseudo-random bits. These two bit streams
* are then combined by simply adding with carry to generate a final
* sequence of pseudo-random bits which is stored in the buffer that
* 'output' points to the end of - len is the size of this buffer.
*
* The first LFSR is of degree 25, and has a polynomial of:
* x^13 + x^5 + x^4 + x^1 + 1
*
* The second LSFR is of degree 17, and has a (primitive) polynomial of:
* x^15 + x^1 + 1
*
* I don't know if these polynomials are primitive modulo 2, and thus
* represent maximal-period LFSR's.
*
*
* Note that we take the output of each LFSR from the new shifted in
* bit, not the old shifted out bit. Thus for ease of use the LFSR's
* are implemented in bit reversed order.
*
*/
/* In order to ensure that the LFSR works we need to ensure that the
* initial values are non-zero. Thus when we initialise them from
* the seed, we ensure that a bit is set.
*/
i_lfsr0 = ( pi_tmp1[0] << 17 ) | ( pi_tmp1[1] << 9 ) |
(( pi_tmp1[2] & ~7 ) << 1 ) | 8 | ( pi_tmp1[2] & 7 );
i_lfsr1 = ( pi_tmp1[3] << 9 ) | 0x100 | pi_tmp1[4];
i_index = sizeof(pi_bits);
i_carry = 0;
do
/* Init sequence, request AGID */
for( i = 1; i < 4 ; ++i )
{
for( i_bit = 0, i_val = 0 ; i_bit < 8 ; ++i_bit )
intf_WarnMsg( 3, "css info: request AGID %d", i );
auth_info.type = DVD_LU_SEND_AGID;
auth_info.lsa.agid = 0;
i_error = dvd_ioctl( i_fd, DVD_AUTH, &auth_info );
if( i_error != -1 )
{
i_lfsr0_o = ( ( i_lfsr0 >> 24 ) ^ ( i_lfsr0 >> 21 ) ^
( i_lfsr0 >> 20 ) ^ ( i_lfsr0 >> 12 ) ) & 1;
i_lfsr0 = ( i_lfsr0 << 1 ) | i_lfsr0_o;
i_lfsr1_o = ( ( i_lfsr1 >> 16 ) ^ ( i_lfsr1 >> 2 ) ) & 1;
i_lfsr1 = ( i_lfsr1 << 1 ) | i_lfsr1_o;
#define BIT0(x) ((x) & 1)
#define BIT1(x) (((x) >> 1) & 1)
i_combined = !i_lfsr1_o + i_carry + !i_lfsr0_o;
/* taking bit 1 */
i_carry = ( i_combined >> 1 ) & 1;
i_val |= ( i_combined & 1 ) << i_bit;
/* No error during ioctl: we know if device
* is authenticated */
break;
}
pi_bits[--i_index] = i_val;
} while( i_index > 0 );
/* This term is used throughout the following to
* select one of 32 different variations on the
* algorithm.
*/
i_cse = pi_varients[i_css_varient] ^ pi_crypt_tab2[i_css_varient];
intf_ErrMsg( "css error: AGID N/A, invalidating" );
auth_info.type = DVD_INVALIDATE_AGID;
auth_info.lsa.agid = 0;
dvd_ioctl( i_fd, DVD_AUTH, &auth_info );
}
/* Now the actual blocks doing the encryption. Each
* of these works on 40 bits at a time and are quite
* similar.
*/
i_index = 0;
for( i = 5, i_term = 0 ; --i >= 0 ; i_term = pi_scratch[i] )
/* Unable to authenticate without AGID */
if( i_error == -1 )
{
i_index = pi_bits[25 + i] ^ pi_scratch[i];
i_index = pi_crypt_tab1[i_index] ^ ~pi_crypt_tab2[i_index] ^ i_cse;
pi_tmp1[i] = pi_crypt_tab2[i_index] ^ pi_crypt_tab3[i_index] ^ i_term;
css.b_error = 1;
intf_ErrMsg( "css error: could not get AGID" );
return css;
}
pi_tmp1[4] ^= pi_tmp1[0];
for( i = 5, i_term = 0 ; --i >= 0 ; i_term = pi_tmp1[i] )
for( i = 0 ; i < 10; ++i )
{
i_index = pi_bits[20 + i] ^ pi_tmp1[i];
i_index = pi_crypt_tab1[i_index] ^ ~pi_crypt_tab2[i_index] ^ i_cse;
pi_tmp2[i] = pi_crypt_tab2[i_index] ^ pi_crypt_tab3[i_index] ^ i_term;
css.disc.pi_challenge[i] = i;
}
pi_tmp2[4] ^= pi_tmp2[0];
for( i = 5, i_term = 0 ; --i >= 0 ; i_term = pi_tmp2[i] )
{
i_index = pi_bits[15 + i] ^ pi_tmp2[i];
i_index = pi_crypt_tab1[i_index] ^ ~pi_crypt_tab2[i_index] ^ i_cse;
i_index = pi_crypt_tab2[i_index] ^ pi_crypt_tab3[i_index] ^ i_term;
/* Send AGID to host */
auth_info.type = DVD_HOST_SEND_CHALLENGE;
pi_tmp1[i] = pi_crypt_tab0[i_index] ^ pi_crypt_tab2[i_index];
/* Get challenge from host */
for( i = 0 ; i < 10 ; ++i )
{
auth_info.hsc.chal[9-i] = css.disc.pi_challenge[i];
}
pi_tmp1[4] ^= pi_tmp1[0];
/* Returning data, let LU change state */
css.i_agid = auth_info.lsa.agid;
for( i = 5, i_term = 0 ; --i >= 0 ; i_term = pi_tmp1[i] )
/* Send challenge to LU */
if( dvd_ioctl( i_fd, DVD_AUTH, &auth_info )<0 )
{
i_index = pi_bits[10 + i] ^ pi_tmp1[i];
i_index = pi_crypt_tab1[i_index] ^ ~pi_crypt_tab2[i_index] ^ i_cse;
i_index = pi_crypt_tab2[i_index] ^ pi_crypt_tab3[i_index] ^ i_term;
pi_tmp2[i] = pi_crypt_tab0[i_index] ^ pi_crypt_tab2[i_index];
intf_ErrMsg( "css error: failed sending challenge to LU" );
css.b_error = 1;
return css;
}
pi_tmp2[4] ^= pi_tmp2[0];
for( i = 5, i_term = 0 ; --i >= 0 ; i_term = pi_tmp2[i] )
/* Get key1 from LU */
if( dvd_ioctl( i_fd, DVD_AUTH, &auth_info ) < 0)
{
i_index = pi_bits[5 + i] ^ pi_tmp2[i];
i_index = pi_crypt_tab1[i_index] ^ ~pi_crypt_tab2[i_index] ^ i_cse;
pi_tmp1[i] = pi_crypt_tab2[i_index] ^ pi_crypt_tab3[i_index] ^ i_term;
intf_ErrMsg( "css error: failed getting key1 from LU" );
css.b_error = 1;
return css;
}
pi_tmp1[4] ^= pi_tmp1[0];
for(i = 5, i_term = 0 ; --i >= 0 ; i_term = pi_tmp1[i] )
{
i_index = pi_bits[i] ^ pi_tmp1[i];
i_index = pi_crypt_tab1[i_index] ^ ~pi_crypt_tab2[i_index] ^ i_cse;
pi_key[i] = pi_crypt_tab2[i_index] ^ pi_crypt_tab3[i_index] ^ i_term;
}
return;
}
/*****************************************************************************
* CSSCracker : title key decryption by cracking
* ---
* This function is called by CSSGetKeys to find a key
*****************************************************************************/
static int CSSCracker( int i_start,
unsigned char * p_crypted,
unsigned char * p_decrypted,
dvd_key_t * p_sector_key,
dvd_key_t * p_key )
{
unsigned char pi_buffer[10];
unsigned int i_t1, i_t2, i_t3, i_t4, i_t5, i_t6;
unsigned int i_try;
unsigned int i_candidate;
unsigned int i, j;
int i_exit = -1;
for( i = 0 ; i < 10 ; i++ )
{
pi_buffer[i] = pi_css_tab1[p_crypted[i]] ^ p_decrypted[i];
}
for( i_try = i_start ; i_try < 0x10000 ; i_try++ )
{
i_t1 = i_try >> 8 | 0x100;
i_t2 = i_try & 0xff;
i_t3 = 0; /* not needed */
i_t5 = 0;
/* iterate cipher 4 times to reconstruct LFSR2 */
for( i = 0 ; i < 4 ; i++ )
{
/* advance LFSR1 normaly */
i_t4 = pi_css_tab2[i_t2] ^ pi_css_tab3[i_t1];
i_t2 = i_t1 >> 1;
i_t1 = ( ( i_t1 & 1 ) << 8 ) ^ i_t4;
i_t4 = pi_css_tab5[i_t4];
/* deduce i_t6 & i_t5 */
i_t6 = pi_buffer[i];
if( i_t5 )
{
i_t6 = ( i_t6 + 0xff ) & 0x0ff;
}
if( i_t6 < i_t4 )
{
i_t6 += 0x100;
}
i_t6 -= i_t4;
i_t5 += i_t6 + i_t4;
i_t6 = pi_css_tab4[ i_t6 ];
/* feed / advance i_t3 / i_t5 */
i_t3 = ( i_t3 << 8 ) | i_t6;
i_t5 >>= 8;
}
i_candidate = i_t3;
/* iterate 6 more times to validate candidate key */
for( ; i < 10 ; i++ )
{
i_t4 = pi_css_tab2[i_t2] ^ pi_css_tab3[i_t1];
i_t2 = i_t1 >> 1;
i_t1 = ( ( i_t1 & 1 ) << 8 ) ^ i_t4;
i_t4 = pi_css_tab5[i_t4];
i_t6 = ((((((( i_t3 >> 3 ) ^ i_t3 ) >> 1 ) ^
i_t3 ) >> 8 ) ^ i_t3 ) >> 5 ) & 0xff;
i_t3 = ( i_t3 << 8 ) | i_t6;
i_t6 = pi_css_tab4[i_t6];
i_t5 += i_t6 + i_t4;
if( ( i_t5 & 0xff ) != pi_buffer[i] )
{
break;
}
i_t5 >>= 8;
}
if( i == 10 )
{
/* Do 4 backwards steps of iterating t3 to deduce initial state */
i_t3 = i_candidate;
for( i = 0 ; i < 4 ; i++ )
{
i_t1 = i_t3 & 0xff;
i_t3 = ( i_t3 >> 8 );
/* easy to code, and fast enough bruteforce
* search for byte shifted in */
for( j = 0 ; j < 256 ; j++ )
{
i_t3 = ( i_t3 & 0x1ffff) | ( j << 17 );
i_t6 = ((((((( i_t3 >> 3 ) ^ i_t3 ) >> 1 ) ^
i_t3 ) >> 8 ) ^ i_t3 ) >> 5 ) & 0xff;
if( i_t6 == i_t1 )
{
break;
}
}
}
i_t4 = ( i_t3 >> 1 ) - 4;
for( i_t5 = 0 ; i_t5 < 8; i_t5++ )
{
if( ( ( i_t4 + i_t5 ) * 2 + 8 - ( (i_t4 + i_t5 ) & 7 ) )
== i_t3 )
{
(*p_key)[0] = i_try>>8;
(*p_key)[1] = i_try & 0xFF;
(*p_key)[2] = ( ( i_t4 + i_t5 ) >> 0) & 0xFF;
(*p_key)[3] = ( ( i_t4 + i_t5 ) >> 8) & 0xFF;
(*p_key)[4] = ( ( i_t4 + i_t5 ) >> 16) & 0xFF;
i_exit = i_try + 1;
}
}
}
}
if( i_exit >= 0 )
{
(*p_key)[0] ^= (*p_sector_key)[0];
(*p_key)[1] ^= (*p_sector_key)[1];
(*p_key)[2] ^= (*p_sector_key)[2];
(*p_key)[3] ^= (*p_sector_key)[3];
(*p_key)[4] ^= (*p_sector_key)[4];
}
return i_exit;
}
/*
* Authentication and keys
*/
/*****************************************************************************
* CSSTest : check if the disc is encrypted or not
*****************************************************************************/
int CSSTest( int i_fd )
{
dvd_struct dvd;
dvd.type = DVD_STRUCT_COPYRIGHT;
dvd.copyright.layer_num = 0;
if( dvd_ioctl( i_fd, DVD_READ_STRUCT, &dvd ) < 0 )
{
intf_ErrMsg( "DVD ioctl error" );
return -1;
}
return dvd.copyright.cpst;
}
/*****************************************************************************
* CSSInit : CSS Structure initialisation and DVD authentication.
* It simulates the mutual authentication between logical unit and host.
* ---
* Since we don't need the disc key to find the title key, we just run the
* basic unavoidable commands to authenticate device and disc.
*****************************************************************************/
css_t CSSInit( int i_fd )
{
/* structures defined in cdrom.h or dvdio.h */
dvd_authinfo auth_info;
dvd_struct dvd;
css_t css;
int i_error = -1;
int i;
css.i_fd = i_fd;
css.b_error = 0;
memset( &auth_info, 0, sizeof(auth_info) );
/* Test authentication success */
switch( CSSGetASF( i_fd ) )
{
case -1:
css.b_error = 1;
case 1:
return css;
case 0:
intf_WarnMsg( 3, "CSS: Authenticating" );
}
/* Init sequence, request AGID */
for( i = 1; i < 4 ; ++i )
{
intf_WarnMsg( 3, "CSS: Request AGID %d", i );
auth_info.type = DVD_LU_SEND_AGID;
auth_info.lsa.agid = 0;
i_error = dvd_ioctl( i_fd, DVD_AUTH, &auth_info );
if( i_error != -1 )
{
/* No error during ioctl: we know if device
* is authenticated */
break;
}
intf_ErrMsg( "CSS: AGID N/A, invalidating" );
auth_info.type = DVD_INVALIDATE_AGID;
auth_info.lsa.agid = 0;
dvd_ioctl( i_fd, DVD_AUTH, &auth_info );
}
/* Unable to authenticate without AGID */
if( i_error == -1 )
{
css.b_error = 1;
intf_ErrMsg( "CSS: Cannot get AGID" );
return css;
}
for( i = 0 ; i < 10; ++i )
{
css.disc.pi_challenge[i] = i;
}
/* Send AGID to host */
auth_info.type = DVD_HOST_SEND_CHALLENGE;
/* Get challenge from host */
for( i = 0 ; i < 10 ; ++i )
{
auth_info.hsc.chal[9-i] = css.disc.pi_challenge[i];
}
/* Returning data, let LU change state */
css.i_agid = auth_info.lsa.agid;
/* Send challenge to LU */
if( dvd_ioctl( i_fd, DVD_AUTH, &auth_info )<0 )
{
intf_ErrMsg( "CSS: Send challenge to LU failed ");
css.b_error = 1;
return css;
}
/* Get key1 from LU */
if( dvd_ioctl( i_fd, DVD_AUTH, &auth_info ) < 0)
{
intf_ErrMsg( "CSS: Get key1 from LU failed ");
css.b_error = 1;
return css;
}
/* Send key1 to host */
for( i = 0 ; i < KEY_SIZE ; i++ )
/* Send key1 to host */
for( i = 0 ; i < KEY_SIZE ; i++ )
{
css.disc.pi_key1[i] = auth_info.lsk.key[4-i];
}
......@@ -914,7 +202,7 @@ css_t CSSInit( int i_fd )
if( memcmp( css.disc.pi_key_check,
css.disc.pi_key1, KEY_SIZE ) == 0 )
{
intf_WarnMsg( 3, "CSS: Drive Authentic - using varient %d", i);
intf_WarnMsg( 3, "css info: drive authentic, using variant %d", i);
css.disc.i_varient = i;
auth_info.type = DVD_LU_SEND_CHALLENGE;
break;
......@@ -923,7 +211,7 @@ css_t CSSInit( int i_fd )
if( i == 32 )
{
intf_ErrMsg( "Drive would not Authenticate" );
intf_ErrMsg( "css error: drive would not authenticate" );
auth_info.type = DVD_AUTH_FAILURE;
css.b_error = 1;
return css;
......@@ -932,7 +220,7 @@ css_t CSSInit( int i_fd )
/* Get challenge from LU */
if( dvd_ioctl( i_fd, DVD_AUTH, &auth_info ) < 0 )
{
intf_ErrMsg( "CSS: Get challenge from LU failed ");
intf_ErrMsg( "css error: failed getting challenge from LU" );
css.b_error = 1;
return css;
}
......@@ -957,18 +245,18 @@ css_t CSSInit( int i_fd )
/* Send key2 to LU */
if( dvd_ioctl( i_fd, DVD_AUTH, &auth_info ) < 0 )
{
intf_ErrMsg( "CSS: Send key2 to LU failed (expected)" );
intf_ErrMsg( "css error: failed sending key2 to LU (expected)" );
return css;
}
if( auth_info.type == DVD_AUTH_ESTABLISHED )
{
intf_WarnMsg( 3, "CSS: Authentication established");
intf_WarnMsg( 3, "css info: authentication established" );
}
else if( auth_info.type == DVD_AUTH_FAILURE )
{
css.b_error = 1;
intf_ErrMsg("CSS: DVD authentication failed");
intf_ErrMsg( "css error: DVD authentication failed" );
}
memcpy( css.disc.pi_challenge, css.disc.pi_key1, KEY_SIZE );
......@@ -977,7 +265,7 @@ css_t CSSInit( int i_fd )
css.disc.pi_challenge,
css.disc.pi_key_check );
intf_WarnMsg( 1, "CSS: Received Session Key" );
intf_WarnMsg( 1, "css info: received Session Key" );
if( css.i_agid < 0 )
{
......@@ -993,7 +281,7 @@ css_t CSSInit( int i_fd )
case 1:
return css;
case 0:
intf_WarnMsg( 3, "CSS: Getting disc key" );
intf_WarnMsg( 3, "css info: getting disc key" );
}
/* Get encrypted disc key */
......@@ -1003,7 +291,7 @@ css_t CSSInit( int i_fd )
if( dvd_ioctl( i_fd, DVD_READ_STRUCT, &dvd ) < 0 )
{
intf_ErrMsg( "CSS: Could not read Disc Key" );
intf_ErrMsg( "css error: could not read Disc Key" );
css.b_error = 1;
return css;
}
......@@ -1024,16 +312,24 @@ css_t CSSInit( int i_fd )
case 1:
return css;
}
#else /* HAVE_CSS */
intf_ErrMsg( "css error: CSS decryption is disabled in this module" );
css.i_fd = i_fd;
css.b_error = 1;
#endif /* HAVE_CSS */
return css;
}
/*****************************************************************************
* CSSGetKey : get title key.
*****************************************************************************
* The DVD should have been opened and authenticated before.
*****************************************************************************/
int CSSGetKey( css_t * p_css )
{
#ifdef HAVE_CSS
/*
* Title key cracking method from Ethan Hawke,
* with Frank A. Stevenson algorithm.
......@@ -1112,146 +408,530 @@ int CSSGetKey( css_t * p_css )
}
}
if( k == 0 )
{
memcpy( &(p_title_key[i_registered_keys].pi_key),
&pi_key, sizeof(dvd_key_t) );
p_title_key[i_registered_keys++].i_occ = 1;
i_total_keys_found++;
}
i = CSSCracker( i, &pi_buf[0x80],
&pi_buf[0x80 - ( i_best_plen / i_best_p) *i_best_p],
(dvd_key_t*)&pi_buf[0x54], &pi_key);
}
if( k == 0 )
{
memcpy( &(p_title_key[i_registered_keys].pi_key),
&pi_key, sizeof(dvd_key_t) );
p_title_key[i_registered_keys++].i_occ = 1;
i_total_keys_found++;
}
i = CSSCracker( i, &pi_buf[0x80],
&pi_buf[0x80 - ( i_best_plen / i_best_p) *i_best_p],
(dvd_key_t*)&pi_buf[0x54], &pi_key);
}
/* Stop search if we find one occurance of the key
* I have never found a DVD for which it is not enough
* but we should take care of that */
if( i_registered_keys == 1 && p_title_key[0].i_occ >= 1 )
{
b_stop_scanning = 1;
}
}
}
i_pos += i_bytes_read;
} while( i_bytes_read == 0x800 && !b_stop_scanning);
if( b_stop_scanning)
{
intf_WarnMsg( 1,
"css info: found enough occurencies of the same key." );
}
if( !b_encrypted )
{
intf_WarnMsg( 3, "css warning: this file was _NOT_ encrypted!" );
return(0);
}
if( b_encrypted && i_registered_keys == 0 )
{
intf_ErrMsg( "css error: unable to determine keys from file" );
return(1);
}
for( i = 0 ; i < i_registered_keys - 1 ; i++ )
{
for( j = i + 1 ; j < i_registered_keys ; j++ )
{
if( p_title_key[j].i_occ > p_title_key[i].i_occ )
{
memcpy( &pi_key, &(p_title_key[j].pi_key), sizeof(dvd_key_t) );
k = p_title_key[j].i_occ;
memcpy( &(p_title_key[j].pi_key),
&(p_title_key[i].pi_key), sizeof(dvd_key_t) );
p_title_key[j].i_occ = p_title_key[i].i_occ;
memcpy( &(p_title_key[i].pi_key),&pi_key, sizeof(dvd_key_t) );
p_title_key[i].i_occ = k;
}
}
}
#ifdef STATS
intf_WarnMsg( 1, "css info: key(s) & key probability" );
intf_WarnMsg( 1, "----------------------------------" );
#endif
for( i=0 ; i<i_registered_keys ; i++ )
{
#ifdef STATS
intf_WarnMsg( 1, "%d) %02X %02X %02X %02X %02X - %3.2f%%", i,
p_title_key[i].pi_key[0], p_title_key[i].pi_key[1],
p_title_key[i].pi_key[2], p_title_key[i].pi_key[3],
p_title_key[i].pi_key[4],
p_title_key[i].i_occ * 100.0 / i_total_keys_found );
#endif
if( p_title_key[i_highest].i_occ * 100.0 / i_total_keys_found
<= p_title_key[i].i_occ*100.0 / i_total_keys_found )
{
i_highest = i;
}
}
/* The "find the key with the highest probability" code
* is untested, as I haven't been able to find a VOB that
* produces multiple keys (RT)
*/
intf_WarnMsg( 3, "css info: title %d, key %02X %02X %02X %02X %02X",
i_title, p_title_key[i_highest].pi_key[0],
p_title_key[i_highest].pi_key[1],
p_title_key[i_highest].pi_key[2],
p_title_key[i_highest].pi_key[3],
p_title_key[i_highest].pi_key[4] );
memcpy( p_css->pi_title_key,
p_title_key[i_highest].pi_key, KEY_SIZE );
return 0;
#else /* HAVE_CSS */
return 1;
#endif /* HAVE_CSS */
}
/*****************************************************************************
* CSSDescrambleSector
*****************************************************************************
* sec : sector to descramble
* key : title key for this sector
*****************************************************************************/
int CSSDescrambleSector( dvd_key_t pi_key, u8* pi_sec )
{
#ifdef HAVE_CSS
unsigned int i_t1, i_t2, i_t3, i_t4, i_t5, i_t6;
u8* pi_end = pi_sec + 0x800;
/* PES_scrambling_control */
if( pi_sec[0x14] & 0x30)
{
i_t1 = ((pi_key)[0] ^ pi_sec[0x54]) | 0x100;
i_t2 = (pi_key)[1] ^ pi_sec[0x55];
i_t3 = (((pi_key)[2]) | ((pi_key)[3] << 8) |
((pi_key)[4] << 16)) ^ ((pi_sec[0x56]) |
(pi_sec[0x57] << 8) | (pi_sec[0x58] << 16));
i_t4 = i_t3 & 7;
i_t3 = i_t3 * 2 + 8 - i_t4;
pi_sec += 0x80;
i_t5 = 0;
while( pi_sec != pi_end )
{
i_t4 = pi_css_tab2[i_t2] ^ pi_css_tab3[i_t1];
i_t2 = i_t1>>1;
i_t1 = ( ( i_t1 & 1 ) << 8 ) ^ i_t4;
i_t4 = pi_css_tab5[i_t4];
i_t6 = ((((((( i_t3 >> 3 ) ^ i_t3 ) >> 1 ) ^
i_t3 ) >> 8 ) ^ i_t3 ) >> 5) & 0xff;
i_t3 = (i_t3 << 8 ) | i_t6;
i_t6 = pi_css_tab4[i_t6];
i_t5 += i_t6 + i_t4;
*pi_sec++ = pi_css_tab1[*pi_sec] ^( i_t5 & 0xff );
i_t5 >>= 8;
}
}
return 0;
#else /* HAVE_CSS */
return 1;
#endif /* HAVE_CSS */
}
#ifdef HAVE_CSS
/*
* Following functions are local
*/
/*****************************************************************************
* CSSGetASF : Get Authentification success flag
*****************************************************************************
* Returns :
* -1 on ioctl error,
* 0 if the device needs to be authenticated,
* 1 either.
*****************************************************************************/
static int CSSGetASF( int i_fd )
{
dvd_authinfo auth_info;
auth_info.type = DVD_LU_SEND_ASF;
auth_info.lsasf.asf = 0;
for( auth_info.lsasf.agid = 0 ; auth_info.lsasf.agid < 4 ;
auth_info.lsasf.agid++ )
{
if( !( dvd_ioctl( i_fd, DVD_AUTH, &auth_info ) ) )
{
intf_WarnMsg( 3, "css info: %sauthenticated",
auth_info.lsasf.asf ? "" : "not " );
return auth_info.lsasf.asf;
}
}
/* The ioctl process has failed */
intf_ErrMsg( "css error: GetASF fatal error" );
return -1;
}
/*****************************************************************************
* CSSCryptKey : shuffles bits and unencrypt keys.
*****************************************************************************
* Used during authentication and disc key negociation in CSSInit.
* i_key_type : 0->key1, 1->key2, 2->buskey.
* i_varient : between 0 and 31.
*****************************************************************************/
static void CSSCryptKey( int i_key_type, int i_varient,
u8 const * pi_challenge, u8* pi_key )
{
/* Permutation table for challenge */
u8 ppi_perm_challenge[3][10] =
{ { 1, 3, 0, 7, 5, 2, 9, 6, 4, 8 },
{ 6, 1, 9, 3, 8, 5, 7, 4, 0, 2 },
{ 4, 0, 3, 5, 7, 2, 8, 6, 1, 9 } };
/* Permutation table for varient table for key2 and buskey */
u8 ppi_perm_varient[2][32] =
{ { 0x0a, 0x08, 0x0e, 0x0c, 0x0b, 0x09, 0x0f, 0x0d,
0x1a, 0x18, 0x1e, 0x1c, 0x1b, 0x19, 0x1f, 0x1d,
0x02, 0x00, 0x06, 0x04, 0x03, 0x01, 0x07, 0x05,
0x12, 0x10, 0x16, 0x14, 0x13, 0x11, 0x17, 0x15 },
{ 0x12, 0x1a, 0x16, 0x1e, 0x02, 0x0a, 0x06, 0x0e,
0x10, 0x18, 0x14, 0x1c, 0x00, 0x08, 0x04, 0x0c,
0x13, 0x1b, 0x17, 0x1f, 0x03, 0x0b, 0x07, 0x0f,
0x11, 0x19, 0x15, 0x1d, 0x01, 0x09, 0x05, 0x0d } };
u8 pi_varients[32] =
{ 0xB7, 0x74, 0x85, 0xD0, 0xCC, 0xDB, 0xCA, 0x73,
0x03, 0xFE, 0x31, 0x03, 0x52, 0xE0, 0xB7, 0x42,
0x63, 0x16, 0xF2, 0x2A, 0x79, 0x52, 0xFF, 0x1B,
0x7A, 0x11, 0xCA, 0x1A, 0x9B, 0x40, 0xAD, 0x01 };
/* The "secret" key */
u8 pi_secret[5] = { 0x55, 0xD6, 0xC4, 0xC5, 0x28 };
u8 pi_bits[30];
u8 pi_scratch[10];
u8 pi_tmp1[5];
u8 pi_tmp2[5];
u8 i_lfsr0_o; /* 1 bit used */
u8 i_lfsr1_o; /* 1 bit used */
u32 i_lfsr0;
u32 i_lfsr1;
u8 i_css_varient;
u8 i_cse;
u8 i_index;
u8 i_combined;
u8 i_carry;
u8 i_val = 0;
int i_term = 0;
int i_bit;
int i;
for (i = 9; i >= 0; --i)
pi_scratch[i] = pi_challenge[ppi_perm_challenge[i_key_type][i]];
i_css_varient = ( i_key_type == 0 ) ? i_varient :
ppi_perm_varient[i_key_type-1][i_varient];
/*
* This encryption engine implements one of 32 variations
* one the same theme depending upon the choice in the
* varient parameter (0 - 31).
*
* The algorithm itself manipulates a 40 bit input into
* a 40 bit output.
* The parameter 'input' is 80 bits. It consists of
* the 40 bit input value that is to be encrypted followed
* by a 40 bit seed value for the pseudo random number
* generators.
*/
/* Feed the secret into the input values such that
* we alter the seed to the LFSR's used above, then
* generate the bits to play with.
*/
for( i = 5 ; --i >= 0 ; )
{
pi_tmp1[i] = pi_scratch[5 + i] ^ pi_secret[i] ^ pi_crypt_tab2[i];
}
/*
* We use two LFSR's (seeded from some of the input data bytes) to
* generate two streams of pseudo-random bits. These two bit streams
* are then combined by simply adding with carry to generate a final
* sequence of pseudo-random bits which is stored in the buffer that
* 'output' points to the end of - len is the size of this buffer.
*
* The first LFSR is of degree 25, and has a polynomial of:
* x^13 + x^5 + x^4 + x^1 + 1
*
* The second LSFR is of degree 17, and has a (primitive) polynomial of:
* x^15 + x^1 + 1
*
* I don't know if these polynomials are primitive modulo 2, and thus
* represent maximal-period LFSR's.
*
*
* Note that we take the output of each LFSR from the new shifted in
* bit, not the old shifted out bit. Thus for ease of use the LFSR's
* are implemented in bit reversed order.
*
*/
/* In order to ensure that the LFSR works we need to ensure that the
* initial values are non-zero. Thus when we initialise them from
* the seed, we ensure that a bit is set.
*/
i_lfsr0 = ( pi_tmp1[0] << 17 ) | ( pi_tmp1[1] << 9 ) |
(( pi_tmp1[2] & ~7 ) << 1 ) | 8 | ( pi_tmp1[2] & 7 );
i_lfsr1 = ( pi_tmp1[3] << 9 ) | 0x100 | pi_tmp1[4];
i_index = sizeof(pi_bits);
i_carry = 0;
do
{
for( i_bit = 0, i_val = 0 ; i_bit < 8 ; ++i_bit )
{
i_lfsr0_o = ( ( i_lfsr0 >> 24 ) ^ ( i_lfsr0 >> 21 ) ^
( i_lfsr0 >> 20 ) ^ ( i_lfsr0 >> 12 ) ) & 1;
i_lfsr0 = ( i_lfsr0 << 1 ) | i_lfsr0_o;
/* Stop search if we find one occurance of the key
* I have never found a DVD for which it is not enough
* but we should take care of that */
if( i_registered_keys == 1 && p_title_key[0].i_occ >= 1 )
{
b_stop_scanning = 1;
}
i_lfsr1_o = ( ( i_lfsr1 >> 16 ) ^ ( i_lfsr1 >> 2 ) ) & 1;
i_lfsr1 = ( i_lfsr1 << 1 ) | i_lfsr1_o;
#define BIT0(x) ((x) & 1)
#define BIT1(x) (((x) >> 1) & 1)
i_combined = !i_lfsr1_o + i_carry + !i_lfsr0_o;
/* taking bit 1 */
i_carry = ( i_combined >> 1 ) & 1;
i_val |= ( i_combined & 1 ) << i_bit;
}
}
pi_bits[--i_index] = i_val;
} while( i_index > 0 );
i_pos += i_bytes_read;
} while( i_bytes_read == 0x800 && !b_stop_scanning);
/* This term is used throughout the following to
* select one of 32 different variations on the
* algorithm.
*/
i_cse = pi_varients[i_css_varient] ^ pi_crypt_tab2[i_css_varient];
if( b_stop_scanning)
/* Now the actual blocks doing the encryption. Each
* of these works on 40 bits at a time and are quite
* similar.
*/
i_index = 0;
for( i = 5, i_term = 0 ; --i >= 0 ; i_term = pi_scratch[i] )
{
intf_WarnMsg( 1,
"CSS: Found enough occurancies of the same key." );
i_index = pi_bits[25 + i] ^ pi_scratch[i];
i_index = pi_crypt_tab1[i_index] ^ ~pi_crypt_tab2[i_index] ^ i_cse;
pi_tmp1[i] = pi_crypt_tab2[i_index] ^ pi_crypt_tab3[i_index] ^ i_term;
}
pi_tmp1[4] ^= pi_tmp1[0];
if( !b_encrypted )
for( i = 5, i_term = 0 ; --i >= 0 ; i_term = pi_tmp1[i] )
{
intf_WarnMsg( 3, "CSS: This file was _NOT_ encrypted!");
return(0);
i_index = pi_bits[20 + i] ^ pi_tmp1[i];
i_index = pi_crypt_tab1[i_index] ^ ~pi_crypt_tab2[i_index] ^ i_cse;
pi_tmp2[i] = pi_crypt_tab2[i_index] ^ pi_crypt_tab3[i_index] ^ i_term;
}
pi_tmp2[4] ^= pi_tmp2[0];
if( b_encrypted && i_registered_keys == 0 )
for( i = 5, i_term = 0 ; --i >= 0 ; i_term = pi_tmp2[i] )
{
intf_ErrMsg( "CSS: Unable to determine keys from file.");
return(1);
i_index = pi_bits[15 + i] ^ pi_tmp2[i];
i_index = pi_crypt_tab1[i_index] ^ ~pi_crypt_tab2[i_index] ^ i_cse;
i_index = pi_crypt_tab2[i_index] ^ pi_crypt_tab3[i_index] ^ i_term;
pi_tmp1[i] = pi_crypt_tab0[i_index] ^ pi_crypt_tab2[i_index];
}
pi_tmp1[4] ^= pi_tmp1[0];
for( i = 0 ; i < i_registered_keys - 1 ; i++ )
for( i = 5, i_term = 0 ; --i >= 0 ; i_term = pi_tmp1[i] )
{
for( j = i + 1 ; j < i_registered_keys ; j++ )
{
if( p_title_key[j].i_occ > p_title_key[i].i_occ )
{
memcpy( &pi_key, &(p_title_key[j].pi_key), sizeof(dvd_key_t) );
k = p_title_key[j].i_occ;
i_index = pi_bits[10 + i] ^ pi_tmp1[i];
i_index = pi_crypt_tab1[i_index] ^ ~pi_crypt_tab2[i_index] ^ i_cse;
memcpy( &(p_title_key[j].pi_key),
&(p_title_key[i].pi_key), sizeof(dvd_key_t) );
p_title_key[j].i_occ = p_title_key[i].i_occ;
i_index = pi_crypt_tab2[i_index] ^ pi_crypt_tab3[i_index] ^ i_term;
memcpy( &(p_title_key[i].pi_key),&pi_key, sizeof(dvd_key_t) );
p_title_key[i].i_occ = k;
}
}
pi_tmp2[i] = pi_crypt_tab0[i_index] ^ pi_crypt_tab2[i_index];
}
pi_tmp2[4] ^= pi_tmp2[0];
#ifdef STATS
intf_WarnMsg( 1, " Key(s) & key probability\n---------------------");
#endif
for( i=0 ; i<i_registered_keys ; i++ )
for( i = 5, i_term = 0 ; --i >= 0 ; i_term = pi_tmp2[i] )
{
#ifdef STATS
intf_WarnMsg( 1, "%d) %02X %02X %02X %02X %02X - %3.2f%%", i,
p_title_key[i].pi_key[0], p_title_key[i].pi_key[1],
p_title_key[i].pi_key[2], p_title_key[i].pi_key[3],
p_title_key[i].pi_key[4],
p_title_key[i].i_occ * 100.0 / i_total_keys_found );
#endif
if( p_title_key[i_highest].i_occ * 100.0 / i_total_keys_found
<= p_title_key[i].i_occ*100.0 / i_total_keys_found )
{
i_highest = i;
}
}
i_index = pi_bits[5 + i] ^ pi_tmp2[i];
i_index = pi_crypt_tab1[i_index] ^ ~pi_crypt_tab2[i_index] ^ i_cse;
pi_tmp1[i] = pi_crypt_tab2[i_index] ^ pi_crypt_tab3[i_index] ^ i_term;
}
pi_tmp1[4] ^= pi_tmp1[0];
/* The "find the key with the highest probability" code
* is untested, as I haven't been able to find a VOB that
* produces multiple keys (RT)
*/
intf_WarnMsg( 3, "CSS: Title %d key: %02X %02X %02X %02X %02X",
i_title,
p_title_key[i_highest].pi_key[0],
p_title_key[i_highest].pi_key[1],
p_title_key[i_highest].pi_key[2],
p_title_key[i_highest].pi_key[3],
p_title_key[i_highest].pi_key[4] );
for(i = 5, i_term = 0 ; --i >= 0 ; i_term = pi_tmp1[i] )
{
i_index = pi_bits[i] ^ pi_tmp1[i];
i_index = pi_crypt_tab1[i_index] ^ ~pi_crypt_tab2[i_index] ^ i_cse;
memcpy( p_css->pi_title_key,
p_title_key[i_highest].pi_key, KEY_SIZE );
pi_key[i] = pi_crypt_tab2[i_index] ^ pi_crypt_tab3[i_index] ^ i_term;
}
return 0;
return;
}
/*****************************************************************************
* CSSDescrambleSector
* ---
* sec : sector to descramble
* key : title key for this sector
* CSSCracker : title key decryption by cracking
*****************************************************************************
* This function is called by CSSGetKeys to find a key
*****************************************************************************/
int CSSDescrambleSector( dvd_key_t pi_key, u8* pi_sec )
static int CSSCracker( int i_start,
unsigned char * p_crypted,
unsigned char * p_decrypted,
dvd_key_t * p_sector_key,
dvd_key_t * p_key )
{
unsigned int i_t1, i_t2, i_t3, i_t4, i_t5, i_t6;
u8* pi_end = pi_sec + 0x800;
unsigned char pi_buffer[10];
unsigned int i_t1, i_t2, i_t3, i_t4, i_t5, i_t6;
unsigned int i_try;
unsigned int i_candidate;
unsigned int i, j;
int i_exit = -1;
/* PES_scrambling_control */
if( pi_sec[0x14] & 0x30)
for( i = 0 ; i < 10 ; i++ )
{
i_t1 = ((pi_key)[0] ^ pi_sec[0x54]) | 0x100;
i_t2 = (pi_key)[1] ^ pi_sec[0x55];
i_t3 = (((pi_key)[2]) | ((pi_key)[3] << 8) |
((pi_key)[4] << 16)) ^ ((pi_sec[0x56]) |
(pi_sec[0x57] << 8) | (pi_sec[0x58] << 16));
i_t4 = i_t3 & 7;
i_t3 = i_t3 * 2 + 8 - i_t4;
pi_sec += 0x80;
pi_buffer[i] = pi_css_tab1[p_crypted[i]] ^ p_decrypted[i];
}
for( i_try = i_start ; i_try < 0x10000 ; i_try++ )
{
i_t1 = i_try >> 8 | 0x100;
i_t2 = i_try & 0xff;
i_t3 = 0; /* not needed */
i_t5 = 0;
while( pi_sec != pi_end )
/* iterate cipher 4 times to reconstruct LFSR2 */
for( i = 0 ; i < 4 ; i++ )
{
/* advance LFSR1 normaly */
i_t4 = pi_css_tab2[i_t2] ^ pi_css_tab3[i_t1];
i_t2 = i_t1>>1;
i_t2 = i_t1 >> 1;
i_t1 = ( ( i_t1 & 1 ) << 8 ) ^ i_t4;
i_t4 = pi_css_tab5[i_t4];
/* deduce i_t6 & i_t5 */
i_t6 = pi_buffer[i];
if( i_t5 )
{
i_t6 = ( i_t6 + 0xff ) & 0x0ff;
}
if( i_t6 < i_t4 )
{
i_t6 += 0x100;
}
i_t6 -= i_t4;
i_t5 += i_t6 + i_t4;
i_t6 = pi_css_tab4[ i_t6 ];
/* feed / advance i_t3 / i_t5 */
i_t3 = ( i_t3 << 8 ) | i_t6;
i_t5 >>= 8;
}
i_candidate = i_t3;
/* iterate 6 more times to validate candidate key */
for( ; i < 10 ; i++ )
{
i_t4 = pi_css_tab2[i_t2] ^ pi_css_tab3[i_t1];
i_t2 = i_t1 >> 1;
i_t1 = ( ( i_t1 & 1 ) << 8 ) ^ i_t4;
i_t4 = pi_css_tab5[i_t4];
i_t6 = ((((((( i_t3 >> 3 ) ^ i_t3 ) >> 1 ) ^
i_t3 ) >> 8 ) ^ i_t3 ) >> 5) & 0xff;
i_t3 = (i_t3 << 8 ) | i_t6;
i_t3 ) >> 8 ) ^ i_t3 ) >> 5 ) & 0xff;
i_t3 = ( i_t3 << 8 ) | i_t6;
i_t6 = pi_css_tab4[i_t6];
i_t5 += i_t6 + i_t4;
*pi_sec++ = pi_css_tab1[*pi_sec] ^( i_t5 & 0xff );
if( ( i_t5 & 0xff ) != pi_buffer[i] )
{
break;
}
i_t5 >>= 8;
}
if( i == 10 )
{
/* Do 4 backwards steps of iterating t3 to deduce initial state */
i_t3 = i_candidate;
for( i = 0 ; i < 4 ; i++ )
{
i_t1 = i_t3 & 0xff;
i_t3 = ( i_t3 >> 8 );
/* easy to code, and fast enough bruteforce
* search for byte shifted in */
for( j = 0 ; j < 256 ; j++ )
{
i_t3 = ( i_t3 & 0x1ffff) | ( j << 17 );
i_t6 = ((((((( i_t3 >> 3 ) ^ i_t3 ) >> 1 ) ^
i_t3 ) >> 8 ) ^ i_t3 ) >> 5 ) & 0xff;
if( i_t6 == i_t1 )
{
break;
}
}
}
i_t4 = ( i_t3 >> 1 ) - 4;
for( i_t5 = 0 ; i_t5 < 8; i_t5++ )
{
if( ( ( i_t4 + i_t5 ) * 2 + 8 - ( (i_t4 + i_t5 ) & 7 ) )
== i_t3 )
{
(*p_key)[0] = i_try>>8;
(*p_key)[1] = i_try & 0xFF;
(*p_key)[2] = ( ( i_t4 + i_t5 ) >> 0) & 0xFF;
(*p_key)[3] = ( ( i_t4 + i_t5 ) >> 8) & 0xFF;
(*p_key)[4] = ( ( i_t4 + i_t5 ) >> 16) & 0xFF;
i_exit = i_try + 1;
}
}
}
}
if( i_exit >= 0 )
{
(*p_key)[0] ^= (*p_sector_key)[0];
(*p_key)[1] ^= (*p_sector_key)[1];
(*p_key)[2] ^= (*p_sector_key)[2];
(*p_key)[3] ^= (*p_sector_key)[3];
(*p_key)[4] ^= (*p_sector_key)[4];
}
return(0);
return i_exit;
}
#endif /* HAVE_CSS */
/*****************************************************************************
* dvd_csstables.h: CSS Tables for DVD unscrambling
*****************************************************************************
* Copyright (C) 1999-2001 VideoLAN
* $Id: dvd_csstables.h,v 1.1 2001/03/02 13:47:01 sam Exp $
*
* Author: Stphane Borel <stef@via.ecp.fr>
*
* based on:
* - css-auth by Derek Fawcus <derek@spider.com>
* - DVD CSS ioctls example program by Andrew T. Veliath <andrewtv@usa.net>
* - The Divide and conquer attack by Frank A. Stevenson <frank@funcom.com>
* - DeCSSPlus by Ethan Hawke
* - DecVOB
* see http://www.lemuria.org/DeCSS/ by Tom Vogt for more information.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA.
*****************************************************************************/
static u8 pi_css_tab1[ 256 ] =
{
0x33, 0x73, 0x3b, 0x26, 0x63, 0x23, 0x6b, 0x76,
0x3e, 0x7e, 0x36, 0x2b, 0x6e, 0x2e, 0x66, 0x7b,
0xd3, 0x93, 0xdb, 0x06, 0x43, 0x03, 0x4b, 0x96,
0xde, 0x9e, 0xd6, 0x0b, 0x4e, 0x0e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ad, 0xe5, 0xf4,
0xbc, 0xfc, 0xb4, 0xa5, 0xec, 0xac, 0xe4, 0xf5,
0x39, 0x79, 0x31, 0x20, 0x69, 0x29, 0x61, 0x70,
0x38, 0x78, 0x30, 0x21, 0x68, 0x28, 0x60, 0x71,
0xb7, 0xf7, 0xbf, 0xa2, 0xe7, 0xa7, 0xef, 0xf2,
0xba, 0xfa, 0xb2, 0xaf, 0xea, 0xaa, 0xe2, 0xff
};
static u8 pi_css_tab2[ 256 ] =
{
0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07,
0x09, 0x08, 0x0b, 0x0a, 0x0d, 0x0c, 0x0f, 0x0e,
0x12, 0x13, 0x10, 0x11, 0x16, 0x17, 0x14, 0x15,
0x1b, 0x1a, 0x19, 0x18, 0x1f, 0x1e, 0x1d, 0x1c,
0x24, 0x25, 0x26, 0x27, 0x20, 0x21, 0x22, 0x23,
0x2d, 0x2c, 0x2f, 0x2e, 0x29, 0x28, 0x2b, 0x2a,
0x36, 0x37, 0x34, 0x35, 0x32, 0x33, 0x30, 0x31,
0x3f, 0x3e, 0x3d, 0x3c, 0x3b, 0x3a, 0x39, 0x38,
0x49, 0x48, 0x4b, 0x4a, 0x4d, 0x4c, 0x4f, 0x4e,
0x40, 0x41, 0x42, 0x43, 0x44, 0x45, 0x46, 0x47,
0x5b, 0x5a, 0x59, 0x58, 0x5f, 0x5e, 0x5d, 0x5c,
0x52, 0x53, 0x50, 0x51, 0x56, 0x57, 0x54, 0x55,
0x6d, 0x6c, 0x6f, 0x6e, 0x69, 0x68, 0x6b, 0x6a,
0x64, 0x65, 0x66, 0x67, 0x60, 0x61, 0x62, 0x63,
0x7f, 0x7e, 0x7d, 0x7c, 0x7b, 0x7a, 0x79, 0x78,
0x76, 0x77, 0x74, 0x75, 0x72, 0x73, 0x70, 0x71,
0x92, 0x93, 0x90, 0x91, 0x96, 0x97, 0x94, 0x95,
0x9b, 0x9a, 0x99, 0x98, 0x9f, 0x9e, 0x9d,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00, 0x24, 0x49, 0x6d, 0x92, 0xb6, 0xdb, 0xff,
0x00, 0x24, 0x49, 0x6d, 0x92, 0xb6, 0xdb, 0xff,
0x00, 0x24, 0x49, 0x6d, 0x92, 0xb6, 0xdb, 0xff,
0x00, 0x24, 0x49, 0x6d, 0x92, 0xb6, 0xdb, 0xff,
0x00, 0x24, 0x49, 0x6d, 0x92, 0xb6, 0xdb, 0xff,
0x00, 0x24, 0x49, 0x6d, 0x92, 0xb6, 0xdb, 0xff,
0x00, 0x24, 0x49, 0x6d, 0x92, 0xb6, 0xdb, 0xff,
0x00, 0x24, 0x49, 0x6d, 0x92, 0xb6, 0xdb, 0xff,
0x00, 0x24, 0x49, 0x6d, 0x92, 0xb6, 0xdb, 0xff,
0x00, 0x24, 0x49, 0x6d, 0x92, 0xb6, 0xdb, 0xff,
0x00, 0x24, 0x49, 0x6d, 0x92, 0xb6, 0xdb, 0xff,
0x00, 0x24, 0x49, 0x6d, 0x92, 0xb6, 0xdb, 0xff,
0x00, 0x24, 0x49, 0x6d, 0x92, 0xb6, 0xdb, 0xff,
0x00, 0x24, 0x49, 0x6d, 0x92, 0xb6, 0xdb, 0xff,
0x00, 0x24, 0x49, 0x6d, 0x92, 0xb6, 0xdb, 0xff,
0x00, 0x24, 0x49, 0x6d, 0x92, 0xb6, 0xdb, 0xff,
0x00, 0x24, 0x49, 0x6d, 0x92, 0xb6, 0xdb, 0xff,
0x00, 0x24, 0x49, 0x6d, 0x92, 0xb6, 0xdb, 0xff,
0x00, 0x24, 0x49, 0x6d, 0x92, 0xb6, 0xdb, 0xff,
0x00, 0x24, 0x49, 0x6d, 0x92, 0xb6, 0xdb, 0xff,
0x00, 0x24, 0x49, 0x6d, 0x92, 0xb6, 0xdb, 0xff,
0x00, 0x24, 0x49, 0x6d, 0x92, 0xb6, 0xdb, 0xff,
0x00, 0x24, 0x49, 0x6d, 0x92, 0xb6, 0xdb, 0xff,
0x00, 0x24, 0x49, 0x6d, 0x92, 0xb6, 0xdb, 0xff,
0x00, 0x24, 0x49, 0x6d, 0x92, 0xb6, 0xdb, 0xff,
0x00, 0x24, 0x49, 0x6d, 0x92, 0xb6, 0xdb, 0xff,
0x00, 0x24, 0x49, 0x6d, 0x92, 0xb6, 0xdb, 0xff,
0x00, 0x24, 0x49, 0x6d, 0x92, 0xb6, 0xdb, 0xff,
0x00, 0x24, 0x49, 0x6d, 0x92, 0xb6, 0xdb, 0xff,
0x00, 0x24, 0x49, 0x6d, 0x92, 0xb6, 0xdb, 0xff,
0x00, 0x24, 0x49, 0x6d, 0x92, 0xb6, 0xdb, 0xff,
0x00, 0x24, 0x49, 0x6d, 0x92, 0xb6, 0xdb, 0xff,
0x00, 0x24, 0x49, 0x6d, 0x92, 0xb6, 0xdb, 0xff,
0x00, 0x24, 0x49, 0x6d, 0x92, 0xb6, 0xdb, 0xff,
0x00, 0x24, 0x49, 0x6d, 0x92, 0xb6, 0xdb, 0xff,
0x00, 0x24, 0x49, 0x6d, 0x92, 0xb6, 0xdb, 0xff,
0x00, 0x24, 0x49, 0x6d, 0x92, 0xb6, 0xdb, 0xff,
0x00, 0x24, 0x49, 0x6d, 0x92, 0xb6, 0xdb, 0xff,
0x00, 0x24, 0x49, 0x6d, 0x92, 0xb6, 0xdb, 0xff,
0x00, 0x24, 0x49, 0x6d, 0x92, 0xb6, 0xdb, 0xff,
0x00, 0x24, 0x49, 0x6d, 0x92, 0xb6, 0xdb, 0xff,
0x00, 0x24, 0x49, 0x6d, 0x92, 0xb6, 0xdb, 0xff,
0x00, 0x24, 0x49, 0x6d, 0x92, 0xb6, 0xdb, 0xff,
0x00, 0x24, 0x49, 0x6d, 0x92, 0xb6, 0xdb, 0xff,
0x00, 0x24, 0x49, 0x6d, 0x92, 0xb6, 0xdb, 0xff,
0x00, 0x24, 0x49, 0x6d, 0x92, 0xb6, 0xdb, 0xff,
0x00, 0x24, 0x49, 0x6d, 0x92, 0xb6, 0xdb, 0xff,
0x00, 0x24, 0x49, 0x6d, 0x92, 0xb6, 0xdb, 0xff,
0x00, 0x24, 0x49, 0x6d, 0x92, 0xb6, 0xdb, 0xff,
0x00, 0x24, 0x49, 0x6d, 0x92, 0xb6, 0xdb, 0xff,
0x00, 0x24, 0x49, 0x6d, 0x92, 0xb6, 0xdb, 0xff,
0x00, 0x24, 0x49, 0x6d, 0x92, 0xb6, 0xdb, 0xff,
0x00, 0x24, 0x49, 0x6d, 0x92, 0xb6, 0xdb, 0xff,
0x00, 0x24, 0x49, 0x6d, 0x92, 0xb6, 0xdb, 0xff,
0x00, 0x24, 0x49, 0x6d, 0x92, 0xb6, 0xdb, 0xff,
0x00, 0x24, 0x49, 0x6d, 0x92, 0xb6, 0xdb, 0xff
};
static u8 pi_css_tab4[ 256 ] =
{
0x00, 0x80, 0x40, 0xc0, 0x20, 0xa0, 0x60, 0xe0,
0x10, 0x90, 0x50, 0xd0, 0x30, 0xb0, 0x70, 0xf0,
0x08, 0x88, 0x48, 0xc8, 0x28, 0xa8, 0x68, 0xe8,
0x18, 0x98, 0x58, 0xd8, 0x38, 0xb8, 0x78, 0xf8,
0x04, 0x84, 0x44, 0xc4, 0x24, 0xa4, 0x64, 0xe4,
0x14, 0x94, 0x54, 0xd4, 0x34, 0xb4, 0x74, 0xf4,
0x0c, 0x8c, 0x4c, 0xcc, 0x2c, 0xac, 0x6c, 0xec,
0x1c, 0x9c, 0x5c, 0xdc, 0x3c, 0xbc, 0x7c, 0xfc,
0x02, 0x82, 0x42, 0xc2, 0x22, 0xa2, 0x62, 0xe2,
0x12, 0x92, 0x52, 0xd2, 0x32, 0xb2, 0x72, 0xf2,
0x0a, 0x8a, 0x4a, 0xca, 0x2a, 0xaa, 0x6a, 0xea,
0x1a, 0x9a, 0x5a, 0xda, 0x3a, 0xba, 0x7a, 0xfa,
0x06, 0x86, 0x46, 0xc6, 0x26, 0xa6, 0x66, 0xe6,
0x16, 0x96, 0x56, 0xd6, 0x36, 0xb6, 0x76, 0xf6,
0x0e, 0x8e, 0x4e, 0xce, 0x2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0xC3, 0x82, 0xC9, 0x15, 0x57, 0x16, 0x5D, 0x81
};
......@@ -10,7 +10,7 @@
* -dvd_udf to find files
*****************************************************************************
* Copyright (C) 1998-2001 VideoLAN
* $Id: input_dvd.c,v 1.22 2001/03/02 03:32:46 stef Exp $
* $Id: input_dvd.c,v 1.23 2001/03/02 13:47:01 sam Exp $
*
* Author: Stphane Borel <stef@via.ecp.fr>
*
......@@ -83,157 +83,158 @@ static struct
{
char p_code[3];
char p_lang_long[20];
} lang_tbl[] =
{
}
lang_tbl[] =
{
/* The ISO 639 language codes.
* Language names with * prefix are not spelled in their own language
*/
{" ", "Not Specified"},
{"aa", "*Afar"},
{"ab", "*Abkhazian"},
{"af", "*Afrikaans"},
{"am", "*Amharic"},
{"ar", "*Arabic"},
{"as", "*Assamese"},
{"ay", "*Aymara"},
{"az", "*Azerbaijani"},
{"ba", "*Bashkir"},
{"be", "*Byelorussian"},
{"bg", "*Bulgarian"},
{"bh", "*Bihari"},
{"bi", "*Bislama"},
{"bn", "*Bengali; Bangla"},
{"bo", "*Tibetan"},
{"br", "*Breton"},
{"ca", "*Catalan"},
{"co", "*Corsican"},
{"cs", "*Czech(Ceske)"},
{"cy", "*Welsh"},
{"da", "Dansk"},
{"de", "Deutsch"},
{"dz", "*Bhutani"},
{"el", "*Greek"},
{"en", "English"},
{"eo", "*Esperanto"},
{"es", "Espanol"},
{"et", "*Estonian"},
{"eu", "*Basque"},
{"fa", "*Persian"},
{"fi", "Suomi"},
{"fj", "*Fiji"},
{"fo", "*Faroese"},
{"fr", "Francais"},
{"fy", "*Frisian"},
{"ga", "*Irish"},
{"gd", "*Scots Gaelic"},
{"gl", "*Galician"},
{"gn", "*Guarani"},
{"gu", "*Gujarati"},
{"ha", "*Hausa"},
{"he", "*Hebrew"}, // formerly iw
{"hi", "*Hindi"},
{"hr", "Hrvatski"}, // Croatian
{"hu", "Magyar"},
{"hy", "*Armenian"},
{"ia", "*Interlingua"},
{"id", "*Indonesian"}, // formerly in
{"ie", "*Interlingue"},
{"ik", "*Inupiak"},
{"in", "*Indonesian"}, // replaced by id
{"is", "Islenska"},
{"it", "Italiano"},
{"iu", "*Inuktitut"},
{"iw", "*Hebrew"}, // replaced by he
{"ja", "*Japanese"},
{"ji", "*Yiddish"}, // replaced by yi
{"jw", "*Javanese"},
{"ka", "*Georgian"},
{"kk", "*Kazakh"},
{"kl", "*Greenlandic"},
{"km", "*Cambodian"},
{"kn", "*Kannada"},
{"ko", "*Korean"},
{"ks", "*Kashmiri"},
{"ku", "*Kurdish"},
{"ky", "*Kirghiz"},
{"la", "*Latin"},
{"ln", "*Lingala"},
{"lo", "*Laothian"},
{"lt", "*Lithuanian"},
{"lv", "*Latvian, Lettish"},
{"mg", "*Malagasy"},
{"mi", "*Maori"},
{"mk", "*Macedonian"},
{"ml", "*Malayalam"},
{"mn", "*Mongolian"},
{"mo", "*Moldavian"},
{"mr", "*Marathi"},
{"ms", "*Malay"},
{"mt", "*Maltese"},
{"my", "*Burmese"},
{"na", "*Nauru"},
{"ne", "*Nepali"},
{"nl", "Nederlands"},
{"no", "Norsk"},
{"oc", "*Occitan"},
{"om", "*(Afan) Oromo"},
{"or", "*Oriya"},
{"pa", "*Punjabi"},
{"pl", "*Polish"},
{"ps", "*Pashto, Pushto"},
{"pt", "Portugues"},
{"qu", "*Quechua"},
{"rm", "*Rhaeto-Romance"},
{"rn", "*Kirundi"},
{"ro", "*Romanian"},
{"ru", "*Russian"},
{"rw", "*Kinyarwanda"},
{"sa", "*Sanskrit"},
{"sd", "*Sindhi"},
{"sg", "*Sangho"},
{"sh", "*Serbo-Croatian"},
{"si", "*Sinhalese"},
{"sk", "*Slovak"},
{"sl", "*Slovenian"},
{"sm", "*Samoan"},
{"sn", "*Shona"},
{"so", "*Somali"},
{"sq", "*Albanian"},
{"sr", "*Serbian"},
{"ss", "*Siswati"},
{"st", "*Sesotho"},
{"su", "*Sundanese"},
{"sv", "Svenska"},
{"sw", "*Swahili"},
{"ta", "*Tamil"},
{"te", "*Telugu"},
{"tg", "*Tajik"},
{"th", "*Thai"},
{"ti", "*Tigrinya"},
{"tk", "*Turkmen"},
{"tl", "*Tagalog"},
{"tn", "*Setswana"},
{"to", "*Tonga"},
{"tr", "*Turkish"},
{"ts", "*Tsonga"},
{"tt", "*Tatar"},
{"tw", "*Twi"},
{"ug", "*Uighur"},
{"uk", "*Ukrainian"},
{"ur", "*Urdu"},
{"uz", "*Uzbek"},
{"vi", "*Vietnamese"},
{"vo", "*Volapuk"},
{"wo", "*Wolof"},
{"xh", "*Xhosa"},
{"yi", "*Yiddish"}, // formerly ji
{"yo", "*Yoruba"},
{"za", "*Zhuang"},
{"zh", "*Chinese"},
{"zu", "*Zulu"},
{"\0", ""}
};
{ " ", "Not Specified" },
{ "aa", "*Afar" },
{ "ab", "*Abkhazian" },
{ "af", "*Afrikaans" },
{ "am", "*Amharic" },
{ "ar", "*Arabic" },
{ "as", "*Assamese" },
{ "ay", "*Aymara" },
{ "az", "*Azerbaijani" },
{ "ba", "*Bashkir" },
{ "be", "*Byelorussian" },
{ "bg", "*Bulgarian" },
{ "bh", "*Bihari" },
{ "bi", "*Bislama" },
{ "bn", "*Bengali; Bangla" },
{ "bo", "*Tibetan" },
{ "br", "*Breton" },
{ "ca", "*Catalan" },
{ "co", "*Corsican" },
{ "cs", "*Czech(Ceske)" },
{ "cy", "*Welsh" },
{ "da", "Dansk" },
{ "de", "Deutsch" },
{ "dz", "*Bhutani" },
{ "el", "*Greek" },
{ "en", "English" },
{ "eo", "*Esperanto" },
{ "es", "Espanol" },
{ "et", "*Estonian" },
{ "eu", "*Basque" },
{ "fa", "*Persian" },
{ "fi", "Suomi" },
{ "fj", "*Fiji" },
{ "fo", "*Faroese" },
{ "fr", "Francais" },
{ "fy", "*Frisian" },
{ "ga", "*Irish" },
{ "gd", "*Scots Gaelic" },
{ "gl", "*Galician" },
{ "gn", "*Guarani" },
{ "gu", "*Gujarati" },
{ "ha", "*Hausa" },
{ "he", "*Hebrew" }, /* formerly iw */
{ "hi", "*Hindi" },
{ "hr", "Hrvatski" }, /* Croatian */
{ "hu", "Magyar" },
{ "hy", "*Armenian" },
{ "ia", "*Interlingua" },
{ "id", "*Indonesian" }, /* formerly in */
{ "ie", "*Interlingue" },
{ "ik", "*Inupiak" },
{ "in", "*Indonesian" }, /* replaced by id */
{ "is", "Islenska" },
{ "it", "Italiano" },
{ "iu", "*Inuktitut" },
{ "iw", "*Hebrew" }, /* replaced by he */
{ "ja", "*Japanese" },
{ "ji", "*Yiddish" }, /* replaced by yi */
{ "jw", "*Javanese" },
{ "ka", "*Georgian" },
{ "kk", "*Kazakh" },
{ "kl", "*Greenlandic" },
{ "km", "*Cambodian" },
{ "kn", "*Kannada" },
{ "ko", "*Korean" },
{ "ks", "*Kashmiri" },
{ "ku", "*Kurdish" },
{ "ky", "*Kirghiz" },
{ "la", "*Latin" },
{ "ln", "*Lingala" },
{ "lo", "*Laothian" },
{ "lt", "*Lithuanian" },
{ "lv", "*Latvian, Lettish" },
{ "mg", "*Malagasy" },
{ "mi", "*Maori" },
{ "mk", "*Macedonian" },
{ "ml", "*Malayalam" },
{ "mn", "*Mongolian" },
{ "mo", "*Moldavian" },
{ "mr", "*Marathi" },
{ "ms", "*Malay" },
{ "mt", "*Maltese" },
{ "my", "*Burmese" },
{ "na", "*Nauru" },
{ "ne", "*Nepali" },
{ "nl", "Nederlands" },
{ "no", "Norsk" },
{ "oc", "*Occitan" },
{ "om", "*(Afan) Oromo" },
{ "or", "*Oriya" },
{ "pa", "*Punjabi" },
{ "pl", "*Polish" },
{ "ps", "*Pashto, Pushto" },
{ "pt", "Portugues" },
{ "qu", "*Quechua" },
{ "rm", "*Rhaeto-Romance" },
{ "rn", "*Kirundi" },
{ "ro", "*Romanian" },
{ "ru", "*Russian" },
{ "rw", "*Kinyarwanda" },
{ "sa", "*Sanskrit" },
{ "sd", "*Sindhi" },
{ "sg", "*Sangho" },
{ "sh", "*Serbo-Croatian" },
{ "si", "*Sinhalese" },
{ "sk", "*Slovak" },
{ "sl", "*Slovenian" },
{ "sm", "*Samoan" },
{ "sn", "*Shona" },
{ "so", "*Somali" },
{ "sq", "*Albanian" },
{ "sr", "*Serbian" },
{ "ss", "*Siswati" },
{ "st", "*Sesotho" },
{ "su", "*Sundanese" },
{ "sv", "Svenska" },
{ "sw", "*Swahili" },
{ "ta", "*Tamil" },
{ "te", "*Telugu" },
{ "tg", "*Tajik" },
{ "th", "*Thai" },
{ "ti", "*Tigrinya" },
{ "tk", "*Turkmen" },
{ "tl", "*Tagalog" },
{ "tn", "*Setswana" },
{ "to", "*Tonga" },
{ "tr", "*Turkish" },
{ "ts", "*Tsonga" },
{ "tt", "*Tatar" },
{ "tw", "*Twi" },
{ "ug", "*Uighur" },
{ "uk", "*Ukrainian" },
{ "ur", "*Urdu" },
{ "uz", "*Uzbek" },
{ "vi", "*Vietnamese" },
{ "vo", "*Volapuk" },
{ "wo", "*Wolof" },
{ "xh", "*Xhosa" },
{ "yi", "*Yiddish" }, /* formerly ji */
{ "yo", "*Yoruba" },
{ "za", "*Zhuang" },
{ "zh", "*Chinese" },
{ "zu", "*Zulu" },
{ "\0", "" }
};
/*****************************************************************************
* Local prototypes
......@@ -434,7 +435,7 @@ static int DVDSetArea( input_thread_t * p_input,
p_method->ifo.vts.i_pos +
p_method->ifo.vts.mat.i_tt_vobs_ssector * DVD_LB_SIZE;
CSSGetKey( &(p_method->css) );
intf_WarnMsg( 2, "CSS: VTS key initialized" );
intf_WarnMsg( 2, "css info: VTS key initialized" );
}
/*
......@@ -699,10 +700,10 @@ static void DVDInit( input_thread_t * p_input )
if( ( p_input->b_error = p_method->css.b_error ) )
{
intf_ErrMsg( "CSS fatal error" );
intf_ErrMsg( "css error: fatal failure" );
return;
}
intf_WarnMsg( 2, "CSS: initialized" );
intf_WarnMsg( 2, "css info: initialized" );
}
/* Initialize ES structures */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment