On Fri, 4 Jul 2014 19:53:20 +0300 Valentin Popa <valentin.p...@intel.com> wrote:
> Since version 209 of systemd, libsystemd-login has been merged > into libsystemd.so. > > http://lists.freedesktop.org/archives/systemd-devel/2014-February/017146.html > > This patch handles the case when systemd is built > without --enable-compat-libs (e.g. no libsystemd-login). > > Signed-off-by: Valentin Popa <valentin.p...@intel.com> > --- > configure.ac | 10 ++++++---- > 1 file changed, 6 insertions(+), 4 deletions(-) > > diff --git a/configure.ac b/configure.ac > index 648bee8..b9ccb95 100644 > --- a/configure.ac > +++ b/configure.ac > @@ -347,13 +347,15 @@ AS_IF([test "x$enable_resize_optimization" = "xyes"], > [AC_DEFINE([USE_RESIZE_POOL], [1], [Use resize memory pool as a > performance optimization])]) > > PKG_CHECK_MODULES(SYSTEMD_LOGIN, [libsystemd-login >= 198], > - [have_systemd_login=yes], [have_systemd_login=no]) > + [have_systemd_login_198=yes have_systemd_login_209=no], [ > + PKG_CHECK_MODULES(SYSTEMD_LOGIN, [libsystemd >= 209], > + [have_systemd_login_209=yes have_systemd_login_198=no], > [have_systemd_login_209=no have_systemd_login_198=no]) > +]) > +AS_IF([test "x$have_systemd_login_198" = "xyes" -o > "x$have_systemd_login_209" = "xyes"], > + [have_systemd_login=yes], [have_systemd_login=no]) > AS_IF([test "x$have_systemd_login" = "xyes"], > [AC_DEFINE([HAVE_SYSTEMD_LOGIN], [1], [Have systemd-login])]) > AM_CONDITIONAL(HAVE_SYSTEMD_LOGIN, test "x$have_systemd_login" = "xyes") > - > -PKG_CHECK_MODULES(SYSTEMD_LOGIN_209, [libsystemd-login >= 209], > - [have_systemd_login_209=yes], [have_systemd_login_209=no]) > AS_IF([test "x$have_systemd_login_209" = "xyes"], > [AC_DEFINE([HAVE_SYSTEMD_LOGIN_209], [1], [Have systemd-login >= > 209])]) > Hi, systemd >= 209 when compiled with --disable-compat-libs does not install libsystemd-login.pc, right? If so, that part seems good. What if you have systemd >= 209 installed with --enable-compat-libs (because something else in your distribution happens to need it)? If I read that right, it would lead to have_systemd_login_198=yes have_systemd_login_209=no, which disables HAVE_SYSTEMD_LOGIN_209 when you do have version 209 or later. Could you fix that? How about testing for libsystemd >= 209 first, and only if that is not found, test libsystemd-login >= 198? Luckily both changes tested for here came in 209. Thanks, pq _______________________________________________ wayland-devel mailing list wayland-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/wayland-devel