summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorMichal Ratajsky <[email protected]>2014-08-12 04:56:55 +0200
committerMichal Ratajsky <[email protected]>2014-08-12 04:56:55 +0200
commit6c6d4239ddc807e922df3874654f99eea291aadb (patch)
tree558f48fc965476344a946d93088680db3b5bac41 /configure.ac
parent8436ec1641eee8868128755f6d1475230cea25e6 (diff)
downloadlibmatemixer-6c6d4239ddc807e922df3874654f99eea291aadb.tar.bz2
libmatemixer-6c6d4239ddc807e922df3874654f99eea291aadb.tar.xz
Add ALSA, improve OSS and remove OSS4
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac76
1 files changed, 37 insertions, 39 deletions
diff --git a/configure.ac b/configure.ac
index b618913..d376b19 100644
--- a/configure.ac
+++ b/configure.ac
@@ -61,13 +61,12 @@ LT_INIT
# =======================================================================
PKG_PROG_PKG_CONFIG
-GLIB_REQUIRED_VERSION=2.36.0
+GLIB_REQUIRED_VERSION=2.32.0
PKG_CHECK_MODULES(GLIB, [
glib-2.0 >= $GLIB_REQUIRED_VERSION
gobject-2.0 >= $GLIB_REQUIRED_VERSION
gmodule-2.0 >= $GLIB_REQUIRED_VERSION
- gio-2.0 >= $GLIB_REQUIRED_VERSION
])
GTK_DOC_CHECK([1.10], [--flavour no-tmpl])
@@ -120,6 +119,39 @@ AC_SUBST(PULSEAUDIO_CFLAGS)
AC_SUBST(PULSEAUDIO_LIBS)
# -----------------------------------------------------------------------
+# ALSA
+# -----------------------------------------------------------------------
+ALSA_REQUIRED_VERSION=1.0.0
+
+AC_ARG_ENABLE([alsa],
+ AS_HELP_STRING([--enable-alsa],
+ [Enable ALSA backend module @<:@default=auto@:>@]),
+ enable_alsa=$enableval, enable_alsa=auto)
+
+if test "x$enable_alsa" != "xno"; then
+ PKG_CHECK_MODULES(ALSA, [
+ alsa >= $ALSA_REQUIRED_VERSION
+ gthread-2.0 >= $GLIB_REQUIRED_VERSION
+ ],
+ have_alsa=yes,
+ have_alsa=no)
+
+ if test "x$enable_alsa" = "xyes" -a "x$have_alsa" = "xno"; then
+ AC_MSG_ERROR([ALSA support explicitly requested but dependencies not found])
+ fi
+
+ if test "x$have_alsa" = "xyes" ; then
+ AC_DEFINE(HAVE_ALSA, [], [Define if we have ALSA support])
+ fi
+fi
+
+AM_CONDITIONAL(HAVE_ALSA, test "x$have_alsa" = "xyes")
+
+AC_SUBST(HAVE_ALSA)
+AC_SUBST(ALSA_CFLAGS)
+AC_SUBST(ALSA_LIBS)
+
+# -----------------------------------------------------------------------
# OSS
# -----------------------------------------------------------------------
AC_ARG_ENABLE([oss],
@@ -155,40 +187,6 @@ AC_SUBST(HAVE_OSS)
AC_SUBST(OSS_CFLAGS)
AC_SUBST(OSS_LIBS)
-# -----------------------------------------------------------------------
-# OSS4
-# -----------------------------------------------------------------------
-AC_ARG_ENABLE([oss4],
- AS_HELP_STRING([--enable-oss4],
- [Enable OSS4 backend module @<:@default=no@:>@]),
- enable_oss4=$enableval, enable_oss4=no)
-
-if test "x$enable_oss4" != "xno"; then
- AC_CHECK_HEADERS([soundcard.h sys/soundcard.h machine/soundcard.h])
- if test "x$ac_cv_header_soundcard_h" = "xyes" -o \
- "x$ac_cv_header_sys_soundcard_h" = "xyes" -o \
- "x$ac_cv_header_machine_soundcard_h" = "xyes"; then
- have_oss4=yes
- else
- have_oss4=no
- fi
-
- if test "x$enable_oss4" = "xyes" -a "x$have_oss4" = "xno"; then
- AC_MSG_ERROR([OSS4 support explicitly requested but dependencies not found])
- fi
-
- if test "x$have_oss4" = "xyes" ; then
- AC_DEFINE(HAVE_OSS4, [], [Define if we have OSS support])
- fi
-else
- have_oss4=no
-fi
-
-AM_CONDITIONAL(HAVE_OSS4, test "x$have_oss4" = "xyes")
-
-AC_SUBST(HAVE_OSS4)
-AC_SUBST(OSS4_CFLAGS)
-
# =======================================================================
# Compiler warnings
# =======================================================================
@@ -240,9 +238,9 @@ Makefile
libmatemixer/Makefile
backends/Makefile
backends/null/Makefile
-backends/oss/Makefile
-backends/oss4/Makefile
backends/pulse/Makefile
+backends/alsa/Makefile
+backends/oss/Makefile
data/Makefile
data/libmatemixer.pc
docs/Makefile
@@ -266,7 +264,7 @@ echo "
Build Null module: $have_null
Build PulseAudio module: $have_pulseaudio
+ Build ALSA module: $have_alsa
Build OSS module: $have_oss
- Build OSS4 module: $have_oss4
"