enable alsa support through build time configure
authorMirakels <mirakels@openpli.org>
Fri, 18 Dec 2015 09:33:27 +0000 (10:33 +0100)
committerMirakels <mirakels@openpli.org>
Fri, 18 Dec 2015 09:45:05 +0000 (10:45 +0100)
--with-alsa
will enable alsa support in enigma2
--with-alsacard=card
will define the als card (default 'default')
        Example: --with-alsacard=hw:0
--with-alsamixer=mixername
Defines the als mixer device (defailt 'Master')
Example --with-alsamixer=Master

configure.ac

index 60f35fe..b8b8353 100644 (file)
@@ -145,12 +145,40 @@ if test "$with_po" = "yes"; then
 fi
 AM_CONDITIONAL(UPDATE_PO, test "$with_po" = "yes")
 
 fi
 AM_CONDITIONAL(UPDATE_PO, test "$with_po" = "yes")
 
+AC_ARG_WITH(alsa,
+       AC_HELP_STRING([--with-alsa], [Enable ALSA support]),
+       [[with_alse=$withval]],
+       [[with_alse=no]]
+)
+if test x"$with_alsa" == xyes ; then
+       AC_DEFINE(HAVE_ALSA, 1,[Enables ALSA support])
+       PKG_CHECK_MODULES(ALSA, alsa)
+fi
+
+AC_ARG_WITH(alsacard,
+       AC_HELP_STRING([--with-alsacard=card], [use 'card' for alsa card device, e.g. hw:0]),
+       [[with_alsacard=$withval]],
+       [[with_alsacard=no]]
+)
+if test x"$with_alsacard" != xno ; then
+       AC_DEFINE_UNQUOTED(ALSA_CARD, "$withval",[Defines which alsa card to use])
+fi
+
+AC_ARG_WITH(alsamixer,
+       AC_HELP_STRING([--with-alsamixer=mixername], [use alsa 'mixername' for volume control, e.g. Master]),
+       [[with_alsamixer=$withval]],
+       [[with_alsamixer=no]]
+)
+if test x"$with_alsamixer" != xno ; then
+       AC_DEFINE_UNQUOTED(ALSA_VOLUME_MIXER, "$withval",[Defines which alsa mixer to use for volume control])
+fi
+
 ENIGMA2_CFLAGS="-fno-rtti -fno-exceptions"
 AC_SUBST(ENIGMA2_CFLAGS)
 
 CPPFLAGS="$CPPFLAGS $PYTHON_CPPFLAGS"
 CFLAGS="$CFLAGS $DEBUG_CFLAGS -Wall"
 ENIGMA2_CFLAGS="-fno-rtti -fno-exceptions"
 AC_SUBST(ENIGMA2_CFLAGS)
 
 CPPFLAGS="$CPPFLAGS $PYTHON_CPPFLAGS"
 CFLAGS="$CFLAGS $DEBUG_CFLAGS -Wall"
-CXXFLAGS="$CXXFLAGS $DEBUG_CFLAGS -Wall $BASE_CFLAGS $ENIGMA2_CFLAGS $PTHREAD_CFLAGS $OPENMP_CFLAGS"
+CXXFLAGS="$CXXFLAGS $DEBUG_CFLAGS -Wall $BASE_CFLAGS $ENIGMA2_CFLAGS $PTHREAD_CFLAGS $OPENMP_CFLAGS $ALSA_CFLAGS"
 
 AC_CONFIG_FILES([
 Makefile
 
 AC_CONFIG_FILES([
 Makefile