Debian seems to prefer /lib/modprobe.d - at lease sometimes. So allow ./configure --with-modprobedir=/lib/modprobe.d to work, but default to /usr/lib/modprobe.d Signed-off-by: NeilBrown <neilb@xxxxxxx> --- configure.ac | 12 ++++++++++++ systemd/Makefile.am | 6 ++++-- 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/configure.ac b/configure.ac index a13f36915a35..4403335bcaa9 100644 --- a/configure.ac +++ b/configure.ac @@ -71,6 +71,18 @@ AC_ARG_WITH(systemd, AM_CONDITIONAL(INSTALL_SYSTEMD, [test "$use_systemd" = 1]) AC_SUBST(unitdir) +modprobedir=/usr/lib/modprobe.d +AC_ARG_WITH(modprobedir, + [AS_HELP_STRING([--with-modprobedir@<:@=modprobe-dir-path@:>@],[install modprobe config files @<:@Default: /usr/lib/modprobe.d@:>@])], + if test "$withval" != "no" ; then + modprobedir=$withval + else + modprobedir= + fi + ) + AM_CONDITIONAL(INSTALL_MODPROBEDIR, [test -n "$modprobedir"]) + AC_SUBST(modprobedir) + AC_ARG_ENABLE(nfsv4, [AS_HELP_STRING([--disable-nfsv4],[disable support for NFSv4 @<:@default=no@:>@])], enable_nfsv4=$enableval, diff --git a/systemd/Makefile.am b/systemd/Makefile.am index 63a50bf2c07e..7b5ab84bd793 100644 --- a/systemd/Makefile.am +++ b/systemd/Makefile.am @@ -82,5 +82,7 @@ install-data-hook: $(unit_files) $(modprobe_files) else install-data-hook: $(modprobe_files) endif - mkdir -p $(DESTDIR)/usr/lib/modprobe.d - cp $(modprobe_files) $(DESTDIR)/usr/lib/modprobe.d/ +if INSTALL_MODPROBEDIR + mkdir -p $(DESTDIR)$(modprobedir) + cp $(modprobe_files) $(DESTDIR)$(modprobedir) +endif -- 2.36.1