aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAvuton Olrich <avuton@gmail.com>2011-12-11 12:35:26 -0800
committerMax Kellermann <max@duempel.org>2011-12-12 10:02:27 +0100
commit71b5e431539b0738be453fd45b1605608d0f038d (patch)
tree00aa32cf18458009c011ef46de18c624dd2e334c
parent8459f27312bcbfc6bcd251d592e32b894a6e9950 (diff)
downloadmpd-71b5e431539b0738be453fd45b1605608d0f038d.tar.gz
mpd-71b5e431539b0738be453fd45b1605608d0f038d.tar.xz
mpd-71b5e431539b0738be453fd45b1605608d0f038d.zip
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.
-rw-r--r--configure.ac52
1 files changed, 14 insertions, 38 deletions
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)