[gvfs] cdda: Adapt to new paranoia.h location



commit c79426bf1f5745b7e3427958a0e6fb6e0bdefa93
Author: Tomas Bzatek <tbzatek redhat com>
Date:   Thu Jan 24 15:48:28 2013 +0100

    cdda: Adapt to new paranoia.h location
    
    With the 0.90+ release libcdio-paranoia has been split out and
    headers have moved.
    
    Adapt to this change by finding actual header location and ifdef-ing
    includes in our sources.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=691841

 configure.ac             |   10 ++++++++++
 daemon/gvfsbackendcdda.c |    6 +++++-
 2 files changed, 15 insertions(+), 1 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index 98f2ebc..4848c16 100644
--- a/configure.ac
+++ b/configure.ac
@@ -348,9 +348,19 @@ if test "x$enable_cdda" != "xno" -a \( "x$msg_hal" = "xyes" -o "x$msg_gudev" = "
   if test "x$msg_cdda" = "xyes"; then
     PKG_CHECK_MODULES(CDDA, libcdio_paranoia)
     AC_DEFINE(HAVE_CDDA, 1, [Define to 1 if CDDA is going to be built])
+
+    # test for actual headers location
+    CPPFLAGS_save="$CPPFLAGS"
+    CPPFLAGS="$CPPFLAGS $CDDA_CFLAGS"
+    AC_CHECK_HEADER(cdio/paranoia/paranoia.h, [
+       AC_DEFINE(HAVE_PARANOIA_NEW_INCLUDES, 1, [Define to 1 if cdio/paranoia/paranoia.h is present]) ])
+    CPPFLAGS="$CPPFLAGS_save"
   fi
 fi
 
+AC_SUBST(CDDA_LIBS)
+AC_SUBST(CDDA_CFLAGS)
+
 AM_CONDITIONAL(USE_CDDA, [test "$msg_cdda" = "yes"])
 
 dnl *************************************************
diff --git a/daemon/gvfsbackendcdda.c b/daemon/gvfsbackendcdda.c
index 88f70fb..ff28637 100644
--- a/daemon/gvfsbackendcdda.c
+++ b/daemon/gvfsbackendcdda.c
@@ -55,7 +55,11 @@
 #include "gvfsjobenumerate.h"
 
 #define DO_NOT_WANT_PARANOIA_COMPATIBILITY
-#include <cdio/paranoia.h>
+#ifdef HAVE_PARANOIA_NEW_INCLUDES
+  #include <cdio/paranoia/paranoia.h>
+#else
+  #include <cdio/paranoia.h>
+#endif
 #include <cdio/cdio.h>
 
 /* TODO:



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]