mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-10-29 05:40:23 -04:00
build-sys: drop gconf support
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/499>
This commit is contained in:
parent
faa1a7e042
commit
f7f9c70b0f
10 changed files with 1 additions and 313 deletions
27
configure.ac
27
configure.ac
|
|
@ -926,14 +926,11 @@ AS_IF([test "x$enable_gtk3" = "xyes" && test "x$HAVE_GTK30" = "x0"],
|
|||
AM_CONDITIONAL([HAVE_GTK30], [test "x$HAVE_GTK30" = x1])
|
||||
AS_IF([test "x$HAVE_GTK30" = "x1"], AC_DEFINE([HAVE_GTK], 1, [Have GTK?]))
|
||||
|
||||
#### GSettings and GConf support (optional) ####
|
||||
#### GSettings support (optional) ####
|
||||
|
||||
AC_ARG_ENABLE([gsettings],
|
||||
AS_HELP_STRING([--disable-gsettings],[Disable optional GSettings support]))
|
||||
|
||||
AC_ARG_ENABLE([gconf],
|
||||
AS_HELP_STRING([--disable-gconf],[Disable optional GConf support]))
|
||||
|
||||
AS_IF([test "x$enable_gsettings" != "xno"],
|
||||
[PKG_CHECK_MODULES(GSETTINGS, [ gio-2.0 >= 2.26.0 ], [HAVE_GSETTINGS=1], [HAVE_GSETTINGS=0])],
|
||||
HAVE_GSETTINGS=0)
|
||||
|
|
@ -941,28 +938,8 @@ AS_IF([test "x$enable_gsettings" != "xno"],
|
|||
AS_IF([test "x$enable_gsettings" = "xyes" && test "x$HAVE_GSETTINGS" = "x0"],
|
||||
[AC_MSG_ERROR([*** GSettings support not found])])
|
||||
|
||||
AS_IF([test "x$enable_gconf" != "xno"],
|
||||
[PKG_CHECK_MODULES(GCONF, [ gconf-2.0 >= 2.4.0 gobject-2.0 ], HAVE_GCONF=1, HAVE_GCONF=0)],
|
||||
HAVE_GCONF=0)
|
||||
|
||||
AS_IF([test "x$enable_gconf" = "xyes" && test "x$HAVE_GCONF" = "x0"],
|
||||
[AC_MSG_ERROR([*** GConf support not found])])
|
||||
|
||||
# Enable only one of GSettings and GConf, unless both were explicitly
|
||||
# requested. If neither was explicitly requested and both are available, prefer
|
||||
# GSettings. This is done, because if module-gsettings and module-gconf are
|
||||
# both loaded, they can cause conflicting or at least confusing configuration.
|
||||
# Distributions may want to enable both modules when building PulseAudio, if
|
||||
# they ensure that both modules are never installed at the same time.
|
||||
AS_IF([test "x$HAVE_GSETTINGS" = "x1" && test "x$enable_gconf" != "xyes"],
|
||||
[HAVE_GCONF=0])
|
||||
AS_IF([test "x$HAVE_GCONF" = "x1" && test "x$enable_gsettings" != "xyes"],
|
||||
[HAVE_GSETTINGS=0])
|
||||
|
||||
AM_CONDITIONAL([HAVE_GSETTINGS], [test "x$HAVE_GSETTINGS" = "x1"])
|
||||
AC_SUBST([HAVE_GSETTINGS])
|
||||
AM_CONDITIONAL([HAVE_GCONF], [test "x$HAVE_GCONF" = "x1"])
|
||||
AC_SUBST([HAVE_GCONF])
|
||||
|
||||
if test "x$HAVE_GSETTINGS" = "x1" ; then
|
||||
GLIB_GSETTINGS
|
||||
|
|
@ -1635,7 +1612,6 @@ AS_IF([test "x$HAVE_SOLARIS" = "x1"], ENABLE_SOLARIS=yes, ENABLE_SOLARIS=no)
|
|||
AS_IF([test "x$HAVE_WAVEOUT" = "x1"], ENABLE_WAVEOUT=yes, ENABLE_WAVEOUT=no)
|
||||
AS_IF([test "x$HAVE_GLIB20" = "x1"], ENABLE_GLIB20=yes, ENABLE_GLIB20=no)
|
||||
AS_IF([test "x$HAVE_GTK30" = "x1"], ENABLE_GTK30=yes, ENABLE_GTK30=no)
|
||||
AS_IF([test "x$HAVE_GCONF" = "x1"], ENABLE_GCONF=yes, ENABLE_GCONF=no)
|
||||
AS_IF([test "x$HAVE_GSETTINGS" = "x1"], ENABLE_GSETTINGS=yes, ENABLE_GSETTINGS=no)
|
||||
AS_IF([test "x$HAVE_AVAHI" = "x1"], ENABLE_AVAHI=yes, ENABLE_AVAHI=no)
|
||||
AS_IF([test "x$HAVE_JACK" = "x1"], ENABLE_JACK=yes, ENABLE_JACK=no)
|
||||
|
|
@ -1701,7 +1677,6 @@ echo "
|
|||
Enable WaveOut: ${ENABLE_WAVEOUT}
|
||||
Enable GLib 2.0: ${ENABLE_GLIB20}
|
||||
Enable Gtk+ 3.0: ${ENABLE_GTK30}
|
||||
Enable GConf: ${ENABLE_GCONF}
|
||||
Enable GSettings: ${ENABLE_GSETTINGS}
|
||||
Enable Avahi: ${ENABLE_AVAHI}
|
||||
Enable Jack: ${ENABLE_JACK}
|
||||
|
|
|
|||
|
|
@ -880,7 +880,6 @@ summary = [
|
|||
# 'Enable Solaris: @0@'.format(${ENABLE_SOLARIS}),
|
||||
# 'Enable WaveOut: @0@'.format(${ENABLE_WAVEOUT}),
|
||||
'Enable GLib 2: @0@'.format(glib_dep.found()),
|
||||
# 'Enable GConf: @0@'.format(${ENABLE_GCONF}),
|
||||
'Enable GSettings: @0@'.format(gio_dep.found()),
|
||||
'Enable Gtk+ 3: @0@'.format(gtk_dep.found()),
|
||||
'Enable Avahi: @0@'.format(avahi_dep.found()),
|
||||
|
|
|
|||
|
|
@ -16,8 +16,6 @@ src/modules/alsa/module-alsa-sink.c
|
|||
src/modules/alsa/module-alsa-source.c
|
||||
src/modules/bluetooth/module-bluez5-device.c
|
||||
src/modules/echo-cancel/module-echo-cancel.c
|
||||
src/modules/gconf/gconf-helper.c
|
||||
src/modules/gconf/module-gconf.c
|
||||
src/modules/jack/module-jack-sink.c
|
||||
src/modules/jack/module-jack-source.c
|
||||
src/modules/macosx/module-coreaudio-device.c
|
||||
|
|
|
|||
1
src/.gitignore
vendored
1
src/.gitignore
vendored
|
|
@ -14,7 +14,6 @@ daemon.conf
|
|||
default.pa
|
||||
echo-cancel-test
|
||||
esdcompat
|
||||
gconf-helper
|
||||
gsettings-helper
|
||||
org.freedesktop.pulseaudio.gschema.valid
|
||||
pacat
|
||||
|
|
|
|||
|
|
@ -1461,14 +1461,6 @@ endif
|
|||
|
||||
endif
|
||||
|
||||
if HAVE_GCONF
|
||||
modlibexec_LTLIBRARIES += \
|
||||
module-gconf.la
|
||||
|
||||
pulselibexec_PROGRAMS += \
|
||||
gconf-helper
|
||||
endif
|
||||
|
||||
if HAVE_GSETTINGS
|
||||
modlibexec_LTLIBRARIES += \
|
||||
module-gsettings.la
|
||||
|
|
@ -2122,20 +2114,6 @@ module_systemd_login_la_LDFLAGS = $(MODULE_LDFLAGS)
|
|||
module_systemd_login_la_LIBADD = $(MODULE_LIBADD) $(SYSTEMD_LIBS) $(SYSTEMDLOGIN_LIBS)
|
||||
module_systemd_login_la_CFLAGS = $(AM_CFLAGS) $(SYSTEMD_CFLAGS) $(SYSTEMDLOGIN_CFLAGS) -DPA_MODULE_NAME=module_systemd_login
|
||||
|
||||
# GConf support
|
||||
module_gconf_la_SOURCES = \
|
||||
modules/stdin-util.c modules/stdin-util.h \
|
||||
modules/gconf/module-gconf.c
|
||||
|
||||
module_gconf_la_LDFLAGS = $(MODULE_LDFLAGS)
|
||||
module_gconf_la_LIBADD = $(MODULE_LIBADD)
|
||||
module_gconf_la_CFLAGS = $(AM_CFLAGS) -DPA_GCONF_HELPER=\"$(pulselibexecdir)/gconf-helper\" -DPA_MODULE_NAME=module_gconf
|
||||
|
||||
gconf_helper_SOURCES = modules/gconf/gconf-helper.c
|
||||
gconf_helper_LDADD = $(AM_LDADD) libpulsecore-@PA_MAJORMINOR@.la libpulsecommon-@PA_MAJORMINOR@.la libpulse.la $(GCONF_LIBS)
|
||||
gconf_helper_CFLAGS = $(AM_CFLAGS) $(GCONF_CFLAGS)
|
||||
gconf_helper_LDFLAGS = $(AM_LDFLAGS) $(BINLDFLAGS)
|
||||
|
||||
# GSettings support
|
||||
module_gsettings_la_SOURCES = \
|
||||
modules/stdin-util.c modules/stdin-util.h \
|
||||
|
|
|
|||
|
|
@ -127,17 +127,6 @@ load-module module-gsettings
|
|||
.endif
|
||||
])dnl
|
||||
|
||||
ifelse(@HAVE_GCONF@, 1, [dnl
|
||||
### Load additional modules from GConf settings. This can be configured with the paprefs tool.
|
||||
### Please keep in mind that the modules configured by paprefs might conflict with manually
|
||||
### loaded modules.
|
||||
.ifexists module-gconf@PA_SOEXT@
|
||||
.nofail
|
||||
load-module module-gconf
|
||||
.fail
|
||||
.endif
|
||||
])dnl
|
||||
|
||||
### Automatically restore the default sink/source when changed by the user
|
||||
### during runtime
|
||||
### NOTE: This should be loaded as early as possible so that subsequent modules
|
||||
|
|
|
|||
|
|
@ -103,8 +103,6 @@ default_conf.set('PA_SOEXT', cdata.get_unquoted('PA_SOEXT'))
|
|||
default_conf.set10('HAVE_AF_UNIX', cc.has_header('sys/un.h'))
|
||||
default_conf.set10('OS_IS_WIN32', host_machine.system() == 'windows')
|
||||
default_conf.set10('HAVE_MKFIFO', cc.has_function('mkfifo'))
|
||||
# We don't support the deprecated GConf option in meson
|
||||
default_conf.set10('HAVE_GCONF', 0)
|
||||
|
||||
default_template_file = configure_file(
|
||||
input : 'default.pa.in',
|
||||
|
|
|
|||
|
|
@ -1,133 +0,0 @@
|
|||
/***
|
||||
This file is part of PulseAudio.
|
||||
|
||||
Copyright 2006 Lennart Poettering
|
||||
|
||||
PulseAudio is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU Lesser General Public License as published
|
||||
by the Free Software Foundation; either version 2.1 of the License,
|
||||
or (at your option) any later version.
|
||||
|
||||
PulseAudio is distributed in the hope that it will be useful, but
|
||||
WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Lesser General Public License
|
||||
along with PulseAudio; if not, see <http://www.gnu.org/licenses/>.
|
||||
***/
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include <config.h>
|
||||
#endif
|
||||
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
|
||||
#include <gconf/gconf-client.h>
|
||||
#include <glib.h>
|
||||
|
||||
#include <pulsecore/core-util.h>
|
||||
|
||||
#define PA_GCONF_ROOT "/system/pulseaudio"
|
||||
#define PA_GCONF_PATH_MODULES PA_GCONF_ROOT"/modules"
|
||||
|
||||
static void handle_module(GConfClient *client, const char *name) {
|
||||
gchar p[1024];
|
||||
gboolean enabled, locked;
|
||||
int i;
|
||||
|
||||
pa_snprintf(p, sizeof(p), PA_GCONF_PATH_MODULES"/%s/locked", name);
|
||||
locked = gconf_client_get_bool(client, p, FALSE);
|
||||
|
||||
if (locked)
|
||||
return;
|
||||
|
||||
pa_snprintf(p, sizeof(p), PA_GCONF_PATH_MODULES"/%s/enabled", name);
|
||||
enabled = gconf_client_get_bool(client, p, FALSE);
|
||||
|
||||
printf("%c%s%c", enabled ? '+' : '-', name, 0);
|
||||
|
||||
if (enabled) {
|
||||
|
||||
for (i = 0; i < 10; i++) {
|
||||
gchar *n, *a;
|
||||
|
||||
pa_snprintf(p, sizeof(p), PA_GCONF_PATH_MODULES"/%s/name%i", name, i);
|
||||
if (!(n = gconf_client_get_string(client, p, NULL)) || !*n)
|
||||
break;
|
||||
|
||||
pa_snprintf(p, sizeof(p), PA_GCONF_PATH_MODULES"/%s/args%i", name, i);
|
||||
a = gconf_client_get_string(client, p, NULL);
|
||||
|
||||
printf("%s%c%s%c", n, 0, a ? a : "", 0);
|
||||
|
||||
g_free(n);
|
||||
g_free(a);
|
||||
}
|
||||
|
||||
printf("%c", 0);
|
||||
}
|
||||
|
||||
fflush(stdout);
|
||||
}
|
||||
|
||||
static void modules_callback(
|
||||
GConfClient* client,
|
||||
guint cnxn_id,
|
||||
GConfEntry *entry,
|
||||
gpointer user_data) {
|
||||
|
||||
const char *n;
|
||||
char buf[128];
|
||||
|
||||
g_assert(strncmp(entry->key, PA_GCONF_PATH_MODULES"/", sizeof(PA_GCONF_PATH_MODULES)) == 0);
|
||||
|
||||
n = entry->key + sizeof(PA_GCONF_PATH_MODULES);
|
||||
|
||||
g_strlcpy(buf, n, sizeof(buf));
|
||||
buf[strcspn(buf, "/")] = 0;
|
||||
|
||||
handle_module(client, buf);
|
||||
}
|
||||
|
||||
int main(int argc, char *argv[]) {
|
||||
GMainLoop *g;
|
||||
GConfClient *client;
|
||||
GSList *modules, *m;
|
||||
|
||||
#if !GLIB_CHECK_VERSION(2,36,0)
|
||||
g_type_init();
|
||||
#endif
|
||||
|
||||
if (!(client = gconf_client_get_default()))
|
||||
goto fail;
|
||||
|
||||
gconf_client_add_dir(client, PA_GCONF_ROOT, GCONF_CLIENT_PRELOAD_RECURSIVE, NULL);
|
||||
gconf_client_notify_add(client, PA_GCONF_PATH_MODULES, modules_callback, NULL, NULL, NULL);
|
||||
|
||||
modules = gconf_client_all_dirs(client, PA_GCONF_PATH_MODULES, NULL);
|
||||
|
||||
for (m = modules; m; m = m->next) {
|
||||
char *e = strrchr(m->data, '/');
|
||||
handle_module(client, e ? e+1 : m->data);
|
||||
}
|
||||
|
||||
g_slist_free(modules);
|
||||
|
||||
/* Signal the parent that we are now initialized */
|
||||
printf("!");
|
||||
fflush(stdout);
|
||||
|
||||
g = g_main_loop_new(NULL, FALSE);
|
||||
g_main_loop_run(g);
|
||||
g_main_loop_unref(g);
|
||||
|
||||
g_object_unref(G_OBJECT(client));
|
||||
|
||||
return 0;
|
||||
|
||||
fail:
|
||||
return 1;
|
||||
}
|
||||
|
|
@ -1,114 +0,0 @@
|
|||
/***
|
||||
This file is part of PulseAudio.
|
||||
|
||||
Copyright 2006 Lennart Poettering
|
||||
|
||||
PulseAudio is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU Lesser General Public License as published
|
||||
by the Free Software Foundation; either version 2.1 of the License,
|
||||
or (at your option) any later version.
|
||||
|
||||
PulseAudio is distributed in the hope that it will be useful, but
|
||||
WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Lesser General Public License
|
||||
along with PulseAudio; if not, see <http://www.gnu.org/licenses/>.
|
||||
***/
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include <config.h>
|
||||
#endif
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <sys/wait.h>
|
||||
|
||||
#include <pulsecore/core-error.h>
|
||||
#include <pulsecore/core-util.h>
|
||||
#include <pulsecore/start-child.h>
|
||||
|
||||
#include "../stdin-util.h"
|
||||
|
||||
PA_MODULE_AUTHOR("Lennart Poettering");
|
||||
PA_MODULE_DESCRIPTION("GConf Adapter");
|
||||
PA_MODULE_VERSION(PACKAGE_VERSION);
|
||||
PA_MODULE_LOAD_ONCE(true);
|
||||
|
||||
int pa__init(pa_module*m) {
|
||||
struct userdata *u;
|
||||
int r;
|
||||
|
||||
u = pa_xnew(struct userdata, 1);
|
||||
u->core = m->core;
|
||||
u->module = m;
|
||||
m->userdata = u;
|
||||
u->module_infos = pa_hashmap_new_full(pa_idxset_string_hash_func, pa_idxset_string_compare_func, NULL, (pa_free_cb_t) module_info_free);
|
||||
u->pid = (pid_t) -1;
|
||||
u->fd = -1;
|
||||
u->fd_type = 0;
|
||||
u->io_event = NULL;
|
||||
u->buf_fill = 0;
|
||||
|
||||
if ((u->fd = pa_start_child_for_read(
|
||||
#if defined(__linux__) && defined(HAVE_RUNNING_FROM_BUILD_TREE)
|
||||
pa_run_from_build_tree() ? PA_BUILDDIR "/gconf-helper" :
|
||||
#endif
|
||||
PA_GCONF_HELPER, NULL, &u->pid)) < 0)
|
||||
goto fail;
|
||||
|
||||
u->io_event = m->core->mainloop->io_new(
|
||||
m->core->mainloop,
|
||||
u->fd,
|
||||
PA_IO_EVENT_INPUT,
|
||||
io_event_cb,
|
||||
u);
|
||||
|
||||
do {
|
||||
if ((r = handle_event(u)) < 0)
|
||||
goto fail;
|
||||
|
||||
/* Read until the client signalled us that it is ready with
|
||||
* initialization */
|
||||
} while (r != 1);
|
||||
|
||||
return 0;
|
||||
|
||||
fail:
|
||||
pa__done(m);
|
||||
return -1;
|
||||
}
|
||||
|
||||
void pa__done(pa_module*m) {
|
||||
struct userdata *u;
|
||||
|
||||
pa_assert(m);
|
||||
|
||||
if (!(u = m->userdata))
|
||||
return;
|
||||
|
||||
if (u->pid != (pid_t) -1) {
|
||||
kill(u->pid, SIGTERM);
|
||||
|
||||
for (;;) {
|
||||
if (waitpid(u->pid, NULL, 0) >= 0)
|
||||
break;
|
||||
|
||||
if (errno != EINTR) {
|
||||
pa_log("waitpid() failed: %s", pa_cstrerror(errno));
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (u->io_event)
|
||||
m->core->mainloop->io_free(u->io_event);
|
||||
|
||||
if (u->fd >= 0)
|
||||
pa_close(u->fd);
|
||||
|
||||
if (u->module_infos)
|
||||
pa_hashmap_free(u->module_infos);
|
||||
|
||||
pa_xfree(u);
|
||||
}
|
||||
|
|
@ -28,7 +28,6 @@ all_modules = [
|
|||
# [ 'module-esound-sink', 'module-esound-sink.c' ],
|
||||
[ 'module-filter-apply', 'module-filter-apply.c' ],
|
||||
[ 'module-filter-heuristics', 'module-filter-heuristics.c' ],
|
||||
# [ 'module-gconf', 'gconf/module-gconf.c' ],
|
||||
[ 'module-http-protocol-tcp', 'module-protocol-stub.c', [], ['-DUSE_PROTOCOL_HTTP', '-DUSE_TCP_SOCKETS'], [], libprotocol_http ],
|
||||
[ 'module-http-protocol-unix', 'module-protocol-stub.c', [], ['-DUSE_PROTOCOL_HTTP', '-DUSE_UNIX_SOCKETS'], [], libprotocol_http ],
|
||||
[ 'module-intended-roles', 'module-intended-roles.c' ],
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue