On FreeBSD the configure now looks like:
[...] -- Could NOT find loginctl (missing: loginctl_EXECUTABLE) -- Found ConsoleKit: /usr/local/bin/ck-list-sessions [...] * prctl/procctl tracing control, Required for disallowing ptrace on greeter and kcheckpass process * sys/event.h, Use the kevent() and sigwaitinfo() api for signalhandling * XInput, Required for grabbing XInput2 devices in the screen locker * Unlock broken screenlocker, Needed for emergency unlock in case that the greeter is broken. In case your distribution does not provide loginctl or consolekit please contact firstname.lastname@example.org to discuss alternatives. -- The following OPTIONAL packages have been found: * WaylandScanner, Executable that converts XML protocol files to C code, <http://wayland.freedesktop.org> * PkgConfig -- The following RECOMMENDED packages have been found: * ConsoleKit, Framework for defining and tracking users, <http://www.freedesktop.org/wiki/Software/ConsoleKit> [...]
I would suggest that this build-time detection of ConsoleKit occur always, and as a result, that ck-unlock-session be always installed if ConsoleKit is installed.
We could certainly do that by removing the wrapping if ( NOT HAVE_LOGINCTL ).
Additionally, also the order of the if-branches in abstractlocker.cpp would probably need to be reordered as to prefere login1.