[vlc-devel] commit: Libdvdread compile fix. (Jean-Baptiste Kempf )
git version control
git at videolan.org
Sat Jun 28 01:38:42 CEST 2008
vlc | branch: master | Jean-Baptiste Kempf <jb at altair.videolan.org> | Sat Jun 28 01:40:18 2008 +0200| [b5a8714b8b854b5f11f7934bd58a97ea9419d037]
Libdvdread compile fix.
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=b5a8714b8b854b5f11f7934bd58a97ea9419d037
---
extras/contrib/src/Makefile | 2 +-
extras/contrib/src/Patches/libdvdread.patch | 94 +++++++++++++++++++++++++++
2 files changed, 95 insertions(+), 1 deletions(-)
diff --git a/extras/contrib/src/Makefile b/extras/contrib/src/Makefile
index eca871a..9e6bdd2 100644
--- a/extras/contrib/src/Makefile
+++ b/extras/contrib/src/Makefile
@@ -1177,7 +1177,7 @@ libdvdread:
(cd $@; sh autogen.sh)
.libdvdread: libdvdread .dvdcss
- (cd libdvdread; $(HOSTCC) ./configure $(HOSTCONF) --prefix=$(PREFIX) && make && make install)
+ (cd libdvdread; $(HOSTCC) ./configure $(HOSTCONF) --prefix=$(PREFIX) --with-libdvdcss=$(PREFIX) && make && make install)
$(INSTALL_NAME)
touch $@
diff --git a/extras/contrib/src/Patches/libdvdread.patch b/extras/contrib/src/Patches/libdvdread.patch
new file mode 100644
index 0000000..3fe8220
--- /dev/null
+++ b/extras/contrib/src/Patches/libdvdread.patch
@@ -0,0 +1,94 @@
+Index: configure.ac
+===================================================================
+--- configure.ac (revision 1107)
++++ configure.ac (working copy)
+@@ -137,24 +137,59 @@
+ dnl ---------------------------------------------
+ dnl dynamic linker
+ 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: autogen.sh
+===================================================================
+--- autogen.sh (revision 1107)
++++ autogen.sh (working copy)
+@@ -86,7 +86,7 @@
+ try_libtool_executable() {
+ libtool=$1
+ LT="`$libtool --version | awk '{ print $4 }' | sed -e 's/[a-zA-Z\ \.\(\)\-\;]//g'`"
+- if test "$LT" -ne "" ; then
++ if test "$LT" -ne "0" ; then
+ LIBTOOL_MIN="`echo $LIBTOOL_MIN | sed -e 's/[a-zA-Z\ \.\(\)\-]//g'`"
+ if test $LT -lt 100 ; then
+ LT=`expr $LT \* 10`
More information about the vlc-devel
mailing list