When trying to configure unbound with systemd enabled, unbound could not locate systemd.
$ ./configure --enable-systemd
...
...
...
checking for SYSTEMD... no
configure: error: Package requirements (libsystemd) were not met:
Package 'libsystemd', required by 'virtual:world', not found
Consider adjusting the PKG_CONFIG_PATH environment variable if you
installed software in a non-standard prefix.
Alternatively, you may set the environment variables SYSTEMD_CFLAGS
and SYSTEMD_LIBS to avoid the need to call pkg-config.
See the pkg-config man page for more details.
However, systemd is present:
$ dpkg -l | grep systemd
ii dbus-user-session 1.14.10-1~deb12u1 armhf simple interprocess messaging system (systemd --user integration)
ii libpam-systemd:armhf 252.31-1~deb12u1 armhf system and service manager - PAM module
ii libsystemd-shared:armhf 252.31-1~deb12u1 armhf systemd shared private library
ii libsystemd0:armhf 252.31-1~deb12u1 armhf systemd utility library
ii systemd 252.31-1~deb12u1 armhf system and service manager
ii systemd-resolved 252.31-1~deb12u1 armhf systemd DNS resolver
ii systemd-sysv 252.31-1~deb12u1 armhf system and service manager - SysV compatibility symlinks
ii systemd-timesyncd 252.31-1~deb12u1 armhf minimalistic service to synchronize local time with NTP servers
$ ls /usr/lib/systemd
catalog systemd-boot-check-no-failures systemd-integritysetup systemd-network-generator systemd-shutdown systemd-time-wait-sync system-preset
network systemd-cgroups-agent systemd-journald systemd-pcrphase systemd-sleep systemd-udevd system-shutdown
ntp-units.d systemd-cryptsetup systemd-localed systemd-pstore systemd-socket-proxyd systemd-update-utmp system-sleep
resolv.conf systemd-fsck systemd-logind systemd-quotacheck systemd-sulogin-shell systemd-user-runtime-dir user
system systemd-fsckd systemd-makefs systemd-random-seed systemd-sysctl systemd-user-sessions user-environment-generators
systemd systemd-growfs systemd-measure systemd-remount-fs systemd-sysroot-fstab-check systemd-veritysetup user-generators
systemd-ac-power systemd-hibernate-resume systemd-modules-load systemd-reply-password systemd-sysv-install systemd-volatile-root user-preset
systemd-backlight systemd-hostnamed systemd-networkd systemd-resolved systemd-timedated systemd-xdg-autostart-condition
systemd-binfmt systemd-initctl systemd-networkd-wait-online systemd-rfkill systemd-timesyncd system-generators
It seems that the systemd utility library package on this device is named libsystemd0 and not systemd. I have tried using
$ ./configure --enable-systemd SYSTEMD_LIBS=/usr/lib/systemd
but was returned with the same error msg as mentioned above.
Also,
$ echo $PKG_CONFIG_PATH
$ pkg-config --list-all
libunbound unbound - Library with validating, recursive, and caching DNS resolver
libsodium libsodium - A modern and easy-to-use crypto library
libnsl libnsl - Library containing NIS functions using TI-RPC (IPv6 enabled)
expat expat - expat XML parser
libcrypt libxcrypt - Extended crypt library for DES, MD5, Blowfish and others
libtirpc libtirpc - Transport Independent RPC Library
openssl OpenSSL - Secure Sockets Layer and cryptography libraries and tools
libssl OpenSSL-libssl - Secure Sockets Layer and cryptography libraries
libxcrypt libxcrypt - Extended crypt library for DES, MD5, Blowfish and others
libcrypto OpenSSL-libcrypto - OpenSSL cryptography library
udev udev - udev
xkeyboard-config XKeyboardConfig - X Keyboard configuration data
systemd systemd - systemd System and Service Manager
bash-completion bash-completion - programmable completion for the bash shell
$ pkg-config --cflags systemd
$ pkg-config --cflags systemd0
Package systemd0 was not found in the pkg-config search path.
Perhaps you should add the directory containing `systemd0.pc'
to the PKG_CONFIG_PATH environment variable
Package 'systemd0', required by 'virtual:world', not found
How can I overcome this configuration issue?