mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-11-04 13:29:59 -05:00
Enable per-user esound sockets by default. Esound CVS already enables this by default, and all sane distributions ship a patched esd anyway. And those which do not should get a life and start patching esd
git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@2145 fefdeb5f-60dc-0310-8127-8f9354f1896f
This commit is contained in:
parent
5addad21a4
commit
14ed19cf8b
2 changed files with 47 additions and 30 deletions
22
configure.ac
22
configure.ac
|
|
@ -1073,10 +1073,20 @@ fi
|
|||
AC_SUBST(PA_ACCESS_GROUP)
|
||||
AC_DEFINE_UNQUOTED(PA_ACCESS_GROUP,"$PA_ACCESS_GROUP", [Access group])
|
||||
|
||||
AC_ARG_WITH(peruser_esound, AS_HELP_STRING([--with-peruser-esound-socket], [Use per-user esound socket directory, like /tmp/.esd-UID/socket.]))
|
||||
AC_ARG_ENABLE(
|
||||
per_user_esound_socket,
|
||||
AS_HELP_STRING([--disable-per-user-esound-socket], [Use per-user esound socket directory, like /tmp/.esd-UID/socket.]),
|
||||
[
|
||||
case "${enableval}" in
|
||||
yes) per_user_esound_socket=1 ;;
|
||||
no) per_user_esound_socket=0 ;;
|
||||
*) AC_MSG_ERROR(bad value ${enableval} for --disable-per-user-esound-socket) ;;
|
||||
esac
|
||||
],
|
||||
[per_user_esound_socket=1])
|
||||
|
||||
if test "x$with_peruser_esound" = "xyes"; then
|
||||
AC_DEFINE([USE_PERUSER_ESOUND_SOCKET], [1], [Define this if you want per-user esound socket directories])
|
||||
if test "x$per_user_esound_socket" = "x1"; then
|
||||
AC_DEFINE([USE_PER_USER_ESOUND_SOCKET], [1], [Define this if you want per-user esound socket directories])
|
||||
fi
|
||||
|
||||
#### PulseAudio system runtime dir ####
|
||||
|
|
@ -1210,6 +1220,11 @@ if test "x${HAVE_POLKIT}" = "x1" ; then
|
|||
ENABLE_POLKIT=yes
|
||||
fi
|
||||
|
||||
ENABLE_PER_USER_ESOUND_SOCKET=no
|
||||
if test "x$per_user_esound_socket" = "x1" ; then
|
||||
ENABLE_PER_USER_ESOUND_SOCKET=yes
|
||||
fi
|
||||
|
||||
echo "
|
||||
---{ $PACKAGE_NAME $VERSION }---
|
||||
|
||||
|
|
@ -1238,4 +1253,5 @@ echo "
|
|||
System Group: ${PA_SYSTEM_GROUP}
|
||||
Realtime Group: ${PA_REALTIME_GROUP}
|
||||
Access Group: ${PA_ACCESS_GROUP}
|
||||
Enable per-user EsounD socket: ${ENABLE_PER_USER_ESOUND_SOCKET}
|
||||
"
|
||||
|
|
|
|||
|
|
@ -218,7 +218,7 @@ int pa__init(pa_module*m) {
|
|||
char tmp[PATH_MAX];
|
||||
|
||||
#if defined(USE_PROTOCOL_ESOUND)
|
||||
#if defined(USE_PERUSER_ESOUND_SOCKET)
|
||||
#if defined(USE_PER_USER_ESOUND_SOCKET)
|
||||
char esdsocketpath[PATH_MAX];
|
||||
#else
|
||||
const char esdsocketpath[] = "/tmp/.esd/socket";
|
||||
|
|
@ -269,9 +269,10 @@ int pa__init(pa_module*m) {
|
|||
|
||||
#if defined(USE_PROTOCOL_ESOUND)
|
||||
|
||||
#if defined(USE_PERUSER_ESOUND_SOCKET)
|
||||
#if defined(USE_PER_USER_ESOUND_SOCKET)
|
||||
snprintf(esdsocketpath, sizeof(esdsocketpath), "/tmp/.esd-%lu/socket", (unsigned long) getuid());
|
||||
#endif
|
||||
|
||||
pa_runtime_path(pa_modargs_get_value(ma, "socket", esdsocketpath), tmp, sizeof(tmp));
|
||||
u->socket_path = pa_xstrdup(tmp);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue