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

Libdvdnav using HEAD.

parent b5a8714b
......@@ -1174,7 +1174,7 @@ libdvdread:
#ifdef HAVE_WIN32
(cd $@; patch -p 0 < ../Patches/libdvdread-win32.patch)
#endif
(cd $@; sh autogen.sh)
(cd $@; sh autogen.sh noconfig)
.libdvdread: libdvdread .dvdcss
(cd libdvdread; $(HOSTCC) ./configure $(HOSTCONF) --prefix=$(PREFIX) --with-libdvdcss=$(PREFIX) && make && make install)
......@@ -1191,7 +1191,7 @@ CLEAN_PKG += libdvdread
ifdef SVN
libdvdnav:
$(SVN) co $(LIBDVDNAV_SVN) libdvdnav -r1100
$(SVN) co $(LIBDVDNAV_SVN) libdvdnav
patch -d libdvdnav -p0 < Patches/libdvdnav.patch
(cd $@; ./autogen.sh noconfig)
else
......@@ -1207,11 +1207,11 @@ endif
(cd $@; ./autogen.sh noconfig)
endif
.dvdnav: libdvdnav .libdvdread .dvdcss
.dvdnav: libdvdnav .libdvdread
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
(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
$(INSTALL_NAME)
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
===================================================================
--- src/vm/vm.c (revision 1096)
+++ 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 @@
* all off_t are 64bit.
*/
......@@ -100,234 +42,16 @@ Index: src/vm/vm.c
if((data[i] == 0)) break;
if((data[i] > 32) && (data[i] < 127)) {
fprintf(MSG_OUT, "%c", data[i]);
Index: src/vm/decoder.c
Index: Makefile.am
===================================================================
--- src/vm/decoder.c (revision 1096)
+++ src/vm/decoder.c (working copy)
@@ -33,8 +33,8 @@
#include <limits.h>
#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 */
--- Makefile.am (revision 1100)
+++ Makefile.am (working copy)
@@ -1,7 +1,7 @@
include $(top_srcdir)/misc/Makefile.common
#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
menus_LDFLAGS = -L$(top_srcdir)/src/ -ldvdread
-menus_LDADD = $(DVDNAV_LIB)
+menus_LDADD = $(DVDNAV_LIB) $(CSS_LIBS)
-SUBDIRS = src examples doc misc m4
+SUBDIRS = src misc m4
$(DVDNAV_LIB):
@cd $(top_builddir)/src/ && $(MAKE) libdvdnav.la
EXTRA_DIST = autogen.sh \
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