[MPlayer-dev-eng] [PATCH] libdvdnav not detected

Jim Radford radford at robotics.caltech.edu
Tue Oct 29 01:02:48 CET 2002


Hi MPlayers,

I noticed that configure thinks that dvdnav-config returns a directory
when it really returns cflags or ldflags (i.e. with the -I or -L
already prepended).  This patch acknowledges this and should keep
backward compatibility with specifying the dvdnavdir on the command
line.

Thanks,
-Jim

--- configure   28 Oct 2002 19:30:29 -0000      1.588
+++ configure   28 Oct 2002 23:58:13 -0000
@@ -3289,24 +3289,24 @@
 int main(void) { dvdnav_t *dvd=0; return 0; }
 EOF
   _dvdnav=no
-  test -n "$_dvdnavdir" && _legal_dvdnavdir=-L$_dvdnavdir/.libs
+  test -n "$_dvdnavdir" && _legal_dvdnavdir='-L$_dvdnavdir/.libs -ldvdnav'
   if test -z "$_dvdnavconfig" ; then
     if ( dvdnav-config --version ) >/dev/null 2>&1 ; then
       _dvdnavconfig="dvdnav-config"
     fi
   fi
-  test -z "$_dvdnavdir" && test -n "$_dvdnavconfig" && _dvdnavdir=`$_dvdnavconfig --cflags`
+  test -n "$_dvdnavdir" && _dvdnavcflags=-I$_dvdnavdir
+  test -z "$_dvdnavcflags" && test -n "$_dvdnavconfig" && _dvdnavcflags=`$_dvdnavconfig --cflags`
+  test -z "$_legal_dvdnavdir" && test -n "$_dvdnavconfig" && _legal_dvdnavdir=`$_dvdnavconfig --libs`
   _used_css=
   test "$_dvdkit" = no && test "$_dvdkit2" = no && _used_css=$_ld_css
-  cc_check $_inc_extra -I$_dvdnavdir $_legal_dvdnavdir -ldvdnav $_used_css $_ld_dl && _dvdnav=yes
+  cc_check $_inc_extra $_dvdnavcflags $_legal_dvdnavdir $_used_css $_ld_dl && _dvdnav=yes
 fi
 if test "$_dvdnav" = yes ; then
   _largefiles=yes
   _def_dvdnav='#define USE_DVDNAV 1'
   if test -n "$_legal_dvdnavdir" ; then
-   _ld_css="$_ld_css $_legal_dvdnavdir -ldvdnav"
-  elif test -n "$_dvdnavconfig" ; then
-   _ld_css="$_ld_css `$_dvdnavconfig --libs`"
+   _ld_css="$_ld_css $_legal_dvdnavdir"
   else
    _ld_css="$_ld_css -ldvdnav"
   fi
@@ -3314,8 +3314,8 @@
    _dvdnav_version=`$_dvdnavconfig --version | sed "s/\.//g"`
    _def_dvdnav_version="#define DVDNAVVERSION $_dvdnav_version"
   fi
-  if test -n "$_dvdnavdir" ; then
-   _inc_extra="$_inc_extra -I$_dvdnavdir"
+  if test -n "$_dvdnavcflags" ; then
+   _inc_extra="$_inc_extra $_dvdnavcflags"
   fi
   _inputmodules="dvdnav $_inputmodules"
   echores "yes"



More information about the MPlayer-dev-eng mailing list