[MPlayer-dev-eng] [PATCH] move libdvd* checks together

Reimar Döffinger Reimar.Doeffinger at stud.uni-karlsruhe.de
Sat Jan 10 14:56:19 CET 2009


Hello,
not sure if this is that good an approach, but this patch moves all
those checks together in configure.
This also ensures that the -Ilibdvd* are last on the gcc commandline and
are not overridden by some -I/usr/include (of course, that one is useless
and should not be there in the first place, but for some reason it is on
my system).

Greetings,
Reimar Döffinger
-------------- next part --------------
Index: configure
===================================================================
--- configure	(revision 28291)
+++ configure	(working copy)
@@ -5515,90 +5515,6 @@
 
 
 
-echocheck "dvdread"
-if test "$_dvdread_internal" = auto ; then
-  _dvdread_internal=no
-  _dvdread=no
-  if (linux || freebsd || netbsd || openbsd || dragonfly || sunos || hpux) \
-     && (test "$_dvd" = yes || test "$_cdrom" = yes || test "$_cdio" = yes || \
-         test "$_dvdio" = yes || test "$_bsdi_dvd" = yes) \
-     || darwin || win32; then
-    _dvdread_internal=yes
-    _dvdread=yes
-    _inc_extra="$_inc_extra -Ilibdvdread4"
-  fi
-elif test "$_dvdread" = auto ; then
-  _dvdread=no
-  if test "$_dl" = yes; then
-    cat > $TMPC << EOF
-#include <inttypes.h>
-#include <dvdread/dvd_reader.h>
-#include <dvdread/ifo_types.h>
-#include <dvdread/ifo_read.h>
-#include <dvdread/nav_read.h>
-int main(void) { return 0; }
-EOF
-  fi
-  _dvdreadcflags=`$_dvdreadconfig --cflags`
-  _dvdreadlibs=`$_dvdreadconfig --libs`
-  if cc_check -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE \
-    $_dvdreadcflags $_dvdreadlibs $_ld_dl ; then
-    _dvdread=yes
-    _inc_extra="$_inc_extra $_dvdreadcflags"
-    _ld_extra="$_ld_extra $_dvdreadlibs"
-    _res_comment="external"
-  fi
-fi
-
-if test "$_dvdread_internal" = yes; then
-  _def_dvdread='#define CONFIG_DVDREAD 1'
-  _inputmodules="dvdread(internal) $_inputmodules"
-  _largefiles=yes
-  _res_comment="internal"
-elif test "$_dvdread" = yes; then
-  _def_dvdread='#define CONFIG_DVDREAD 1'
-  _largefiles=yes
-  _ld_extra="$_ld_extra -ldvdread"
-  _inputmodules="dvdread(external) $_inputmodules"
-  _res_comment="external"
-else
-  _def_dvdread='#undef CONFIG_DVDREAD'
-  _noinputmodules="dvdread $_noinputmodules"
-fi
-echores "$_dvdread"
-
-
-echocheck "internal libdvdcss"
-if test "$_libdvdcss_internal" = auto ; then
-  _libdvdcss_internal=no
-  test "$_dvdread_internal" = yes && _libdvdcss_internal=yes
-  hpux && test "$_hpux_scsi_h" = no && _libdvdcss_internal=no
-fi
-if test "$_libdvdcss_internal" = yes ; then
-  if linux || netbsd || openbsd || bsdos ; then
-    _def_dvd_linux='#define HAVE_LINUX_DVD_STRUCT 1'
-    openbsd && _def_dvd_openbsd='#define HAVE_OPENBSD_DVD_STRUCT 1'
-  elif freebsd || dragonfly ; then
-    _def_dvd_bsd='#define HAVE_BSD_DVD_STRUCT 1'
-  elif darwin ; then
-    _def_dvd_darwin='#define DARWIN_DVD_IOCTL'
-    _ld_extra="$_ld_extra -framework IOKit"
-  elif cygwin ; then
-    cflags_libdvdcss="-DSYS_CYGWIN -DWIN32"
-  elif beos ; then
-    cflags_libdvdcss="-DSYS_BEOS"
-  elif os2 ; then
-    cflags_libdvdcss="-DSYS_OS2"
-  fi
-  cflags_libdvdcss_dvdread="-Ilibdvdcss -DHAVE_DVDCSS_DVDCSS_H"
-  _inputmodules="libdvdcss(internal) $_inputmodules"
-  _largefiles=yes
-else
-  _noinputmodules="libdvdcss(internal) $_noinputmodules"
-fi
-echores "$_libdvdcss_internal"
-
-
 echocheck "cdparanoia"
 if test "$_cdparanoia" = auto ; then
     cat > $TMPC <<EOF
