From: Tim-Philipp Müller Date: Fri, 11 Jun 2010 21:16:26 +0000 (+0100) Subject: cdparanoia: check for cdparanoia with pkg-config first X-Git-Tag: 1.19.3~511^2~8352 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=dab38bb8a05262d52f8abbb9848a913763f9579c;p=platform%2Fupstream%2Fgstreamer.git cdparanoia: check for cdparanoia with pkg-config first cdparanoia now has a .pc file in post-0.10.2 SVN, so use that to check for cdparanoia before we try all the other checks. Besides being generally nicer, this may help with correctly detecting cdparanoia on OSX some day (see #609918). --- diff --git a/configure.ac b/configure.ac index c5267ef2bd..3e5493af78 100644 --- a/configure.ac +++ b/configure.ac @@ -584,38 +584,43 @@ AG_GST_CHECK_FEATURE(ALSA, [ALSA], alsa, [ ]) dnl *** CDParanoia *** +dnl Note: upstream has a pkg-config file only in post-10.2 SVN so far translit(dnm, m, l) AM_CONDITIONAL(USE_CDPARANOIA, true) AG_GST_CHECK_FEATURE(CDPARANOIA, [CDParanoia], cdparanoia, [ - AG_GST_CHECK_LIBHEADER(CDPARANOIA, cdda_interface, - cdda_open, -lm, - cdda_interface.h, - CDPARANOIA_LIBS="-lcdda_interface -lcdda_paranoia" - HEADER_DIR="no" - FOUND_CDPARANOIA="yes") - if test "x$FOUND_CDPARANOIA" != "xyes"; - then + PKG_CHECK_MODULES(CDPARANOIA, cdparanoia-3 >= 10.2, [ + HAVE_CDPARANOIA="yes" + ], [ AG_GST_CHECK_LIBHEADER(CDPARANOIA, cdda_interface, cdda_open, -lm, - cdda/cdda_interface.h, + cdda_interface.h, CDPARANOIA_LIBS="-lcdda_interface -lcdda_paranoia" - HEADER_DIR="yes" + HEADER_DIR="no" FOUND_CDPARANOIA="yes") - fi - if test "x$HEADER_DIR" = "xyes"; - then - AC_DEFINE_UNQUOTED(CDPARANOIA_HEADERS_IN_DIR, , - defined if cdda headers are in a cdda/ directory) - fi - if test "x$FOUND_CDPARANOIA" = "xyes"; - then - AC_CHECK_LIB(cdda_paranoia, - paranoia_cachemodel_size, - : , - HAVE_CDPARANOIA=no, - [-lcdda_interface]) - fi + if test "x$FOUND_CDPARANOIA" != "xyes"; + then + AG_GST_CHECK_LIBHEADER(CDPARANOIA, cdda_interface, + cdda_open, -lm, + cdda/cdda_interface.h, + CDPARANOIA_LIBS="-lcdda_interface -lcdda_paranoia" + HEADER_DIR="yes" + FOUND_CDPARANOIA="yes") + fi + if test "x$HEADER_DIR" = "xyes"; + then + AC_DEFINE_UNQUOTED(CDPARANOIA_HEADERS_IN_DIR, , + defined if cdda headers are in a cdda/ directory) + fi + if test "x$FOUND_CDPARANOIA" = "xyes"; + then + AC_CHECK_LIB(cdda_paranoia, + paranoia_cachemodel_size, + : , + HAVE_CDPARANOIA=no, + [-lcdda_interface]) + fi - AC_SUBST(CDPARANOIA_LIBS) + AC_SUBST(CDPARANOIA_LIBS) + ]) ]) dnl FIXME : add second check somehow if that is necessary dnl AC_CHECK_LIB(cdda_paranoia, paranoia_init, : , HAVE_CDPARANOIA=no, -lcdda_interface ) diff --git a/ext/cdparanoia/Makefile.am b/ext/cdparanoia/Makefile.am index 3b9452f078..e2a2238a2b 100644 --- a/ext/cdparanoia/Makefile.am +++ b/ext/cdparanoia/Makefile.am @@ -1,7 +1,11 @@ plugin_LTLIBRARIES = libgstcdparanoia.la libgstcdparanoia_la_SOURCES = gstcdparanoiasrc.c -libgstcdparanoia_la_CFLAGS = $(GST_PLUGINS_BASE_CFLAGS) $(GST_BASE_CFLAGS) $(GST_CFLAGS) +libgstcdparanoia_la_CFLAGS = \ + $(GST_PLUGINS_BASE_CFLAGS) \ + $(GST_BASE_CFLAGS) \ + $(GST_CFLAGS) \ + $(CDPARANOIA_CFLAGS) libgstcdparanoia_la_LIBADD = \ $(top_builddir)/gst-libs/gst/cdda/libgstcdda-$(GST_MAJORMINOR).la \ $(GST_BASE_LIBS) \