Commit 0beab2c2 authored by Sam Hocevar's avatar Sam Hocevar

* ALL: removed libdvdcss from the vlc tree.

  * ALL: removed libdvdread from the vlc tree.
  * ./acconfig.h: removed this file.
  * ./plugins/dvd/dummy_dvdcss.c: merged this file into dvd.c.
  * ./AUTHORS: moved a few gentlemen to the libdvdcss AUTHORS file.
parent 1de7fc8e
......@@ -35,10 +35,6 @@ C: gbazin
D: mingw32 port, various win32 fixes
D: DirectX audio and video output
N: Billy Biggs
E: vektor@dumbterm.net
D: libdvdcss enhancements
N: Johan Bilien
E: jobi@via.ecp.fr
C: jobi
......@@ -141,11 +137,6 @@ E: jimmy@via.ecp.fr
C: jimmy
D: IDCT and YUV transformations
N: Hkan Hjort
E: d95hjort@dtek.chalmers.se
D: Solaris port of the DVD ioctls
D: libdvdcss enhancements
N: Samuel Hocevar
E: sam@zoy.org
C: sam
......@@ -165,7 +156,7 @@ D: patch for module options handling
N: Eugenio Jarosiewicz
E: ej0@cise.ufl.edu
C: ej
D: MacOS X interface, DVD ioctls, and various fixes
D: MacOS X interface, and various fixes
N: Brieuc Jeunhomme
E: bbp@via.ecp.fr
......@@ -204,10 +195,6 @@ N: Mathias Kretschmer
E: mathias@research.att.com
D: IP Multicast support
N: Markus Kuespert
E: ltlBeBoy@beosmail.com
D: BeOS port of the DVD ioctls
N: Michel Lespinasse
E: walken@zoy.org
C: walken
......@@ -275,10 +262,6 @@ E: richard@rshepherd.demon.co.uk
C: richards
D: BeOS video output (BBitmap and Overlay)
N: David Siebrger
E: drs-videolan@rucus.ru.ac.za
D: HP-UX port of the DVD ioctls
N: Espen Skoglund
E: esk@ira.uka.de
D: FreeBSD autoconf and Makefile patches
......@@ -293,7 +276,3 @@ N: Peter Surda
E: shurdeek@panorama.sth.ac.at
D: rc plugin for vlc control through /dev/stdin
N: German Tischler
E: tanis@gaspode.franken.de
D: FreeBSD DVD input patch
#=========================#
# ChangeLog for libdvdcss #
#=========================#
HEAD
* Support for REPORT_TITLE_KEY and RPC commands by Håkan Hjort
<d95hjort@dtek.chalmers.se>.
* HP-UX port courtesy of David Siebörger <drs-videolan@rucus.ru.ac.za>.
1.0.1
Fri, 7 Dec 2001 20:18:56 +0100
* Update for libdvdcss documentation.
* Reworked Keith Packard's raw device patch. The name of the raw device
is in the environment variable DVDCSS_RAW_DEVICE.
* Fixed a bug in libdvdcss: the key wasn't searched when it had to.
1.0.0
Mon, 12 Nov 2001 17:14:29 +0100
* Got rid of DVDCSS_SEEK_INI.
* Removed the i_flags argument to dvdcss_open. Everything is done through
environment variables now.
* Fixed a buffer overflow in CSSAuth().
* libdvdcss port to OpenBSD.
* Fixed NetBSD (and probably OpenBSD) libdvdcss compilation.
* Fixed undefined KEY_SIZE compile bug mentioned by Dave Thorup.
* Fixed CSS ioctl for Darwin/OSX - still might need tweaking of 'dataLength'
fields.
* Added ReadTitleKey ioctl for Darwin/OSX.
* When using title cracking method in libdvdcss, the key is only checked at
title start, not before each chapter.
* Use of an environment variable to choose libdvdcss method.
* New features for libdvdcss: we have three ways now to decode a title key.
* 1) Crack the title key (the method that was here before). The only change
here is that we search the key for the exact chapter we are seeking with
DVDSetArea (in case the key has changed within a title). It is maybe not a
good idea.
* 2) Crack the disc key, which allows us to decode instantly all title keys.
I've used an algorithm from Frank Stevenson ; it eats much memory (64MB),
and takes about 15 s at launch time.
* 3) Decode the disc key with player keys (libcss method). However, you need
licensed player keys at build time for this to work.
* Darwin ioctl, courtesy of ej0.
* If we see 3000 unencrypted blocks assume that the title is unencrypted.
* If we have not seen any encrypted block and then discover that the block
just read is not a valid block of an MPEG2 Program stream, assume that the
title is unencrypted.
* Empty keys (for unscrambled sectors) are now cached as well.
* We try to decrypt the file even if DVD ioctls are not available.
0.0.3
Wed, 22 Aug 2001 15:18:01 +0200
* Added BSD/OS libdvd by Steven M. Schultz <sms@TO.GD-ES.COM> in
extras/BSDI_dvdioctl after he suggested us to do so. License is GPL.
* ./configure now checks for an installed libdvd under BSD/OS and
falls back to ours if not found.
* Fixed harmless typos in yesterday's Solaris libdvd patches.
* Bumped libdvdcss version number up to 0.0.3.
* Solaris DVD decryption support by Håkan Hjort <d95hjort@dtek.chalmers.se>.
* BSD/OS 4.3beta1 fixes by Steven M. Schultz <sms@TO.GD-ES.COM>.
* libdvdcss* packages are now a bit more policy-compliant.
* Fixed a Win32 bug in libdvdcss. This bug was appearing on title change.
0.0.2
Wed, 22 Aug 2001 15:18:01 +0200
* Fix in libdvdcss in the key caching code.
* Changed libdvdcss API to force binary incompatibility. Yeah, this is
evil, but if we don't do it now we'll have to do it when more people
are using it.
* Fixed minor libdvdcss stuff such as the soname and compilation flags.
* dvdcss_readv() optimisations for Win32.
* Fixed _win32_dvdcss_aread() to work around the WinASPI32 64kb transfer
size restriction.
* libdvdcss segfault fixes.
* Fixed 2 Win32 bugs in libdvdcss (in _win32_dvdcss_readv), one of them
should have prevented the Win9x dvd input from working.
* Moved the "if(Win2k)" out of the loop in _win32_dvdcss_readv.
* libdvdcss enhancements by Billy Biggs <vektor@dumbterm.net>. This breaks
vlc's DVD input (looks like decoders are expecting data too early and
DVD input can't cope with it due to decryption). Needs to be investigated.
* Removed unnecessary translations in the win32 code from block offsets to
byte offsets. This was overflowing some variables.
* Reduced the complexity of the Win9x ASPI functions because we only need
to handle DVD drive access.
* Win32 code now handles seeking in areas above 2.1 Go on DVDs.
* Additional MacOS X DVD ioctl work by Eugenio Jarosiewicz
<ej0@cise.ufl.edu>.
0.0.1
Tue, 19 Jun 2001 08:53:16 +0200
* First libdvdcss version (0.0.1).
* Fully working Windows DVD ioctl support by Jon Lech Johansen.
* Merged dvdcss_init and dvdcss_open into dvdcss_open, and dvdcss_close
and dvdcss_end into dvdcss_close. libdvdcss API now has 7 functions.
* Exported the CSS part of the dvd plugin into a library.
INSTALL file for libdvdcss, a DVD access library
Configuring libdvdcss
=====================
A typical way to configure libdvdcss is:
./configure --prefix=/usr
See `./configure --help' for more information.
It is also possible to cross-compile for the Win32 platform using mingw32:
CC=i586-mingw32msvc-gcc CFLAGS=-I/usr/i586-mingw32msvc \
RANLIB=i586-mingw32msvc-ranlib ./configure --host=i386-mingw32msvc \
--target=i386-mingw32msvc --build=i386-linux
Building libdvdcss
==================
Once configured, run `make' to build libdvdcss.
If you have player keys, you need to put them in the file csskeys.h, before
configuring libdvdcss to enable the "key" method (the one from libcss).
Installing libdvdcss
====================
You can install libdvdcss by typing:
make install
......@@ -210,8 +210,6 @@ endif
# Misc variables
#
VLC_QUICKVERSION := $(shell grep '^ *VLC_VERSION=' configure.in | head -1 | sed 's/"//g' | cut -f2 -d=)
LIBDVDCSS_QUICKVERSION := $(shell grep '^ *LIBDVDCSS_VERSION=' configure.in | head -1 | sed 's/"//g' | cut -f2 -d=)
# All symbols must be exported
export
......@@ -247,21 +245,15 @@ show:
#
# Cleaning rules
#
clean: libdvdcss-clean libdvdread-clean plugins-clean po-clean vlc-clean
clean: plugins-clean po-clean vlc-clean
rm -f src/*/*.o extras/*/*.o
rm -f lib/*.so* lib/*.a
rm -f plugins/*.so plugins/*.a
rm -rf extras/MacOSX/build
libdvdcss-clean:
-cd extras/libdvdcss && $(MAKE) clean
po-clean:
-cd po && $(MAKE) clean
libdvdread-clean:
-cd extras/libdvdread && $(MAKE) clean
plugins-clean:
for dir in $(PLUGINS_DIR) ; do \
( cd plugins/$${dir} \
......@@ -287,9 +279,9 @@ distclean: clean
#
# Install/uninstall rules
#
install: libdvdcss-install vlc-install plugins-install po-install
install: vlc-install plugins-install po-install
uninstall: libdvdcss-uninstall vlc-uninstall plugins-uninstall po-uninstall
uninstall: vlc-uninstall plugins-uninstall po-uninstall
vlc-install:
mkdir -p $(DESTDIR)$(bindir)
......@@ -320,18 +312,6 @@ endif
plugins-uninstall:
rm -f $(DESTDIR)$(libdir)/videolan/vlc/*.so
libdvdcss-install:
-cd extras/libdvdcss && $(MAKE) install
libdvdcss-uninstall:
-cd extras/libdvdcss && $(MAKE) uninstall
libdvdread-install:
-cd extras/libdvdread && $(MAKE) install
libdvdread-uninstall:
-cd extras/libdvdread && $(MAKE) uninstall
po-install:
-cd po && $(MAKE) install
......@@ -374,7 +354,7 @@ snapshot-common:
cp FAQ AUTHORS COPYING TODO todo.pl ChangeLog* README* INSTALL* \
Makefile Makefile.opts.in Makefile.dep Makefile.modules \
configure configure.in install-sh install-win32 vlc.spec \
config.sub config.guess acconfig.h aclocal.m4 mkinstalldirs \
config.sub config.guess aclocal.m4 mkinstalldirs \
tmp/vlc/
# Copy Debian control files
for file in debian/*dirs debian/*docs debian/*menu debian/*desktop \
......@@ -400,18 +380,12 @@ snapshot: snapshot-common
rm -Rf tmp
snapshot-nocss: snapshot-common
# Remove libdvdcss
rm -Rf tmp/vlc/extras/libdvdcss
rm -f tmp/vlc/*.libdvdcss
# Fix debian information
rm -f tmp/vlc/debian/libdvdcss*
rm -f tmp/vlc/debian/control
sed -e 's#^ DVDs# unencrypted DVDs#' < debian/control \
| awk '{if(gsub("Package: libdvdcss",$$0))a=1;if(a==0)print $$0;if(a==1&&$$0=="")a=0}' \
> tmp/vlc/debian/control
rm -f tmp/vlc/debian/rules
sed -e 's#^\(export LIBDVDCSS_FLAGS=\).*#\1"--without-dvdcss"#' < debian/rules \
| awk '{if($$0=="# libdvdcss start")a=1;if(a==0)print $$0;if($$0=="# libdvdcss stop")a=0}' \
sed -e 's#^\(export DVDCSS_FLAGS=\).*#\1"--enable-dvd --without-dvdcss"#' < debian/rules \
> tmp/vlc/debian/rules
chmod +x tmp/vlc/debian/rules
# Build css-disabled archives
......@@ -437,8 +411,7 @@ package-win32:
# Copy relevant files
cp vlc.exe $(PLUGINS:%=plugins/%.so) tmp/
cp INSTALL.win32 tmp/INSTALL.txt ; unix2dos tmp/INSTALL.txt
for file in AUTHORS COPYING ChangeLog ChangeLog.libdvdcss \
README README.libdvdcss FAQ TODO ; \
for file in AUTHORS COPYING ChangeLog README FAQ TODO ; \
do cp $$file tmp/$${file}.txt ; \
unix2dos tmp/$${file}.txt ; done
for file in iconv.dll libgmodule-1.3-12.dll libgtk-0.dll libgdk-0.dll \
......@@ -467,8 +440,7 @@ package-beos:
mkdir -p tmp/vlc/share
# Copy relevant files
cp vlc tmp/vlc/
cp AUTHORS COPYING ChangeLog ChangeLog.libdvdcss \
README README.libdvdcss FAQ TODO tmp/vlc/
cp AUTHORS COPYING ChangeLog README FAQ TODO tmp/vlc/
for file in default8x16.psf default8x9.psf ; \
do cp share/$$file tmp/vlc/share/ ; done
# Create package
......@@ -489,8 +461,7 @@ package-macosx:
# Copy relevant files
cp -R vlc.app tmp/
cp AUTHORS COPYING ChangeLog ChangeLog.libdvdcss \
README README.libdvdcss FAQ TODO tmp/
cp AUTHORS COPYING ChangeLog README FAQ TODO tmp/
# Create disk image
./macosx-dmg 0 "vlc-${VLC_QUICKVERSION}" tmp/*
......@@ -498,39 +469,6 @@ package-macosx:
# Clean up
rm -Rf tmp
libdvdcss-snapshot: snapshot-common
# Remove vlc sources and icons, doc, debian directory...
rm -Rf tmp/vlc/src tmp/vlc/share tmp/vlc/plugins tmp/vlc/doc
rm -Rf tmp/vlc/extras/GNUgetopt tmp/vlc/extras/MacOSX
rm -Rf tmp/vlc/debian
rm -Rf tmp/vlc/ipkg
# Remove useless headers
rm -f tmp/vlc/include/*
for file in defs.h.in config.h common.h int_types.h ; \
do cp include/$$file tmp/vlc/include/ ; done
# Remove misc files (??? - maybe not really needed)
rm -f tmp/vlc/vlc.spec tmp/vlc/INSTALL-win32.txt
mv tmp/vlc/INSTALL.libdvdcss tmp/vlc/INSTALL
mv tmp/vlc/README.libdvdcss tmp/vlc/README
mv tmp/vlc/ChangeLog.libdvdcss tmp/vlc/ChangeLog
# Fix Makefile
rm -f tmp/vlc/Makefile
sed -e 's#^install:#install-unused:#' \
-e 's#^uninstall:#uninstall-unused:#' \
-e 's#^clean:#clean-unused:#' \
-e 's#^all:.*#all: libdvdcss#' \
-e 's#^libdvdcss-install:#install:#' \
-e 's#^libdvdcss-uninstall:#uninstall:#' \
-e 's#^libdvdcss-clean:#clean:#' \
< Makefile > tmp/vlc/Makefile
# Build archives
F=libdvdcss-${LIBDVDCSS_QUICKVERSION}; \
mv tmp/vlc tmp/$$F; (cd tmp ; tar cf $$F.tar $$F); \
bzip2 -f -9 < tmp/$$F.tar > $$F.tar.bz2; \
gzip -f -9 tmp/$$F.tar ; mv tmp/$$F.tar.gz .
# Clean up
rm -Rf tmp
deb:
dpkg-buildpackage -rfakeroot -us -uc
......@@ -630,18 +568,6 @@ builtins: Makefile.modules Makefile.opts Makefile.dep Makefile $(BUILTIN_OBJ)
$(BUILTIN_OBJ): FORCE
@cd $(shell echo " "$(PLUGINS_TARGETS)" " | sed -e 's@.* \([^/]*/\)'$(@:plugins/%.a=%)' .*@plugins/\1@' -e 's@^ .*@@') && $(MAKE) -f ../../Makefile.modules $(@:plugins/%=../%)
#
# libdvdcss target
#
libdvdcss: Makefile.opts
@cd extras/libdvdcss && $(MAKE)
#
# libdvdread target
#
libdvdread: Makefile.opts
@cd extras/libdvdread && $(MAKE)
#
# gettext target
#
......
......@@ -92,8 +92,6 @@ LIB_IMDCTSSE = @LIB_IMDCTSSE@
LIB_IPV4 = @LIB_IPV4@
LIB_IPV6 = @LIB_IPV6@
LIB_KDE = @LIB_KDE@
LIB_LIBDVDCSS = @LIB_LIBDVDCSS@
LIB_LIBDVDREAD = @LIB_LIBDVDREAD@
LIB_LIRC = @LIB_LIRC@
LIB_MACOSX = @LIB_MACOSX@
LIB_MAD = @LIB_MAD@
......@@ -125,7 +123,6 @@ CFLAGS_GNOME = @CFLAGS_GNOME@
CFLAGS_GTK = @CFLAGS_GTK@
CFLAGS_KDE = @CFLAGS_KDE@
CFLAGS_IDCTALTIVEC = @CFLAGS_IDCTALTIVEC@
CFLAGS_LIBDVDCSS = @CFLAGS_LIBDVDCSS@
CFLAGS_MACOSX = @CFLAGS_MACOSX@
CFLAGS_MAD = @CFLAGS_MAD@
CFLAGS_MOTIONALTIVEC = @CFLAGS_MOTIONALTIVEC@
......@@ -135,17 +132,10 @@ CFLAGS_WIN32 = @CFLAGS_WIN32@
CFLAGS_X11 = @CFLAGS_X11@
CFLAGS_XVIDEO = @CFLAGS_XVIDEO@
#
# Additional objects
#
SRC_DVD_EXTRA = @SRC_DVD_EXTRA@
SRC_DVDCSS_EXTRA = @SRC_DVDCSS_EXTRA@
#
# Other special cases
#
NEED_GETOPT = @NEED_GETOPT@
NEED_LIBDVDCSS = @NEED_LIBDVDCSS@
###############################################################################
# Configuration pre-processing
......@@ -176,10 +166,6 @@ else
PROGRAM_BUILD = `date` $(USER)@`hostname`
endif
# PROGRAM_VERSION is the current vlc version
PROGRAM_VERSION=@VLC_VERSION@
LIBDVDCSS_VERSION=@LIBDVDCSS_VERSION@
# DEFINE will contain some of the constants definitions decided in Makefile,
# including SYS_xx. It will be passed to C compiler.
DEFINE_SYS := -DSYS_$(shell echo $(SYS) | sed -e 's/-.*//' | tr '[a-z].' '[A-Z]_')
......@@ -304,11 +290,6 @@ ifneq (,$(findstring mingw32,$(SYS)))
LDFLAGS += -mwindows -Xlinker --force-exe-suffix
endif
#
# C compiler and linker flags: setting soname
#
SOFLAGS = @SOFLAGS@
#
# C compiler flags: plugin compilation
#
......
README for libdvdcss, a portable abstraction library for DVD decryption
Introduction
============
libdvdcss is part of the VideoLAN project, a full MPEG2 client/server
solution. The VideoLAN Client can also be used as a standalone program
to play MPEG2 streams from a hard disk or a DVD.
Building and Installing libdvdcss
=================================
See the INSTALL or INSTALL.libdvdcss file for this.
Running lidvdcss
================
The behaviourof the library can be affected by changing two environment
variables:
DVDCSS_METHOD={title|disc|key}: method for key decryption
title: decrypted title key is guessed from the encrypted sectors of
the stream. Thus it should work with a file as well as the
DVD device. But it sometimes takes much time to decrypt a title
key and may even fail. With this method, the key is only checked
at the beginning of each title, so it won't work if the key
changes in the middle of a title.
This is the default method,
disc: the disc key is first cracked ; then all title keys can be
decrypted instantly, which allows us to check them often,
key: the same as "disc" if you don't have a file with player keys at
compilation time. If you do, the decryption of the disc key
will be faster with this method. It is the one that was used by
libcss.
DVDCSS_VERBOSE={0|1|2}: libdvdcss verbosity
0: no error messages, no debug messages,
1: only error messages (this is the default)
2: error and debug messages
Troubleshooting
===============
A mailing-list has been set up for support and discussion about vlc and
libdvdcss. Its address is :
<vlc@videolan.org>
To subscribe, send a mail to <listar@videolan.org> with the following
words in the mail body :
subscribe vlc
To unsubscribe, do the same with the words :
unsubscribe vlc
When reporting bugs, try to be as precise as possible (which OS, which
distribution, what plugins you were trying, and so on).
Resources
=========
The VideoLAN web site at http://www.videolan.org/ is a good start for
information about MPEG and DVD playing. Have a look at the documentation
section, as well as the bookmarks.
#undef PACKAGE
#undef VERSION
#undef DVD_DEVICE
#undef VCD_DEVICE
#undef COPYRIGHT_MESSAGE
#undef MODULE_SUFFIX
#undef MODULE_SYMBOL
#undef VERSION_MESSAGE
This diff is collapsed.
dnl Autoconf settings for vlc and libdvdcss
dnl Autoconf settings for vlc
AC_INIT(include/main.h)
AC_CONFIG_HEADER(include/defs.h)
AC_CANONICAL_SYSTEM
HAVE_VLC=0
if test -r src/interface/main.c; then
HAVE_VLC=1
VLC_VERSION="0.2.92-dev"
VLC_CODENAME=Ourumov
fi
HAVE_LIBDVDCSS=0
if test -r extras/libdvdcss/libdvdcss.c; then
HAVE_LIBDVDCSS=1
LIBDVDCSS_VERSION="1.0.1-dev"
AC_SUBST(LIBDVDCSS_VERSION)
if test -r extras/libdvdcss/csskeys.h; then
AC_DEFINE(HAVE_CSSKEYS,1,css decryption with player keys)
fi
fi
VERSION="0.2.92-dev"
CODENAME=Ourumov
dnl Save CFLAGS and LDFLAGS
save_CFLAGS="${CFLAGS}"
......@@ -53,8 +39,8 @@ fi
dnl Gettext stuff
ALL_LINGUAS="de fr ja no ru nl"
AC_DEFINE_UNQUOTED(PACKAGE, "vlc")
AC_DEFINE_UNQUOTED(VERSION, "$VLC_VERSION")
AC_DEFINE_UNQUOTED(PACKAGE, "vlc", [Package name])
AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Package version])
AM_GNU_GETTEXT
dnl AM_PROG_LIBTOOL
......@@ -326,33 +312,6 @@ if test x"$ac_cv_ld_plugins" != x"no"; then
PLDFLAGS="${PLDFLAGS} -shared"
fi
dnl Check for soname setting
if test x"${SOFLAGS}" = x; then
AC_CACHE_CHECK([for soname setting],
[ac_cv_ld_soname],
[
# Standard
try_SOFLAGS="-Wl,-soname -Wl,"
LDFLAGS="${save_LDFLAGS} ${try_SOFLAGS}foo.so.0"
AC_TRY_LINK([],,ac_cv_ld_soname="${try_SOFLAGS}", [
# SunOS
try_SOFLAGS="-Wl,-h -Wl,"
LDFLAGS="${save_LDFLAGS} ${try_SOFLAGS}foo.so.0"
AC_TRY_LINK([],,ac_cv_ld_soname="${try_SOFLAGS}",
ac_cv_ld_soname=none)
])])
if test x"$ac_cv_ld_soname" != x"none"; then
SOFLAGS=$ac_cv_ld_soname
else
echo "
------------
Your system doesn't seem to have support for dynamic linking. You may
have problems using libdvdcss.
------------
"
fi
fi
dnl Checks for __attribute__(aligned()) directive
AC_CACHE_CHECK([__attribute__ ((aligned ())) support],
[ac_cv_c_attribute_aligned],
......@@ -521,106 +480,6 @@ fi
fi # end if mingw32
dnl
dnl libdvdcss: check for DVD ioctls
dnl
dnl default is no
CAN_BUILD_LIBDVDCSS=0
dnl for windoze
AC_CHECK_HEADERS(winioctl.h,[
CAN_BUILD_LIBDVDCSS="${HAVE_LIBDVDCSS}"
])
dnl for Un*x and BeOS
AC_CHECK_HEADERS(sys/ioctl.h,[
CAN_BUILD_LIBDVDCSS="${HAVE_LIBDVDCSS}"
AC_CHECK_HEADERS(sys/cdio.h sys/dvdio.h linux/cdrom.h dvd.h)
BSD_DVD_STRUCT=0
LINUX_DVD_STRUCT=0
OPENBSD_DVD_STRUCT=0
dnl
dnl Old FreeBSD: sys/cdio.h
dnl
AC_EGREP_HEADER(dvd_struct,sys/cdio.h,[
AC_DEFINE(DVD_STRUCT_IN_SYS_CDIO_H, 1,
Define if <sys/cdio.h> defines dvd_struct.)
AC_EGREP_HEADER(struct dvd_struct,sys/cdio.h,[
BSD_DVD_STRUCT=1],[LINUX_DVD_STRUCT=1; OPENBSD_DVD_STRUCT=1])
])
dnl
dnl Newer FreeBSD: sys/dvdio.h
dnl
AC_EGREP_HEADER(dvd_struct,sys/dvdio.h,[
AC_DEFINE(DVD_STRUCT_IN_SYS_DVDIO_H, 1,
Define if <sys/dvdio.h> defines dvd_struct.)
AC_EGREP_HEADER(struct dvd_struct,sys/dvdio.h,[
BSD_DVD_STRUCT=1],[LINUX_DVD_STRUCT=1])
])
dnl
dnl Linux: linux/cdrom.h
dnl
AC_EGREP_HEADER(dvd_struct,linux/cdrom.h,[
AC_DEFINE(DVD_STRUCT_IN_LINUX_CDROM_H, 1,
Define if <linux/cdrom.h> defines DVD_STRUCT.)
LINUX_DVD_STRUCT=1
])
dnl
dnl BSDI: dvd.h
dnl
NEED_BSDI_LIBDVD=0
AC_EGREP_HEADER(dvd_struct,dvd.h,[
AC_DEFINE(DVD_STRUCT_IN_DVD_H, 1,
Define if <dvd.h> defines DVD_STRUCT.)
LIB_LIBDVDCSS="${LIB_LIBDVDCSS} -ldvd"
LINUX_DVD_STRUCT=1
],[
dnl
dnl BSDI: /sys/dev/scsi/scsi_ioctl.h, using our own libdvd
dnl
AC_CHECK_HEADERS(/sys/dev/scsi/scsi_ioctl.h,[
NEED_BSDI_LIBDVD=1
AC_DEFINE(DVD_STRUCT_IN_BSDI_DVDIOCTL_DVD_H, 1,
Define if <extras/BSDI_dvdioctl/dvd.h> defines DVD_STRUCT.)
SRC_DVDCSS_EXTRA="${SRC_DVDCSS_EXTRA} bsdi_dvdioctl.c"
LINUX_DVD_STRUCT=1
])
])
dnl
dnl Solaris: sys/scsi/scsi_types.h, sys/scsi/impl/uscsi.h
dnl
AC_CHECK_HEADER(sys/scsi/scsi_types.h,[
AC_CHECK_HEADER(sys/scsi/impl/uscsi.h,[
AC_DEFINE(SOLARIS_USCSI, 1, Have userspace SCSI headers.)
])
])
dnl
dnl HP-UX: sys/scsi.h
dnl
AC_CHECK_HEADER(sys/scsi.h,[
AC_EGREP_HEADER(sctl_io,sys/scsi.h,[
AC_DEFINE(HPUX_SCTL_IO, 1, Define if <sys/scsi.h> defines sctl_io.)
])
])
dnl
dnl Final tests to check what was detected
dnl
if test x$LINUX_DVD_STRUCT = x1; then
AC_DEFINE(HAVE_LINUX_DVD_STRUCT, 1,
Define if Linux-like dvd_struct is defined.)
if test x$OPENBSD_DVD_STRUCT = x1; then
AC_DEFINE(HAVE_OPENBSD_DVD_STRUCT, 1,
Define if OpenBSD-like dvd_struct is defined.)
fi
else
if test x$BSD_DVD_STRUCT = x1; then
AC_DEFINE(HAVE_BSD_DVD_STRUCT, 1,
Define if FreeBSD-like dvd_struct is defined.)
fi
fi
])
AC_ARG_WITH(,[])
AC_ARG_WITH(,[Optimization options:])
......@@ -680,8 +539,7 @@ dnl
AC_ARG_ENABLE(release,
[ --enable-release activate extra optimizations (default disabled)],
[ if test x$enableval = xyes; then RELEASE=1; fi ],
[ VLC_VERSION="${VLC_VERSION}_`date +%Y-%m-%d`";
LIBDVDCSS_VERSION="${LIBDVDCSS_VERSION}_`date +%Y-%m-%d`"; ])
[ VERSION="${VERSION}_`date +%Y-%m-%d`" ])
dnl
dnl Input plugins
......@@ -690,136 +548,77 @@ dnl
AC_ARG_WITH(,[Input plugins:])
dnl
dnl DVD module: check for installed libdvdcss or local libdvdcss
dnl
NEED_LIBDVDCSS=0
STATIC_LIBDVDCSS=0
DUMMY_LIBDVDCSS=0
AC_ARG_WITH(dvdcss,
[ --with-dvdcss[=name] use libdvdcss, either 'yes', 'no', 'local-static',
'local-shared', or a path to another libdvdcss such
as '/usr/local' (default 'local-static')],
[ case "x${withval}" in
xlocal-static|xyes)
# local libdvdcss, statically linked
BUILTINS="${BUILTINS} dvd"
if test x${CAN_BUILD_LIBDVDCSS} = x1
then
NEED_LIBDVDCSS=1
STATIC_LIBDVDCSS=1
CFLAGS_DVD="${CFLAGS_DVD} -I../../extras/libdvdcss"
LIB_DVD="${LIB_DVD} lib/libdvdcss.a ${LIB_LIBDVDCSS}"
fi
;;
xlocal-shared)
# local libdvdcss, dynamically linked
PLUGINS="${PLUGINS} dvd"
if test x${CAN_BUILD_LIBDVDCSS} = x1
then
NEED_LIBDVDCSS=1
CFLAGS_DVD="${CFLAGS_DVD} -I../../extras/libdvdcss"
LIB_DVD="${LIB_DVD} -L../../lib -ldvdcss"
fi
;;
xno)
# don't use libdvdcss at all, build a DVD module that can dlopen() it
PLUGINS="${PLUGINS} dvd"
DUMMY_LIBDVDCSS=1
SRC_DVD_EXTRA="${SRC_DVD_EXTRA} dummy_dvdcss.c"
CFLAGS_DVD="${CFLAGS_DVD} -DGOD_DAMN_DMCA"
CFLAGS_DVD="${CFLAGS_DVD} -DLIBDVDCSS_VERSION=\"${LIBDVDCSS_VERSION}\""
LIB_DVD="${LIB_DVD} -ldl"
;;
*)
# existing libdvdcss
PLUGINS="${PLUGINS} dvd"
if test "x$withval" != "xyes"
then
LIB_DVD="${LIB_DVD} -L"$withval"/lib"
CFLAGS_DVD="${CFLAGS_DVD} -I"$withval"/include"
fi
LIB_DVD="${LIB_DVD} -ldvdcss"
esac ],
# user didn't decide, we choose to use local libdvdcss and link statically
# if libdvdcss is in the archive, or to use the dummy replacement otherwise.
[ if test x${CAN_BUILD_LIBDVDCSS} = x1
dnl DVD module: optionally check for installed libdvdcss
dnl
AC_ARG_ENABLE(dvd,
[ --enable-dvd DVD input module (default enabled)])
if test "x$enableval" != "xno"
then
AC_ARG_WITH(dvdcss,
[ --with-dvdcss=PATH libdvdcss headers and libraries])
case "x$with_dvdcss" in
x)