[MPlayer-cvslog] r37407 - in trunk: configure gui/win32/interface.c stream/stream_cdda.c

ib subversion at mplayerhq.hu
Sun May 31 23:56:44 CEST 2015


Author: ib
Date: Sun May 31 23:56:43 2015
New Revision: 37407

Log:
Fix libcdio autodetection failure.

Roughly since end of 2011 libcdio-paranoia installs its header files
cdda.h and paranoia.h under cdio/paranoia/, so we have to check both
locations, old and new one. The current check prevents autodetection
of libcdio for a post-2011 libcdio-paranoia.

Modified:
   trunk/configure
   trunk/gui/win32/interface.c
   trunk/stream/stream_cdda.c

Modified: trunk/configure
==============================================================================
--- trunk/configure	Sun May 31 12:57:49 2015	(r37406)
+++ trunk/configure	Sun May 31 23:56:43 2015	(r37407)
@@ -6135,12 +6135,13 @@ echores "$_dvdread"
 
 
 echocheck "libcdio"
+header_check cdio/cdda.h && _inc_paranoia=cdio || _inc_paranoia=cdio/paranoia
 if test "$_libcdio" = auto ; then
         cat > $TMPC << EOF
 #include <stdio.h>
 #include <cdio/version.h>
-#include <cdio/cdda.h>
-#include <cdio/paranoia.h>
+#include <$_inc_paranoia/cdda.h>
+#include <$_inc_paranoia/paranoia.h>
 int main(void) {
     void *test = cdda_verbose_set;
     printf("%s\n", CDIO_VERSION);
@@ -6164,10 +6165,19 @@ if test "$_libcdio" = yes ; then
     _cdda='yes'
     _cdparanoia=no
     def_libcdio='#define CONFIG_LIBCDIO 1'
+    if test "$_inc_paranoia" = cdio ; then
+      def_cdio_paranoia_h='#define HAVE_CDIO_PARANOIA_H 1'
+      def_cdio_paranoia_paranoia_h='#define HAVE_CDIO_PARANOIA_PARANOIA_H 0'
+    else
+      def_cdio_paranoia_h='#define HAVE_CDIO_PARANOIA_H 0'
+      def_cdio_paranoia_paranoia_h='#define HAVE_CDIO_PARANOIA_PARANOIA_H 1'
+    fi
     def_havelibcdio='yes'
 else
     _libcdio=no
     def_libcdio='#undef CONFIG_LIBCDIO'
+    def_cdio_paranoia_h='#define HAVE_CDIO_PARANOIA_H 0'
+    def_cdio_paranoia_paranoia_h='#define HAVE_CDIO_PARANOIA_PARANOIA_H 0'
     def_havelibcdio='no'
 fi
 echores "$_libcdio"
@@ -8777,6 +8787,8 @@ $def_sys_videoio_h
 $def_termios_h
 $def_termios_sys_h
 $def_winsock2_h
+$def_cdio_paranoia_h
+$def_cdio_paranoia_paranoia_h
 
 
 /* system functions */

Modified: trunk/gui/win32/interface.c
==============================================================================
--- trunk/gui/win32/interface.c	Sun May 31 12:57:49 2015	(r37406)
+++ trunk/gui/win32/interface.c	Sun May 31 23:56:43 2015	(r37407)
@@ -24,7 +24,11 @@
 #include "config.h"
 
 #if defined(CONFIG_LIBCDIO)
+#if HAVE_CDIO_PARANOIA_H
 #include <cdio/cdda.h>
+#elif HAVE_CDIO_PARANOIA_PARANOIA_H
+#include <cdio/paranoia/cdda.h>
+#endif
 #elif defined(CONFIG_CDDA)
 #include <cdda_interface.h>
 #endif

Modified: trunk/stream/stream_cdda.c
==============================================================================
--- trunk/stream/stream_cdda.c	Sun May 31 12:57:49 2015	(r37406)
+++ trunk/stream/stream_cdda.c	Sun May 31 23:56:43 2015	(r37407)
@@ -21,8 +21,13 @@
 #include <cdda_interface.h>
 #include <cdda_paranoia.h>
 #else
+#if HAVE_CDIO_PARANOIA_H
 #include <cdio/cdda.h>
 #include <cdio/paranoia.h>
+#elif HAVE_CDIO_PARANOIA_PARANOIA_H
+#include <cdio/paranoia/cdda.h>
+#include <cdio/paranoia/paranoia.h>
+#endif
 #endif
 #include <stdio.h>
 #include <stdlib.h>


More information about the MPlayer-cvslog mailing list