This commit is contained in:
Rafael Diniz 2016-08-03 17:19:16 -03:00
parent 335edcc58d
commit b16c58104e
27 changed files with 110 additions and 239 deletions

View File

@ -41,8 +41,8 @@ SYSTEM_INCLUDE=/usr/include
dnl----------------------------------------------------------------------------- dnl-----------------------------------------------------------------------------
dnl link the lame library if requested dnl link the lame library if requested
dnl----------------------------------------------------------------------------- dnl-----------------------------------------------------------------------------
AC_SUBST(LAME_INCFLAGS) AC_SUBST(LAME_CFLAGS)
AC_SUBST(LAME_LDFLAGS) AC_SUBST(LAME_LIBS)
AC_ARG_WITH(lame, AC_ARG_WITH(lame,
[ --with-lame use lame for encoding mp3 streams [yes] ], [ --with-lame use lame for encoding mp3 streams [yes] ],
@ -60,9 +60,9 @@ if test "x${USE_LAME}" = "xyes" ; then
if test "x${LAME_LIB_LOC}" != "x" ; then if test "x${LAME_LIB_LOC}" != "x" ; then
AC_DEFINE( HAVE_LAME_LIB, 1, [build with lame library] ) AC_DEFINE( HAVE_LAME_LIB, 1, [build with lame library] )
if test "x${LAME_INC_LOC}" != "x${SYSTEM_INCLUDE}" ; then if test "x${LAME_INC_LOC}" != "x${SYSTEM_INCLUDE}" ; then
LAME_INCFLAGS="-I${LAME_INC_LOC}" LAME_CFLAGS="-I${LAME_INC_LOC}"
fi fi
LAME_LDFLAGS="-L${LAME_LIB_LOC} -lmp3lame" LAME_LIBS="-L${LAME_LIB_LOC} -lmp3lame"
AC_MSG_RESULT( [found at ${CONFIG_LAME_PREFIX}] ) AC_MSG_RESULT( [found at ${CONFIG_LAME_PREFIX}] )
else else
AC_MSG_WARN( [not found, building without lame]) AC_MSG_WARN( [not found, building without lame])
@ -72,44 +72,22 @@ else
fi fi
PKG_PROG_PKG_CONFIG()
dnl----------------------------------------------------------------------------- dnl-----------------------------------------------------------------------------
dnl link the ogg vorbis libraries if requested dnl link the ogg vorbis libraries if requested
dnl----------------------------------------------------------------------------- dnl-----------------------------------------------------------------------------
AC_SUBST(VORBIS_INCFLAGS) AC_SUBST(VORBIS_CFLAGS)
AC_SUBST(VORBIS_LDFLAGS) AC_SUBST(VORBIS_LIBS)
AC_ARG_WITH(vorbis, AC_ARG_WITH(vorbis,
[ --with-vorbis use Ogg Vorbis for encoding vorbis streams [yes] ], [ --with-vorbis use Ogg Vorbis for encoding vorbis streams [yes] ],
USE_VORBIS=${withval}, USE_VORBIS="yes" ) USE_VORBIS=${withval}, USE_VORBIS="yes" )
AC_ARG_WITH(vorbis-prefix,
[ --with-vorbis-prefix=DIR alternate location for vorbis [/usr]
look for libraries in VORBIS-PREFIX/lib,
for headers in VORBIS-PREFIX/include],
CONFIG_VORBIS_PREFIX="${withval}", CONFIG_VORBIS_PREFIX="/usr")
if test "x${USE_VORBIS}" = "xyes" ; then if test "x${USE_VORBIS}" = "xyes" ; then
AC_MSG_CHECKING( [for vorbis libraries at ${CONFIG_VORBIS_PREFIX}] ) AC_MSG_CHECKING( [for vorbis libraries] )
LA_SEARCH_LIB( OGG_LIB_LOC, OGG_INC_LOC, libogg.a libogg.so, ogg/ogg.h, PKG_CHECK_MODULES( [VORBIS], [ogg vorbis vorbisenc],
${CONFIG_VORBIS_PREFIX}) [AC_DEFINE( HAVE_VORBIS_LIB, 1, [build with Ogg Vorbis library] )])
LA_SEARCH_LIB( VORBIS_LIB_LOC, VORBIS_INC_LOC, libvorbis.a libvorbis.so, vorbis/codec.h,
${CONFIG_VORBIS_PREFIX})
LA_SEARCH_LIB( VORBISENC_LIB_LOC, VORBISENC_INC_LOC,
libvorbisenc.a libvorbisenc.so, vorbis/vorbisenc.h,
${CONFIG_VORBIS_PREFIX})
if test "x${OGG_LIB_LOC}" != "x" -a \
"x${VORBIS_LIB_LOC}" != "x" -a \
"x${VORBISENC_LIB_LOC}" != "x" ; then
AC_DEFINE( HAVE_VORBIS_LIB, 1, [build with Ogg Vorbis library] )
if test "x${OGG_INC_LOC}" != "x${SYSTEM_INCLUDE}" ; then
VORBIS_INCFLAGS="-I${OGG_INC_LOC}"
fi
VORBIS_LDFLAGS="-L${OGG_LIB_LOC} -logg -lvorbis -lvorbisenc"
AC_MSG_RESULT( [found at ${CONFIG_VORBIS_PREFIX}] )
else
AC_MSG_WARN( [not found, building without Ogg Vorbis])
fi
else else
AC_MSG_RESULT( [building without Ogg Vorbis] ) AC_MSG_RESULT( [building without Ogg Vorbis] )
fi fi
@ -118,37 +96,16 @@ fi
dnl----------------------------------------------------------------------------- dnl-----------------------------------------------------------------------------
dnl link the ogg / opus libraries if requested dnl link the ogg / opus libraries if requested
dnl----------------------------------------------------------------------------- dnl-----------------------------------------------------------------------------
AC_SUBST(OPUS_INCFLAGS) AC_SUBST(OPUS_CFLAGS)
AC_SUBST(OPUS_LDFLAGS) AC_SUBST(OPUS_LIBS)
AC_ARG_WITH(opus, AC_ARG_WITH(opus,
[ --with-opus use Ogg Opus for encoding opus streams [yes] ], [ --with-opus use Ogg Opus for encoding opus streams [yes] ],
USE_OPUS=${withval}, USE_OPUS="yes" ) USE_OPUS=${withval}, USE_OPUS="yes" )
AC_ARG_WITH(opus-prefix,
[ --with-opus-prefix=DIR alternate location for opus [/usr]
look for libraries in OPUS-PREFIX/lib,
for headers in OPUS-PREFIX/include],
CONFIG_OPUS_PREFIX="${withval}", CONFIG_OPUS_PREFIX="/usr")
if test "x${USE_OPUS}" = "xyes" ; then if test "x${USE_OPUS}" = "xyes" ; then
AC_MSG_CHECKING( [for opus libraries at ${CONFIG_OPUS_PREFIX}] ) AC_MSG_CHECKING( [for opus libraries] )
LA_SEARCH_LIB( OGG_LIB_LOC, OGG_INC_LOC, libogg.a libogg.so, ogg/ogg.h, PKG_CHECK_MODULES( [OPUS], [ogg opus],
${CONFIG_OPUS_PREFIX}) [AC_DEFINE( HAVE_OPUS_LIB, 1, [build with Ogg Opus library] )])
LA_SEARCH_LIB( OPUS_LIB_LOC, OPUS_INC_LOC, libopus.a libopus.so, opus/opus.h,
${CONFIG_OPUS_PREFIX})
if test "x${OGG_LIB_LOC}" != "x" -a \
"x${OPUS_LIB_LOC}" != "x" ; then
AC_DEFINE( HAVE_OPUS_LIB, 1, [build with Ogg Opus library] )
if test "x${OGG_INC_LOC}" != "x${SYSTEM_INCLUDE}" ; then
OPUS_INCFLAGS="-I${OGG_INC_LOC}"
fi
OPUS_LDFLAGS="-L${OGG_LIB_LOC} -logg -lopus"
AC_MSG_RESULT( [found at ${CONFIG_OPUS_PREFIX}] )
else
AC_MSG_WARN( [not found, building without Ogg Opus])
fi
else else
AC_MSG_RESULT( [building without Ogg Opus] ) AC_MSG_RESULT( [building without Ogg Opus] )
fi fi
@ -156,8 +113,8 @@ fi
dnl----------------------------------------------------------------------------- dnl-----------------------------------------------------------------------------
dnl link the faac library if requested dnl link the faac library if requested
dnl----------------------------------------------------------------------------- dnl-----------------------------------------------------------------------------
AC_SUBST(FAAC_INCFLAGS) AC_SUBST(FAAC_CFLAGS)
AC_SUBST(FAAC_LDFLAGS) AC_SUBST(FAAC_LIBS)
AC_ARG_WITH(faac, AC_ARG_WITH(faac,
[ --with-faac use faac for encoding AAC streams [yes] ], [ --with-faac use faac for encoding AAC streams [yes] ],
@ -175,9 +132,9 @@ if test "x${USE_FAAC}" = "xyes" ; then
if test "x${FAAC_LIB_LOC}" != "x" ; then if test "x${FAAC_LIB_LOC}" != "x" ; then
AC_DEFINE( HAVE_FAAC_LIB, 1, [build with faac library] ) AC_DEFINE( HAVE_FAAC_LIB, 1, [build with faac library] )
if test "x${FAAC_INC_LOC}" != "x${SYSTEM_INCLUDE}" ; then if test "x${FAAC_INC_LOC}" != "x${SYSTEM_INCLUDE}" ; then
FAAC_INCFLAGS="-I${FAAC_INC_LOC}" FAAC_CFLAGS="-I${FAAC_INC_LOC}"
fi fi
FAAC_LDFLAGS="-L${FAAC_LIB_LOC} -lfaac" FAAC_LIBS="-L${FAAC_LIB_LOC} -lfaac"
AC_MSG_RESULT( [found at ${CONFIG_FAAC_PREFIX}] ) AC_MSG_RESULT( [found at ${CONFIG_FAAC_PREFIX}] )
else else
AC_MSG_WARN( [not found, building without faac]) AC_MSG_WARN( [not found, building without faac])
@ -190,32 +147,17 @@ fi
dnl----------------------------------------------------------------------------- dnl-----------------------------------------------------------------------------
dnl link the aacplus library if requested dnl link the aacplus library if requested
dnl----------------------------------------------------------------------------- dnl-----------------------------------------------------------------------------
AC_SUBST(AACPLUS_INCFLAGS) AC_SUBST(AACPLUS_CFLAGS)
AC_SUBST(AACPLUS_LDFLAGS) AC_SUBST(AACPLUS_LIBS)
AC_ARG_WITH(aacplus, AC_ARG_WITH(aacplus,
[ --with-aacplus use aacplus for encoding AAC HEv2 streams [yes] ], [ --with-aacplus use aacplus for encoding AAC HEv2 streams [yes] ],
USE_AACPLUS=${withval}, USE_AACPLUS="yes" ) USE_AACPLUS=${withval}, USE_AACPLUS="yes" )
AC_ARG_WITH(aacplus-prefix,
[ --with-aacplus-prefix=DIR alternate location for aacplus [/usr]
look for libraries in AACPLUS-PREFIX/lib,
for headers in AACPLUS-PREFIX/include],
CONFIG_AACPLUS_PREFIX="${withval}", CONFIG_AACPLUS_PREFIX="/usr")
if test "x${USE_AACPLUS}" = "xyes" ; then if test "x${USE_AACPLUS}" = "xyes" ; then
AC_MSG_CHECKING( [for aacplus library at ${CONFIG_AACPLUS_PREFIX}] ) AC_MSG_CHECKING( [for aacplus library] )
LA_SEARCH_LIB( AACPLUS_LIB_LOC, AACPLUS_INC_LOC, libaacplus.a libaacplus.so, aacplus.h, PKG_CHECK_MODULES( [AACPLUS], [aacplus],
${CONFIG_AACPLUS_PREFIX}) [AC_DEFINE( HAVE_AACPLUS_LIB, 1, [build with aacplus library] )])
if test "x${AACPLUS_LIB_LOC}" != "x" ; then
AC_DEFINE( HAVE_AACPLUS_LIB, 1, [build with aacplus library] )
if test "x${AACPLUS_INC_LOC}" != "x${SYSTEM_INCLUDE}" ; then
AACPLUS_INCFLAGS="-I${AACPLUS_INC_LOC}"
fi
AACPLUS_LDFLAGS="-L${AACPLUS_LIB_LOC} -laacplus"
AC_MSG_RESULT( [found at ${CONFIG_AACPLUS_PREFIX}] )
else
AC_MSG_WARN( [not found, building without aacplus])
fi
else else
AC_MSG_RESULT( [building without aacplus] ) AC_MSG_RESULT( [building without aacplus] )
fi fi
@ -224,32 +166,17 @@ fi
dnl----------------------------------------------------------------------------- dnl-----------------------------------------------------------------------------
dnl link the twolame library if requested dnl link the twolame library if requested
dnl----------------------------------------------------------------------------- dnl-----------------------------------------------------------------------------
AC_SUBST(TWOLAME_INCFLAGS) AC_SUBST(TWOLAME_CFLAGS)
AC_SUBST(TWOLAME_LDFLAGS) AC_SUBST(TWOLAME_LIBS)
AC_ARG_WITH(twolame, AC_ARG_WITH(twolame,
[ --with-twolame use twolame for encoding MP2 streams [yes] ], [ --with-twolame use twolame for encoding MP2 streams [yes] ],
USE_TWOLAME=${withval}, USE_TWOLAME="yes" ) USE_TWOLAME=${withval}, USE_TWOLAME="yes" )
AC_ARG_WITH(twolame-prefix,
[ --with-twolame-prefix=DIR alternate location for twolame [/usr]
look for libraries in TWOLAME-PREFIX/lib,
for headers in TWOLAME-PREFIX/include],
CONFIG_TWOLAME_PREFIX="${withval}", CONFIG_TWOLAME_PREFIX="/usr")
if test "x${USE_TWOLAME}" = "xyes" ; then if test "x${USE_TWOLAME}" = "xyes" ; then
AC_MSG_CHECKING( [for twolame library at ${CONFIG_TWOLAME_PREFIX}] ) AC_MSG_CHECKING( [for twolame library] )
LA_SEARCH_LIB( TWOLAME_LIB_LOC, TWOLAME_INC_LOC, libtwolame.a libtwolame.so, twolame.h, PKG_CHECK_MODULES( [TWOLAME], [twolame],
${CONFIG_TWOLAME_PREFIX}) [AC_DEFINE( HAVE_TWOLAME_LIB, 1, [build with twolame library] )])
if test "x${TWOLAME_LIB_LOC}" != "x" ; then
AC_DEFINE( HAVE_TWOLAME_LIB, 1, [build with twolame library] )
if test "x${TWOLAME_INC_LOC}" != "x${SYSTEM_INCLUDE}" ; then
TWOLAME_INCFLAGS="-I${TWOLAME_INC_LOC}"
fi
TWOLAME_LDFLAGS="-L${TWOLAME_LIB_LOC} -ltwolame"
AC_MSG_RESULT( [found at ${CONFIG_TWOLAME_PREFIX}] )
else
AC_MSG_WARN( [not found, building without twolame])
fi
else else
AC_MSG_RESULT( [building without twolame] ) AC_MSG_RESULT( [building without twolame] )
fi fi
@ -258,12 +185,12 @@ fi
dnl----------------------------------------------------------------------------- dnl-----------------------------------------------------------------------------
dnl make sure at least one of lame and vorbis present dnl make sure at least one of lame and vorbis present
dnl----------------------------------------------------------------------------- dnl-----------------------------------------------------------------------------
if test "x${LAME_LDFLAGS}" = "x" \ if test "x${LAME_LIBS}" = "x" \
-a "x${VORBIS_LDFLAGS}" = "x" \ -a "x${VORBIS_LIBS}" = "x" \
-a "x${OPUS_LDFLAGS}" = "x" \ -a "x${OPUS_LIBS}" = "x" \
-a "x${FAAC_LDFLAGS}" = "x" \ -a "x${FAAC_LIBS}" = "x" \
-a "x${AACPLUS_LDFLAGS}" = "x" \ -a "x${AACPLUS_LIBS}" = "x" \
-a "x${TWOLAME_LDFLAGS}" = "x"; then -a "x${TWOLAME_LIBS}" = "x"; then
AC_MSG_ERROR([neither lame, Ogg Vorbis, opus, faac, aac+ nor twolame configured]) AC_MSG_ERROR([neither lame, Ogg Vorbis, opus, faac, aac+ nor twolame configured])
fi fi
@ -271,34 +198,16 @@ fi
dnl----------------------------------------------------------------------------- dnl-----------------------------------------------------------------------------
dnl link ALSA sound system if requested dnl link ALSA sound system if requested
dnl----------------------------------------------------------------------------- dnl-----------------------------------------------------------------------------
AC_SUBST(ALSA_INCFLAGS) AC_SUBST(ALSA_CFLAGS)
AC_SUBST(ALSA_LDFLAGS) AC_SUBST(ALSA_LIBS)
AC_ARG_WITH(alsa, AC_ARG_WITH(alsa,
[ --with-alsa use ALSA sound system [yes] ], [ --with-alsa use ALSA sound system [yes] ],
USE_ALSA=${withval}, USE_ALSA="yes" ) USE_ALSA=${withval}, USE_ALSA="yes" )
AC_ARG_WITH(alsa-prefix,
[ --with-alsa-prefix=DIR alternate location for ALSA [/usr]
look for libraries in ALSA-PREFIX/lib,
for headers in ALSA-PREFIX/include],
CONFIG_ALSA_PREFIX="${withval}", CONFIG_ALSA_PREFIX="/usr")
if test "x${USE_ALSA}" = "xyes" ; then if test "x${USE_ALSA}" = "xyes" ; then
AC_MSG_CHECKING( [for alsa libraries at ${CONFIG_ALSA_PREFIX}] ) AC_MSG_CHECKING( [for alsa libraries] )
LA_SEARCH_LIB( ALSA_LIB_LOC, ALSA_INC_LOC, libasound.so, alsa/asoundlib.h, PKG_CHECK_MODULES( [ALSA], [alsa],
${CONFIG_ALSA_PREFIX}) [AC_DEFINE( HAVE_ALSA_LIB, 1, [build with ALSA sound system] )])
if test "x${ALSA_LIB_LOC}" != "x" ; then
AC_DEFINE( HAVE_ALSA_LIB, 1, [build with ALSA sound system] )
if test "x${ALSA_INC_LOC}" != "x${SYSTEM_INCLUDE}" ; then
ALSA_INCFLAGS="-I${ALSA_INC_LOC}"
fi
ALSA_LDFLAGS="-L${ALSA_LIB_LOC} -lasound"
AC_MSG_RESULT( [found at ${CONFIG_ALSA_PREFIX}] )
else
AC_MSG_WARN( [not found, building without ALSA support])
fi
else else
AC_MSG_RESULT( [building without ALSA support] ) AC_MSG_RESULT( [building without ALSA support] )
fi fi
@ -307,34 +216,16 @@ fi
dnl----------------------------------------------------------------------------- dnl-----------------------------------------------------------------------------
dnl link PULSEAUDIO sound system if requested dnl link PULSEAUDIO sound system if requested
dnl----------------------------------------------------------------------------- dnl-----------------------------------------------------------------------------
AC_SUBST(PULSEAUDIO_INCFLAGS) AC_SUBST(PULSEAUDIO_CFLAGS)
AC_SUBST(PULSEAUDIO_LDFLAGS) AC_SUBST(PULSEAUDIO_LIBS)
AC_ARG_WITH(pulseaudio, AC_ARG_WITH(pulseaudio,
[ --with-pulseaudio use PULSEAUDIO sound system [yes] ], [ --with-pulseaudio use PULSEAUDIO sound system [yes] ],
USE_PULSEAUDIO=${withval}, USE_PULSEAUDIO="yes" ) USE_PULSEAUDIO=${withval}, USE_PULSEAUDIO="yes" )
AC_ARG_WITH(pulseaudio-prefix,
[ --with-pulseaudio-prefix=DIR alternate location for PULSEAUDIO [/usr]
look for libraries in PULSEAUDIO-PREFIX/lib,
for headers in PULSEAUDIO-PREFIX/include],
CONFIG_PULSEAUDIO_PREFIX="${withval}", CONFIG_PULSEAUDIO_PREFIX="/usr")
if test "x${USE_PULSEAUDIO}" = "xyes" ; then if test "x${USE_PULSEAUDIO}" = "xyes" ; then
AC_MSG_CHECKING( [for pulseaudio libraries at ${CONFIG_PULSEAUDIO_PREFIX}] ) AC_MSG_CHECKING( [for pulseaudio libraries] )
LA_SEARCH_LIB( PULSEAUDIO_LIB_LOC, PULSEAUDIO_INC_LOC, libpulse.so, pulse/pulseaudio.h, PKG_CHECK_MODULES( [PULSEAUDIO], [libpulse-simple libpulse],
${CONFIG_PULSEAUDIO_PREFIX}) [AC_DEFINE( HAVE_PULSEAUDIO_LIB, 1, [build with PULSEAUDIO sound system] )])
if test "x${PULSEAUDIO_LIB_LOC}" != "x" ; then
AC_DEFINE( HAVE_PULSEAUDIO_LIB, 1, [build with PULSEAUDIO sound system] )
if test "x${PULSEAUDIO_INC_LOC}" != "x${SYSTEM_INCLUDE}" ; then
PULSEAUDIO_INCFLAGS="-I${PULSEAUDIO_INC_LOC}"
fi
PULSEAUDIO_LDFLAGS="-L${PULSEAUDIO_LIB_LOC} -lpulse-simple -L${PULSEAUDIO_LIB_LOC} -lpulse"
AC_MSG_RESULT( [found at ${CONFIG_PULSEAUDIO_PREFIX}] )
else
AC_MSG_WARN( [not found, building without PULSEAUDIO support])
fi
else else
AC_MSG_RESULT( [building without PULSEAUDIO support] ) AC_MSG_RESULT( [building without PULSEAUDIO support] )
fi fi
@ -344,34 +235,15 @@ dnl-----------------------------------------------------------------------------
dnl link JACK sound server if requested dnl link JACK sound server if requested
dnl----------------------------------------------------------------------------- dnl-----------------------------------------------------------------------------
AC_SUBST(JACK_CFLAGS) AC_SUBST(JACK_CFLAGS)
AC_SUBST(JACK_LDFLAGS) AC_SUBST(JACK_LIBS)
AC_SUBST(JACK_INCFLAGS)
AC_ARG_WITH(jack, AC_ARG_WITH(jack,
[ --with-jack use JACK sound system [yes] ], [ --with-jack use JACK sound system [yes] ],
USE_JACK=${withval}, USE_JACK="yes" ) USE_JACK=${withval}, USE_JACK="yes" )
AC_ARG_WITH(jack-prefix,
[ --with-jack-prefix=DIR alternate location for JACK [/usr]
look for libraries in JACK-PREFIX/lib,
for headers in JACK-PREFIX/include],
CONFIG_JACK_PREFIX="${withval}", CONFIG_JACK_PREFIX="/usr")
if test "x${USE_JACK}" = "xyes" ; then if test "x${USE_JACK}" = "xyes" ; then
AC_MSG_CHECKING( [for jack libraries at ${CONFIG_JACK_PREFIX}] ) AC_MSG_CHECKING( [for jack libraries at ${CONFIG_JACK_PREFIX}] )
LA_SEARCH_LIB( JACK_LIB_LOC, JACK_INC_LOC, libjack.la libjack.so libjack.dylib, jack/jack.h, PKG_CHECK_MODULES( [JACK], [jack],
${CONFIG_JACK_PREFIX}) [AC_DEFINE( HAVE_JACK_LIB, 1, [build with JACK audio server support] )])
if test "x${JACK_LIB_LOC}" != "x" ; then
AC_DEFINE( HAVE_JACK_LIB, 1, [build with JACK audio server support] )
if test "x${JACK_INC_LOC}" != "x${SYSTEM_INCLUDE}" ; then
JACK_INCFLAGS="-I${JACK_INC_LOC}"
fi
JACK_LDFLAGS="-L${JACK_LIB_LOC} -ljack"
AC_MSG_RESULT( [found at ${CONFIG_JACK_PREFIX}] )
else
AC_MSG_WARN( [not found, building without JACK support])
fi
else else
AC_MSG_RESULT( [building without JACK support] ) AC_MSG_RESULT( [building without JACK support] )
fi fi
@ -381,39 +253,20 @@ dnl-----------------------------------------------------------------------------
dnl link Secret Rabbit Code (aka libsamplerate) if requested dnl link Secret Rabbit Code (aka libsamplerate) if requested
dnl----------------------------------------------------------------------------- dnl-----------------------------------------------------------------------------
AC_SUBST(SRC_CFLAGS) AC_SUBST(SRC_CFLAGS)
AC_SUBST(SRC_LDFLAGS) AC_SUBST(SRC_LIBS)
AC_SUBST(SRC_INCFLAGS)
AC_ARG_WITH(samplerate, AC_ARG_WITH(samplerate,
[ --with-samplerate use Secret Rabbit Code (aka libsamplerate) for samplerate conversion [yes] ], [ --with-samplerate use Secret Rabbit Code (aka libsamplerate) for samplerate conversion [yes] ],
USE_SRC=${withval}, USE_SRC="yes" ) USE_SRC=${withval}, USE_SRC="yes" )
AC_ARG_WITH(samplerate-prefix,
[ --with-samplerate-prefix=DIR alternate location for samplerate [/usr]
look for libraries in SRC-PREFIX/lib,
for headers in SRC-PREFIX/include],
CONFIG_SRC_PREFIX="${withval}", CONFIG_SRC_PREFIX="/usr")
if test "x${USE_SRC}" = "xyes" ; then if test "x${USE_SRC}" = "xyes" ; then
AC_MSG_CHECKING( [for samplerate libraries at ${CONFIG_SRC_PREFIX}] ) AC_MSG_CHECKING( [for samplerate libraries] )
LA_SEARCH_LIB( SRC_LIB_LOC, SRC_INC_LOC, libsamplerate.la libsamplerate.so libsamplerate.dylib, samplerate.h, PKG_CHECK_MODULES( [SRC], [samplerate],
${CONFIG_SRC_PREFIX}) [AC_DEFINE( HAVE_SRC_LIB, 1, [build with samplerate conversion through libsamplerate] )])
if test "x${SRC_LIB_LOC}" != "x" ; then
AC_DEFINE( HAVE_SRC_LIB, 1, [build with samplerate conversion through libsamplerate] )
if test "x${SRC_INC_LOC}" != "x${SYSTEM_INCLUDE}" ; then
SRC_INCFLAGS="-I${SRC_INC_LOC}"
fi
SRC_LDFLAGS="-L${SRC_LIB_LOC} -lsamplerate"
AC_MSG_RESULT( [found at ${CONFIG_SRC_PREFIX}] )
else
AC_MSG_WARN( [not found, building libsamplerate support])
fi
else else
AC_MSG_RESULT( [building without libsamplerate support] ) AC_MSG_RESULT( [building without libsamplerate support] )
fi fi
AM_CONDITIONAL(HAVE_SRC_LIB, test "x${SRC_LIB_LOC}" != "x") AM_CONDITIONAL(HAVE_SRC_LIB, test "x${SRC_LIBS}" != "x")
dnl----------------------------------------------------------------------------- dnl-----------------------------------------------------------------------------
dnl check for MSG_NOSIGNAL for the send() function in libsocket dnl check for MSG_NOSIGNAL for the send() function in libsocket
dnl----------------------------------------------------------------------------- dnl-----------------------------------------------------------------------------

View File

@ -175,7 +175,7 @@ Url related to the stream
Genre of the stream Genre of the stream
.TP .TP
.I public .I public
"yes" or "no", wether the stream is public "yes" or "no", whether the stream is public
.TP .TP
.I remoteDumpFile .I remoteDumpFile
The file the The file the
@ -189,7 +189,7 @@ Dump the same mp3 data sent to the
server to this local file. server to this local file.
.TP .TP
.I fileAddDate .I fileAddDate
"yes" or "no" if you want to automaticaly insert a date string in "yes" or "no" if you want to automatically insert a date string in
the localDumpFile name before its extension or at the end of file name if the localDumpFile name before its extension or at the end of file name if
no extension present no extension present
.TP .TP
@ -302,7 +302,7 @@ Url related to the stream
Genre of the stream Genre of the stream
.TP .TP
.I public .I public
"yes" or "no", wether the stream is public "yes" or "no", whether the stream is public
.TP .TP
.I localDumpFile .I localDumpFile
Dump the same Ogg Vorbis data sent to the Dump the same Ogg Vorbis data sent to the
@ -310,7 +310,7 @@ Dump the same Ogg Vorbis data sent to the
server to this local file. server to this local file.
.TP .TP
.I fileAddDate .I fileAddDate
"yes" or "no" if you want to automaticaly insert a date string in "yes" or "no" if you want to automatically insert a date string in
the localDumpFile name before its extension or at the end of file name if the localDumpFile name before its extension or at the end of file name if
no extension present no extension present
.TP .TP
@ -403,7 +403,7 @@ Url related to the stream
Genre of the stream Genre of the stream
.TP .TP
.I public .I public
"yes" or "no", wether the stream is public "yes" or "no", whether the stream is public
.TP .TP
.I irc .I irc
IRC information related to the stream IRC information related to the stream
@ -432,7 +432,7 @@ Dump the same mp3 data sent to the
server to this local file. server to this local file.
.TP .TP
.I fileAddDate .I fileAddDate
"yes" or "no" if you want to automaticaly insert a date string in "yes" or "no" if you want to automatically insert a date string in
the localDumpFile name before its extension or at the end of file name if the localDumpFile name before its extension or at the end of file name if
no extension present no extension present
.TP .TP

View File

@ -210,7 +210,7 @@ AlsaDspSource :: open ( void ) throw ( Exception )
/*------------------------------------------------------------------------------ /*------------------------------------------------------------------------------
* Check wether read() would return anything * Check whether read() would return anything
*----------------------------------------------------------------------------*/ *----------------------------------------------------------------------------*/
bool bool
AlsaDspSource :: canRead ( unsigned int sec, AlsaDspSource :: canRead ( unsigned int sec,

View File

@ -441,7 +441,7 @@ class AudioEncoder : public Sink, public virtual Referable
} }
/** /**
* Check wether encoding is in progress. * Check whether encoding is in progress.
* *
* @return true if encoding is in progress, false otherwise. * @return true if encoding is in progress, false otherwise.
*/ */

View File

@ -431,7 +431,7 @@ class CastSink : public Sink, public virtual Reporter
} }
/** /**
* Get wether this stream is public. * Get whether this stream is public.
* *
* @return true if the stream is public, false otherwise. * @return true if the stream is public, false otherwise.
*/ */

View File

@ -1277,7 +1277,7 @@ DarkIce :: encode ( void ) throw ( Exception )
len = encConnector->transfer( bytes, 4096, 1, 0 ); len = encConnector->transfer( bytes, 4096, 1, 0 );
reportEvent( 1, len, "bytes transfered to the encoders"); reportEvent( 1, len, "bytes transferred to the encoders");
encConnector->close(); encConnector->close();

View File

@ -399,7 +399,7 @@ class FaacEncoder : public AudioEncoder, public virtual Reporter
} }
/** /**
* Check wether encoding is in progress. * Check whether encoding is in progress.
* *
* @return true if encoding is in progress, false otherwise. * @return true if encoding is in progress, false otherwise.
*/ */

