Commit 460360a8 authored by Sam Hocevar's avatar Sam Hocevar

  * Added a dummy libdvdcss so that the DVD plugin can be used without
    libdvdcss. It will try to dlopen() libdvdcss at runtime, though,
    and will use the dummy functions only if it couldn't find a valid
    libdvdcss. This is probably only useful to package maintainers.

  * Tidied the snapshot-* Makefile rules.
  * Tidied the modules Makefiles.
  * Removed useless stuff in the debian/ directory.
  * Removed the "make all" kludge in the Makefile.opts rule. I hope this
    patch is harmless on all systems.
parent f82f7f25
...@@ -125,6 +125,7 @@ D: Bug fixes ...@@ -125,6 +125,7 @@ D: Bug fixes
N: Jon Lech Johansen N: Jon Lech Johansen
E: jon-vl@nanocrew.net E: jon-vl@nanocrew.net
C: jlj
D: PS input fixes D: PS input fixes
D: Win32 DVD input port D: Win32 DVD input port
D: QNX RTOS plug-in D: QNX RTOS plug-in
......
...@@ -87,6 +87,13 @@ ifneq (,$(BUILTINS)) ...@@ -87,6 +87,13 @@ ifneq (,$(BUILTINS))
BUILTIN_OBJ := $(shell for i in $(BUILTINS) ; do echo " "$(PLUGINS_TARGETS)" " | sed -e 's@.*/\('$$i'\) .*@plugins/\1.a@' -e 's@^ .*@@' ; done) BUILTIN_OBJ := $(shell for i in $(BUILTINS) ; do echo " "$(PLUGINS_TARGETS)" " | sed -e 's@.*/\('$$i'\) .*@plugins/\1.a@' -e 's@^ .*@@' ; done)
endif endif
#
# Misc variables
#
VLC_QUICKVERSION := $(shell grep 'VLC_VERSION=' configure.in | cut -f2 -d=)
LIBDVDCSS_QUICKVERSION := $(shell grep 'LIBDVDCSS_VERSION=' configure.in | cut -f2 -d=)
# All symbols must be exported # All symbols must be exported
export export
...@@ -97,21 +104,37 @@ export ...@@ -97,21 +104,37 @@ export
# #
# Virtual targets # Virtual targets
# #
all: Makefile.opts vlc ${ALIASES} plugins vlc.app all: Makefile.opts vlc ${ALIASES} vlc.app
Makefile.opts: Makefile.opts:
@echo "**** No configuration found, running ./configure..." @echo "**** No configuration found, running ./configure..."
./configure ./configure
$(MAKE) all
exit
# Include Makefile.opts again in case we just generated it
ifneq (1,$(HAVE_MAKEFILE_OPTS))
-include Makefile.opts
endif
show:
@echo CC: $(CC)
@echo CFLAGS: $(CFLAGS)
@echo DCFLAGS: $(DCFLAGS)
@echo LCFLAGS: $(LCFLAGS)
@echo C_OBJ: $(C_OBJ)
@echo CPP_OBJ: $(CPP_OBJ)
@echo PLUGIN_OBJ: $(PLUGIN_OBJ)
@echo BUILTIN_OBJ: $(BUILTIN_OBJ)
#
# Cleaning rules
#
clean: libdvdcss-clean plugins-clean vlc-clean clean: libdvdcss-clean plugins-clean vlc-clean
rm -f src/*/*.o extras/*/*.o rm -f src/*/*.o extras/*/*.o
rm -f lib/*.so lib/*.so.* lib/*.a rm -f lib/*.so* lib/*.a
rm -f plugins/*.so plugins/*.so.* plugins/*.a rm -f plugins/*.so plugins/*.a
libdvdcss-clean: libdvdcss-clean:
cd extras/libdvdcss && $(MAKE) clean -cd extras/libdvdcss && $(MAKE) clean
plugins-clean: plugins-clean:
for dir in $(PLUGINS_DIR) ; do \ for dir in $(PLUGINS_DIR) ; do \
...@@ -133,6 +156,9 @@ distclean: clean ...@@ -133,6 +156,9 @@ distclean: clean
rm -Rf .dep rm -Rf .dep
rm -f .gdb_history rm -f .gdb_history
#
# Install/uninstall rules
#
install: libdvdcss-install vlc-install plugins-install install: libdvdcss-install vlc-install plugins-install
uninstall: libdvdcss-uninstall vlc-uninstall plugins-uninstall uninstall: libdvdcss-uninstall vlc-uninstall plugins-uninstall
...@@ -164,94 +190,98 @@ ifneq (,$(PLUGINS)) ...@@ -164,94 +190,98 @@ ifneq (,$(PLUGINS))
endif endif
plugins-uninstall: plugins-uninstall:
ifneq (,$(PLUGINS))
rm -f $(DESTDIR)$(libdir)/videolan/vlc/*.so rm -f $(DESTDIR)$(libdir)/videolan/vlc/*.so
endif
libdvdcss-install: libdvdcss-install:
cd extras/libdvdcss && $(MAKE) install -cd extras/libdvdcss && $(MAKE) install
libdvdcss-uninstall: libdvdcss-uninstall:
cd extras/libdvdcss && $(MAKE) uninstall -cd extras/libdvdcss && $(MAKE) uninstall
show:
@echo CC: $(CC)
@echo CFLAGS: $(CFLAGS)
@echo DCFLAGS: $(DCFLAGS)
@echo LCFLAGS: $(LCFLAGS)
@echo C_OBJ: $(C_OBJ)
@echo CPP_OBJ: $(CPP_OBJ)
@echo objects: $(objects)
@echo cppobjects: $(cppobjects)
@echo PLUGIN_OBJ: $(PLUGIN_OBJ)
@echo BUILTIN_OBJ: $(BUILTIN_OBJ)
# ugliest of all, but I have no time to do it -- sam #
snapshot: clean Makefile.opts # Package generation rules
rm -Rf /tmp/vlc-${PROGRAM_VERSION}* /tmp/vlc-${PROGRAM_VERSION}nocss* #
# copy archive in /tmp snapshot-common: clean
rm -Rf /tmp/vlc
# Copy directory structure in /tmp
find -type d | grep -v CVS | grep -v '\.dep' | while read i ; \ find -type d | grep -v CVS | grep -v '\.dep' | while read i ; \
do mkdir -p /tmp/vlc-${PROGRAM_VERSION}/$$i ; \ do mkdir -p /tmp/vlc/$$i ; \
done done
find debian -mindepth 1 -maxdepth 1 -type d | \ find debian -mindepth 1 -maxdepth 1 -type d | \
while read i ; do rm -Rf /tmp/vlc-${PROGRAM_VERSION}/$$i ; done while read i ; do rm -Rf /tmp/vlc/$$i ; done
# .c .h .in .cpp .glade # Copy .c .h .in .cpp and .glade files
find include src plugins -type f -name '*.[chig]*' | while read i ; \ find include src plugins -type f -name '*.[chig]*' | while read i ; \
do cp $$i /tmp/vlc-${PROGRAM_VERSION}/$$i ; done do cp $$i /tmp/vlc/$$i ; done
# Makefiles # Copy plugin Makefiles
find . plugins -type f -name Makefile | while read i ; \ find plugins -type f -name Makefile | while read i ; \
do cp $$i /tmp/vlc-${PROGRAM_VERSION}/$$i ; done do cp $$i /tmp/vlc/$$i ; done
# extra files # Copy extra programs and documentation
cp -a extras/* /tmp/vlc-${PROGRAM_VERSION}/extras cp -a extras/* /tmp/vlc/extras
cp -a doc/* /tmp/vlc-${PROGRAM_VERSION}/doc cp -a doc/* /tmp/vlc/doc
find /tmp/vlc-${PROGRAM_VERSION}/extras \ find /tmp/vlc/extras /tmp/vlc/doc \
/tmp/vlc-${PROGRAM_VERSION}/doc \ -type d -name CVS -o -type f -name '.*' | while read i ; \
-type d -name CVS | while read i ; \ do rm -Rf $$i ; done
do rm -Rf $$i ; \ # Copy misc files
done cp vlc.spec AUTHORS COPYING TODO todo.pl ChangeLog README* INSTALL* \
# copy misc files Makefile Makefile.opts.in Makefile.dep Makefile.modules \
cp vlc.spec AUTHORS COPYING ChangeLog INSTALL INSTALL.libdvdcss \
INSTALL-win32.txt README TODO todo.pl \
Makefile.opts.in Makefile.dep Makefile.modules \
configure configure.in install-sh config.sub config.guess \ configure configure.in install-sh config.sub config.guess \
/tmp/vlc-${PROGRAM_VERSION}/ /tmp/vlc/
for file in control control-css vlc-gtk.menu vlc.copyright vlc.docs \ # Copy Debian control files
changelog changelog-css rules rules-css vlc.dirs vlc.desktop \ for file in debian/*dirs debian/*menu debian/*desktop ; do \
gvlc.desktop gnome-vlc.desktop vlc.menu ; do \ cp $$file /tmp/vlc/debian ; done
cp debian/$$file /tmp/vlc-${PROGRAM_VERSION}/debian/ ; \ for file in control changelog rules vlc.copyright vlc.docs ; do \
done cp debian/$$file /tmp/vlc/debian/ ; done
for file in default8x16.psf default8x9.psf vlc_beos.rsrc vlc.icns \ # Copy fonts and icons
gvlc_win32.ico vlc_win32_rc.rc ; do \ for file in share/*png share/*xpm share/*psf ; do \
cp share/$$file /tmp/vlc-${PROGRAM_VERSION}/share/ ; \ cp $$file /tmp/vlc/share ; done
done for file in vlc_beos.rsrc vlc.icns gvlc_win32.ico vlc_win32_rc.rc ; do \
for icon in vlc gvlc qvlc gnome-vlc kvlc ; do \ cp share/$$file /tmp/vlc/share/ ; done
cp share/$$icon.xpm share/$$icon.png \
/tmp/vlc-${PROGRAM_VERSION}/share/ ; done snapshot: snapshot-common
# Build archives and clean up
# build css-enabled archives F=vlc-${VLC_QUICKVERSION}; \
(cd /tmp ; tar cf vlc-${PROGRAM_VERSION}.tar vlc-${PROGRAM_VERSION} ; \ rm -Rf /tmp/$$F ; mv /tmp/vlc /tmp/$$F; \
bzip2 -f -9 < vlc-${PROGRAM_VERSION}.tar \ (cd /tmp ; tar cf $$F.tar $$F ; bzip2 -f -9 < $$F.tar > $$F.tar.bz2; \
> vlc-${PROGRAM_VERSION}.tar.bz2 ; \ gzip -f -9 $$F.tar ); mv /tmp/$$F.tar.gz /tmp/$$F.tar.bz2 ..; \
gzip -f -9 vlc-${PROGRAM_VERSION}.tar ) rm -Rf /tmp/$$F
mv /tmp/vlc-${PROGRAM_VERSION}.tar.gz \
/tmp/vlc-${PROGRAM_VERSION}.tar.bz2 .. snapshot-nocss: snapshot-common
# Remove libdvdcss
# clean up rm -Rf /tmp/vlc/extras/libdvdcss
rm -Rf /tmp/vlc-${PROGRAM_VERSION}* rm -f /tmp/vlc/*.libdvdcss
# Fix debian information
libdvdcss-snapshot: clean Makefile.opts rm -f /tmp/vlc/debian/libdvdcss*
rm -Rf /tmp/libdvdcss-${LIBDVDCSS_VERSION}* \ rm -f /tmp/vlc/debian/control
/tmp/libdvdcss-${LIBDVDCSS_VERSION}nocss* sed -e 's#^ DVDs# unencrypted DVDs#' < debian/control \
# copy archive in /tmp | awk '{if(gsub("Package: libdvdcss",$$0))a=1;if(a==0)print $$0;if(a==1&&$$0=="")a=0}' \
find include extras doc lib -type d | grep -v CVS | grep -v '\.dep' | \ > /tmp/vlc/debian/control
while read i ; do \ rm -f /tmp/vlc/debian/rules
mkdir -p /tmp/libdvdcss-${LIBDVDCSS_VERSION}/$$i ; \ sed -e 's#^\(export LIBDVDCSS_FLAGS=\).*#\1"--without-dvdcss"#' < debian/rules \
done | awk '{if($$0=="# libdvdcss start")a=1;if(a==0)print $$0;if($$0=="# libdvdcss stop")a=0}' \
# .c .h .in .cpp .glade > /tmp/vlc/debian/rules
find include extras -type f -name '*.[chig]*' | while read i ; \ chmod +x /tmp/vlc/debian/rules
do cp $$i /tmp/libdvdcss-${LIBDVDCSS_VERSION}/$$i ; done # Build css-disabled archives and clean up
# Makefiles F=vlc-${VLC_QUICKVERSION}; G=vlc-${VLC_QUICKVERSION}-nocss; \
rm -Rf /tmp/$$F ; mv /tmp/vlc /tmp/$$F; \
(cd /tmp ; tar cf $$G.tar $$F ; bzip2 -f -9 < $$G.tar > $$G.tar.bz2; \
gzip -f -9 $$G.tar ); mv /tmp/$$G.tar.gz /tmp/$$G.tar.bz2 ..; \
rm -Rf /tmp/$$F
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_app
rm -Rf /tmp/vlc/debian
# Remove useless headers
rm -f /tmp/vlc/include/*
for file in defs.h.in config.h.in 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
# Fix Makefile
rm -f /tmp/vlc/Makefile
sed -e 's#^install:#install-unused:#' \ sed -e 's#^install:#install-unused:#' \
-e 's#^uninstall:#uninstall-unused:#' \ -e 's#^uninstall:#uninstall-unused:#' \
-e 's#^clean:#clean-unused:#' \ -e 's#^clean:#clean-unused:#' \
...@@ -259,32 +289,22 @@ libdvdcss-snapshot: clean Makefile.opts ...@@ -259,32 +289,22 @@ libdvdcss-snapshot: clean Makefile.opts
-e 's#^libdvdcss-install:#install:#' \ -e 's#^libdvdcss-install:#install:#' \
-e 's#^libdvdcss-uninstall:#uninstall:#' \ -e 's#^libdvdcss-uninstall:#uninstall:#' \
-e 's#^libdvdcss-clean:#clean:#' \ -e 's#^libdvdcss-clean:#clean:#' \
< Makefile > /tmp/libdvdcss-${LIBDVDCSS_VERSION}/Makefile < Makefile > /tmp/vlc/Makefile
# extra files # Build archives and clean up
cp -a extras/* /tmp/libdvdcss-${LIBDVDCSS_VERSION}/extras F=libdvdcss-${LIBDVDCSS_QUICKVERSION}; \
cp -a doc/* /tmp/libdvdcss-${LIBDVDCSS_VERSION}/doc rm -Rf /tmp/$$F ; mv /tmp/vlc /tmp/$$F; \
find /tmp/libdvdcss-${LIBDVDCSS_VERSION}/extras \ (cd /tmp ; tar cf $$F.tar $$F ; bzip2 -f -9 < $$F.tar > $$F.tar.bz2; \
/tmp/libdvdcss-${LIBDVDCSS_VERSION}/doc \ gzip -f -9 $$F.tar ); mv /tmp/$$F.tar.gz /tmp/$$F.tar.bz2 ..; \
-type d -name CVS | while read i ; \ rm -Rf /tmp/$$F
do rm -Rf $$i ; \
done
# copy misc files
cp AUTHORS COPYING ChangeLog INSTALL INSTALL.libdvdcss README \
TODO todo.pl Makefile.opts.in Makefile.dep Makefile.modules \
configure configure.in install-sh config.sub config.guess \
/tmp/libdvdcss-${LIBDVDCSS_VERSION}/
# build css-enabled archives deb:
(cd /tmp ; tar cf libdvdcss-${LIBDVDCSS_VERSION}.tar \ dpkg-buildpackage -rfakeroot -us -uc
libdvdcss-${LIBDVDCSS_VERSION} ; \
bzip2 -f -9 < libdvdcss-${LIBDVDCSS_VERSION}.tar \
> libdvdcss-${LIBDVDCSS_VERSION}.tar.bz2 ; \
gzip -f -9 libdvdcss-${LIBDVDCSS_VERSION}.tar )
mv /tmp/libdvdcss-${LIBDVDCSS_VERSION}.tar.gz \
/tmp/libdvdcss-${LIBDVDCSS_VERSION}.tar.bz2 ..
# clean up #
rm -Rf /tmp/libdvdcss-${LIBDVDCSS_VERSION}* # Gtk/Gnome/* aliases and OS X application
#
gnome-vlc gvlc kvlc qvlc: vlc
rm -f $@ && ln -s vlc $@
.PHONY: vlc.app .PHONY: vlc.app
vlc.app: Makefile.opts vlc.app: Makefile.opts
...@@ -305,13 +325,6 @@ endif ...@@ -305,13 +325,6 @@ endif
FORCE: FORCE:
#
# GTK/Gnome aliases - don't add too many aliases which could bloat
# the namespace
#
gnome-vlc gvlc kvlc qvlc: vlc
rm -f $@ && ln -s vlc $@
# #
# Generic rules (see below) # Generic rules (see below)
# #
...@@ -329,16 +342,14 @@ ifneq (,$(BUILTINS)) ...@@ -329,16 +342,14 @@ ifneq (,$(BUILTINS))
echo "int module_"$$i"_ActivateModule( module_t* );" >> $@ ; \ echo "int module_"$$i"_ActivateModule( module_t* );" >> $@ ; \
echo "int module_"$$i"_DeactivateModule( module_t* );" >> $@ ; \ echo "int module_"$$i"_DeactivateModule( module_t* );" >> $@ ; \
done done
endif
ifneq (,$(BUILTINS))
echo "" >> $@ ; echo "" >> $@ ;
printf "#define ALLOCATE_ALL_BUILTINS() do { " >> $@ ; printf "#define ALLOCATE_ALL_BUILTINS() do { " >> $@ ;
for i in $(BUILTINS) ; do \ for i in $(BUILTINS) ; do \
printf "ALLOCATE_BUILTIN("$$i"); " >> $@ ; \ printf "ALLOCATE_BUILTIN("$$i"); " >> $@ ; \
done done
echo "} while( 0 );" >> $@ ; echo "} while( 0 );" >> $@ ;
endif
echo "" >> $@ ; echo "" >> $@ ;
endif
$(C_OBJ): %.o: Makefile.opts Makefile.dep Makefile $(C_OBJ): %.o: Makefile.opts Makefile.dep Makefile
$(C_OBJ): %.o: .dep/%.d $(C_OBJ): %.o: .dep/%.d
...@@ -359,7 +370,7 @@ endif ...@@ -359,7 +370,7 @@ endif
# #
# Main application target # Main application target
# #
vlc: Makefile.opts Makefile.dep Makefile $(H_OBJ) $(C_OBJ) $(CPP_OBJ) $(BUILTIN_OBJ) $(RESOURCE_OBJ) vlc: Makefile.opts Makefile.dep Makefile $(H_OBJ) $(C_OBJ) $(CPP_OBJ) $(BUILTIN_OBJ) $(RESOURCE_OBJ) plugins
$(CC) $(CFLAGS) -o $@ $(C_OBJ) $(CPP_OBJ) $(BUILTIN_OBJ) $(RESOURCE_OBJ) $(LCFLAGS) $(CC) $(CFLAGS) -o $@ $(C_OBJ) $(CPP_OBJ) $(BUILTIN_OBJ) $(RESOURCE_OBJ) $(LCFLAGS)
ifeq ($(SYS),beos) ifeq ($(SYS),beos)
xres -o $@ ./share/vlc_beos.rsrc xres -o $@ ./share/vlc_beos.rsrc
...@@ -371,14 +382,14 @@ endif ...@@ -371,14 +382,14 @@ endif
# #
plugins: Makefile.modules Makefile.opts Makefile.dep Makefile $(PLUGIN_OBJ) plugins: Makefile.modules Makefile.opts Makefile.dep Makefile $(PLUGIN_OBJ)
$(PLUGIN_OBJ): FORCE $(PLUGIN_OBJ): FORCE
cd $(shell echo " "$(PLUGINS_TARGETS)" " | sed -e 's@.* \([^/]*/\)'$(@:plugins/%.so=%)' .*@plugins/\1@' -e 's@^ .*@@') && $(MAKE) $(@:%=../../%) cd $(shell echo " "$(PLUGINS_TARGETS)" " | sed -e 's@.* \([^/]*/\)'$(@:plugins/%.so=%)' .*@plugins/\1@' -e 's@^ .*@@') && $(MAKE) $(@:plugins/%=../%)
# #
# Built-in modules target # Built-in modules target
# #
builtins: Makefile.modules Makefile.opts Makefile.dep Makefile $(BUILTIN_OBJ) builtins: Makefile.modules Makefile.opts Makefile.dep Makefile $(BUILTIN_OBJ)
$(BUILTIN_OBJ): FORCE $(BUILTIN_OBJ): FORCE
cd $(shell echo " "$(PLUGINS_TARGETS)" " | sed -e 's@.* \([^/]*/\)'$(@:plugins/%.a=%)' .*@plugins/\1@' -e 's@^ .*@@') && $(MAKE) $(@:%=../../%) cd $(shell echo " "$(PLUGINS_TARGETS)" " | sed -e 's@.* \([^/]*/\)'$(@:plugins/%.a=%)' .*@plugins/\1@' -e 's@^ .*@@') && $(MAKE) $(@:plugins/%=../%)
# #
# libdvdcss target # libdvdcss target
......
...@@ -3,6 +3,8 @@ ...@@ -3,6 +3,8 @@
# (c)1998 VideoLAN # (c)1998 VideoLAN
############################################################################### ###############################################################################
HAVE_MAKEFILE_OPTS = 1
############################################################################### ###############################################################################
# Configuration # Configuration
############################################################################### ###############################################################################
...@@ -96,6 +98,7 @@ CFLAGS_X11 = @CFLAGS_X11@ ...@@ -96,6 +98,7 @@ CFLAGS_X11 = @CFLAGS_X11@
# #
# Other special cases # Other special cases
# #
OBJ_DVD = @OBJ_DVD@
LOCAL_LIBDVDCSS = @LOCAL_LIBDVDCSS@ LOCAL_LIBDVDCSS = @LOCAL_LIBDVDCSS@
############################################################################### ###############################################################################
......
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, Installing and Running libdvdcss
==========================================
See the INSTALL or INSTALL.libdvdcss file for this.
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.
This diff is collapsed.
dnl Autoconf settings for vlc and libdvdcss dnl Autoconf settings for vlc and libdvdcss
AC_INIT(include/main.h) AC_INIT(include/common.h)
AC_CONFIG_HEADER(include/defs.h) AC_CONFIG_HEADER(include/defs.h)
AC_CANONICAL_HOST AC_CANONICAL_HOST
VLC_VERSION=0.2.81 HAVE_VLC=0
AC_SUBST(VLC_VERSION) if test -r src/interface/main.c; then
LIBDVDCSS_VERSION=0.0.2 HAVE_VLC=1
AC_SUBST(LIBDVDCSS_VERSION) VLC_VERSION=0.2.81
VLC_CODENAME=Ourumov AC_SUBST(VLC_VERSION)
AC_SUBST(VLC_CODENAME) VLC_CODENAME=Ourumov
AC_SUBST(VLC_CODENAME)
fi
HAVE_LIBDVDCSS=0
if test -r extras/libdvdcss/libdvdcss.c; then
HAVE_LIBDVDCSS=1
LIBDVDCSS_VERSION=0.0.2
AC_SUBST(LIBDVDCSS_VERSION)
fi
dnl Save CFLAGS dnl Save CFLAGS
save_CFLAGS="${CFLAGS}" save_CFLAGS="${CFLAGS}"
...@@ -109,7 +118,7 @@ void foo() { int meuh; ntohl(meuh); }],, ...@@ -109,7 +118,7 @@ void foo() { int meuh; ntohl(meuh); }],,
AC_MSG_RESULT(yes), AC_MSG_RESULT(no)) AC_MSG_RESULT(yes), AC_MSG_RESULT(no))
dnl Check for inline function size limit dnl Check for inline function size limit
CFLAGS="${save_CFLAGS} -finline-limit=12" CFLAGS="${save_CFLAGS} -finline-limit=31337"
AC_MSG_CHECKING([if \$CC accepts -finline-limit]) AC_MSG_CHECKING([if \$CC accepts -finline-limit])
AC_TRY_COMPILE([],, AC_TRY_COMPILE([],,
save_CFLAGS="${save_CFLAGS} -finline-limit=31337"; AC_MSG_RESULT(yes), save_CFLAGS="${save_CFLAGS} -finline-limit=31337"; AC_MSG_RESULT(yes),
...@@ -177,14 +186,17 @@ dnl ...@@ -177,14 +186,17 @@ dnl
dnl libdvdcss: check for DVD ioctls dnl libdvdcss: check for DVD ioctls
dnl dnl
dnl default is no
CAN_BUILD_LIBDVDCSS=0
dnl for windoze dnl for windoze
AC_CHECK_HEADERS(winioctl.h,[ AC_CHECK_HEADERS(winioctl.h,[
CAN_BUILD_LIBDVDCSS=1 CAN_BUILD_LIBDVDCSS="${HAVE_LIBDVDCSS}"
]) ])
dnl for Un*x dnl for Un*x and BeOS
AC_CHECK_HEADERS(sys/ioctl.h,[ AC_CHECK_HEADERS(sys/ioctl.h,[
CAN_BUILD_LIBDVDCSS=1 CAN_BUILD_LIBDVDCSS="${HAVE_LIBDVDCSS}"
AC_CHECK_HEADERS(sys/cdio.h sys/dvdio.h linux/cdrom.h) AC_CHECK_HEADERS(sys/cdio.h sys/dvdio.h linux/cdrom.h)
BSD_DVD_STRUCT=0 BSD_DVD_STRUCT=0
dnl dnl
...@@ -216,6 +228,7 @@ AC_CHECK_HEADERS(sys/ioctl.h,[ ...@@ -216,6 +228,7 @@ AC_CHECK_HEADERS(sys/ioctl.h,[
]) ])
]) ])
dnl dnl
dnl Check the operating system dnl Check the operating system
dnl dnl
...@@ -318,8 +331,9 @@ dnl DVD module: check for installed libdvdcss or local libdvdcss ...@@ -318,8 +331,9 @@ dnl DVD module: check for installed libdvdcss or local libdvdcss
dnl dnl
LOCAL_LIBDVDCSS=0 LOCAL_LIBDVDCSS=0
STATIC_LIBDVDCSS=0 STATIC_LIBDVDCSS=0
DUMMY_LIBDVDCSS=0
AC_ARG_WITH(dvdcss, AC_ARG_WITH(dvdcss,
[ --with-dvdcss[=name] way to use libdvdcss, either local-static, local-shared or a path to another libdvdcss such as /usr/local (default local-static)], [ --with-dvdcss[=name] way to use libdvdcss, either 'yes' or 'no', or 'local-static', 'local-shared', or a path to another libdvdcss such as '/usr/local' (default 'local-static')],
[ case "x${withval}" in [ case "x${withval}" in
xlocal-static|xyes) xlocal-static|xyes)
# local libdvdcss, statically linked # local libdvdcss, statically linked
...@@ -344,6 +358,15 @@ AC_ARG_WITH(dvdcss, ...@@ -344,6 +358,15 @@ AC_ARG_WITH(dvdcss,
LIB_DVD_PLUGIN="${LIB_DVD_PLUGIN} -L../../lib -ldvdcss" LIB_DVD_PLUGIN="${LIB_DVD_PLUGIN} -L../../lib -ldvdcss"
fi fi
;; ;;
xno)
# don't use libdvdcss at all, build a DVD module that can dlopen() it
DUMMY_LIBDVDCSS=1
BUILTINS="${BUILTINS} dvd"
OBJ_DVD="${OBJ_DVD} dummy_dvdcss.o"
CFLAGS_DVD="${CFLAGS_DVD} -DGOD_DAMN_DMCA"
LIB_DVD="${LIB_DVD} -ldl"
LIB_DVD_PLUGIN="${LIB_DVD_PLUGIN} -ldl"
;;
*) *)
# existing libdvdcss # existing libdvdcss
BUILTINS="${BUILTINS} dvd" BUILTINS="${BUILTINS} dvd"
...@@ -356,6 +379,7 @@ AC_ARG_WITH(dvdcss, ...@@ -356,6 +379,7 @@ AC_ARG_WITH(dvdcss,
LIB_DVD_PLUGIN="${LIB_DVD_PLUGIN} -ldvdcss" LIB_DVD_PLUGIN="${LIB_DVD_PLUGIN} -ldvdcss"
esac ], esac ],
# user didn't decide, we choose to use local libdvdcss and link statically # 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 [ if test x${CAN_BUILD_LIBDVDCSS} = x1
then then
LOCAL_LIBDVDCSS=1 LOCAL_LIBDVDCSS=1
...@@ -364,25 +388,16 @@ AC_ARG_WITH(dvdcss, ...@@ -364,25 +388,16 @@ AC_ARG_WITH(dvdcss,
CFLAGS_DVD="${CFLAGS_DVD} -I../../extras/libdvdcss" CFLAGS_DVD="${CFLAGS_DVD} -I../../extras/libdvdcss"
LIB_DVD="${LIB_DVD} lib/libdvdcss.a"