D-Bus: configure option for overriding default logging
By default, syncevo-dbus-server logs to syslog. This can be changed with the new parameter of --enable-dbus-service. For example, this changes the logging to DLT (must be available, or course): configure "--enable-dbus-server=--dlt --no-syslog"
This commit is contained in:
parent
e7a8f1b456
commit
771ed318eb
22
configure.ac
22
configure.ac
|
@ -465,16 +465,24 @@ AC_ARG_ENABLE(core,
|
|||
AM_CONDITIONAL([COND_CORE], [test "$enable_core" = "yes"])
|
||||
|
||||
AC_ARG_ENABLE(dbus-service,
|
||||
AS_HELP_STRING([--enable-dbus-service],
|
||||
[enables building the dbus service executable and all related features
|
||||
(the DBus wrapper library, command line usage of server, etc).]),
|
||||
AS_HELP_STRING([--enable-dbus-service=args],
|
||||
[Enables building the dbus service executable and all related features
|
||||
(the DBus wrapper library, command line usage of server, etc).
|
||||
The optional arguments are syncevo-dbus-server command line arguments
|
||||
that are used when auto-starting via D-Bus or .desktop file. By default,
|
||||
the daemon logs to syslog. This can be changed via command line arguments.
|
||||
]),
|
||||
enable_dbus_service="$enableval",
|
||||
[if test $enable_gui = "no"; then
|
||||
enable_dbus_service="no"
|
||||
else
|
||||
enable_dbus_service="yes"
|
||||
fi])
|
||||
AM_CONDITIONAL([COND_DBUS], [test "$enable_dbus_service" = "yes"])
|
||||
AM_CONDITIONAL([COND_DBUS], [test "$enable_dbus_service" != "no"])
|
||||
if test "$enable_dbus_service" != "no" && test "$enable_dbus_service" != "yes"; then
|
||||
SYNCEVO_DBUS_SERVER_ARGS="$enable_dbus_service"
|
||||
fi
|
||||
AC_SUBST(SYNCEVO_DBUS_SERVER_ARGS)
|
||||
|
||||
AC_ARG_WITH([gio-gdbus],
|
||||
AS_HELP_STRING([--with-gio-gdbus],
|
||||
|
@ -504,7 +512,7 @@ AS_IF([test "x$with_gio_gdbus" = "xyes"],
|
|||
AC_DEFINE(NEED_DBUS_WATCH_GET_UNIX_FD, 1,
|
||||
[Define to 1 if you need the dbus_watch_get_unix_fd() function.]))])
|
||||
|
||||
if test $enable_dbus_service = "yes"; then
|
||||
if test "$enable_dbus_service" != "no"; then
|
||||
if test -z "$XSLT"; then
|
||||
AC_MSG_ERROR([xsltproc not found, is required for D-Bus service])
|
||||
fi
|
||||
|
@ -627,7 +635,7 @@ DBUS_SERVICES_DIR="${datadir}/dbus-1/services"
|
|||
AC_SUBST(DBUS_SERVICES_DIR)
|
||||
AC_DEFINE_UNQUOTED(DBUS_SERVICES_DIR, "$DBUS_SERVICES_DIR", [Location of D-Bus services directory])
|
||||
|
||||
if test $enable_gui != "no" || test $enable_dbus_service = "yes"; then
|
||||
if test "$enable_gui" != "no" || test "$enable_dbus_service" != "no"; then
|
||||
IT_PROG_INTLTOOL([0.37.1])
|
||||
GETTEXT_PACKAGE=syncevolution
|
||||
AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE, "$GETTEXT_PACKAGE", [The gettext package name])
|
||||
|
@ -691,7 +699,7 @@ if test $enable_gui != "no"; then
|
|||
|
||||
PKG_CHECK_MODULES(GUI, $gui_modules)
|
||||
|
||||
elif test "$enable_dbus_service" = "yes"; then
|
||||
elif test "$enable_dbus_service" != "no"; then
|
||||
# syncevo-dbus-server needs localization
|
||||
:
|
||||
else
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
[D-BUS Service]
|
||||
Name=org.syncevolution
|
||||
Exec=@libexecdir@/syncevo-dbus-server
|
||||
Exec=@libexecdir@/syncevo-dbus-server @SYNCEVO_DBUS_SERVER_ARGS@
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
[D-BUS Service]
|
||||
Name=org._01.pim.contacts
|
||||
Exec=@libexecdir@/syncevo-dbus-server
|
||||
Exec=@libexecdir@/syncevo-dbus-server @SYNCEVO_DBUS_SERVER_ARGS@
|
||||
|
|
|
@ -128,7 +128,7 @@ src_dbus_server_autostart_DATA = $(src_dbus_server_desktop)
|
|||
|
||||
libexec_SCRIPTS += $(src_dbus_server_script)
|
||||
$(src_dbus_server_script): $(src_dbus_server_script_in)
|
||||
@sed -e "s|\@libexecdir\@|$(libexecdir)|" $< >$@
|
||||
@sed -e "s|\@libexecdir\@|$(libexecdir)|" -e "s|\@SYNCEVO_DBUS_SERVER_ARGS\@|$(SYNCEVO_DBUS_SERVER_ARGS)|" $< >$@
|
||||
$(src_dbus_server_desktop): $(src_dbus_server_desktop_in)
|
||||
@sed -e "s|\@libexecdir\@|$(libexecdir)|" $< >$@
|
||||
|
||||
|
@ -137,7 +137,7 @@ src_dbus_server_service_files = $(src_dbus_server_service_files_in:.service.in=.
|
|||
src_dbus_server_servicedir = $(DBUS_SERVICES_DIR)
|
||||
src_dbus_server_service_DATA = $(src_dbus_server_service_files)
|
||||
src/dbus/server/%.service: src/dbus/server/%.service.in
|
||||
@sed -e "s|\@libexecdir\@|$(libexecdir)|" $< >$@
|
||||
@sed -e "s|\@libexecdir\@|$(libexecdir)|" -e "s|\@SYNCEVO_DBUS_SERVER_ARGS\@|$(SYNCEVO_DBUS_SERVER_ARGS)|" $< >$@
|
||||
|
||||
if COND_DBUS_PIM
|
||||
src_dbus_server_service_files_in += \
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
#! /bin/sh
|
||||
sleep 120
|
||||
exec @libexecdir@/syncevo-dbus-server 2>/dev/null 1>&1
|
||||
exec @libexecdir@/syncevo-dbus-server @SYNCEVO_DBUS_SERVER_ARGS@ 2>/dev/null 1>&1
|
||||
|
|
Loading…
Reference in New Issue