Fix configure --with-systemd-modules-load=DIR
PATCH 1/1 Fix configure --with-systemd-modules-load=DIR
Currently --with-systemd=DIR1 --with-systemd-modules-load=DIR2 will set both XEN_SYSTEMD_DIR and XEN_SYSTEMD_MODULES_LOAD to DIR1. The reason is that both AC_ARG_WITH() use 'systemd' as the name for the internal variable. As a result the value of the first option is also use as the value for the second option. Fix this by using another variable name.
Please rerun autogen.sh after applying this patch.
--- m4/systemd.m4 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
m4/systemd.m4 +1 -1
@@ -24,7 +24,7 @@ AC_DEFUN([AX_SYSTEMD_OPTIONS], [ [SYSTEMD_DIR="$withval"],[SYSTEMD_DIR=""]) AC_SUBST(SYSTEMD_DIR) - AC_ARG_WITH(systemd, + AC_ARG_WITH(systemd_modules_load, AS_HELP_STRING([--with-systemd-modules-load=DIR], [set directory for systemd modules load files [PREFIX/lib/modules-load.d/]]), [SYSTEMD_MODULES_LOAD="$withval"], [SYSTEMD_MODULES_LOAD=""])
Olaf Hering writes ("[PATCH for-xen-4.5] Fix configure --with-systemd-modules-load=DIR"):
Quoted 5 lines
Currently --with-systemd=DIR1 --with-systemd-modules-load=DIR2 will set both
XEN_SYSTEMD_DIRandXEN_SYSTEMD_MODULES_LOADto DIR1. The reason is that bothAC_ARG_WITH()use 'systemd' as the name for the internal variable. As a result the value of the first option is also use as the value for the second option. Fix this by using another variable name.
...
m4/systemd.m4 AC_DEFUN([AX_SYSTEMD_OPTIONS], [ · line 27
Quoted 2 lines
m4/systemd.m4 +1
-1- AC_ARG_WITH(systemd, + AC_ARG_WITH(systemd_modules_load,
AFAICT this changes the command line option. I don't understand how --with-systemd-modules-load worked at all before this.
Also I think PACKAGE in AC_ARG_WITH should have hyphens, not underscores.
Ian.
Quoted 6 lines · Ian Jackson
Olaf Hering writes ("[PATCH for-xen-4.5] Fix configure --with-systemd-modules-load=DIR"):
Quoted 5 lines
Currently --with-systemd=DIR1 --with-systemd-modules-load=DIR2 will set both
XEN_SYSTEMD_DIRandXEN_SYSTEMD_MODULES_LOADto DIR1. The reason is that bothAC_ARG_WITH()use 'systemd' as the name for the internal variable. As a result the value of the first option is also use as the value for the second option. Fix this by using another variable name.
Quoted 6 lines
...
m4/systemd.m4 AC_DEFUN([AX_SYSTEMD_OPTIONS], [ · line 27
Quoted 2 lines
m4/systemd.m4 +1
-1- AC_ARG_WITH(systemd, + AC_ARG_WITH(systemd_modules_load,AFAICT this changes the command line option. I don't understand how --with-systemd-modules-load worked at all before this.
It did not, at least I was able to change the variable to the desired value. But you are right, sysconfig-leaf-dir in another file does not have underscores. Do you want me to resend, or will you fix it up manually to systemd-modules-load once you merge it?
Olaf
Quoted 15 lines · Olaf Hering
Quoted 6 lines · Ian Jackson
Olaf Hering writes ("[PATCH for-xen-4.5] Fix configure --with-systemd-modules-load=DIR"):
Quoted 5 lines
Currently --with-systemd=DIR1 --with-systemd-modules-load=DIR2 will set both
XEN_SYSTEMD_DIRandXEN_SYSTEMD_MODULES_LOADto DIR1. The reason is that bothAC_ARG_WITH()use 'systemd' as the name for the internal variable. As a result the value of the first option is also use as the value for the second option. Fix this by using another variable name.Quoted 6 lines
...
m4/systemd.m4 AC_DEFUN([AX_SYSTEMD_OPTIONS], [ · line 27
Quoted 2 lines
m4/systemd.m4 +1
-1- AC_ARG_WITH(systemd, + AC_ARG_WITH(systemd_modules_load,AFAICT this changes the command line option. I don't understand how --with-systemd-modules-load worked at all before this.
Quoted 4 lines
It did not, at least I was able to change the variable to the desired value. But you are right, sysconfig-leaf-dir in another file does not have underscores. Do you want me to resend, or will you fix it up manually to systemd-modules-load once you merge it?
Best to have a new patch for something not related to this one please.
Ian
Olaf Hering writes ("Re: [PATCH for-xen-4.5] Fix configure --with-systemd-modules-load=DIR"):
Quoted 8 lines · Ian Jackson
Quoted 2 lines
AFAICT this changes the command line option. I don't understand how --with-systemd-modules-load worked at all before this.
It did not, at least I was able to change the variable to the desired value. But you are right, sysconfig-leaf-dir in another file does not have underscores. Do you want me to resend, or will you fix it up manually to systemd-modules-load once you merge it?
Please resend.
Thanks,
Ian.