readutmp: Fix naming of configure option

Bruno Haible via Gnulib discussion list <[email protected]>
Newsgroups gmane.comp.lib.gnulib.bugs
Message-ID <11529038.0AQdONaE2F@cagnes>
The configure option '--enable-systemd' is a misnomer, as can be seen from
the GNU Coding Standards
  https://www.gnu.org/prep/standards/html_node/Configuration.html
and from the Autoconf manual
  https://www.gnu.org/savannah-checkouts/gnu/autoconf/manual/autoconf-2.73/html_node/Optional-Features.html
  https://www.gnu.org/savannah-checkouts/gnu/autoconf/manual/autoconf-2.73/html_node/Package-Options.html
  https://www.gnu.org/savannah-checkouts/gnu/autoconf/manual/autoconf-2.73/html_node/External-Software.html

This patch renames it to '--with-systemd'.

Pàdraig, find attached a proposed patch for coreutils, accordingly.


2026-08-04  Bruno Haible  <[email protected]>

	readutmp: Fix naming of configure option.
	* m4/systemd.m4 (gl_SYSTEMD_CHOICE): Invoke AC_ARG_WITH. Mark
	--enable-systemd as deprecated.

diff --git a/m4/systemd.m4 b/m4/systemd.m4
index dfb74e60fd..a4ed4b1fa7 100644
--- a/m4/systemd.m4
+++ b/m4/systemd.m4
@@ -1,5 +1,5 @@
 # systemd.m4
-# serial 3
+# serial 4
 dnl Copyright (C) 2023-2026 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -11,10 +11,18 @@
 AC_DEFUN([gl_SYSTEMD_CHOICE],
 [
   AC_MSG_CHECKING([whether to use systemd APIs])
+  SYSTEMD_CHOICE=
   AC_ARG_ENABLE([systemd],
-    [  --enable-systemd        use systemd APIs],
+    [  --enable-systemd        same as --with-systemd, deprecated],
     [SYSTEMD_CHOICE="$enableval"],
-    [SYSTEMD_CHOICE=no])
+    [])
+  AC_ARG_WITH([systemd],
+    [  --with-systemd          use systemd APIs],
+    [SYSTEMD_CHOICE="$withval"],
+    [])
+  if test -z "$SYSTEMD_CHOICE"; then
+    SYSTEMD_CHOICE=no
+  fi
   AC_MSG_RESULT([$SYSTEMD_CHOICE])
   AC_SUBST([SYSTEMD_CHOICE])
 ])
0001-maint-Document-change-from-enable-systemd-to-with-sy.patch (text/x-patch, 1.4 KB)
From 8c57ac15059eabea809137d31214b1f88fc22075 Mon Sep 17 00:00:00 2001
From: Bruno Haible <[email protected]>
Date: Tue, 4 Aug 2026 16:24:11 +0200
Subject: [PATCH] maint: Document change from --enable-systemd to
 --with-systemd

* DEPENDENCIES: Mention --with-systemd, not --enable-systemd.
* NEWS: Mention the change.
---
 DEPENDENCIES | 2 +-
 NEWS         | 4 ++++
 2 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/DEPENDENCIES b/DEPENDENCIES
index 375b08d20..b501ffe4a 100644
--- a/DEPENDENCIES
+++ b/DEPENDENCIES
@@ -5,7 +5,7 @@
     Needed for the multi-user programs ('who', 'users', 'pinky', and
     - if built - 'uptime'), so that they can access the database of
     user logins from systemd-logind.
-    Related 'configure' option: --enable-systemd.
+    Related 'configure' option: --with-systemd.
   * Homepage:
     https://systemd.io/
   + Download:
diff --git a/NEWS b/NEWS
index a85b0ada9..ae34bab0d 100644
--- a/NEWS
+++ b/NEWS
@@ -4,6 +4,10 @@ GNU coreutils NEWS                                    -*- outline -*-
 
 ** Bug fixes
 
+  The configure option '--enable-systemd' is renamed to '--with-systemd'.
+  The option '--enable-systemd' was a misnomer and is now deprecated.
+  [bug introduced in coreutils-9.4]
+
   'chcon', 'chgrp', 'chmod', 'chown', 'du', 'ls' which traverse hierarchies with
   -R,  no longer fail merely because files may be being removed in parallel.
   [This bug was present in "the beginning".]
-- 
2.53.0
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.