From b39852672b31c9f8ba4adf65fdad62f0c250af49 Mon Sep 17 00:00:00 2001 From: nicodvb Date: Sat, 9 Sep 2006 19:35:55 +0000 Subject: detect dvdnav before mpdvdkit and dvdread; if dvdnav is set mplayer will use the version of dvdread embedded in dvdnav git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@19769 b3059339-0415-0410-9bf9-f77b7e298cf2 --- configure | 70 +++++++++++++++++++++++++++++------------------------ stream/stream_dvd.h | 5 ++++ 2 files changed, 43 insertions(+), 32 deletions(-) diff --git a/configure b/configure index 3a31ebc8e9..dd1690e04b 100755 --- a/configure +++ b/configure @@ -5074,6 +5074,41 @@ else fi echores "$_vcd" +echocheck "DVD support (libdvdnav)" +if test "$_dvdnav" = auto ; then + $_dvdnavconfig --version >> $TMPLOG 2>&1 || _dvdnav=no +fi +if test "$_dvdnav" = auto ; then + cat > $TMPC < +int main(void) { dvdnav_t *dvd=0; return 0; } +EOF + _dvdnav=no + _dvdnavdir=`$_dvdnavconfig --cflags` + _dvdnavlibs=`$_dvdnavconfig --libs` + _dvdnavvsn=`$_dvdnavconfig --version | sed "s/\.//g"` + _used_css= + _dvdnavmajor=`echo $_dvdnavvsn | cut -d. -f2` + test "$_dvdnavmajor" -ge 2 -o "$_dvdnavvsn" -ge 0110 && \ + cc_check -I$_dvdnavdir $_dvdnavlibs $_used_css $_ld_dl $_ld_pthread && _dvdnav=yes +fi +if test "$_dvdnav" = yes ; then + _largefiles=yes + _def_dvdnav='#define USE_DVDNAV 1' + _ld_dvdnav=`$_dvdnavconfig --libs` + _dvdnav_version=`$_dvdnavconfig --version | sed "s/\.//g"` + _def_dvdnav_version="#define DVDNAVVERSION $_dvdnav_version" + _inc_extra="$_inc_extra `$_dvdnavconfig --cflags`" + _inputmodules="dvdnav $_inputmodules" + + #disable mpdvdkit and dvdread checks: dvdread will be enabled using dvdnav's version of dvdread + _mpdvdkit=no + _dvdread=yes +else + _def_dvdnav='#undef USE_DVDNAV' + _noinputmodules="dvdnav $_noinputmodules" +fi +echores "$_dvdnav" echocheck "DVD support (libmpdvdkit2)" if test "$_mpdvdkit" = auto ; then @@ -5134,7 +5169,9 @@ case "$_dvdread" in yes) _largefiles=yes _def_dvdread='#define USE_DVDREAD 1' - _ld_dvdread='-ldvdread' + if test "$_dvdnav" != yes ; then + _ld_dvdread='-ldvdread' + fi _inputmodules="dvdread $_inputmodules" _have_dvd=yes ;; @@ -5161,37 +5198,6 @@ else _def_have_dvd='#undef HAVE_DVD' fi -echocheck "DVD support (libdvdnav)" -if test "$_dvdnav" = auto ; then - $_dvdnavconfig --version >> $TMPLOG 2>&1 || _dvdnav=no -fi -if test "$_dvdnav" = auto ; then - cat > $TMPC < -int main(void) { dvdnav_t *dvd=0; return 0; } -EOF - _dvdnav=no - _dvdnavdir=`$_dvdnavconfig --cflags` - _dvdnavlibs=`$_dvdnavconfig --libs` - _dvdnavvsn=`$_dvdnavconfig --version | sed "s/\.//g"` - _used_css= - _dvdnavmajor=`echo $_dvdnavvsn | cut -d. -f2` - test "$_dvdnavmajor" -ge 2 -o "$_dvdnavvsn" -ge 0110 && \ - cc_check -I$_dvdnavdir $_dvdnavlibs $_used_css $_ld_dl $_ld_pthread && _dvdnav=yes -fi -if test "$_dvdnav" = yes ; then - _largefiles=yes - _def_dvdnav='#define USE_DVDNAV 1' - _ld_dvdnav=`$_dvdnavconfig --libs` - _dvdnav_version=`$_dvdnavconfig --version | sed "s/\.//g"` - _def_dvdnav_version="#define DVDNAVVERSION $_dvdnav_version" - _inc_extra="$_inc_extra `$_dvdnavconfig --cflags`" - _inputmodules="dvdnav $_inputmodules" -else - _def_dvdnav='#undef USE_DVDNAV' - _noinputmodules="dvdnav $_noinputmodules" -fi -echores "$_dvdnav" echocheck "cdparanoia" if test "$_cdparanoia" = auto ; then diff --git a/stream/stream_dvd.h b/stream/stream_dvd.h index f734dc4c04..4968e752a8 100644 --- a/stream/stream_dvd.h +++ b/stream/stream_dvd.h @@ -6,6 +6,11 @@ #include "libmpdvdkit2/ifo_types.h" #include "libmpdvdkit2/ifo_read.h" #include "libmpdvdkit2/nav_read.h" +#elif defined(USE_DVDNAV) +#include +#include +#include +#include #else #include #include -- cgit v1.2.3