@@ -7771,6 +7687,90 @@
 echores "$_maemo"
 fi
 
+echocheck "dvdread"
+if test "$_dvdread_internal" = auto ; then
+  _dvdread_internal=no
+  _dvdread=no
+  if (linux || freebsd || netbsd || openbsd || dragonfly || sunos || hpux) \
+     && (test "$_dvd" = yes || test "$_cdrom" = yes || test "$_cdio" = yes || \
+         test "$_dvdio" = yes || test "$_bsdi_dvd" = yes) \
+     || darwin || win32; then
+    _dvdread_internal=yes
+    _dvdread=yes
+    _inc_extra="$_inc_extra -Ilibdvdread4"
+  fi
+elif test "$_dvdread" = auto ; then
+  _dvdread=no
+  if test "$_dl" = yes; then
+    cat > $TMPC << EOF
+#include <inttypes.h>
+#include <dvdread/dvd_reader.h>
+#include <dvdread/ifo_types.h>
+#include <dvdread/ifo_read.h>
+#include <dvdread/nav_read.h>
+int main(void) { return 0; }
+EOF
+  fi
+  _dvdreadcflags=`$_dvdreadconfig --cflags`
+  _dvdreadlibs=`$_dvdreadconfig --libs`
+  if cc_check -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE \
+    $_dvdreadcflags $_dvdreadlibs $_ld_dl ; then
+    _dvdread=yes
+    _inc_extra="$_inc_extra $_dvdreadcflags"
+    _ld_extra="$_ld_extra $_dvdreadlibs"
+    _res_comment="external"
+  fi
+fi
+
+if test "$_dvdread_internal" = yes; then
+  _def_dvdread='#define CONFIG_DVDREAD 1'
+  _inputmodules="dvdread(internal) $_inputmodules"
+  _largefiles=yes
+  _res_comment="internal"
+elif test "$_dvdread" = yes; then
+  _def_dvdread='#define CONFIG_DVDREAD 1'
+  _largefiles=yes
+  _ld_extra="$_ld_extra -ldvdread"
+  _inputmodules="dvdread(external) $_inputmodules"
+  _res_comment="external"
+else
+  _def_dvdread='#undef CONFIG_DVDREAD'
+  _noinputmodules="dvdread $_noinputmodules"
+fi
+echores "$_dvdread"
+
+
+echocheck "internal libdvdcss"
+if test "$_libdvdcss_internal" = auto ; then
+  _libdvdcss_internal=no
+  test "$_dvdread_internal" = yes && _libdvdcss_internal=yes
+  hpux && test "$_hpux_scsi_h" = no && _libdvdcss_internal=no
+fi
+if test "$_libdvdcss_internal" = yes ; then
+  if linux || netbsd || openbsd || bsdos ; then
+    _def_dvd_linux='#define HAVE_LINUX_DVD_STRUCT 1'
+    openbsd && _def_dvd_openbsd='#define HAVE_OPENBSD_DVD_STRUCT 1'
+  elif freebsd || dragonfly ; then
+    _def_dvd_bsd='#define HAVE_BSD_DVD_STRUCT 1'
+  elif darwin ; then
+    _def_dvd_darwin='#define DARWIN_DVD_IOCTL'
+    _ld_extra="$_ld_extra -framework IOKit"
+  elif cygwin ; then
+    cflags_libdvdcss="-DSYS_CYGWIN -DWIN32"
+  elif beos ; then
+    cflags_libdvdcss="-DSYS_BEOS"
+  elif os2 ; then
+    cflags_libdvdcss="-DSYS_OS2"
+  fi
+  cflags_libdvdcss_dvdread="-Ilibdvdcss -DHAVE_DVDCSS_DVDCSS_H"
+  _inputmodules="libdvdcss(internal) $_inputmodules"
+  _largefiles=yes
+else
+  _noinputmodules="libdvdcss(internal) $_noinputmodules"
+fi
+echores "$_libdvdcss_internal"
+
+
 #this must be the last test to be performed or the ones following it will likely fail
 #because libdvdnavmini is intentionally not linked against libdvdread (to permit mplayer
 # to use its own copy of the library)


More information about the MPlayer-dev-eng mailing list