diff mbox series

[rpcbind,1/1] configure.ac: Add check for systemd-escape

Message ID 20241114214044.1099257-1-petr.vorel@gmail.com (mailing list archive)
State New
Headers show
Series [rpcbind,1/1] configure.ac: Add check for systemd-escape | expand

Commit Message

Petr Vorel Nov. 14, 2024, 9:40 p.m. UTC
364b7fef added dependency on systemd-escape. Although it's mostly
installed on development machines, there are systems without it.

Warn properly when it is missing, because warning like this can be
easily overlooked:
./configure: line 26206: systemd-escape: command not found

Reported-by: Anssi Hannula <anssi.hannula@bitwise.fi>
Signed-off-by: Petr Vorel <petr.vorel@gmail.com>
---
 configure.ac | 2 ++
 1 file changed, 2 insertions(+)
diff mbox series

Patch

diff --git a/configure.ac b/configure.ac
index 9a8e3ce1..b3eb35b1 100644
--- a/configure.ac
+++ b/configure.ac
@@ -705,6 +705,8 @@  AC_CONFIG_COMMANDS_PRE([eval eval _statedir=$statedir])
 if test "$statedir" = "/var/lib/nfs"; then
 	rpc_pipefsmount="var-lib-nfs-rpc_pipefs.mount"
 else
+	AC_CHECK_PROG(SYSTEMD_ESCAPE, systemd-escape, true)
+	test -z "$SYSTEMD_ESCAPE" && AC_MSG_ERROR([systemd-escape required])
 	rpc_pipefsmount="$(systemd-escape -p "$statedir/rpc_pipefs").mount"
 fi
 AC_SUBST(rpc_pipefsmount)