pkgconfig checks for mad, audiofile, fix for mcopidl

Original commit message from CVS:

pkgconfig checks for mad, audiofile, fix for mcopidl
This commit is contained in:
Thomas Vander Stichele 2003-05-30 10:53:14 +00:00
parent 19bb3d1864
commit cd928692ab

View file

@ -464,7 +464,7 @@ GST_CHECK_FEATURE(ALSA, [alsa plug-ins], gstalsa, [
dnl *** arts *** dnl *** arts ***
dnl if mcopidl can't be found there's no use in compiling it dnl if mcopidl can't be found there's no use in compiling it
AC_CHECK_PROG(MCOPIDL, mcopidl, yes, no) AC_CHECK_PROG(MCOPIDL, mcopidl, yes, no)
if test "xHAVE_MCOPIDL" = "xno"; if test "x$HAVE_MCOPIDL" = "xno";
then then
USE_ARTS=no USE_ARTS=no
fi fi
@ -486,9 +486,13 @@ translit(dnm, m, l) AM_CONDITIONAL(USE_AUDIOFILE, true)
GST_CHECK_FEATURE(AUDIOFILE, [audiofile], afsink afsrc, [ GST_CHECK_FEATURE(AUDIOFILE, [audiofile], afsink afsrc, [
translit(dnm, m, l) AC_SUBST(AUDIOFILE_LIBS) translit(dnm, m, l) AC_SUBST(AUDIOFILE_LIBS)
translit(dnm, m, l) AC_SUBST(AUDIOFILE_CFLAGS) translit(dnm, m, l) AC_SUBST(AUDIOFILE_CFLAGS)
GST_CHECK_CONFIGPROG(AUDIOFILE, audiofile-config) dnl check with pkg-config first
dnl we need this function PKG_CHECK_MODULES(AUDIOFILE, audiofile, HAVE_AUDIOFILE="yes", HAVE_AUDIOFILE="no")
AC_CHECK_LIB(audiofile, afOpenVirtualFile, , 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 *** dnl *** CDParanoia ***
@ -757,14 +761,19 @@ dnl *** mad ***
dnl FIXME: we could use header checks here as well IMO dnl FIXME: we could use header checks here as well IMO
translit(dnm, m, l) AM_CONDITIONAL(USE_MAD, true) translit(dnm, m, l) AM_CONDITIONAL(USE_MAD, true)
GST_CHECK_FEATURE(MAD, [mad mp3 decoder], mad, [ GST_CHECK_FEATURE(MAD, [mad mp3 decoder], mad, [
AC_CHECK_LIB(mad, mad_decoder_finish, HAVE_MAD="yes" MAD_LIBS="-lmad") dnl check with pkg-config first
if test "x$HAVE_MAD" = "xyes"; then PKG_CHECK_MODULES(MAD, mad id3tag, HAVE_MAD="yes", HAVE_MAD="no")
# installed with mad >= 0.14 if test "x$HAVE_MAD" = "xno"; then
HAVE_MAD="no" dnl fall back to oldskool detection
save_libs=$LIBS AC_CHECK_LIB(mad, mad_decoder_finish, HAVE_MAD="yes" MAD_LIBS="-lmad")
LIBS="-lz" if test "x$HAVE_MAD" = "xyes"; then
AC_CHECK_LIB(id3tag, id3_tag_query, HAVE_MAD="yes" MAD_LIBS="$MAD_LIBS -lid3tag") # installed with mad >= 0.14
LIBS=$save_LIBS 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 fi
]) ])
AC_SUBST(MAD_LIBS) AC_SUBST(MAD_LIBS)