Lines 426-439
Link Here
|
426 |
[Support systemd session tracking])) |
426 |
[Support systemd session tracking])) |
427 |
AC_ARG_WITH(consolekit, AS_HELP_STRING([--with-consolekit=yes|no], |
427 |
AC_ARG_WITH(consolekit, AS_HELP_STRING([--with-consolekit=yes|no], |
428 |
[Support consolekit session tracking])) |
428 |
[Support consolekit session tracking])) |
429 |
AC_ARG_WITH(session-tracking, AS_HELP_STRING([--with-session-tracking=systemd|consolekit|no], |
429 |
AC_ARG_WITH(session-tracking, AS_HELP_STRING([--with-session-tracking=systemd|elogind|consolekit|no], |
430 |
[Compatibility option to choose one session tracking module])) |
430 |
[Compatibility option to choose one session tracking module])) |
431 |
# backwards compatibility |
431 |
# backwards compatibility |
432 |
AS_IF([test "$with_session_tracking" = "ck"], [use_consolekit="yes" use_systemd_logind="no"]) |
432 |
AS_IF([test "$with_session_tracking" = "ck"], [use_consolekit="yes" use_systemd_logind="no" use_elogind="no"]) |
433 |
AS_IF([test "$with_session_tracking" = "consolekit"], [use_consolekit="yes" use_systemd_logind="no"]) |
433 |
AS_IF([test "$with_session_tracking" = "consolekit"], [use_consolekit="yes" use_systemd_logind="no" use_elogind="no"]) |
434 |
AS_IF([test "$with_session_tracking" = "systemd"], [use_consolekit="no" use_systemd_logind="yes"]) |
434 |
AS_IF([test "$with_session_tracking" = "systemd"], [use_consolekit="no" use_systemd_logind="yes" use_elogind="no"]) |
435 |
AS_IF([test "$with_session_tracking" = "no"], [use_consolekit="no" use_systemd_logind="no"]) |
435 |
AS_IF([test "$with_session_tracking" = "elogind"], [use_consolekit="no" use_systemd_logind="no" use_elogind="yes"]) |
436 |
AS_IF([test "$with_session_tracking" = "none"], [use_consolekit="no" use_systemd_logind="no"]) |
436 |
AS_IF([test "$with_session_tracking" = "no"], [use_consolekit="no" use_systemd_logind="no" use_elogind="no"]) |
|
|
437 |
AS_IF([test "$with_session_tracking" = "none"], [use_consolekit="no" use_systemd_logind="no" use_elogind="no"]) |
437 |
# current options |
438 |
# current options |
438 |
AS_IF([test -n "$with_systemd_logind" ], [use_systemd_logind="$with_systemd_logind"]) |
439 |
AS_IF([test -n "$with_systemd_logind" ], [use_systemd_logind="$with_systemd_logind"]) |
439 |
AS_IF([test -n "$with_consolekit" ], [use_consolekit="$with_consolekit"]) |
440 |
AS_IF([test -n "$with_consolekit" ], [use_consolekit="$with_consolekit"]) |
Lines 454-459
Link Here
|
454 |
AC_DEFINE([SESSION_TRACKING_SYSTEMD], 1, [Define to 1 if libsystemd-login is available]) |
455 |
AC_DEFINE([SESSION_TRACKING_SYSTEMD], 1, [Define to 1 if libsystemd-login is available]) |
455 |
session_tracking="$session_tracking, systemd-logind" |
456 |
session_tracking="$session_tracking, systemd-logind" |
456 |
fi |
457 |
fi |
|
|
458 |
|
459 |
if test "$use_elogind" = "yes" -a "$have_systemd_logind" = "yes"; then |
460 |
AC_MSG_ERROR([Cannot enable systemd-logind together with elogind.]) |
461 |
fi |
462 |
if test "$use_elogind" = "yes"; then |
463 |
PKG_CHECK_MODULES(SYSTEMD_LOGIN, [libelogind], [have_elogind=yes], [PKG_CHECK_MODULES(SYSTEMD_LOGIN, [libelogind], [have_elogind=yes], [have_elogind=no])]) |
464 |
else |
465 |
have_elogind=no |
466 |
fi |
467 |
if test "$use_elogind" = "yes" -a "$have_elogind" = "no"; then |
468 |
AC_MSG_ERROR([You must have libelogind installed to build with elogind support.]) |
469 |
fi |
470 |
if test "$have_elogind" = "yes"; then |
471 |
AC_DEFINE([SESSION_TRACKING_ELOGIND], 1, [Define to 1 if libelogin is available]) |
472 |
session_tracking="$session_tracking, elogind" |
473 |
fi |
474 |
|
457 |
if test "$use_consolekit" = "yes"; then |
475 |
if test "$use_consolekit" = "yes"; then |
458 |
AC_DEFINE([SESSION_TRACKING_CONSOLEKIT], 1, [Define to 1 if ConsoleKit is available]) |
476 |
AC_DEFINE([SESSION_TRACKING_CONSOLEKIT], 1, [Define to 1 if ConsoleKit is available]) |
459 |
AC_DEFINE([CKDB_PATH], "/var/run/ConsoleKit/database", [Path to ConsoleKit database]) |
477 |
AC_DEFINE([CKDB_PATH], "/var/run/ConsoleKit/database", [Path to ConsoleKit database]) |
Lines 461-467
Link Here
|
461 |
fi |
479 |
fi |
462 |
session_tracking="$(printf '%s' "${session_tracking}" | sed 's/^, //')" |
480 |
session_tracking="$(printf '%s' "${session_tracking}" | sed 's/^, //')" |
463 |
|
481 |
|
464 |
AC_ARG_WITH(suspend-resume, AS_HELP_STRING([--with-suspend-resume=upower|systemd|consolekit], [Build NetworkManager with specific suspend/resume support])) |
482 |
AC_ARG_WITH(suspend-resume, AS_HELP_STRING([--with-suspend-resume=upower|systemd|elogind|consolekit], [Build NetworkManager with specific suspend/resume support])) |
465 |
if test "z$with_suspend_resume" = "z"; then |
483 |
if test "z$with_suspend_resume" = "z"; then |
466 |
PKG_CHECK_EXISTS([libsystemd >= 209], [have_systemd_inhibit=yes], |
484 |
PKG_CHECK_EXISTS([libsystemd >= 209], [have_systemd_inhibit=yes], |
467 |
[PKG_CHECK_EXISTS([libsystemd-login >= 183], [have_systemd_inhibit=yes], [have_systemd_inhibit=no])]) |
485 |
[PKG_CHECK_EXISTS([libsystemd-login >= 183], [have_systemd_inhibit=yes], [have_systemd_inhibit=no])]) |
Lines 469-474
Link Here
|
469 |
# Use systemd if it's new enough |
487 |
# Use systemd if it's new enough |
470 |
with_suspend_resume="systemd" |
488 |
with_suspend_resume="systemd" |
471 |
else |
489 |
else |
|
|
490 |
PKG_CHECK_EXISTS([libelogind >= 219], [have_elogind_inhibit=yes], |
491 |
[PKG_CHECK_EXISTS([libelogind >= 219], [have_elogind_inhibit=yes], [have_elogind_inhibit=no])]) |
492 |
if test "z${have_elogind_inhibit}" = "zyes"; then |
493 |
# Use elogind if it's new enough |
494 |
with_suspend_resume="elogind" |
495 |
else |
472 |
if test "$use_consolekit" = "yes"; then |
496 |
if test "$use_consolekit" = "yes"; then |
473 |
# Use consolekit suspend if session tracking is consolekit |
497 |
# Use consolekit suspend if session tracking is consolekit |
474 |
with_suspend_resume="consolekit" |
498 |
with_suspend_resume="consolekit" |
Lines 478-483
Link Here
|
478 |
fi |
502 |
fi |
479 |
fi |
503 |
fi |
480 |
fi |
504 |
fi |
|
|
505 |
fi |
481 |
|
506 |
|
482 |
case $with_suspend_resume in |
507 |
case $with_suspend_resume in |
483 |
upower) |
508 |
upower) |
Lines 488-498
Link Here
|
488 |
[PKG_CHECK_MODULES(SYSTEMD_INHIBIT, [libsystemd-login >= 183])]) |
513 |
[PKG_CHECK_MODULES(SYSTEMD_INHIBIT, [libsystemd-login >= 183])]) |
489 |
AC_DEFINE([SUSPEND_RESUME_SYSTEMD], 1, [Define to 1 to use systemd suspend api]) |
514 |
AC_DEFINE([SUSPEND_RESUME_SYSTEMD], 1, [Define to 1 to use systemd suspend api]) |
490 |
;; |
515 |
;; |
|
|
516 |
elogind) |
517 |
PKG_CHECK_MODULES(ELOGIND_INHIBIT, [libelogind >= 219],, |
518 |
[PKG_CHECK_MODULES(ELOGIND_INHIBIT, [libelogind >= 219])]) |
519 |
AC_DEFINE([SUSPEND_RESUME_ELOGIND], 1, [Define to 1 to use elogind suspend api]) |
520 |
;; |
491 |
consolekit) |
521 |
consolekit) |
492 |
AC_DEFINE([SUSPEND_RESUME_CONSOLEKIT], 1, [Define to 1 to use ConsoleKit2 suspend api]) |
522 |
AC_DEFINE([SUSPEND_RESUME_CONSOLEKIT], 1, [Define to 1 to use ConsoleKit2 suspend api]) |
493 |
;; |
523 |
;; |
494 |
*) |
524 |
*) |
495 |
AC_MSG_ERROR(--with-suspend-resume must be one of [upower, systemd, consolekit]) |
525 |
AC_MSG_ERROR(--with-suspend-resume must be one of [upower, systemd, elogind, consolekit]) |
496 |
;; |
526 |
;; |
497 |
esac |
527 |
esac |
498 |
|
528 |
|