Commit 2a6addaa authored by Jean-Baptiste Kempf's avatar Jean-Baptiste Kempf

Libdvdnav using HEAD.

parent b5a8714b
...@@ -1174,7 +1174,7 @@ libdvdread: ...@@ -1174,7 +1174,7 @@ libdvdread:
#ifdef HAVE_WIN32 #ifdef HAVE_WIN32
(cd $@; patch -p 0 < ../Patches/libdvdread-win32.patch) (cd $@; patch -p 0 < ../Patches/libdvdread-win32.patch)
#endif #endif
(cd $@; sh autogen.sh) (cd $@; sh autogen.sh noconfig)
.libdvdread: libdvdread .dvdcss .libdvdread: libdvdread .dvdcss
(cd libdvdread; $(HOSTCC) ./configure $(HOSTCONF) --prefix=$(PREFIX) --with-libdvdcss=$(PREFIX) && make && make install) (cd libdvdread; $(HOSTCC) ./configure $(HOSTCONF) --prefix=$(PREFIX) --with-libdvdcss=$(PREFIX) && make && make install)
...@@ -1191,7 +1191,7 @@ CLEAN_PKG += libdvdread ...@@ -1191,7 +1191,7 @@ CLEAN_PKG += libdvdread
ifdef SVN ifdef SVN
libdvdnav: libdvdnav:
$(SVN) co $(LIBDVDNAV_SVN) libdvdnav -r1100 $(SVN) co $(LIBDVDNAV_SVN) libdvdnav
patch -d libdvdnav -p0 < Patches/libdvdnav.patch patch -d libdvdnav -p0 < Patches/libdvdnav.patch
(cd $@; ./autogen.sh noconfig) (cd $@; ./autogen.sh noconfig)
else else
...@@ -1207,11 +1207,11 @@ endif ...@@ -1207,11 +1207,11 @@ endif
(cd $@; ./autogen.sh noconfig) (cd $@; ./autogen.sh noconfig)
endif endif
.dvdnav: libdvdnav .libdvdread .dvdcss .dvdnav: libdvdnav .libdvdread
ifdef HAVE_WIN32 ifdef HAVE_WIN32
(cd $<; $(HOSTCC) ./configure $(HOSTCONF) --enable-static --prefix=$(PREFIX) --with-libdvdcss=$(PREFIX) && make && make install) (cd $<; $(HOSTCC) ./configure $(HOSTCONF) --enable-static --prefix=$(PREFIX) && make && make install)
else else
(cd $<; $(HOSTCC) ./configure $(HOSTCONF) --enable-static --prefix=$(PREFIX) --with-libdvdcss=$(PREFIX) CFLAGS="$(CFLAGS) -Dlseek64=lseek -Doff64_t=off_t" && make && make install) (cd $<; $(HOSTCC) ./configure $(HOSTCONF) --enable-static --prefix=$(PREFIX) CFLAGS="$(CFLAGS) -Dlseek64=lseek -Doff64_t=off_t" && make && make install)
endif endif
$(INSTALL_NAME) $(INSTALL_NAME)
touch $@ touch $@
......
Index: src/read_cache.c
===================================================================
--- src/read_cache.c (revision 1096)
+++ src/read_cache.c (working copy)
@@ -37,8 +37,8 @@
#include <sys/time.h>
#include <time.h>
#include "dvd_types.h"
-#include <libdvdread/nav_types.h>
-#include <libdvdread/ifo_types.h>
+#include <dvdread/nav_types.h>
+#include <dvdread/ifo_types.h>
#include "remap.h"
#include "vm/decoder.h"
#include "vm/vm.h"
Index: src/navigation.c
===================================================================
--- src/navigation.c (revision 1096)
+++ src/navigation.c (working copy)
@@ -30,8 +30,8 @@
#include <string.h>
#include <sys/time.h>
#include "dvd_types.h"
-#include <libdvdread/nav_types.h>
-#include <libdvdread/ifo_types.h>
+#include <dvdread/nav_types.h>
+#include <dvdread/ifo_types.h>
#include "remap.h"
#include "vm/decoder.h"
#include "vm/vm.h"
Index: src/settings.c
===================================================================
--- src/settings.c (revision 1096)
+++ src/settings.c (working copy)
@@ -30,8 +30,8 @@
#include <string.h>
#include <sys/time.h>
#include "dvd_types.h"
-#include <libdvdread/nav_types.h>
-#include <libdvdread/ifo_types.h>
+#include <dvdread/nav_types.h>
+#include <dvdread/ifo_types.h>
#include "remap.h"
#include "vm/decoder.h"
#include "vm/vm.h"
Index: src/vm/vm.c Index: src/vm/vm.c
=================================================================== ===================================================================
--- src/vm/vm.c (revision 1096) --- src/vm/vm.c (revision 1096)
+++ src/vm/vm.c (working copy) +++ src/vm/vm.c (working copy)
@@ -40,9 +40,9 @@
#include <sys/time.h>
#include <fcntl.h>
-#include <libdvdread/nav_types.h>
-#include <libdvdread/ifo_types.h>
-#include <libdvdread/ifo_read.h>
+#include <dvdread/nav_types.h>
+#include <dvdread/ifo_types.h>
+#include <dvdread/ifo_read.h>
#include "dvd_types.h"
#include "decoder.h"
@@ -139,19 +139,18 @@ @@ -139,19 +139,18 @@
* all off_t are 64bit. * all off_t are 64bit.
*/ */
...@@ -100,234 +42,16 @@ Index: src/vm/vm.c ...@@ -100,234 +42,16 @@ Index: src/vm/vm.c
if((data[i] == 0)) break; if((data[i] == 0)) break;
if((data[i] > 32) && (data[i] < 127)) { if((data[i] > 32) && (data[i] < 127)) {
fprintf(MSG_OUT, "%c", data[i]); fprintf(MSG_OUT, "%c", data[i]);
Index: src/vm/decoder.c Index: Makefile.am
=================================================================== ===================================================================
--- src/vm/decoder.c (revision 1096) --- Makefile.am (revision 1100)
+++ src/vm/decoder.c (working copy) +++ Makefile.am (working copy)
@@ -33,8 +33,8 @@ @@ -1,7 +1,7 @@
#include <limits.h> include $(top_srcdir)/misc/Makefile.common
#include <string.h> /* For memset */
#include <sys/time.h>
-#include <libdvdread/nav_types.h>
-#include <libdvdread/ifo_types.h> /* vm_cmd_t */
+#include <dvdread/nav_types.h>
+#include <dvdread/ifo_types.h> /* vm_cmd_t */
#include "dvd_types.h"
#include "remap.h"
Index: src/vm/vmcmd.c
===================================================================
--- src/vm/vmcmd.c (revision 1096)
+++ src/vm/vmcmd.c (working copy)
@@ -34,8 +34,8 @@
#include <sys/time.h>
#include "dvd_types.h"
-#include <libdvdread/nav_types.h>
-#include <libdvdread/ifo_types.h>
+#include <dvdread/nav_types.h>
+#include <dvdread/ifo_types.h>
#include "decoder.h"
#include "remap.h"
#include "vm.h"
Index: src/searching.c
===================================================================
--- src/searching.c (revision 1096)
+++ src/searching.c (working copy)
@@ -33,8 +33,8 @@
#include <stdlib.h>
#include <sys/time.h>
#include "dvd_types.h"
-#include <libdvdread/nav_types.h>
-#include <libdvdread/ifo_types.h>
+#include <dvdread/nav_types.h>
+#include <dvdread/ifo_types.h>
#include "remap.h"
#include "vm/decoder.h"
#include "vm/vm.h"
Index: src/remap.c
===================================================================
--- src/remap.c (revision 1096)
+++ src/remap.c (working copy)
@@ -39,8 +39,8 @@
#include <limits.h>
#include <sys/time.h>
#include "dvd_types.h"
-#include <libdvdread/nav_types.h>
-#include <libdvdread/ifo_types.h>
+#include <dvdread/nav_types.h>
+#include <dvdread/ifo_types.h>
#include "remap.h"
#include "vm/decoder.h"
#include "vm/vm.h"
Index: src/highlight.c
===================================================================
--- src/highlight.c (revision 1096)
+++ src/highlight.c (working copy)
@@ -32,7 +32,7 @@
#include <limits.h>
#include <string.h>
#include <sys/time.h>
-#include <libdvdread/nav_types.h>
+#include <dvdread/nav_types.h>
#include "dvd_types.h"
#include "remap.h"
#include "vm/decoder.h"
Index: src/dvdnav.c
===================================================================
--- src/dvdnav.c (revision 1096)
+++ src/dvdnav.c (working copy)
@@ -37,9 +37,9 @@
#include <string.h>
#include <sys/time.h>
#include "dvd_types.h"
-#include <libdvdread/dvd_reader.h>
-#include <libdvdread/nav_types.h>
-#include <libdvdread/ifo_types.h> /* For vm_cmd_t */
+#include <dvdread/dvd_reader.h>
+#include <dvdread/nav_types.h>
+#include <dvdread/ifo_types.h> /* For vm_cmd_t */
#include "remap.h"
#include "vm/decoder.h"
#include "vm/vm.h"
@@ -47,7 +47,7 @@
#include "dvdnav_events.h"
#include "dvdnav_internal.h"
#include "read_cache.h"
-#include <libdvdread/nav_read.h>
+#include <dvdread/nav_read.h>
#include "remap.h"
static dvdnav_status_t dvdnav_clear(dvdnav_t * this) {
Index: src/dvdnav.h
===================================================================
--- src/dvdnav.h (revision 1096)
+++ src/dvdnav.h (working copy)
@@ -37,9 +37,9 @@
#ifndef DVDNAV_COMPILE
# include <dvdnav/dvd_types.h>
-# include <libdvdread/dvd_reader.h>
-# include <libdvdread/nav_types.h>
-# include <libdvdread/ifo_types.h> /* For vm_cmd_t */
+# include <dvdread/dvd_reader.h>
+# include <dvdread/nav_types.h>
+# include <dvdread/ifo_types.h> /* For vm_cmd_t */
# include <dvdnav/dvdnav_events.h>
#endif
Index: configure.ac
===================================================================
--- configure.ac (revision 1096)
+++ configure.ac (working copy)
@@ -155,26 +155,62 @@
AC_SUBST(THREAD_CFLAGS)
dnl ---------------------------------------------
-dnl dynamic linker
+dnl dvdcss checking
dnl ---------------------------------------------
-case $host in
- *mingw32*)
- CFLAGS="-idirafter \$(top_srcdir)/msvc/include $CFLAGS"
- LDFLAGS="-no-undefined $LDFLAGS"
- ;;
- *cygwin*)
- LDFLAGS="-no-undefined $LDFLAGS"
- ;;
- *)
- AC_CHECK_LIB(c, dlopen,
- DYNAMIC_LD_LIBS="",
- AC_CHECK_LIB(dl, dlopen,
- DYNAMIC_LD_LIBS="-ldl",
- AC_MSG_ERROR(dynamic linker needed)))
- AC_SUBST(DYNAMIC_LD_LIBS)
- ;;
-esac
+AC_ARG_WITH( [libdvdcss],
+ [ --with-libdvdcss[=PATH] force linking against libdvdcss],
+ [if test x"$withval" != xno; then
+ link_dvdcss=yes
+ fi
+ if test x"$withval" != xyes; then
+ dvdcss_path=$withval
+ fi])
+if test x"$link_dvdcss" != xyes; then
+dnl dlopen libdvdcss
+ AC_CHECK_FUNC( dlopen,
+ [DL_LIBS="" ],
+ AC_CHECK_LIB( dl, dlopen,
+ [DL_LIBS=-ld ],
+ AC_MSG_ERROR(You need libdl (dlopen))
+ )
+ )
+else
+dnl link with libdvdcss
+ if test -z "$dvdcss_path"; then
+ AC_CHECK_LIB(dvdcss, dvdcss_interface_2,
+ [ CSS_LIBS=-ldvdcss ],
+ AC_MSG_ERROR(You need libdvdcss.so.2 or later)
+ )
+ AC_CHECK_HEADERS(dvdcss/dvdcss.h,
+ [ ],
+ AC_MSG_ERROR(You need libdvdcss (dvdcss.h))
+ )
+ else
+ saved_CFLAGS=$CFLAGS
+ CFLAGS="$CFLAGS -L$dvdcss_path/lib"
+ AC_CHECK_LIB(dvdcss, dvdcss_interface_2,
+ [ CSS_LIBS="-L$dvdcss_path/lib -R$dvdcss_path/lib -ldvdcss"
+ CSS_CFLAGS=-I$dvdcss_path/include ],
+ AC_MSG_ERROR(You need libdvdcss.so.2 or later)
+ )
+ CFLAGS=$saved_CFLAGS
+ dnl -w added to shutup GCC3.1's cpp warning about -I/usr/local
+ saved_CPPFLAGS=$CPPFLAGS
+ CPPFLAGS="-w $CPPFLAGS -I$dvdcss_path/include"
+ AC_CHECK_HEADERS(dvdcss/dvdcss.h,
+ [ ],
+ AC_MSG_ERROR(You need libdvdcss (dvdcss.h))
+ )
+ CPPFLAGS=$saved_CPPFLAGS
+ fi
+fi
+
+AC_SUBST(DL_LIBS)
+AC_SUBST(CSS_LIBS)
+AC_SUBST(CSS_CFLAGS)
+
+
dnl ---------------------------------------------
dnl cflags
dnl ---------------------------------------------
Index: examples/menus.c
===================================================================
--- examples/menus.c (revision 1096)
+++ examples/menus.c (working copy)
@@ -28,9 +28,9 @@
#include <sys/stat.h>
#include <fcntl.h>
#include "dvd_types.h"
-#include <libdvdread/dvd_reader.h>
-#include <libdvdread/nav_types.h>
-#include <libdvdread/ifo_types.h> /* For vm_cmd_t */
+#include <dvdread/dvd_reader.h>
+#include <dvdread/nav_types.h>
+#include <dvdread/ifo_types.h> /* For vm_cmd_t */
#include "dvdnav.h"
#include "dvdnav_events.h"
Index: examples/Makefile.am
===================================================================
--- examples/Makefile.am (revision 1096)
+++ examples/Makefile.am (working copy)
@@ -8,7 +8,7 @@
menus_SOURCES = menus.c -SUBDIRS = src examples doc misc m4
menus_LDFLAGS = -L$(top_srcdir)/src/ -ldvdread +SUBDIRS = src misc m4
-menus_LDADD = $(DVDNAV_LIB)
+menus_LDADD = $(DVDNAV_LIB) $(CSS_LIBS)
$(DVDNAV_LIB): EXTRA_DIST = autogen.sh \
@cd $(top_builddir)/src/ && $(MAKE) libdvdnav.la AUTHORS \
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