diff --git a/ChangeLog b/ChangeLog index 719dfc99dc..281ed389e3 100644 --- a/ChangeLog +++ b/ChangeLog @@ -2,6 +2,7 @@ * Eeze: add a dummy implementation of libmount when it is not available. * Ecore_Con: add systemd socket activation support (ECORE_CON_SOCKET_ACTIVATE). + * Ecore: notify systemd that we are ready as soon as the main loop is running. 2013-03-08 Igor Murzov diff --git a/NEWS b/NEWS index 2729d5c34b..31b17ae0be 100644 --- a/NEWS +++ b/NEWS @@ -73,6 +73,7 @@ Additions: * Ecore_x: Add manual render code before deiconify * Eeze: Add a dummy libmount replacement for when libmount is not there. * Ecore_Con: Add systemd socket activation support (ECORE_CON_SOCKET_ACTIVATE). + * Ecore: notify systemd that we are ready as soon as the main loop is running. Deprecations: * ecore_x: diff --git a/configure.ac b/configure.ac index 01ed6e2af8..6d54280354 100644 --- a/configure.ac +++ b/configure.ac @@ -137,6 +137,7 @@ case "$host_os" in ;; esac +want_systemd="no" have_wince="no" have_win32="no" have_windows="no" @@ -158,6 +159,7 @@ case "$host_os" in ;; linux*) have_linux="yes" + want_systemd="yes" ;; esac @@ -1735,6 +1737,9 @@ if test "x${have_glib}" = "xno"; then want_g_main_loop="no" fi +EFL_OPTIONAL_DEPEND_PKG([ECORE], [${want_systemd}], [SYSTEMD], [libsystemd-daemon]) + +EFL_ADD_FEATURE([ECORE], [systemd-daemon], [${want_systemd}]) EFL_ADD_FEATURE([ECORE], [glib]) EFL_ADD_FEATURE([ECORE], [g-main-loop]) @@ -1885,26 +1890,21 @@ want_ecore_con_local_sockets="yes" want_ecore_con_abstract_sockets="yes" if test "${have_wince}" = "yes"; then - want_systemd="no" want_curl="no" want_cares="no" want_ecore_con_local_sockets="no" want_ecore_con_abstract_sockets="no" elif test "${have_win32}" = "yes"; then - want_systemd="no" want_cares="yes" want_ecore_con_abstract_sockets="no" elif test "${have_darwin}" = "yes"; then - want_systemd="no" want_cares="no" want_ecore_con_abstract_sockets="no" elif test "${have_ps3}" = "yes"; then - want_systemd="no" want_cares="no" want_ecore_con_local_sockets="no" want_ecore_con_abstract_sockets="no" else - want_systemd="yes" want_cares="no" fi diff --git a/src/lib/ecore/ecore_main.c b/src/lib/ecore/ecore_main.c index e551ea71e0..df240c1632 100644 --- a/src/lib/ecore/ecore_main.c +++ b/src/lib/ecore/ecore_main.c @@ -25,6 +25,10 @@ #include #include +#ifdef HAVE_SYSTEMD +# include +#endif + #ifdef _MSC_VER # include #endif @@ -949,6 +953,9 @@ EAPI void ecore_main_loop_begin(void) { EINA_MAIN_LOOP_CHECK_RETURN; +#ifdef HAVE_SYSTEMD + sd_notify(0, "READY=1"); +#endif #ifndef USE_G_MAIN_LOOP _ecore_lock(); in_main_loop++;