fix commit https://github.com/OpenPLi/enigma2/commit/0237136ce955899bca6fc5837b6d71a...
[openblackhole/openblackhole-enigma2.git] / configure.ac
index f2a4770..9782627 100644 (file)
@@ -46,11 +46,6 @@ AC_SUBST(LIBJPEG_LIBS)
 AC_CHECK_LIB([ungif], [DGifOpen], [LIBGIF_LIBS="-lungif"], [AC_CHECK_LIB([gif], [DGifOpen], [LIBGIF_LIBS="-lgif"], [AC_MSG_ERROR([Could not find libgif or libungif])])])
 AC_SUBST(LIBGIF_LIBS)
 
-AC_LANG_PUSH([C++])
-AC_CHECK_LIB([xmlccwrap], [exit], [LIBXMLCCWRAP_LIBS="-lxmlccwrap"], [AC_MSG_ERROR([Could not find libxmlccwrap])])
-AC_SUBST(LIBXMLCCWRAP_LIBS)
-AC_LANG_POP
-
 AC_ARG_WITH(boxtype,
        [  --with-boxtype=NAME box type [[none,dm7025,dm800...]]],
        [BOXTYPE="$withval"],[BOXTYPE="dm800"])
@@ -150,12 +145,58 @@ if test "$with_po" = "yes"; then
 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
+
+AC_ARG_WITH(fbdev,
+       AC_HELP_STRING([--with-fbdev=devicename], [use devicename for framebuffer device, e.g. /dev/fb0 ]),
+       [[with_fbdev=$withval]],
+       [[with_fbdev=no]]
+)
+if test x"$with_fbdev" != xno ; then
+       AC_DEFINE_UNQUOTED(FB_DEV, "$withval", [Defines which device to use for main framebuffer (e.g. /dev/fb0)])
+fi
+
+AC_ARG_WITH(lcddev,
+       AC_HELP_STRING([--with-lcddev=devicename], [use devicename for lcd framebuffer device, e.g. /dev/fb1 ]),
+       [[with_lcddev=$withval]],
+       [[with_lcddev=no]]
+)
+if test x"$with_lcddev" != xno ; then
+       AC_DEFINE_UNQUOTED(LCD_DEV, "$withval", [Defines which device to use for lcd (e.g. /dev/fb1)])
+fi
+
 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