ahkok / user-session-units

A collection of units for the systemd user session.
GNU Lesser General Public License v2.1
72 stars 23 forks source link

Use ldflags from systemd's pkgconfig #19

Closed fredcadete closed 9 years ago

fredcadete commented 9 years ago

Removing the hardcoded -lsystemd-login also fixes builds against systemd >= 209 (issue #18)

phmccarty commented 9 years ago

On Arch Linux, systemd.pc defines variables for various paths, but does not include a Libs entry to substitute the proper linker flag(s), so the build fails.

The correct Libs entry can be found in libsystemd.pc though, so one solution would be adding a new PKG_CHECK_MODULES() macro to configure.ac specifically for libsystemd, producing a new variable with _LIBS suffix, and substitute that in the makefile.

fredcadete commented 9 years ago

Thanks. My bad, I did have it as you said in the Yocto environment I was using. I tested the build on Debian-testing this time.

phmccarty commented 9 years ago

Looks good to me, thanks!