wip
authorŁukasz Stelmach <l.stelmach@samsung.com>
Mon, 28 Dec 2015 17:04:04 +0000 (18:04 +0100)
committerŁukasz Stelmach <l.stelmach@samsung.com>
Fri, 29 Jan 2016 15:15:54 +0000 (16:15 +0100)
Change-Id: Ica2008da1d5f22741595251690fbab46d8e822d4
Signed-off-by: Łukasz Stelmach <l.stelmach@samsung.com>
Conflicts:
src/bin/e_comp_wl.c

configure.ac
src/bin/e_comp_wl.c

index eb6e0b3d321751e83dd73e62723e2430aec806e1..da9b3af7bd48914c23f6786c5c4446e810c99b9a 100755 (executable)
@@ -249,6 +249,26 @@ fi
 AM_CONDITIONAL([HAVE_SYSTEMD_USER_SESSION], [test "x${have_systemd_user_session}" = "xyes"])
 AC_SUBST([USER_SESSION_DIR])
 
+AS_IF([test "x$want_systemd" != "xno"],
+        [
+         PKG_CHECK_MODULES([LIBSYSTEMD], [libsystemd],
+                 [have_libsystemd="yes"],
+                 [have_libsystemd="no"])
+          AS_IF([test "x$have_libsystemd" = "xyes"],
+                  [have_systemd_daemon=yes],
+                  [PKG_CHECK_MODULES([LIBSYSTEMD_DAEMON], [libsystemd-daemon],
+                          [have_systemd_daemon="yes"],
+                          [have_systemd_daemon="no"])])
+       ],
+        [
+         have_libsystemd=no
+         have_systemd_daemon=no
+        ])
+
+AM_CONDITIONAL([HAVE_SYSTEMD_DAEMON], [test "x${have_systemd_daemon}" = "xyes"])
+AC_SUBST([HAVE_SYSTEMD_DAEMON])
+AS_IF([test "x${have_systemd_daemon}" = "xyes"], AC_DEFINE([HAVE_SYSTEMD_DAEMON], 1, [Have libsystemd-daemon or libsystemd]))
+
 execinfo_libs=""
 AC_CHECK_HEADERS([execinfo.h], [have_execinfo="yes"], [have_execinfo="no"])
 if test "x${have_execinfo}" = "xyes" ; then
index 2ca6fea56852a446274bddeaf163185445883901..aa53c5276f8c07bf30bb326865ce513b93db0983 100644 (file)
@@ -3,7 +3,9 @@
 #include "e_comp_wl_screenshooter_server.h"
 
 #include <wayland-tbm-server.h>
+#ifdef HAVE_SYSTEMD_DAEMON
 #include <systemd/sd-daemon.h>
+#endif
 
 /* handle include for printing uint64_t */
 #define __STDC_FORMAT_MACROS
@@ -4148,7 +4150,7 @@ _e_comp_wl_compositor_create(void)
    const char *name;
    int fd = 0;
    const char *runtime_dir;
-#ifdef HAVE_SYSTEMD
+#ifdef HAVE_SYSTEMD_DAEMON
    int a;
 #endif
 
@@ -4176,7 +4178,7 @@ _e_comp_wl_compositor_create(void)
         goto disp_err;
      }
 
-#ifdef HAVE_SYSTEMD
+#ifdef HAVE_SYSTEMD_DAEMON
    a = sd_listen_fds(1);
    if (a < 0)
      {