View File

@ -191,7 +191,7 @@ FileSink :: operator= ( const FileSink & fs ) throw ( Exception )
/*------------------------------------------------------------------------------ /*------------------------------------------------------------------------------
* Check wether a file exists and is regular file * Check whether a file exists and is regular file
*----------------------------------------------------------------------------*/ *----------------------------------------------------------------------------*/
bool bool
FileSink :: exists ( void ) const throw () FileSink :: exists ( void ) const throw ()
@ -250,7 +250,7 @@ FileSink :: open ( void ) throw ( Exception )
/*------------------------------------------------------------------------------ /*------------------------------------------------------------------------------
* Check wether the file can be written to * Check whether the file can be written to
*----------------------------------------------------------------------------*/ *----------------------------------------------------------------------------*/
bool bool
FileSink :: canWrite ( unsigned int sec, FileSink :: canWrite ( unsigned int sec,

View File

@ -233,7 +233,7 @@ IceCast2 :: sendLogin ( void ) throw ( Exception )
sink->write( str, strlen( str)); sink->write( str, strlen( str));
} }
str = "\n\n"; str = "\r\n\r\n";
sink->write( str, strlen( str)); sink->write( str, strlen( str));
sink->flush(); sink->flush();

View File

@ -82,6 +82,12 @@
#error need limits.h #error need limits.h
#endif #endif
#ifdef HAVE_STDIO_H
#include <stdio.h>
#endif
#include <climits>
#include "Util.h" #include "Util.h"
#include "Exception.h" #include "Exception.h"
#include "JackDspSource.h" #include "JackDspSource.h"
@ -296,7 +302,7 @@ JackDspSource :: open ( void ) throw ( Exception )
/*------------------------------------------------------------------------------ /*------------------------------------------------------------------------------
* Check wether read() would return anything * Check whether read() would return anything
*----------------------------------------------------------------------------*/ *----------------------------------------------------------------------------*/
bool bool
JackDspSource :: canRead ( unsigned int sec, JackDspSource :: canRead ( unsigned int sec,

View File

@ -320,7 +320,7 @@ class LameLibEncoder : public AudioEncoder, public virtual Reporter
} }
/** /**
* Check wether encoding is in progress. * Check whether encoding is in progress.
* *
* @return true if encoding is in progress, false otherwise. * @return true if encoding is in progress, false otherwise.
*/ */

