From 210ef327ce61a5d9efc6a1f2b10406dfb27e531f Mon Sep 17 00:00:00 2001 From: Alberto Fanjul Date: Sun, 2 Jun 2024 02:19:24 +0200 Subject: [PATCH] Configure usage of systemd or elogind --- configure.ac | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/configure.ac b/configure.ac index 6cc2870..a93c08c 100644 --- a/configure.ac +++ b/configure.ac @@ -45,8 +45,15 @@ AC_ARG_VAR(IP_BINARY, [Path for ip binary]) if test -z "$IP_BINARY"; then IP_BINARY=/bin/ip fi -AC_ARG_ENABLE([disable-systemd], - AS_HELP_STRING([--disable-systemd], [Disable systemd]), [], [use_libsystemd=yes], [Disable systemd using elogind]) +AC_ARG_ENABLE([systemd], + AS_HELP_STRING([--disable-systemd], [Disable systemd]), + [case "${enableval}" in + yes) use_libsystemd=yes ;; + no) use_libsystemd=no ;; + *) AC_MSG_ERROR([bad value ${enableval} for --enable-systemd]) ;; + esac], + [use_libsystemd=yes]) + AC_DEFINE_UNQUOTED([IP_BINARY], [$IP_BINARY], [Path for ip binary]) #