From 71b5e431539b0738be453fd45b1605608d0f038d Mon Sep 17 00:00:00 2001 From: Avuton Olrich Date: Sun, 11 Dec 2011 12:35:26 -0800 Subject: configure.ac: Refactor the musepack section It appears the musepack section has not really been reviewed in some time, many parts unfunctional, others, just unnecessary. --- configure.ac | 52 ++++++++++++++-------------------------------------- 1 file changed, 14 insertions(+), 38 deletions(-) (limited to 'configure.ac') diff --git a/configure.ac b/configure.ac index eda125eab..7c3fb3fcc 100644 --- a/configure.ac +++ b/configure.ac @@ -882,52 +882,28 @@ AM_CONDITIONAL(ENABLE_SNDFILE, test x$enable_sndfile = xyes) dnl --------------------------------- musepack -------------------------------- if test x$enable_mpc = xyes; then - if test "x$mpcdec_libraries" != "x" ; then - MPCDEC_LIBS="-L$mpcdec_libraries" - elif test "x$mpcdec_prefix" != "x" ; then - MPCDEC_LIBS="-L$mpcdec_prefix/lib" - fi - - MPCDEC_LIBS="$MPCDEC_LIBS -lmpcdec" - - if test "x$mpcdec_includes" != "x" ; then - MPCDEC_CFLAGS="-I$mpcdec_includes" - elif test "x$mpcdec_prefix" != "x" ; then - MPCDEC_CFLAGS="-I$mpcdec_prefix/include" - fi - oldcflags=$CFLAGS oldlibs=$LIBS oldcppflags=$CPPFLAGS - CFLAGS="$CFLAGS $MPCDEC_CFLAGS -I." - LIBS="$LIBS $MPCDEC_LIBS" - CPPFLAGS=$CFLAGS - AC_CHECK_HEADER(mpc/mpcdec.h, - old_mpcdec=no, - [AC_CHECK_HEADER(mpcdec/mpcdec.h, - old_mpcdec=yes, - enable_mpc=no)]) - if test x$enable_mpc = xyes; then - AC_CHECK_LIB(mpcdec,main,, - [], + AC_CHECK_LIB(mpcdec,main, + MPCDEC_LIBS="$MPCDEC_LIBS -lmpcdec", enable_mpc=no) - else - MPCDEC_LIBS="" - MPCDEC_CFLAGS="" - fi + CFLAGS=$oldcflags + LIBS=$oldlibs + CPPFLAGS=$oldcppflags + if test x$enable_mpc = xyes; then - AC_DEFINE(HAVE_MPCDEC,1, - [Define to use libmpcdec for MPC decoding]) - if test x$old_mpcdec = xyes; then - AC_DEFINE(MPC_IS_OLD_API, 1, - [Define if an old pre-SV8 libmpcdec is used]) - fi + AC_CHECK_HEADER([mpc/mpcdec.h], + [AC_DEFINE(HAVE_MPCDEC,1, + [Define to use libmpcdec for MPC decoding])], + [AC_CHECK_HEADER(mpcdec/mpcdec.h, + [AC_DEFINE(MPC_IS_OLD_API, 1, + [Define if an old pre-SV8 libmpcdec is used])] + )] + ) else AC_MSG_WARN([mpcdec lib needed for MPC support -- disabling MPC support]) fi - CFLAGS=$oldcflags - LIBS=$oldlibs - CPPFLAGS=$oldcppflags fi AC_SUBST(MPCDEC_LIBS) -- cgit v1.2.3