1 # CFLAGS and library paths for LIBLAME
2 # taken from Autostar Sandbox, http://autostars.sourceforge.net/
6 dnl AM_PATH_LIBLAME([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]])
7 dnl FIXME: version checking does not work currently
10 dnl AM_PATH_LIBLAME(3.89, , AC_MSG_ERROR([*** LIBLAME >= 3.89 not installed))
12 dnl Defines LIBLAME_LIBS
13 dnl FIXME: should define LIBLAME_VERSION
16 AC_DEFUN([AM_PATH_LIBLAME],
18 dnl check for the library
19 AC_CHECK_LIB(mp3lame, lame_init, HAVE_LIBLAME=yes, HAVE_LIBLAME=no, -lm)
20 dnl check if lame.h is available in the standard location or not
22 AC_CHECK_HEADER(lame.h, HAVE_LAME_H_STD=no, :)
23 AC_CHECK_HEADER(lame/lame.h, HAVE_LAME_H_STD=yes, :)
24 AC_MSG_CHECKING(for lame.h in right location)
25 if test "x$HAVE_LAME_H_STD" = "xyes"; then
30 if test "x$HAVE_LAME_H_STD"="xno"; then
31 AC_MSG_WARN(lame.h found in include dir,)
32 AC_MSG_WARN( while it should be in it's own lame/ dir !)
36 dnl now do the actual "do we have it ?" test
37 if test "x$HAVE_LIBLAME" = "xyes"; then
38 LIBLAME_LIBS="-lmp3lame -lm"
39 dnl execute what we have to because it's found
40 ifelse([$2], , :, [$2])
43 dnl execute what we have to because it's not found
44 ifelse([$3], , :, [$3])
47 dnl make variables available
48 AC_SUBST(LIBLAME_LIBS)
49 AC_SUBST(HAVE_LIBLAME)