mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-11-04 13:29:59 -05:00
build-sys: Clarify some systemd sub-component variable/define names.
We currently use the term SYSTEMD when referring to libsystemd-login and JOURNAL when referring to libsystemd-journal. I will be shortly adding support for libsystemd-daemon and in preparation I figured it would be a good idea to clarify the names used currently before adding another!
This commit is contained in:
parent
e775529167
commit
f7da58b73f
6 changed files with 30 additions and 30 deletions
32
configure.ac
32
configure.ac
|
|
@ -1178,29 +1178,29 @@ AM_CONDITIONAL([HAVE_GCOV], [test "x$HAVE_GCOV" = x1])
|
||||||
|
|
||||||
ORC_CHECK([0.4.11])
|
ORC_CHECK([0.4.11])
|
||||||
|
|
||||||
#### systemd support (optional) ####
|
#### systemd login support (optional) ####
|
||||||
|
|
||||||
AC_ARG_ENABLE([systemd],
|
AC_ARG_ENABLE([systemd-login],
|
||||||
AS_HELP_STRING([--disable-systemd],[Disable optional systemd support]))
|
AS_HELP_STRING([--disable-systemd-login],[Disable optional systemd login support]))
|
||||||
|
|
||||||
AS_IF([test "x$enable_systemd" != "xno"],
|
AS_IF([test "x$enable_systemd_login" != "xno"],
|
||||||
[PKG_CHECK_MODULES(SYSTEMD, [ libsystemd-login ], HAVE_SYSTEMD=1, HAVE_SYSTEMD=0)],
|
[PKG_CHECK_MODULES(SYSTEMDLOGIN, [ libsystemd-login ], HAVE_SYSTEMD_LOGIN=1, HAVE_SYSTEMD_LOGIN=0)],
|
||||||
HAVE_SYSTEMD=0)
|
HAVE_SYSTEMD_LOGIN=0)
|
||||||
|
|
||||||
AS_IF([test "x$enable_systemd" = "xyes" && test "x$HAVE_SYSTEMD" = "x0"],
|
AS_IF([test "x$enable_systemd_login" = "xyes" && test "x$HAVE_SYSTEMD_LOGIN" = "x0"],
|
||||||
[AC_MSG_ERROR([*** Needed systemd support not found])])
|
[AC_MSG_ERROR([*** Needed systemd login support not found])])
|
||||||
|
|
||||||
AC_SUBST(HAVE_SYSTEMD)
|
AC_SUBST(HAVE_SYSTEMD_LOGIN)
|
||||||
AM_CONDITIONAL([HAVE_SYSTEMD], [test "x$HAVE_SYSTEMD" = x1])
|
AM_CONDITIONAL([HAVE_SYSTEMD_LOGIN], [test "x$HAVE_SYSTEMD_LOGIN" = x1])
|
||||||
AS_IF([test "x$HAVE_SYSTEMD" = "x1"], AC_DEFINE([HAVE_SYSTEMD], 1, [Have SYSTEMD?]))
|
AS_IF([test "x$HAVE_SYSTEMD_LOGIN" = "x1"], AC_DEFINE([HAVE_SYSTEMD_LOGIN], 1, [Have SYSTEMDLOGIN?]))
|
||||||
|
|
||||||
#### journal support (optional) ####
|
#### systemd journal support (optional) ####
|
||||||
|
|
||||||
AC_ARG_ENABLE([systemd-journal],
|
AC_ARG_ENABLE([systemd-journal],
|
||||||
AS_HELP_STRING([--disable-systemd-journal],[Disable optional systemd journal support]))
|
AS_HELP_STRING([--disable-systemd-journal],[Disable optional systemd journal support]))
|
||||||
|
|
||||||
AS_IF([test "x$enable_systemd_journal" != "xno"],
|
AS_IF([test "x$enable_systemd_journal" != "xno"],
|
||||||
[PKG_CHECK_MODULES(JOURNAL, [ libsystemd-journal ], HAVE_SYSTEMD_JOURNAL=1, HAVE_SYSTEMD_JOURNAL=0)],
|
[PKG_CHECK_MODULES(SYSTEMDJOURNAL, [ libsystemd-journal ], HAVE_SYSTEMD_JOURNAL=1, HAVE_SYSTEMD_JOURNAL=0)],
|
||||||
HAVE_SYSTEMD_JOURNAL=0)
|
HAVE_SYSTEMD_JOURNAL=0)
|
||||||
|
|
||||||
AS_IF([test "x$enable_systemd_journal" = "xyes" && test "x$HAVE_SYSTEMD_JOURNAL" = "x0"],
|
AS_IF([test "x$enable_systemd_journal" = "xyes" && test "x$HAVE_SYSTEMD_JOURNAL" = "x0"],
|
||||||
|
|
@ -1208,7 +1208,7 @@ AS_IF([test "x$enable_systemd_journal" = "xyes" && test "x$HAVE_SYSTEMD_JOURNAL"
|
||||||
|
|
||||||
AC_SUBST(HAVE_SYSTEMD_JOURNAL)
|
AC_SUBST(HAVE_SYSTEMD_JOURNAL)
|
||||||
AM_CONDITIONAL([HAVE_SYSTEMD_JOURNAL], [test "x$HAVE_SYSTEMD_JOURNAL" = x1])
|
AM_CONDITIONAL([HAVE_SYSTEMD_JOURNAL], [test "x$HAVE_SYSTEMD_JOURNAL" = x1])
|
||||||
AS_IF([test "x$HAVE_SYSTEMD_JOURNAL" = "x1"], AC_DEFINE([HAVE_JOURNAL], 1, [Have JOURNAL?]))
|
AS_IF([test "x$HAVE_SYSTEMD_JOURNAL" = "x1"], AC_DEFINE([HAVE_SYSTEMD_JOURNAL], 1, [Have SYSTEMDJOURNAL?]))
|
||||||
|
|
||||||
#### Build and Install man pages ####
|
#### Build and Install man pages ####
|
||||||
|
|
||||||
|
|
@ -1458,7 +1458,7 @@ AS_IF([test "x$HAVE_LIRC" = "x1"], ENABLE_LIRC=yes, ENABLE_LIRC=no)
|
||||||
AS_IF([test "x$HAVE_XEN" = "x1"], ENABLE_XEN=yes, ENABLE_XEN=no)
|
AS_IF([test "x$HAVE_XEN" = "x1"], ENABLE_XEN=yes, ENABLE_XEN=no)
|
||||||
AS_IF([test "x$HAVE_DBUS" = "x1"], ENABLE_DBUS=yes, ENABLE_DBUS=no)
|
AS_IF([test "x$HAVE_DBUS" = "x1"], ENABLE_DBUS=yes, ENABLE_DBUS=no)
|
||||||
AS_IF([test "x$HAVE_UDEV" = "x1"], ENABLE_UDEV=yes, ENABLE_UDEV=no)
|
AS_IF([test "x$HAVE_UDEV" = "x1"], ENABLE_UDEV=yes, ENABLE_UDEV=no)
|
||||||
AS_IF([test "x$HAVE_SYSTEMD" = "x1"], ENABLE_SYSTEMD=yes, ENABLE_SYSTEMD=no)
|
AS_IF([test "x$HAVE_SYSTEMD_LOGIN" = "x1"], ENABLE_SYSTEMD_LOGIN=yes, ENABLE_SYSTEMD_LOGIN=no)
|
||||||
AS_IF([test "x$HAVE_SYSTEMD_JOURNAL" = "x1"], ENABLE_SYSTEMD_JOURNAL=yes, ENABLE_SYSTEMD_JOURNAL=no)
|
AS_IF([test "x$HAVE_SYSTEMD_JOURNAL" = "x1"], ENABLE_SYSTEMD_JOURNAL=yes, ENABLE_SYSTEMD_JOURNAL=no)
|
||||||
AS_IF([test "x$HAVE_BLUEZ_4" = "x1"], ENABLE_BLUEZ_4=yes, ENABLE_BLUEZ_4=no)
|
AS_IF([test "x$HAVE_BLUEZ_4" = "x1"], ENABLE_BLUEZ_4=yes, ENABLE_BLUEZ_4=no)
|
||||||
AS_IF([test "x$HAVE_BLUEZ_5" = "x1"], ENABLE_BLUEZ_5=yes, ENABLE_BLUEZ_5=no)
|
AS_IF([test "x$HAVE_BLUEZ_5" = "x1"], ENABLE_BLUEZ_5=yes, ENABLE_BLUEZ_5=no)
|
||||||
|
|
@ -1519,7 +1519,7 @@ echo "
|
||||||
headset backend: ${BLUETOOTH_HEADSET_BACKEND}
|
headset backend: ${BLUETOOTH_HEADSET_BACKEND}
|
||||||
Enable udev: ${ENABLE_UDEV}
|
Enable udev: ${ENABLE_UDEV}
|
||||||
Enable HAL->udev compat: ${ENABLE_HAL_COMPAT}
|
Enable HAL->udev compat: ${ENABLE_HAL_COMPAT}
|
||||||
Enable systemd login: ${ENABLE_SYSTEMD}
|
Enable systemd login: ${ENABLE_SYSTEMD_LOGIN}
|
||||||
Enable systemd journal: ${ENABLE_SYSTEMD_JOURNAL}
|
Enable systemd journal: ${ENABLE_SYSTEMD_JOURNAL}
|
||||||
Enable TCP Wrappers: ${ENABLE_TCPWRAP}
|
Enable TCP Wrappers: ${ENABLE_TCPWRAP}
|
||||||
Enable libsamplerate: ${ENABLE_LIBSAMPLERATE}
|
Enable libsamplerate: ${ENABLE_LIBSAMPLERATE}
|
||||||
|
|
|
||||||
|
|
@ -707,8 +707,8 @@ libpulsecommon_@PA_MAJORMINOR@_la_LDFLAGS += $(X11_LIBS)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
if HAVE_SYSTEMD_JOURNAL
|
if HAVE_SYSTEMD_JOURNAL
|
||||||
libpulsecommon_@PA_MAJORMINOR@_la_CFLAGS += $(JOURNAL_FLAGS)
|
libpulsecommon_@PA_MAJORMINOR@_la_CFLAGS += $(SYSTEMDJOURNAL_FLAGS)
|
||||||
libpulsecommon_@PA_MAJORMINOR@_la_LDFLAGS += $(JOURNAL_LIBS)
|
libpulsecommon_@PA_MAJORMINOR@_la_LDFLAGS += $(SYSTEMDJOURNAL_LIBS)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
# proplist-util.h uses these header files, but not the library itself!
|
# proplist-util.h uses these header files, but not the library itself!
|
||||||
|
|
@ -1353,7 +1353,7 @@ modlibexec_LTLIBRARIES += \
|
||||||
module-udev-detect.la
|
module-udev-detect.la
|
||||||
endif
|
endif
|
||||||
|
|
||||||
if HAVE_SYSTEMD
|
if HAVE_SYSTEMD_LOGIN
|
||||||
modlibexec_LTLIBRARIES += \
|
modlibexec_LTLIBRARIES += \
|
||||||
module-systemd-login.la
|
module-systemd-login.la
|
||||||
endif
|
endif
|
||||||
|
|
@ -2061,8 +2061,8 @@ module_console_kit_la_CFLAGS = $(AM_CFLAGS) $(DBUS_CFLAGS)
|
||||||
|
|
||||||
module_systemd_login_la_SOURCES = modules/module-systemd-login.c
|
module_systemd_login_la_SOURCES = modules/module-systemd-login.c
|
||||||
module_systemd_login_la_LDFLAGS = $(MODULE_LDFLAGS)
|
module_systemd_login_la_LDFLAGS = $(MODULE_LDFLAGS)
|
||||||
module_systemd_login_la_LIBADD = $(MODULE_LIBADD) $(SYSTEMD_LIBS)
|
module_systemd_login_la_LIBADD = $(MODULE_LIBADD) $(SYSTEMDLOGIN_LIBS)
|
||||||
module_systemd_login_la_CFLAGS = $(AM_CFLAGS) $(SYSTEMD_CFLAGS)
|
module_systemd_login_la_CFLAGS = $(AM_CFLAGS) $(SYSTEMDLOGIN_CFLAGS)
|
||||||
|
|
||||||
# GConf support
|
# GConf support
|
||||||
module_gconf_la_SOURCES = modules/gconf/module-gconf.c
|
module_gconf_la_SOURCES = modules/gconf/module-gconf.c
|
||||||
|
|
|
||||||
|
|
@ -323,7 +323,7 @@ int pa_cmdline_parse(pa_daemon_conf *conf, int argc, char *const argv [], int *d
|
||||||
|
|
||||||
case ARG_LOG_TARGET:
|
case ARG_LOG_TARGET:
|
||||||
if (pa_daemon_conf_set_log_target(conf, optarg) < 0) {
|
if (pa_daemon_conf_set_log_target(conf, optarg) < 0) {
|
||||||
#ifdef HAVE_JOURNAL
|
#ifdef HAVE_SYSTEMD_JOURNAL
|
||||||
pa_log(_("Invalid log target: use either 'syslog', 'journal','stderr' or 'auto' or a valid file name 'file:<path>', 'newfile:<path>'."));
|
pa_log(_("Invalid log target: use either 'syslog', 'journal','stderr' or 'auto' or a valid file name 'file:<path>', 'newfile:<path>'."));
|
||||||
#else
|
#else
|
||||||
pa_log(_("Invalid log target: use either 'syslog', 'stderr' or 'auto' or a valid file name 'file:<path>', 'newfile:<path>'."));
|
pa_log(_("Invalid log target: use either 'syslog', 'stderr' or 'auto' or a valid file name 'file:<path>', 'newfile:<path>'."));
|
||||||
|
|
|
||||||
|
|
@ -788,7 +788,7 @@ int main(int argc, char *argv[]) {
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (!conf->log_target) {
|
if (!conf->log_target) {
|
||||||
#ifdef HAVE_JOURNAL
|
#ifdef HAVE_SYSTEMD_JOURNAL
|
||||||
pa_log_target target = { .type = PA_LOG_JOURNAL, .file = NULL };
|
pa_log_target target = { .type = PA_LOG_JOURNAL, .file = NULL };
|
||||||
#else
|
#else
|
||||||
pa_log_target target = { .type = PA_LOG_SYSLOG, .file = NULL };
|
pa_log_target target = { .type = PA_LOG_SYSLOG, .file = NULL };
|
||||||
|
|
|
||||||
|
|
@ -40,7 +40,7 @@
|
||||||
#include <syslog.h>
|
#include <syslog.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef HAVE_JOURNAL
|
#ifdef HAVE_SYSTEMD_JOURNAL
|
||||||
#include <systemd/sd-journal.h>
|
#include <systemd/sd-journal.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
@ -96,7 +96,7 @@ static const int level_to_syslog[] = {
|
||||||
|
|
||||||
/* These are actually equivalent to the syslog ones
|
/* These are actually equivalent to the syslog ones
|
||||||
* but we don't want to depend on syslog.h */
|
* but we don't want to depend on syslog.h */
|
||||||
#ifdef HAVE_JOURNAL
|
#ifdef HAVE_SYSTEMD_JOURNAL
|
||||||
static const int level_to_journal[] = {
|
static const int level_to_journal[] = {
|
||||||
[PA_LOG_ERROR] = 3,
|
[PA_LOG_ERROR] = 3,
|
||||||
[PA_LOG_WARN] = 4,
|
[PA_LOG_WARN] = 4,
|
||||||
|
|
@ -145,7 +145,7 @@ int pa_log_set_target(pa_log_target *t) {
|
||||||
switch (t->type) {
|
switch (t->type) {
|
||||||
case PA_LOG_STDERR:
|
case PA_LOG_STDERR:
|
||||||
case PA_LOG_SYSLOG:
|
case PA_LOG_SYSLOG:
|
||||||
#ifdef HAVE_JOURNAL
|
#ifdef HAVE_SYSTEMD_JOURNAL
|
||||||
case PA_LOG_JOURNAL:
|
case PA_LOG_JOURNAL:
|
||||||
#endif
|
#endif
|
||||||
case PA_LOG_NULL:
|
case PA_LOG_NULL:
|
||||||
|
|
@ -488,7 +488,7 @@ void pa_log_levelv_meta(
|
||||||
break;
|
break;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef HAVE_JOURNAL
|
#ifdef HAVE_SYSTEMD_JOURNAL
|
||||||
case PA_LOG_JOURNAL:
|
case PA_LOG_JOURNAL:
|
||||||
if (sd_journal_send("MESSAGE=%s", t,
|
if (sd_journal_send("MESSAGE=%s", t,
|
||||||
"PRIORITY=%i", level_to_journal[level],
|
"PRIORITY=%i", level_to_journal[level],
|
||||||
|
|
@ -619,7 +619,7 @@ pa_log_target *pa_log_parse_target(const char *string) {
|
||||||
t = pa_log_target_new(PA_LOG_STDERR, NULL);
|
t = pa_log_target_new(PA_LOG_STDERR, NULL);
|
||||||
else if (pa_streq(string, "syslog"))
|
else if (pa_streq(string, "syslog"))
|
||||||
t = pa_log_target_new(PA_LOG_SYSLOG, NULL);
|
t = pa_log_target_new(PA_LOG_SYSLOG, NULL);
|
||||||
#ifdef HAVE_JOURNAL
|
#ifdef HAVE_SYSTEMD_JOURNAL
|
||||||
else if (pa_streq(string, "journal"))
|
else if (pa_streq(string, "journal"))
|
||||||
t = pa_log_target_new(PA_LOG_JOURNAL, NULL);
|
t = pa_log_target_new(PA_LOG_JOURNAL, NULL);
|
||||||
#endif
|
#endif
|
||||||
|
|
@ -647,7 +647,7 @@ char *pa_log_target_to_string(const pa_log_target *t) {
|
||||||
case PA_LOG_SYSLOG:
|
case PA_LOG_SYSLOG:
|
||||||
string = pa_xstrdup("syslog");
|
string = pa_xstrdup("syslog");
|
||||||
break;
|
break;
|
||||||
#ifdef HAVE_JOURNAL
|
#ifdef HAVE_SYSTEMD_JOURNAL
|
||||||
case PA_LOG_JOURNAL:
|
case PA_LOG_JOURNAL:
|
||||||
string = pa_xstrdup("journal");
|
string = pa_xstrdup("journal");
|
||||||
break;
|
break;
|
||||||
|
|
|
||||||
|
|
@ -35,7 +35,7 @@
|
||||||
typedef enum pa_log_target_type {
|
typedef enum pa_log_target_type {
|
||||||
PA_LOG_STDERR, /* default */
|
PA_LOG_STDERR, /* default */
|
||||||
PA_LOG_SYSLOG,
|
PA_LOG_SYSLOG,
|
||||||
#ifdef HAVE_JOURNAL
|
#ifdef HAVE_SYSTEMD_JOURNAL
|
||||||
PA_LOG_JOURNAL, /* systemd journal */
|
PA_LOG_JOURNAL, /* systemd journal */
|
||||||
#endif
|
#endif
|
||||||
PA_LOG_NULL, /* to /dev/null */
|
PA_LOG_NULL, /* to /dev/null */
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue