summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNeilBrown <neilb@suse.de>2022-06-27 10:31:17 -0400
committerSteve Dickson <steved@redhat.com>2022-06-27 10:33:03 -0400
commit7d76dd2e6f09a141eb6303b7343baa5c4f9c85ad (patch)
tree0b13b7ba8830e9633f2dd748d6059b271cd8f4a3
parent5e60e38aa4ba251ef66610514be5f45c41519e0f (diff)
downloadnfs-utils-7d76dd2e6f09a141eb6303b7343baa5c4f9c85ad.tar.gz
configure: make modprobe.d directory configurable.nfs-utils-2-6-2-rc8
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@suse.de> Signed-off-by: Steve Dickson <steved@redhat.com>
-rw-r--r--configure.ac12
-rw-r--r--systemd/Makefile.am6
2 files changed, 16 insertions, 2 deletions
diff --git a/configure.ac b/configure.ac
index a13f369..4403335 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 63a50bf..7b5ab84 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