libcdio: support recent cdio-paranoia
authorLuca Barbato <lu_zero@gentoo.org>
Thu, 17 Jan 2013 10:24:01 +0000 (11:24 +0100)
committerLuca Barbato <lu_zero@gentoo.org>
Thu, 17 Jan 2013 20:42:03 +0000 (21:42 +0100)
Upstream decided to split the paranoia interface and move the headers
accordingly.
(cherry picked from commit 57224e425c567a87798b66425acc383c6dd37331)

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
configure
libavdevice/libcdio.c

index 8cc9cdc..6a8990d 100755 (executable)
--- a/configure
+++ b/configure
@@ -1201,6 +1201,8 @@ HAVE_LIST="
     asm_mod_y
     attribute_may_alias
     attribute_packed
+    cdio_paranoia_h
+    cdio_paranoia_paranoia_h
     closesocket
     cmov
     CommandLineToArgvW
@@ -3551,8 +3553,9 @@ enabled jack_indev && check_lib2 jack/jack.h jack_client_open -ljack &&
 
 enabled_any sndio_indev sndio_outdev && check_lib2 sndio.h sio_open -lsndio
 
-enabled libcdio &&
-    check_lib2 "cdio/cdda.h cdio/paranoia.h" cdio_cddap_open -lcdio_paranoia -lcdio_cdda -lcdio
+if enabled libcdio; then
+    check_lib2 "cdio/cdda.h cdio/paranoia.h" cdio_cddap_open -lcdio_paranoia -lcdio_cdda -lcdio || check_lib2 "cdio/paranoia/cdda.h cdio/paranoia/paranoia.h" cdio_cddap_open -lcdio_paranoia -lcdio_cdda -lcdio
+fi
 
 enabled x11grab                                           &&
 require X11 X11/Xlib.h XOpenDisplay -lX11                 &&
index e846ee6..06ddb4a 100644 (file)
  * libcdio CD grabbing
  */
 
+#include "config.h"
+
+#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
 
 #include "libavutil/log.h"
 #include "libavutil/mem.h"