AC_DEFINE(HAVE_LIBASOUND2, 1, [Define if you have libasound.so.2 (required for ALSA 0.9.x/1.x support)])
fi
])
AC_ARG_WITH(flac,AC_HELP_STRING([--with-flac],[Enable FLAC support @<:@default=check@:>@]),[flac_test="$withval"],[flac_test="yes"])
if test "x$flac_test" = "xyes" ; then
AC_CHECK_LIBFLAC113
if test "x$have_libFLAC" = "xno"; then
AC_CHECK_LIBFLAC
AC_CHECK_LIBOGGFLAC
fi
fi
AC_ARG_WITH(speex,AC_HELP_STRING([--with-speex],[Enable speex support @<:@default=check@:>@]),[speex_test="$withval"],[speex_test="yes"])
if test "x$speex_test" = "xyes" ; then
AC_MSG_CHECKING(for speex headers)
have_libspeex=no
kde_save_akode_cflags="$CFLAGS"
kde_save_akode_libs="$LIBS"
LIBS="$all_libraries $USER_LDFLAGS"
CFLAGS="$CFLAGS $all_includes $USER_INCLUDES"
AC_TRY_COMPILE([
#include <speex.h>
#include <speex_callbacks.h>
#include <ogg/ogg.h>
],[
],[
have_libspeex=yes
])
AC_MSG_RESULT($have_libspeex)
if test x$have_libspeex = xyes; then
KDE_CHECK_LIB(speex,speex_decoder_ctl,,
have_libspeex=no,[-lspeex -logg])
fi
CFLAGS="$kde_save_akode_cflags"
LIBS="$kde_save_akode_libs"
AC_MSG_CHECKING(for speex11 headers)
have_libspeex11=no
kde_save_akode_cflags="$CFLAGS"
kde_save_akode_libs="$LIBS"
LIBS="$all_libraries $USER_LDFLAGS"
CFLAGS="$CFLAGS $all_includes $USER_INCLUDES"
AC_TRY_COMPILE([
#include <speex.h>
#include <speex_callbacks.h>
#include <speex_echo.h>
#include <speex_preprocess.h>
#include <ogg/ogg.h>
],[
],[
have_libspeex11=yes
])
AC_MSG_RESULT($have_libspeex11)
if test x$have_libspeex11 = xyes; then
KDE_CHECK_LIB(speex,speex_decode_int,,
broken_libspeex11=yes,[-lspeex -logg])
fi
if test x$have_libspeex = xyes; then
AC_DEFINE(HAVE_SPEEX,1,[Define if you have speex installed])
SPEEXLIBS="-lspeex -logg"
fi
CFLAGS="$kde_save_akode_cflags"
LIBS="$kde_save_akode_libs"
AC_SUBST(SPEEXLIBS)
if test x$have_libspeex11 = xyes; then
AC_DEFINE(HAVE_SPEEX11,1,[Define if you have libspeex 1.1.x installed])
if test x$broken_libspeex11 = xyes; then
AC_DEFINE(BROKEN_SPEEX11,1,[Define if you have one of the broken libspeex 1.1.x < 1.1.5])
fi
fi
fi
AC_ARG_WITH(libmad,AC_HELP_STRING([--with-libmad],[Enable libmad support @<:@default=check@:>@]),[libmad_test="$withval"],[libmad_test="yes"])
if test "x$libmad_test" = "xyes" ; then
AC_MSG_CHECKING(for MADlib header)
have_libMAD=no
kde_save_akode_cflags="$CFLAGS"
kde_save_akode_libs="$LIBS"
LIBS="$all_libraries $USER_LDFLAGS"
CFLAGS="$CFLAGS $all_includes $USER_INCLUDES"
AC_TRY_COMPILE([
#include <mad.h>
],[
],[
have_libMAD=yes
])
AC_MSG_RESULT($have_libMAD)
if test x$have_libMAD = xyes; then
KDE_CHECK_LIB(mad,mad_decoder_run,MAD_lib=yes,
have_libMAD=no,[-lmad])
fi
if test x$have_libMAD = xyes; then
AC_DEFINE(HAVE_MAD,1,[Define if you have MADlib installed])
MADLIBS="-lmad"
fi
CFLAGS="$kde_save_akode_cflags"
LIBS="$kde_save_akode_libs"
AC_SUBST(MADLIBS)
fi
AC_ARG_WITH(libsamplerate,AC_HELP_STRING([--with-libsamplerate],[Enable libsamplerate support @<:@default=check@:>@]),[libsamplerate_test="$withval"],[libsamplerate_test="yes"])
if test "x$libsamplerate_test" = "xyes" ; then
LIBSAMPLERATE=""
KDE_CHECK_HEADERS(samplerate.h, [
KDE_CHECK_LIB(samplerate, src_simple, [
have_libsamplerate=yes
LIBSAMPLERATE="-lsamplerate"
AC_DEFINE(HAVE_LIBSAMPLERATE,1,[defined if you have libsamplerate library and header])
])
])
AC_SUBST(LIBSAMPLERATE)
fi
dnl Check for pkg-config
AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
AC_ARG_WITH(jack,AC_HELP_STRING([--with-jack],[Enable Jack Audio Connection Kit support @<:@default=check@:>@]),[jack_test="$withval"],[jack_test="yes"])
if test "x$jack_test" = "xyes" ; then
AC_MSG_CHECKING(for Jack Audio Connection Kit)
if $PKG_CONFIG --atleast-version 0.90 jack >/dev/null 2>&1 ; then
JACK_CFLAGS="`$PKG_CONFIG --cflags jack`"
JACK_LIBADD="`$PKG_CONFIG --libs-only-l jack`"
JACK_LDFLAGS="`$PKG_CONFIG --libs-only-L jack`"
have_jack=yes
AC_MSG_RESULT(yes)
AC_DEFINE(HAVE_LIBJACK, 1,
[Define if you have libjack (required if you want Jack support)])
AC_ARG_WITH(pulseaudio,AC_HELP_STRING([--with-pulseaudio],[Enable PulseAudio server support @<:@default=check@:>@]),[pulseaudio_test="$withval"],[pulseaudio_test="yes"])
if test "x$pulseaudio_test" = "xyes" ; then
AC_MSG_CHECKING(for pulseaudio 0.9.2 or later)
if $PKG_CONFIG --atleast-version 0.9.2 libpulse-simple >/dev/null 2>&1 ; then