]> git.alsa-project.org Git - alsa-plugins.git/commitdiff
Improve configure for maemo plugin
authorTakashi Iwai <tiwai@suse.de>
Tue, 22 Apr 2008 17:31:15 +0000 (19:31 +0200)
committerTakashi Iwai <tiwai@suse.de>
Fri, 6 Jun 2008 13:54:24 +0000 (15:54 +0200)
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>
Makefile.am
configure.in

index 91a1284a157a714330b4d80a296a9123839915fd..dc649604e18c09e333332814701c2f8065e391bf 100644 (file)
@@ -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
index 4aee82bf7e4d969e0e618437bc14faf2db51eecb..cc4597d775753a28168632dc696942aabab0ff4c 100644 (file)
@@ -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"