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:
Colin Guthrie 2014-10-17 13:32:03 +02:00
parent e775529167
commit f7da58b73f
6 changed files with 30 additions and 30 deletions

View file

@ -707,8 +707,8 @@ libpulsecommon_@PA_MAJORMINOR@_la_LDFLAGS += $(X11_LIBS)
endif
if HAVE_SYSTEMD_JOURNAL
libpulsecommon_@PA_MAJORMINOR@_la_CFLAGS += $(JOURNAL_FLAGS)
libpulsecommon_@PA_MAJORMINOR@_la_LDFLAGS += $(JOURNAL_LIBS)
libpulsecommon_@PA_MAJORMINOR@_la_CFLAGS += $(SYSTEMDJOURNAL_FLAGS)
libpulsecommon_@PA_MAJORMINOR@_la_LDFLAGS += $(SYSTEMDJOURNAL_LIBS)
endif
# proplist-util.h uses these header files, but not the library itself!
@ -1353,7 +1353,7 @@ modlibexec_LTLIBRARIES += \
module-udev-detect.la
endif
if HAVE_SYSTEMD
if HAVE_SYSTEMD_LOGIN
modlibexec_LTLIBRARIES += \
module-systemd-login.la
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_LDFLAGS = $(MODULE_LDFLAGS)
module_systemd_login_la_LIBADD = $(MODULE_LIBADD) $(SYSTEMD_LIBS)
module_systemd_login_la_CFLAGS = $(AM_CFLAGS) $(SYSTEMD_CFLAGS)
module_systemd_login_la_LIBADD = $(MODULE_LIBADD) $(SYSTEMDLOGIN_LIBS)
module_systemd_login_la_CFLAGS = $(AM_CFLAGS) $(SYSTEMDLOGIN_CFLAGS)
# GConf support
module_gconf_la_SOURCES = modules/gconf/module-gconf.c

View file

@ -323,7 +323,7 @@ int pa_cmdline_parse(pa_daemon_conf *conf, int argc, char *const argv [], int *d
case ARG_LOG_TARGET:
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>'."));
#else
pa_log(_("Invalid log target: use either 'syslog', 'stderr' or 'auto' or a valid file name 'file:<path>', 'newfile:<path>'."));

View file

@ -788,7 +788,7 @@ int main(int argc, char *argv[]) {
#endif
if (!conf->log_target) {
#ifdef HAVE_JOURNAL
#ifdef HAVE_SYSTEMD_JOURNAL
pa_log_target target = { .type = PA_LOG_JOURNAL, .file = NULL };
#else
pa_log_target target = { .type = PA_LOG_SYSLOG, .file = NULL };

View file

@ -40,7 +40,7 @@
#include <syslog.h>
#endif
#ifdef HAVE_JOURNAL
#ifdef HAVE_SYSTEMD_JOURNAL
#include <systemd/sd-journal.h>
#endif
@ -96,7 +96,7 @@ static const int level_to_syslog[] = {
/* These are actually equivalent to the syslog ones
* but we don't want to depend on syslog.h */
#ifdef HAVE_JOURNAL
#ifdef HAVE_SYSTEMD_JOURNAL
static const int level_to_journal[] = {
[PA_LOG_ERROR] = 3,
[PA_LOG_WARN] = 4,
@ -145,7 +145,7 @@ int pa_log_set_target(pa_log_target *t) {
switch (t->type) {
case PA_LOG_STDERR:
case PA_LOG_SYSLOG:
#ifdef HAVE_JOURNAL
#ifdef HAVE_SYSTEMD_JOURNAL
case PA_LOG_JOURNAL:
#endif
case PA_LOG_NULL:
@ -488,7 +488,7 @@ void pa_log_levelv_meta(
break;
#endif
#ifdef HAVE_JOURNAL
#ifdef HAVE_SYSTEMD_JOURNAL
case PA_LOG_JOURNAL:
if (sd_journal_send("MESSAGE=%s", t,
"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);
else if (pa_streq(string, "syslog"))
t = pa_log_target_new(PA_LOG_SYSLOG, NULL);
#ifdef HAVE_JOURNAL
#ifdef HAVE_SYSTEMD_JOURNAL
else if (pa_streq(string, "journal"))
t = pa_log_target_new(PA_LOG_JOURNAL, NULL);
#endif
@ -647,7 +647,7 @@ char *pa_log_target_to_string(const pa_log_target *t) {
case PA_LOG_SYSLOG:
string = pa_xstrdup("syslog");
break;
#ifdef HAVE_JOURNAL
#ifdef HAVE_SYSTEMD_JOURNAL
case PA_LOG_JOURNAL:
string = pa_xstrdup("journal");
break;

View file

@ -35,7 +35,7 @@
typedef enum pa_log_target_type {
PA_LOG_STDERR, /* default */
PA_LOG_SYSLOG,
#ifdef HAVE_JOURNAL
#ifdef HAVE_SYSTEMD_JOURNAL
PA_LOG_JOURNAL, /* systemd journal */
#endif
PA_LOG_NULL, /* to /dev/null */