Commit c2d788f6 authored by Avuton Olrich's avatar Avuton Olrich

configure.ac: Check for LAME libraries the same way others are checked for.

Check for LAME libraries the same way other libraries are checked for, in line with the configure and outside the buggy macro. This will fix problems with cross compilation.
parent fa8992fc
......@@ -1133,12 +1133,20 @@ MPD_AUTO_PKG(vorbis_encoder, VORBISENC, [vorbisenc],
[Ogg Vorbis encoder], [libvorbisenc not found])
if test x$enable_lame_encoder != xno; then
AM_PATH_LAME([found_lame_encoder=yes], [found_lame_encoder=no])
MPD_AUTO_RESULT(lame_encoder, [LAME encoder plugin],
[LAME not found])
AC_CHECK_HEADERS(lame/lame.h,,
[AC_CHECK_HEADERS(lame.h,, using_lame=no)])
AC_CHECK_LIB(mp3lame, lame_init,, using_lame=no)
if test x$using_lame != xno; then
AC_DEFINE(HAVE_LAME, 1, [Define to 1 if you have lame 3.98 or greater.])
LAME_LIBS="-lmp3lame -lm"
enable_lame_encoder=yes
fi
if test "$enable_lame_encoder" = "yes" -a "$using_lame" = "no"; then
AC_MSG_ERROR([LAME libraries and development support files not found.])
fi
fi
AC_SUBST(LAME_CFLAGS)
AC_SUBST(LAME_LIBS)
MPD_AUTO_PKG(twolame_encoder, TWOLAME, [twolame],
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment