From 8e1ee4564b9a68fba01aff1d186d44fe03f3ed62 Mon Sep 17 00:00:00 2001 From: Thomas Vander Stichele Date: Fri, 30 May 2003 10:53:14 +0000 Subject: pkgconfig checks for mad, audiofile, fix for mcopidl Original commit message from CVS: pkgconfig checks for mad, audiofile, fix for mcopidl --- configure.ac | 33 +++++++++++++++++++++------------ 1 file changed, 21 insertions(+), 12 deletions(-) diff --git a/configure.ac b/configure.ac index c129c823..5602c2c0 100644 --- a/configure.ac +++ b/configure.ac @@ -464,7 +464,7 @@ GST_CHECK_FEATURE(ALSA, [alsa plug-ins], gstalsa, [ dnl *** arts *** dnl if mcopidl can't be found there's no use in compiling it AC_CHECK_PROG(MCOPIDL, mcopidl, yes, no) -if test "xHAVE_MCOPIDL" = "xno"; +if test "x$HAVE_MCOPIDL" = "xno"; then USE_ARTS=no fi @@ -486,9 +486,13 @@ translit(dnm, m, l) AM_CONDITIONAL(USE_AUDIOFILE, true) GST_CHECK_FEATURE(AUDIOFILE, [audiofile], afsink afsrc, [ translit(dnm, m, l) AC_SUBST(AUDIOFILE_LIBS) translit(dnm, m, l) AC_SUBST(AUDIOFILE_CFLAGS) - GST_CHECK_CONFIGPROG(AUDIOFILE, audiofile-config) - dnl we need this function - AC_CHECK_LIB(audiofile, afOpenVirtualFile, , HAVE_AUDIOFILE="no") + dnl check with pkg-config first + PKG_CHECK_MODULES(AUDIOFILE, audiofile, HAVE_AUDIOFILE="yes", HAVE_AUDIOFILE="no") + if test "x$HAVE_AUDIOFILE" = "xno"; then + GST_CHECK_CONFIGPROG(AUDIOFILE, audiofile-config) + dnl we need this function + AC_CHECK_LIB(audiofile, afOpenVirtualFile, , HAVE_AUDIOFILE="no") + fi ]) dnl *** CDParanoia *** @@ -757,14 +761,19 @@ dnl *** mad *** dnl FIXME: we could use header checks here as well IMO translit(dnm, m, l) AM_CONDITIONAL(USE_MAD, true) GST_CHECK_FEATURE(MAD, [mad mp3 decoder], mad, [ - AC_CHECK_LIB(mad, mad_decoder_finish, HAVE_MAD="yes" MAD_LIBS="-lmad") - if test "x$HAVE_MAD" = "xyes"; then - # installed with mad >= 0.14 - HAVE_MAD="no" - save_libs=$LIBS - LIBS="-lz" - AC_CHECK_LIB(id3tag, id3_tag_query, HAVE_MAD="yes" MAD_LIBS="$MAD_LIBS -lid3tag") - LIBS=$save_LIBS + dnl check with pkg-config first + PKG_CHECK_MODULES(MAD, mad id3tag, HAVE_MAD="yes", HAVE_MAD="no") + if test "x$HAVE_MAD" = "xno"; then + dnl fall back to oldskool detection + AC_CHECK_LIB(mad, mad_decoder_finish, HAVE_MAD="yes" MAD_LIBS="-lmad") + if test "x$HAVE_MAD" = "xyes"; then + # installed with mad >= 0.14 + HAVE_MAD="no" + save_libs=$LIBS + LIBS="-lz" + AC_CHECK_LIB(id3tag, id3_tag_query, HAVE_MAD="yes" MAD_LIBS="$MAD_LIBS -lid3tag") + LIBS=$save_LIBS + fi fi ]) AC_SUBST(MAD_LIBS) -- cgit v1.2.1