[xiph-commits] r18514 - icecast/trunk/ices

dm8tbr at svn.xiph.org dm8tbr at svn.xiph.org
Mon Aug 6 12:57:51 PDT 2012


Author: dm8tbr
Date: 2012-08-06 12:57:51 -0700 (Mon, 06 Aug 2012)
New Revision: 18514

Modified:
   icecast/trunk/ices/configure.in
Log:
* 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.



Modified: icecast/trunk/ices/configure.in
===================================================================
--- icecast/trunk/ices/configure.in	2012-08-06 11:59:33 UTC (rev 18513)
+++ icecast/trunk/ices/configure.in	2012-08-06 19:57:51 UTC (rev 18514)
@@ -1,5 +1,9 @@
 dnl Process this file with autoconf to produce a configure script.
-AC_INIT([IceS], [2.0.1], [icecast at xiph.org])
+dnl
+dnl Options refactored to allow all audio input modules to be enabled/disabled
+dnl by Thomas B. "dm8tbr" Ruecker <thomas.ruecker at tieto.com>
+dnl
+AC_INIT([IceS], [2.0.2], [icecast at xiph.org])
 AC_PREREQ(2.54)
 AC_CONFIG_SRCDIR(src/ices.c)
 
@@ -48,21 +52,36 @@
 AC_HEADER_STDC
 AC_CHECK_HEADERS([stropts.h sys/timeb.h sys/select.h])
 
+dnl ================================================================
 dnl Check for OSS
+dnl ================================================================
 
-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])
+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
 
+AM_CONDITIONAL(HAVE_OSS,test "$have_oss" = yes)
+
+
+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 "$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 "$have_alsa" = yes; then
-   ALSA_LIBS="-lasound"
-   AC_DEFINE(HAVE_ALSA, ,[Define to enable ALSA input module])
+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])
+    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 "$have_roaraudio" = yes; then
-   ROARAUDIO_LIBS="-lroar"
-   AC_DEFINE(HAVE_ROARAUDIO, ,[Define to enable RoarAudio input module])
+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])
+    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 @@
    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
+
+"



More information about the commits mailing list