Web lists-archives.com

[MPlayer-dev-eng] [PATCH] Fix libcdio autodetection failure




Roughly since end of 2011, libcdio-paranoia installs its header files under
cdio/paranoia/ rather than cdio/, but configure includes from cdio/ which
prevents autodetection.

Ingo
Index: configure
===================================================================
--- configure	(revision 37402)
+++ configure	(working copy)
@@ -6135,12 +6135,13 @@
 
 
 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 @@
     _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_termios_h
 $def_termios_sys_h
 $def_winsock2_h
+$def_cdio_paranoia_h
+$def_cdio_paranoia_paranoia_h
 
 
 /* system functions */
Index: stream/stream_cdda.c
===================================================================
--- stream/stream_cdda.c	(revision 37402)
+++ stream/stream_cdda.c	(working copy)
@@ -21,9 +21,14 @@
 #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>
 
Index: gui/win32/interface.c
===================================================================
--- gui/win32/interface.c	(revision 37402)
+++ gui/win32/interface.c	(working copy)
@@ -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
_______________________________________________
MPlayer-dev-eng mailing list
MPlayer-dev-eng@xxxxxxxxxxxx
https://lists.mplayerhq.hu/mailman/listinfo/mplayer-dev-eng