// We should allow only dynamic linkage due to libsystemd and libelogind LICENSE.
#[cfg(feature = "backend_session_elogind")]
{
ifpkg_config::Config::new()
.statik(false)
.probe("libelogind")
.is_err()
{
println!("cargo:warning=Could not find `libelogind.so`.");
println!("cargo:warning=If your system is systemd-based, you should only enable the `backend_session_logind` feature, not `backend_session_elogind`.");
std::process::exit(1);
}
}
#[cfg(not(feature = "backend_session_elogind"))]
{
ifpkg_config::Config::new()
.statik(false)
.probe("libsystemd")
.is_err()
{
println!("cargo:warning=Could not find `libsystemd.so`.");
println!("cargo:warning=If your system uses elogind, please enable the `backend_session_elogind` feature.");
println!("cargo:warning=Otherwise, you may need to disable the `backend_session_logind` feature as your system does not support it.");