build: only define WITH_SYSTEMD_JOURNAL if enabled

This commit is contained in:
Aleksander Morgado
2017-06-22 10:40:58 +02:00
parent acf36f2ae0
commit 341555504e
2 changed files with 3 additions and 6 deletions
+2 -5
View File
@@ -260,17 +260,14 @@ if test "x$with_systemd_journal" = "xauto"; then
fi
case $with_systemd_journal in
no)
AC_DEFINE(WITH_SYSTEMD_JOURNAL, 0, [Define if you want systemd journal support])
;;
yes)
if test "x$have_libsystemd" = "xno"; then
AC_MSG_ERROR(libsystemd development headers are required)
fi
fi
AC_DEFINE(WITH_SYSTEMD_JOURNAL, 1, [Define if you want systemd journal support])
;;
*)
AC_MSG_ERROR([Wrong value for --with-systemd-journal: $with_systemd_journal])
with_systemd_journal=no
;;
esac
+1 -1
View File
@@ -104,7 +104,7 @@ static const GOptionEntry log_entries[] = {
"Path to log file",
"[PATH]"
},
#if WITH_SYSTEMD_JOURNAL
#if defined WITH_SYSTEMD_JOURNAL
{
"log-journal", 0, 0, G_OPTION_ARG_NONE, &log_journal,
"Log to systemd journal",