Commit 66c27066 authored by Thomas B. Rücker's avatar Thomas B. Rücker 😊

* Refactored ices configure.in to allow enabling/disabling

each of the audio input modules at build time.
* Added version detection for libroar.
* Prettify final configure output.


svn path=/icecast/trunk/ices/; revision=18514
parent db7cc610
dnl Process this file with autoconf to produce a configure script.
AC_INIT([IceS], [2.0.1], [icecast@xiph.org])
dnl
dnl Options refactored to allow all audio input modules to be enabled/disabled
dnl by Thomas B. "dm8tbr" Ruecker <thomas.ruecker@tieto.com>
dnl
AC_INIT([IceS], [2.0.2], [icecast@xiph.org])
AC_PREREQ(2.54)
AC_CONFIG_SRCDIR(src/ices.c)
......@@ -48,21 +52,36 @@ dnl Checks for header files.
AC_HEADER_STDC
AC_CHECK_HEADERS([stropts.h sys/timeb.h sys/select.h])
dnl ================================================================
dnl Check for OSS
dnl ================================================================
AC_ARG_ENABLE(oss,
[AC_HELP_STRING([--disable-oss],
[OSS support [default=autodetect]])],,
enable_oss=yes)
if test "x$enable_oss" = xyes ; then
AC_CHECK_HEADER(sys/soundcard.h, have_oss=yes, have_oss=no)
AC_CHECK_HEADER(machine/soundcard.h, have_oss=yes, )
if test "$have_oss" = yes; then
AC_DEFINE(HAVE_OSS,,[Define to enable OSS input module])
fi
else
have_oss=no
fi
AC_CHECK_HEADER(sys/soundcard.h, have_oss=yes, have_oss=no)
AC_CHECK_HEADER(machine/soundcard.h, have_oss=yes, )
AM_CONDITIONAL(HAVE_OSS,test "$have_oss" = yes)
if test "$have_oss" = yes; then
AC_DEFINE(HAVE_OSS,,[Define to enable OSS input module])
fi
dnl ================================================================
dnl Check for Sun audio
dnl ================================================================
AC_C_BIGENDIAN
AC_ARG_ENABLE(sun-audio,
AC_HELP_STRING([--disable-sun-audio],
[Disable sun audio input (default autodetect)]),
[Sun audio input [default=autodetect]]),
enable_sun="$enableval",
enable_sun=yes
)
......@@ -72,29 +91,57 @@ if test x$enable_sun = xyes; then
if test "$have_sun_audio" = yes; then
AC_DEFINE(HAVE_SUN_AUDIO,,[Define to enable sun audio input module])
fi
else
have_sun_audio=no
fi
AM_CONDITIONAL(HAVE_SUN_AUDIO,test "$have_sun_audio" = yes)
dnl ================================================================
dnl Check for ALSA audio
dnl ================================================================
AC_CHECK_HEADER(alsa/asoundlib.h, have_alsa=yes, have_alsa=no)
AM_CONDITIONAL(HAVE_ALSA,test "$have_alsa" = yes)
AC_ARG_ENABLE(alsa,
[AC_HELP_STRING([--disable-alsa],
[ALSA support [default=autodetect]])],,
enable_alsa=yes)
if test "x$enable_alsa" = xyes ; then
AC_CHECK_HEADER(alsa/asoundlib.h, have_alsa=yes, have_alsa=no)
if test "$have_alsa" = yes; then
ALSA_LIBS="-lasound"
AC_DEFINE(HAVE_ALSA, ,[Define to enable ALSA input module])
if test "$have_alsa" = yes; then
ALSA_LIBS="-lasound"
AC_DEFINE(HAVE_ALSA, ,[Define to enable ALSA input module])
fi
else
have_alsa=no
fi
AM_CONDITIONAL(HAVE_ALSA,test "$have_alsa" = yes)
dnl ================================================================
dnl Check for RoarAudio
dnl ================================================================
AC_CHECK_HEADER(roaraudio.h, have_roaraudio=yes, have_roaraudio=no)
AM_CONDITIONAL(HAVE_ROARAUDIO,test "$have_roaraudio" = yes)
AC_ARG_ENABLE(roaraudio,
[AC_HELP_STRING([--disable-roaraudio],
[Roaraudio support [default=autodetect]])],,
enable_roaraudio=yes)
if test "x$enable_roaraudio" = xyes ; then
PKG_CHECK_MODULES(RoarAudio, [libroar >= 0.4.0], have_roaraudio=yes, have_roaraudio=no)
if test "$have_roaraudio" = yes; then
ROARAUDIO_LIBS="-lroar"
AC_DEFINE(HAVE_ROARAUDIO, ,[Define to enable RoarAudio input module])
if test "$have_roaraudio" = yes; then
ROARAUDIO_LIBS="-lroar"
AC_DEFINE(HAVE_ROARAUDIO, ,[Define to enable RoarAudio input module])
fi
else
have_roaraudio=no
fi
AM_CONDITIONAL(HAVE_ROARAUDIO,test "$have_roaraudio" = yes)
dnl Checks for typedefs, structures, and compiler characteristics.
AC_C_CONST
......@@ -147,3 +194,12 @@ AC_OUTPUT(
src/thread/Makefile
src/avl/Makefile
)
echo "
Build with alsa: $have_alsa
Build with OSS: $have_oss
Build with Sun audio: $have_sun_audio
Build with RoarAudio: $have_roaraudio
"
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