Changeset 14733


Ignore:
Timestamp:
Apr 23, 2016, 4:13:25 PM (16 months ago)
Author:
mikedld
Message:

#5921: Use libsystemd instead of libsystemd-daemon (original patches by Sandro Tosi and Mike Gilbert)

In systemd v209, released over two years ago, the various libsystemd-*
libraries (libsystemd-journal.so, libsystemd-login.so, libsystem-daemon.so,
libsystemd-id128.so) were merged into a single libsystemd.so library to
reduce code duplication and avoid cyclic dependencies.

Location:
trunk
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/CMakeLists.txt

    r14730 r14733  
    399399    tr_get_required_flag(WITH_SYSTEMD SYSTEMD_IS_REQUIRED)
    400400
    401     pkg_check_modules(SYSTEMD_DAEMON ${SYSTEMD_IS_REQUIRED} libsystemd-daemon)
    402 
    403     tr_fixup_auto_option(WITH_SYSTEMD SYSTEMD_DAEMON_FOUND SYSTEMD_IS_REQUIRED)
     401    pkg_check_modules(SYSTEMD ${SYSTEMD_IS_REQUIRED} libsystemd)
     402
     403    tr_fixup_auto_option(WITH_SYSTEMD SYSTEMD_FOUND SYSTEMD_IS_REQUIRED)
    404404endif()
    405405
  • trunk/configure.ac

    r14715 r14733  
    241241
    242242# Check whether to enable systemd startup notification.
    243 # This requires libsystemd-daemon.
    244 AC_ARG_WITH([systemd-daemon], AS_HELP_STRING([--with-systemd-daemon],
     243# This requires libsystemd.
     244AC_ARG_WITH([systemd], AS_HELP_STRING([--with-systemd],
    245245            [Add support for systemd startup notification (default is autodetected)]),
    246             [USE_SYSTEMD_DAEMON=$withval], [USE_SYSTEMD_DAEMON=auto])
    247 AS_IF([test "x$USE_SYSTEMD_DAEMON" != "xno"], [
    248     PKG_CHECK_MODULES([SYSTEMD_DAEMON], [libsystemd-daemon],
    249         [AC_DEFINE(USE_SYSTEMD_DAEMON,1,[Use systemd startup notification])],
    250         [AS_IF([test "x$USE_SYSTEMD_DAEMON" = "xyes"],
    251             [AC_MSG_ERROR([systemd startup notification support requested, but libsystemd-daemon not found.])]
     246            [USE_SYSTEMD=$withval], [USE_SYSTEMD=auto])
     247AS_IF([test "x$USE_SYSTEMD" != "xno"], [
     248    PKG_CHECK_MODULES([SYSTEMD], [libsystemd],
     249        [AC_DEFINE(USE_SYSTEMD,1,[Use systemd startup notification])],
     250        [AS_IF([test "x$USE_SYSTEMD" = "xyes"],
     251            [AC_MSG_ERROR([systemd startup notification support requested, but libsystemd not found.])]
    252252        )]
    253253    )
  • trunk/daemon/CMakeLists.txt

    r14651 r14733  
    22
    33if(WITH_SYSTEMD)
    4     add_definitions(-DUSE_SYSTEMD_DAEMON)
     4    add_definitions(-DUSE_SYSTEMD)
    55endif()
    66
     
    3838
    3939set_target_properties(${TR_NAME}-daemon PROPERTIES
    40     COMPILE_FLAGS "${SYSTEMD_DAEMON_CFLAGS}"
    41     LINK_FLAGS "${SYSTEMD_DAEMON_LDFLAGS}"
     40    COMPILE_FLAGS "${SYSTEMD_CFLAGS}"
     41    LINK_FLAGS "${SYSTEMD_LDFLAGS}"
    4242)
    4343
     
    4545    ${TR_NAME}
    4646    ${EVENT2_LIBRARIES}
    47     ${SYSTEMD_DAEMON_LIBRARIES}
     47    ${SYSTEMD_LIBRARIES}
    4848)
    4949
  • trunk/daemon/Makefile.am

    r14651 r14733  
    44    @LIBEVENT_CFLAGS@ \
    55    @LIBCURL_CFLAGS@ \
    6     @SYSTEMD_DAEMON_CFLAGS@ \
     6    @SYSTEMD_CFLAGS@ \
    77    @ZLIB_CFLAGS@ \
    88    @PTHREAD_CFLAGS@
     
    3030    @CRYPTO_LIBS@ \
    3131    @INTLLIBS@ \
    32     @SYSTEMD_DAEMON_LIBS@ \
     32    @SYSTEMD_LIBS@ \
    3333    @ZLIB_LIBS@ \
    3434    @PTHREAD_LIBS@ \
  • trunk/daemon/daemon.c

    r14675 r14733  
    3434#include <libtransmission/watchdir.h>
    3535
    36 #ifdef USE_SYSTEMD_DAEMON
     36#ifdef USE_SYSTEMD
    3737 #include <systemd/sd-daemon.h>
    3838#else
Note: See TracChangeset for help on using the changeset viewer.