Lines 264-285
Link Here
|
264 |
dnl --------------------------------------------------------------------------- |
264 |
dnl --------------------------------------------------------------------------- |
265 |
AC_PATH_PROG([XSLTPROC], [xsltproc]) |
265 |
AC_PATH_PROG([XSLTPROC], [xsltproc]) |
266 |
|
266 |
|
|
|
267 |
# elogind |
268 |
|
269 |
have_elogind=no |
270 |
|
271 |
AC_MSG_CHECKING([whether to use elogind]) |
272 |
|
273 |
AC_ARG_ENABLE([elogind], |
274 |
AS_HELP_STRING([--enable-elogind], [Use elogind]), |
275 |
[enable_elogind=$enableval], |
276 |
[enable_elogind=no]) |
277 |
|
278 |
AC_MSG_RESULT($enable_elogind) |
279 |
|
280 |
if test "x$enable_elogind" != "xno"; then |
281 |
PKG_CHECK_MODULES(ELOGIND, [libelogind >= 229.4], |
282 |
[have_elogind=yes]) |
283 |
fi |
284 |
|
285 |
if test "x$enable_elogind" != "xno"; then |
286 |
if test "x$have_elogind" != "xyes"; then |
287 |
AC_MSG_ERROR([elogind support requested, but libelogind not found]) |
288 |
else |
289 |
AC_SUBST(ELOGIND_CFLAGS) |
290 |
AC_SUBST(ELOGIND_LIBS) |
291 |
|
292 |
LIBACCOUNTSSERVICE_LIBS="$LIBACCOUNTSSERVICE_LIBS $ELOGIND_LIBS" |
293 |
LIBACCOUNTSSERVICE_CFLAGS="$LIBACCOUNTSSERVICE_CFLAGS $ELOGIND_CFLAGS" |
294 |
fi |
295 |
fi |
296 |
|
297 |
|
267 |
# systemd |
298 |
# systemd |
268 |
|
299 |
|
|
|
300 |
have_systemd=no |
301 |
|
302 |
AC_MSG_CHECKING([whether to use systemd]) |
303 |
|
269 |
AC_ARG_ENABLE([systemd], |
304 |
AC_ARG_ENABLE([systemd], |
270 |
AS_HELP_STRING([--enable-systemd], [Use systemd]), |
305 |
AS_HELP_STRING([--enable-systemd], [Use systemd]), |
271 |
[enable_systemd=$enableval], |
306 |
[enable_systemd=$enableval], |
272 |
[enable_systemd=auto]) |
307 |
[enable_systemd=auto]) |
273 |
|
308 |
|
|
|
309 |
AC_MSG_RESULT($enable_systemd) |
310 |
|
274 |
if test x$enable_systemd != xno; then |
311 |
if test x$enable_systemd != xno; then |
275 |
PKG_CHECK_MODULES(SYSTEMD, [libsystemd >= 186], |
312 |
PKG_CHECK_MODULES(SYSTEMD, [libsystemd >= 186], |
276 |
[have_systemd=yes], [have_systemd=no]) |
313 |
[have_systemd=yes]) |
277 |
else |
|
|
278 |
have_systemd=no |
279 |
fi |
314 |
fi |
280 |
|
315 |
|
281 |
AC_MSG_CHECKING([whether to use systemd]) |
|
|
282 |
|
283 |
if test x$enable_systemd = xauto ; then |
316 |
if test x$enable_systemd = xauto ; then |
284 |
if test x$have_systemd = xno ; then |
317 |
if test x$have_systemd = xno ; then |
285 |
enable_systemd=no |
318 |
enable_systemd=no |
Lines 288-308
Link Here
|
288 |
fi |
321 |
fi |
289 |
fi |
322 |
fi |
290 |
|
323 |
|
291 |
AC_MSG_RESULT($enable_systemd) |
|
|
292 |
|
324 |
|
293 |
if test x$enable_systemd = xyes; then |
325 |
if test x$enable_systemd = xyes; then |
294 |
if test x$have_systemd = xno; then |
326 |
if test x$have_systemd = xno; then |
295 |
AC_MSG_ERROR([Systemd support explicitly required, but systemd not found]) |
327 |
AC_MSG_ERROR([Systemd support explicitly requested, but libsystemd not found]) |
296 |
fi |
328 |
fi |
|
|
329 |
|
330 |
dnl Requesting to use the elogind session tracker makes no sense where |
331 |
dnl systemd-login is (or might be) running. |
332 |
if test x$enable_elogind = xyes; then |
333 |
AC_MSG_WARN([elogind support requested, but systemd was found.]) |
334 |
AC_MSG_ERROR([Disable either elogind or systemd support.]) |
335 |
fi |
336 |
|
337 |
AC_SUBST(SYSTEMD_CFLAGS) |
338 |
AC_SUBST(SYSTEMD_LIBS) |
339 |
|
340 |
LIBACCOUNTSSERVICE_LIBS="$LIBACCOUNTSSERVICE_LIBS $SYSTEMD_LIBS" |
341 |
LIBACCOUNTSSERVICE_CFLAGS="$LIBACCOUNTSSERVICE_CFLAGS $SYSTEMD_CFLAGS" |
342 |
|
297 |
AC_DEFINE(HAVE_SYSTEMD, 1, [Define if systemd is used]) |
343 |
AC_DEFINE(HAVE_SYSTEMD, 1, [Define if systemd is used]) |
298 |
fi |
344 |
fi |
299 |
AC_SUBST(SYSTEMD_CFLAGS) |
|
|
300 |
AC_SUBST(SYSTEMD_LIBS) |
301 |
|
302 |
LIBACCOUNTSSERVICE_LIBS="$LIBACCOUNTSSERVICE_LIBS $SYSTEMD_LIBS" |
303 |
LIBACCOUNTSSERVICE_CFLAGS="$LIBACCOUNTSSERVICE_CFLAGS $SYSTEMD_CFLAGS" |
304 |
|
345 |
|
305 |
if test "x$have_systemd" != "xno" ; then |
346 |
if test "x${have_systemd}x${have_elogind}" != "xnoxno" ; then |
306 |
AC_DEFINE(WITH_SYSTEMD, 1, [Define to enable systemd support]) |
347 |
AC_DEFINE(WITH_SYSTEMD, 1, [Define to enable systemd support]) |
307 |
fi |
348 |
fi |
308 |
|
349 |
|