From 181e9c6d5d11cb1e5d36a2777eeb233ad8ed00e5 Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Thu, 9 Oct 2008 18:15:23 +0200 Subject: big pile of updates to match more what happened with libcanberra --- configure.ac | 214 ++++++++++++++++++++++++++++++++++++++++++++++++++++------- 1 file changed, 191 insertions(+), 23 deletions(-) (limited to 'configure.ac') diff --git a/configure.ac b/configure.ac index 4d4ee07..dc4d0dd 100644 --- a/configure.ac +++ b/configure.ac @@ -82,6 +82,8 @@ esac AM_CONDITIONAL(OS_IS_WIN32, test "x$os_is_win32" = "x1") +AM_CONDITIONAL(USE_VERSION_SCRIPT, test "x$supports_anon_versioning" = "xyes" ) + ################################### # Basic environment checks # ################################### @@ -228,7 +230,7 @@ AC_ARG_ENABLE([alsa], [alsa=auto]) if test "x${alsa}" != xno ; then - PKG_CHECK_MODULES(ASOUNDLIB, [ alsa >= 1.0.0 ], + PKG_CHECK_MODULES(ALSA, [ alsa >= 1.0.0 ], [ HAVE_ALSA=1 AC_DEFINE([HAVE_ALSA], 1, [Have ALSA?]) @@ -243,10 +245,8 @@ else HAVE_ALSA=0 fi -AC_SUBST(ASOUNDLIB_CFLAGS) -AC_SUBST(ASOUNDLIB_LIBS) -AC_SUBST(HAVE_ALSA) -AM_CONDITIONAL([HAVE_ALSA], [test "x$HAVE_ALSA" = x1]) +AC_SUBST(ALSA_CFLAGS) +AC_SUBST(ALSA_LIBS) ### PulseAudio (optional) #### @@ -317,18 +317,154 @@ fi AC_SUBST(JACK_CFLAGS) AC_SUBST(JACK_LIBS) -AC_SUBST(HAVE_JACK) -AM_CONDITIONAL([HAVE_JACK], [test "x$HAVE_JACK" = x1]) -### LIBOIL #### +### Null output (optional) #### + +AC_ARG_ENABLE([null], + AC_HELP_STRING([--disable-null], [Disable optional null output]), + [ + case "${enableval}" in + yes) null=yes ;; + no) null=no ;; + *) AC_MSG_ERROR(bad value ${enableval} for --disable-null) ;; + esac + ], + [null=yes]) + +if test "x${null}" != xno ; then + HAVE_NULL=1 + AC_DEFINE([HAVE_NULL], 1, [Have NULL output?]) +else + HAVE_NULL=0 +fi + +### liboil (mandatory) #### PKG_CHECK_MODULES(LIBOIL, [ liboil-0.3 >= 0.3.0 ]) AC_SUBST(LIBOIL_CFLAGS) AC_SUBST(LIBOIL_LIBS) -PKG_CHECK_MODULES(LIBSPEEX, [ speexdsp >= 1.2 ]) -AC_SUBST(LIBSPEEX_CFLAGS) -AC_SUBST(LIBSPEEX_LIBS) +### libspeex (mandatory) #### + +PKG_CHECK_MODULES(SPEEX, [ speexdsp >= 1.2 ]) +AC_SUBST(SPEEX_CFLAGS) +AC_SUBST(SPEEX_LIBS) + +### Chose builtin driver ### + +AC_ARG_WITH([builtin], + [AS_HELP_STRING([--with-builtin], [Choose builtin driver])], + [], + [with_builtin=dso]) + +HAVE_DSO=0 +BUILTIN_DSO=0 +BUILTIN_PULSE=0 +BUILTIN_ALSA=0 +BUILTIN_OSS=0 +BUILTIN_JACK=0 +BUILTIN_NULL=0 + +case "x$with_builtin" in + xpulse) + if test "x$HAVE_PULSE" != x1 ; then + AC_MSG_ERROR([*** PulseAudio selected for builtin driver, but not enabled. ***]) + fi + + BUILTIN_PULSE=1 + HAVE_ALSA=0 + HAVE_OSS=0 + HAVE_JACK=0 + HAVE_NULL=0 + ;; + + xalsa) + if test "x$HAVE_ALSA" != x1 ; then + AC_MSG_ERROR([*** ALSA selected for builtin driver, but not enabled. ***]) + fi + + BUILTIN_ALSA=1 + HAVE_OSS=0 + HAVE_PULSE=0 + HAVE_JACK=0 + HAVE_NULL=0 + ;; + + xoss) + if test "x$HAVE_OSS" != x1 ; then + AC_MSG_ERROR([*** OSS selected for builtin driver, but not enabled. ***]) + fi + + BUILTIN_OSS=1 + HAVE_ALSA=0 + HAVE_PULSE=0 + HAVE_JACK=0 + HAVE_NULL=0 + ;; + + xjack) + if test "x$HAVE_JACK" != x1 ; then + AC_MSG_ERROR([*** JACK selected for builtin driver, but not enabled. ***]) + fi + + BUILTIN_JACK=1 + HAVE_ALSA=0 + HAVE_PULSE=0 + HAVE_JACK=0 + HAVE_NULL=0 + ;; + + xnull) + if test "x$HAVE_NULL" != x1 ; then + AC_MSG_ERROR([*** Null output selected for builtin driver, but not enabled. ***]) + fi + + BUILTIN_NULL=1 + HAVE_PULSE=0 + HAVE_ALSA=0 + HAVE_OSS=0 + HAVE_JACK=0 + ;; + + xdso) + BUILTIN_DSO=1 + HAVE_DSO=1 + AC_DEFINE([HAVE_DSO], 1, [Have DSO?]) + ;; + + *) + AC_MSG_ERROR([*** Unknown driver $with_builtin selected for builtin ***]) +esac + +if test "x$HAVE_PULSE" != x1 -a "x$HAVE_ALSA" != x1 -a "x$HAVE_OSS" != x1 -a "x$HAVE_JACK" != x1 -a "x$HAVE_NULL" != x1 ; then + AC_MSG_ERROR([*** No backend enabled. ***]) +fi + +AC_SUBST(HAVE_DSO) +AC_SUBST(HAVE_PULSE) +AC_SUBST(HAVE_ALSA) +AC_SUBST(HAVE_OSS) +AC_SUBST(HAVE_JACK) +AC_SUBST(HAVE_NULL) +AC_SUBST(BUILTIN_DSO) +AC_SUBST(BUILTIN_PULSE) +AC_SUBST(BUILTIN_ALSA) +AC_SUBST(BUILTIN_OSS) +AC_SUBST(BUILTIN_JACK) +AC_SUBST(BUILTIN_NULL) +AM_CONDITIONAL([HAVE_PULSE], [test "x$HAVE_PULSE" = x1]) +AM_CONDITIONAL([HAVE_ALSA], [test "x$HAVE_ALSA" = x1]) +AM_CONDITIONAL([HAVE_OSS], [test "x$HAVE_OSS" = x1]) +AM_CONDITIONAL([HAVE_JACK], [test "x$HAVE_JACK" = x1]) +AM_CONDITIONAL([HAVE_NULL], [test "x$HAVE_NULL" = x1]) +AM_CONDITIONAL([BUILTIN_DSO], [test "x$BUILTIN_DSO" = x1]) +AM_CONDITIONAL([BUILTIN_PULSE], [test "x$BUILTIN_PULSE" = x1]) +AM_CONDITIONAL([BUILTIN_ALSA], [test "x$BUILTIN_ALSA" = x1]) +AM_CONDITIONAL([BUILTIN_OSS], [test "x$BUILTIN_OSS" = x1]) +AM_CONDITIONAL([BUILTIN_JACK], [test "x$BUILTIN_JACK" = x1]) +AM_CONDITIONAL([BUILTIN_NULL], [test "x$BUILTIN_NULL" = x1]) + +GTK_DOC_CHECK(1.9) ################################### # Output # @@ -342,30 +478,55 @@ libsydney.pc AC_OUTPUT # ========================================================================== -ENABLE_OSS=no -if test "x$HAVE_OSS" = "x1" ; then - ENABLE_OSS=yes +ENABLE_BUILTIN_DSO=no +if test "x$BUILTIN_DSO" = "x1" ; then + ENABLE_BUILTIN_DSO=yes +fi + +ENABLE_PULSE=no +if test "x$HAVE_PULSE" = "x1" ; then + ENABLE_PULSE=yes +fi +ENABLE_BUILTIN_PULSE=no +if test "x$BUILTIN_PULSE" = "x1" ; then + ENABLE_BUILTIN_PULSE=yes fi ENABLE_ALSA=no if test "x$HAVE_ALSA" = "x1" ; then ENABLE_ALSA=yes fi - -ENABLE_PULSE=no -if test "x$HAVE_PULSE" = "x1" ; then - ENABLE_PULSE=yes +ENABLE_BUILTIN_ALSA=no +if test "x$BUILTIN_ALSA" = "x1" ; then + ENABLE_BUILTIN_ALSA=yes fi -ENABLE_SOLARIS=no -if test "x$HAVE_SOLARIS" = "x1" ; then - ENABLE_SOLARIS=yes +ENABLE_OSS=no +if test "x$HAVE_OSS" = "x1" ; then + ENABLE_OSS=yes +fi +ENABLE_BUILTIN_OSS=no +if test "x$BUILTIN_OSS" = "x1" ; then + ENABLE_BUILTIN_OSS=yes fi ENABLE_JACK=no if test "x$HAVE_JACK" = "x1" ; then ENABLE_JACK=yes fi +ENABLE_BUILTIN_JACK=no +if test "x$BUILTIN_JACK" = "x1" ; then + ENABLE_BUILTIN_JACK=yes +fi + +ENABLE_NULL=no +if test "x$HAVE_NULL" = "x1" ; then + ENABLE_NULL=yes +fi +ENABLE_BUILTIN_NULL=no +if test "x$BUILTIN_NULL" = "x1" ; then + ENABLE_BUILTIN_NULL=yes +fi echo " ---{ $PACKAGE_NAME $VERSION }--- @@ -377,8 +538,15 @@ echo " CFLAGS: ${CFLAGS} C++-Compiler: ${CXX} CXXFLAGS: ${CXXFLAGS} - Enable OSS: ${ENABLE_OSS} - Enable Alsa: ${ENABLE_ALSA} + Builtin DSO: ${ENABLE_BUILTIN_DSO} Enable PulseAudio: ${ENABLE_PULSE} + Builtin PulseAudio: ${ENABLE_BUILTIN_PULSE} + Enable ALSA: ${ENABLE_ALSA} + Builtin ALSA: ${ENABLE_BUILTIN_ALSA} + Enable OSS: ${ENABLE_OSS} + Builtin OSS: ${ENABLE_BUILTIN_OSS} Enable Jack: ${ENABLE_JACK} + Builtin Jack: ${ENABLE_BUILTIN_JACK} + Enable Null Output: ${ENABLE_NULL} + Builtin Null Output: ${ENABLE_BUILTIN_NULL} " -- cgit