summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorMichal Ratajsky <[email protected]>2014-07-18 16:51:07 +0200
committerMichal Ratajsky <[email protected]>2014-07-18 16:51:07 +0200
commit0bc3aa762cd794da510f03229840d939ee7bc0c9 (patch)
tree889ec2ae5954a45ea68c3166cbab6bbe16c342cb /configure.ac
parent1c842063e1f7bf6803655ac193ac28704c4dc0c2 (diff)
downloadlibmatemixer-0bc3aa762cd794da510f03229840d939ee7bc0c9.tar.bz2
libmatemixer-0bc3aa762cd794da510f03229840d939ee7bc0c9.tar.xz
Add module skeleton and build support
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac36
1 files changed, 36 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
index 3adfcba..d9bffc6 100644
--- a/configure.ac
+++ b/configure.ac
@@ -118,6 +118,40 @@ AC_SUBST(HAVE_PULSEAUDIO)
AC_SUBST(PULSEAUDIO_CFLAGS)
AC_SUBST(PULSEAUDIO_LIBS)
+# -----------------------------------------------------------------------
+# OSS
+# -----------------------------------------------------------------------
+AC_ARG_ENABLE([oss],
+ AS_HELP_STRING([--enable-oss],
+ [Enable OSS backend module @<:@default=no@:>@]),
+ enable_oss=$enableval, enable_oss=no)
+
+if test "x$enable_oss" != "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_oss=yes
+ else
+ have_oss=no
+ fi
+
+ if test "x$enable_oss" = "xyes" -a "x$have_oss" = "xno"; then
+ AC_MSG_ERROR([OSS support explicitly requested but dependencies not found])
+ fi
+
+ if test "x$have_oss" = "xyes" ; then
+ AC_DEFINE(HAVE_OSS, [], [Define if we have OSS support])
+ fi
+else
+ have_oss=no
+fi
+
+AM_CONDITIONAL(HAVE_OSS, test "x$have_oss" = "xyes")
+
+AC_SUBST(HAVE_OSS)
+AC_SUBST(OSS_CFLAGS)
+
# =======================================================================
# Compiler warnings
# =======================================================================
@@ -169,6 +203,7 @@ Makefile
libmatemixer/Makefile
backends/Makefile
backends/null/Makefile
+backends/oss/Makefile
backends/pulse/Makefile
data/Makefile
data/libmatemixer.pc
@@ -193,5 +228,6 @@ echo "
Build Null module: $have_null
Build PulseAudio module: $have_pulseaudio
+ Build OSS module: $have_oss
"