aboutsummaryrefslogtreecommitdiffstats
path: root/configure.ac
diff options
context:
space:
mode:
authorAvuton Olrich <avuton@gmail.com>2010-04-15 19:41:18 -0700
committerAvuton Olrich <avuton@gmail.com>2010-04-15 20:23:35 -0700
commitc2d788f6de2ee98faef1a49b700fcf577c2f0d32 (patch)
tree0a8ce2c1e8221758f39adea5b07d38596ec897cf /configure.ac
parentfa8992fc63a3d361e6bcab23ddaf6bc82c4abbe9 (diff)
downloadmpd-c2d788f6de2ee98faef1a49b700fcf577c2f0d32.tar.gz
mpd-c2d788f6de2ee98faef1a49b700fcf577c2f0d32.tar.xz
mpd-c2d788f6de2ee98faef1a49b700fcf577c2f0d32.zip
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.
Diffstat (limited to '')
-rw-r--r--configure.ac16
1 files changed, 12 insertions, 4 deletions
diff --git a/configure.ac b/configure.ac
index 504bd6474..18c2f1f8f 100644
--- a/configure.ac
+++ b/configure.ac
@@ -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],