View File

@ -1,10 +1,10 @@
bin_PROGRAMS = darkice bin_PROGRAMS = darkice
AM_CXXFLAGS = -O2 -pedantic -Wall @DEBUG_CXXFLAGS@ @PTHREAD_CFLAGS@
@JACK_CFLAGS@ darkice_CXXFLAGS = \
INCLUDES = @LAME_INCFLAGS@ @VORBIS_INCFLAGS@ @OPUS_INCFLAGS@ @FAAC_INCFLAGS@ @AACPLUS_INCFLAGS@ @TWOLAME_INCFLAGS@ \ -O2 -pedantic -Wall @DEBUG_CXXFLAGS@ \
@ALSA_INCFLAGS@ @PULSEAUDIO_INCFLAGS@ @JACK_INCFLAGS@ @SRC_INCFLAGS@ $(PTHREAD_CFLAGS) $(LAME_CFLAGS) $(VORBIS_CFLAGS) $(OPUS_CFLAGS) $(FAAC_CFLAGS) $(AACPLUS_CFLAGS) $(TWOLAME_CFLAGS) $(ALSA_CFLAGS) $(PULSEAUDIO_CFLAGS) $(JACK_CFLAGS) $(SRC_CFLAGS)
LDADD = @PTHREAD_LIBS@ @LAME_LDFLAGS@ @VORBIS_LDFLAGS@ @OPUS_LDFLAGS@ @FAAC_LDFLAGS@ @AACPLUS_LDFLAGS@ @TWOLAME_LDFLAGS@ \ darkice_LDADD = \
@ALSA_LDFLAGS@ @PULSEAUDIO_LDFLAGS@ @JACK_LDFLAGS@ @SRC_LDFLAGS@ $(PTHREAD_LIBS) $(LAME_LIBS) $(VORBIS_LIBS) $(OPUS_LIBS) $(FAAC_LIBS) $(AACPLUS_LIBS) $(TWOLAME_LIBS) $(ALSA_LIBS) $(PULSEAUDIO_LIBS) $(JACK_LIBS) $(SRC_LIBS)
if HAVE_SRC_LIB if HAVE_SRC_LIB
AFLIB_SOURCE = AFLIB_SOURCE =

