diff options
author | Takashi Iwai <tiwai@suse.de> | 2008-04-22 19:31:15 +0200 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2008-06-06 15:54:24 +0200 |
commit | 0fec8b8d0af1a9567ea671ad33633d9dab2de9d3 (patch) | |
tree | 0a815aae87018f5f009e3f2f2e623aabb074f88e | |
parent | f2b74602c8c30fa6dd793a2477f1ea1ce8a057f2 (diff) |
Improve configure for maemo plugin
ALSA bug#3860:
https://bugtrack.alsa-project.org/alsa-bug/view.php?id=3860
The Maemo DSP plugin checks for D-Bus in configure.in and then makes a bold assumption that this means it should use a proprietary resource manager available only on a specific proprietary platform.
Attaching a patch to add --enable-maemo-resource-manager configure flag that enables the resource manager if set and if D-Bus is present.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
-rw-r--r-- | Makefile.am | 2 | ||||
-rw-r--r-- | configure.in | 31 |
2 files changed, 22 insertions, 11 deletions
diff --git a/Makefile.am b/Makefile.am index 91a1284..dc64960 100644 --- a/Makefile.am +++ b/Makefile.am @@ -11,7 +11,7 @@ if HAVE_AVCODEC A52DIR = a52 LAVCRATEDIR = rate-lavc endif -if HAVE_DBUS +if HAVE_MAEMO_PLUGIN MAEMODIR = maemo endif if HAVE_PPH diff --git a/configure.in b/configure.in index 4aee82b..cc4597d 100644 --- a/configure.in +++ b/configure.in @@ -24,11 +24,25 @@ AM_CONDITIONAL(HAVE_PULSE, test x$HAVE_PULSE = xyes) PKG_CHECK_MODULES(samplerate, [samplerate], [HAVE_SAMPLERATE=yes], [HAVE_SAMPLERATE=no]) AM_CONDITIONAL(HAVE_SAMPLERATE, test x$HAVE_SAMPLERATE = xyes) -PKG_CHECK_MODULES(DBUS, [dbus-1], [HAVE_DBUS=yes], [HAVE_DBUS=no]) -AM_CONDITIONAL(HAVE_DBUS, test x$HAVE_DBUS = xyes) - -if test "$HAVE_DBUS" = "yes"; then - AC_DEFINE(USE_RESOURCE_MANAGER, 1,"Use dbus server as a resouce manager") +AC_ARG_ENABLE([maemo-plugin], + AS_HELP_STRING([--enable-maemo-plugin], + [Build Maemo DSP plugin]), + [HAVE_MAEMO_PLUGIN="$withval"], [HAVE_MAEMO_PLUGIN="no"]) +AM_CONDITIONAL(HAVE_MAEMO_PLUGIN, test x$HAVE_MAEMO_PLUGIN = xyes) + +AC_ARG_ENABLE([maemo-resource-manager], + AS_HELP_STRING([--enable-maemo-resource-manager], + [Use Maemo resource manager]), + [use_maemo_rm="$withval"], [use_maemo_rm="no"]) + +if test "$use_maemo_rm" = "yes"; then + PKG_CHECK_MODULES(DBUS, [dbus-1], [HAVE_DBUS=yes], [HAVE_DBUS=no]) + + if test "$HAVE_DBUS" = "yes"; then + AC_DEFINE(USE_RESOURCE_MANAGER, 1,"Use dbus server as a resouce manager") + else + AC_ERROR([You must have D-Bus installed if you want to enable the Maemo resource manager]) + fi fi AC_ARG_WITH([avcodec-includedir], @@ -134,11 +148,8 @@ if test "$HAVE_SAMPLERATE" = "yes"; then echo " samplerate_CFLAGS: $samplerate_CFLAGS" echo " samplerate_LIBS: $samplerate_LIBS" fi -echo "Maemo plugin: $HAVE_DBUS" -if test "$HAVE_DBUS" = "yes"; then - echo " DBUS_CFLAGS: $DBUS_CFLAGS" - echo " DBUS_LIBS: $DBUS_LIBS" -fi +echo "Maemo plugin: $HAVE_MAEMO_PLUGIN" +echo " Using Osso resource manager: $use_maemo_rm" echo "A52, lavc plugins: $HAVE_AVCODEC" if test "$HAVE_AVCODEC" = "yes"; then echo " AVCODEC_CFLAGS: $AVCODEC_CFLAGS" |