configure: don't silently disable systemd support
PATCH 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.
---
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" != "x"], + [AC_MSG_ERROR([Unable to find systemd development library])], + [systemd=n]) + ]) ],[systemd=n]) ])
Signature · 1 line
2.1.4
Quoted 20 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]>---
Please rerun ./autogen.sh.--- m4/systemd.m4 | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-)m4/systemd.m4 +0
-0
m4/systemd.m4 AC_DEFUN([AX_CHECK_SYSTEMD], [ · line 90
Quoted 7 lines
m4/systemd.m4 +2
-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" != "x"],
At this point the value of enable_systemd is either empty or ...what...? I think "yes"?, with "no" having been ruled out earlier?
Or can it be just "y"?
I could live with this version, but I think it would be less of a brain ben der if the check was inverted to be "x$enable_systemd" = "xyes" i.e. more explicit.
Ian.
Quoted 32 lines · Ian Campbell
Quoted 20 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]>---
Please rerun ./autogen.sh.--- m4/systemd.m4 | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-)m4/systemd.m4 +0
-0m4/systemd.m4 AC_DEFUN([AX_CHECK_SYSTEMD], [ · line 90
Quoted 7 lines
m4/systemd.m4 +2
-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" != "x"],At this point the value of
enable_systemdis either empty or ...what...? I think "yes"?, with "no" having been ruled out earlier?
Quoted 2 lines
Or can it be just "y"?
At this point, it can't be no. It's either empty or "yes" (or "y"?). I printed it out when I wrote this patch but could remember exactly what it was.
Quoted 4 lines
I could live with this version, but I think it would be less of a brain ben der if the check was inverted to be "x$enable_systemd" = "xyes" i.e. more explicit.
I can do that as well. V2 coming soon.
Wei.
Quoted 1 line
Ian.
Quoted 33 lines · Wei Liu
Quoted 32 lines · Ian Campbell
Quoted 20 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]>---
Please rerun ./autogen.sh.--- m4/systemd.m4 | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-)m4/systemd.m4 +0
-0m4/systemd.m4 AC_DEFUN([AX_CHECK_SYSTEMD], [ · line 90
Quoted 7 lines
m4/systemd.m4 +2
-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" != "x"],At this point the value of
enable_systemdis either empty or ...what...? I think "yes"?, with "no" having been ruled out earlier?
Quoted 4 lines
Quoted 2 lines
Or can it be just "y"?
At this point, it can't be no. It's either empty or "yes" (or "y"?). I
For the record, it was "yes".