View File

@ -229,7 +229,7 @@ MultiThreadedConnector :: transfer ( unsigned long bytes,
dataBuffer = new unsigned char[bufSize]; dataBuffer = new unsigned char[bufSize];
dataSize = 0; dataSize = 0;
reportEvent( 6, "MultiThreadedConnector :: tranfer, bytes", bytes); reportEvent( 6, "MultiThreadedConnector :: transfer, bytes", bytes);
for ( b = 0; !bytes || b < bytes; ) { for ( b = 0; !bytes || b < bytes; ) {
if ( source->canRead( sec, usec) ) { if ( source->canRead( sec, usec) ) {

View File

@ -44,6 +44,8 @@
#include "Util.h" #include "Util.h"
#include "OpusLibEncoder.h" #include "OpusLibEncoder.h"
#include "CastSink.h" #include "CastSink.h"
#include <cstring>
#include <cstdlib>
/* =================================================== local data structures */ /* =================================================== local data structures */

View File

@ -61,6 +61,8 @@
#include "aflibConverter.h" #include "aflibConverter.h"
#endif #endif
#include <stdio.h>
#include <cstdlib>
/* ================================================================ constants */ /* ================================================================ constants */
@ -445,7 +447,7 @@ class OpusLibEncoder : public AudioEncoder, public virtual Reporter
} }
/** /**
* Check wether encoding is in progress. * Check whether encoding is in progress.
* *
* @return true if encoding is in progress, false otherwise. * @return true if encoding is in progress, false otherwise.
*/ */

View File

@ -229,7 +229,7 @@ OssDspSource :: open ( void ) throw ( Exception )
/*------------------------------------------------------------------------------ /*------------------------------------------------------------------------------
* Check wether read() would return anything * Check whether read() would return anything
*----------------------------------------------------------------------------*/ *----------------------------------------------------------------------------*/
bool bool
OssDspSource :: canRead ( unsigned int sec, OssDspSource :: canRead ( unsigned int sec,

View File

@ -69,7 +69,7 @@ class OssDspSource : public AudioSource, public virtual Reporter
int fileDescriptor; int fileDescriptor;
/** /**
* Indicates wether the low-level OSS DSP device is in a recording * Indicates whether the low-level OSS DSP device is in a recording
* state. * state.
*/ */
bool running; bool running;

View File

@ -35,6 +35,7 @@
/* ============================================================ include files */ /* ============================================================ include files */
#include "AudioSource.h" #include "AudioSource.h"
#include <stdio.h>
// compile only if configured for PULSEAUDIO // compile only if configured for PULSEAUDIO
#ifdef SUPPORT_PULSEAUDIO_DSP #ifdef SUPPORT_PULSEAUDIO_DSP
@ -172,7 +173,7 @@ PulseAudioDspSource :: open ( void ) throw ( Exception )
/*------------------------------------------------------------------------------ /*------------------------------------------------------------------------------
* Check wether read() would return anything * Check whether read() would return anything
*----------------------------------------------------------------------------*/ *----------------------------------------------------------------------------*/
bool bool
PulseAudioDspSource :: canRead ( unsigned int sec, PulseAudioDspSource :: canRead ( unsigned int sec,

View File

@ -94,6 +94,10 @@
#error need termios.h #error need termios.h
#endif #endif
#ifdef HAVE_STDIO_H
#include <stdio.h>
#endif
#include "Util.h" #include "Util.h"
#include "Exception.h" #include "Exception.h"

View File

@ -70,7 +70,7 @@ class SerialUlaw : public AudioSource, public virtual Reporter
int fileDescriptor; int fileDescriptor;
/** /**
* Indicates wether the low-level OSS DSP device is in a recording * Indicates whether the low-level OSS DSP device is in a recording
* state. * state.
*/ */
bool running; bool running;

View File

@ -201,7 +201,7 @@ SolarisDspSource :: open ( void ) throw ( Exception )
/*------------------------------------------------------------------------------ /*------------------------------------------------------------------------------
* Check wether read() would return anything * Check whether read() would return anything
*----------------------------------------------------------------------------*/ *----------------------------------------------------------------------------*/
bool bool
SolarisDspSource :: canRead ( unsigned int sec, SolarisDspSource :: canRead ( unsigned int sec,

View File

@ -256,7 +256,7 @@ TcpSocket :: open ( void ) throw ( Exception )
/*------------------------------------------------------------------------------ /*------------------------------------------------------------------------------
* Check wether read() would return anything * Check whether read() would return anything
*----------------------------------------------------------------------------*/ *----------------------------------------------------------------------------*/
bool bool
TcpSocket :: canRead ( unsigned int sec, TcpSocket :: canRead ( unsigned int sec,
@ -329,7 +329,7 @@ TcpSocket :: read ( void * buf,
/*------------------------------------------------------------------------------ /*------------------------------------------------------------------------------
* Check wether write() would send anything * Check whether write() would send anything
*----------------------------------------------------------------------------*/ *----------------------------------------------------------------------------*/
bool bool
TcpSocket :: canWrite ( unsigned int sec, TcpSocket :: canWrite ( unsigned int sec,

View File

@ -249,7 +249,7 @@ class TwoLameLibEncoder : public AudioEncoder, public virtual Reporter
} }
/** /**
* Check wether encoding is in progress. * Check whether encoding is in progress.
* *
* @return true if encoding is in progress, false otherwise. * @return true if encoding is in progress, false otherwise.
*/ */

View File

@ -87,6 +87,9 @@
#error need signal.h #error need signal.h
#endif #endif
#ifdef HAVE_ERRNO_H
#include <errno.h>
#endif
#include "Util.h" #include "Util.h"
@ -232,7 +235,7 @@ Util :: base64Encode( const char * str ) throw ( Exception )
/*------------------------------------------------------------------------------ /*------------------------------------------------------------------------------
* Check wether two strings are equal * Check whether two strings are equal
*----------------------------------------------------------------------------*/ *----------------------------------------------------------------------------*/
bool bool
Util :: strEq( const char * str1, Util :: strEq( const char * str1,
@ -286,7 +289,7 @@ Util :: strToD( const char * str ) throw ( Exception )
} }
val = strtod( str, &s); val = strtod( str, &s);
if ( s == str || val == HUGE_VAL ) { if ( s == str || errno == ERANGE ) {
throw Exception( __FILE__, __LINE__, "number conversion error"); throw Exception( __FILE__, __LINE__, "number conversion error");
} }

View File

@ -169,7 +169,7 @@ class Util
strDup ( const char * str ) throw ( Exception ); strDup ( const char * str ) throw ( Exception );
/** /**
* Determine wether two string are equal. * Determine whether two string are equal.
* *
* @param str1 one of the strings. * @param str1 one of the strings.
* @param str2 the other string. * @param str2 the other string.

View File

@ -331,7 +331,7 @@ class VorbisLibEncoder : public AudioEncoder, public virtual Reporter
} }
/** /**
* Check wether encoding is in progress. * Check whether encoding is in progress.
* *
* @return true if encoding is in progress, false otherwise. * @return true if encoding is in progress, false otherwise.
*/ */

View File

@ -401,7 +401,7 @@ class aacPlusEncoder : public AudioEncoder, public virtual Reporter
} }
/** /**
* Check wether encoding is in progress. * Check whether encoding is in progress.
* *
* @return true if encoding is in progress, false otherwise. * @return true if encoding is in progress, false otherwise.
*/ */