configure: don't silently disable systemd support
PATCH v2 1/1 configure: don't silently disable systemd support
Originally when user runs ./configure --enable-systemd and systemd development library is not available the build system silently disables systemd support. This is not in line with normal expectation.
Instead, configure should error out when user has asked for systemd support but development libraries can't be found.
---
v2: invert the test to check for explicit "yes" value.
Please rerun ./autogen.sh.
--- m4/systemd.m4 | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-)
m4/systemd.m4 +5 -1
@@ -85,7 +85,11 @@ AC_DEFUN([AX_CHECK_SYSTEMD], [ AC_DEFINE([HAVE_SYSTEMD], [1], [Systemd available and enabled]) systemd=y AX_CHECK_SYSTEMD_LIBS() - ],[systemd=n]) + ],[ + AS_IF([test "x$enable_systemd" = "xyes"], + [AC_MSG_ERROR([Unable to find systemd development library])], + [systemd=n]) + ]) ],[systemd=n]) ])
Signature · 1 line
2.1.4
Quoted 9 lines · Wei Liu
Originally when user runs ./configure --enable-systemd and systemd development library is not available the build system silently disables systemd support. This is not in line with normal expectation.
Instead, configure should error out when user has asked for systemd support but development libraries can't be found.
Reported-by George Dunlap <[email protected]>Signed-off-by Wei Liu <[email protected]>
Acked + applied to staging + staging-4.6
Quoted 27 lines
---
v2: invert the test to check for explicit "yes" value.Please rerun ./autogen.sh.
--- m4/systemd.m4 | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-)m4/systemd.m4 +5
-1@@ -85,7 +85,11 @@ AC_DEFUN([AX_CHECK_SYSTEMD], [ AC_DEFINE([HAVE_SYSTEMD], [1], [Systemd available and enabled]) systemd=y AX_CHECK_SYSTEMD_LIBS() - ],[systemd=n]) + ],[ + AS_IF([test "x$enable_systemd" = "xyes"], + [AC_MSG_ERROR([Unable to find systemd development library])], + [systemd=n]) + ]) ],[systemd=n])])
Ian Campbell writes ("Re: [PATCH for 4.6 v2] configure: don't silently disable systemd support"):
Quoted 5 lines · Wei Liu
Quoted 4 lines
Originally when user runs ./configure --enable-systemd and systemd development library is not available the build system silently disables systemd support. This is not in line with normal expectation.
Quoted 7 lines
Quoted 5 lines
Instead, configure should error out when user has asked for systemd support but development libraries can't be found.
Reported-by George Dunlap <[email protected]>Signed-off-by Wei Liu <[email protected]>Acked + applied to staging + staging-4.6
FTR:
I do not think this is a good backport candidate. Changes to the behaviour of build configuration machinery are a bad idea in stable branches.
(AFAIK no-one has requested a backport of this but I thought I should make a note of my thoughts.)
Ian.