diff options
author | Chocobo1 <Chocobo1@users.noreply.github.com> | 2022-09-20 02:25:55 +0800 |
---|---|---|
committer | Chocobo1 <Chocobo1@users.noreply.github.com> | 2022-09-20 02:38:51 +0800 |
commit | e4158f62c04702eccd238451b0d0938b10cdca1d (patch) | |
tree | 1b5a6b6f30bc41cdaa7f048dce03df9ca5d2f1c1 | |
parent | 35198adc7f3c1f0c1e3437f983e7f3ac96477997 (diff) | |
download | ppp-e4158f62c04702eccd238451b0d0938b10cdca1d.tar.gz |
Fix libsystemd detection
1. Use uppercase for `prefix` parameter
`SYSTEMD_CFLAGS` is used elsewhere so `prefix` cannot be lowercase.
https://autotools.info/pkgconfig/pkg_check_modules.html
2. The module name should be `libsystemd`
Previously it will result in the following compile error when building pppd/auth.c:
> /usr/bin/ld: pppd-auth.o: undefined reference to symbol 'sd_notify@@LIBSYSTEMD_209'
> /usr/bin/ld: /usr/lib/libsystemd.so.0: error adding symbols: DSO missing from command line
This is due to missing `-lsystemd-daemon` flag which is provided by `libsystemd-daemon-devel`
package on Debian or `systemd-libs` on ArchLinux. And the proper .pc file in the package is
`libsystemd` not `systemd`.
https://stackoverflow.com/a/38303241
Signed-off-by: Chocobo1 <Chocobo1@users.noreply.github.com>
-rw-r--r-- | configure.ac | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/configure.ac b/configure.ac index 7b4c842..184213e 100644 --- a/configure.ac +++ b/configure.ac @@ -106,7 +106,7 @@ AM_CONDITIONAL(WITH_SYSTEMD, test "x${enable_systemd}" = "xyes") AM_COND_IF([WITH_SYSTEMD], AC_DEFINE([SYSTEMD], 1, [Enable support for systemd notifications])) AS_IF([test "x${enable_systemd}" = "xyes"], [ - PKG_CHECK_MODULES([systemd], [systemd])]) + PKG_CHECK_MODULES([SYSTEMD], [libsystemd])]) # # Enable Callback Protocol Support, disabled by default |