]> sourceware.org Git - lvm2.git/commitdiff
configure: add --with-modulesdir
authorZdenek Kabelac <zkabelac@redhat.com>
Thu, 8 Feb 2024 13:58:16 +0000 (14:58 +0100)
committerZdenek Kabelac <zkabelac@redhat.com>
Mon, 19 Feb 2024 13:20:39 +0000 (14:20 +0100)
Add configurable path for directory with kernel modules.
Following patch will use this directory to lookup:
/lib/modules/`uname -r`/modules.builtin

WHATS_NEW
configure
configure.ac
include/configure.h.in

index 6503e386e2958b70ab1b08d2e93aa3ec7f096a04..485ef3923e1dbcc83574c6b67fb6f8f6b5bc27c0 100644 (file)
--- a/WHATS_NEW
+++ b/WHATS_NEW
@@ -1,5 +1,6 @@
 Version 2.03.24 - 
 ==================
+  Add configure --with-modulesdir to select kernel modules directory.
   Support creation of thin-pool with VDO use for its data volume.
 
 Version 2.03.23 - 21st November 2023
index 0b8d282477d7a450d4fa5b8cc5ca892fa4014d17..1d6b4132db51ac86ac6b9b3a241bc5a5a50cc819 100755 (executable)
--- a/configure
+++ b/configure
@@ -655,6 +655,7 @@ udev_prefix
 udevdir
 tmpfilesdir
 tmpdir
+modulesdir
 missingkernel
 kernelvsn
 kerneldir
@@ -1009,6 +1010,7 @@ with_udev_prefix
 with_udevdir
 with_systemdsystemunitdir
 with_tmpfilesdir
+with_modulesdir
 with_dmeventd_pidfile
 with_dmeventd_path
 with_dmeventd_exit_on_path
@@ -1820,6 +1822,8 @@ Optional Packages:
   --with-tmpfilesdir=DIR  install configuration files for management of
                           volatile files and directories in DIR
                           [PREFIX/lib/tmpfiles.d]
+  --with-modulesdir=DIR   Dir to look for file `uname -r`/modules.builtin
+                          [/lib/modules]
   --with-dmeventd-pidfile=PATH
                           dmeventd pidfile [PID_DIR/dmeventd.pid]
   --with-dmeventd-path=PATH
@@ -15468,6 +15472,25 @@ else $as_nop
   tmpfilesdir='${prefix}/lib/tmpfiles.d'
 fi
 
+
+################################################################################
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for kernel modules directory" >&5
+printf %s "checking for kernel modules directory... " >&6; }
+
+# Check whether --with-modulesdir was given.
+if test ${with_modulesdir+y}
+then :
+  withval=$with_modulesdir; modulesdir=$withval
+else $as_nop
+  modulesdir="/lib/modules"
+fi
+
+
+printf "%s\n" "#define MODULES_PATH \"$modulesdir\"" >>confdefs.h
+
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $modulesdir" >&5
+printf "%s\n" "$modulesdir" >&6; }
+
 ################################################################################
 if test "$READLINE" = "yes"
 then :
@@ -16288,6 +16311,7 @@ AIO_LIBS=${AIO_LIBS:--laio}
 
 
 
+
 
 
 ################################################################################
index 2e52498f9c1a4f58c63523bbc044b70cae7c8dc0..4aea6f11992f7af52f8318c0ae7b6b0f5fb265dd 100644 (file)
@@ -1615,6 +1615,17 @@ AC_ARG_WITH(tmpfilesdir,
            AS_HELP_STRING([--with-tmpfilesdir=DIR],
                           [install configuration files for management of volatile files and directories in DIR [PREFIX/lib/tmpfiles.d]]),
                           tmpfilesdir=$withval, tmpfilesdir='${prefix}/lib/tmpfiles.d')
+
+################################################################################
+dnl - Where to look for modules.builtin file for a kernel - most typically in /lib/modules/
+AC_MSG_CHECKING([for kernel modules directory])
+AC_ARG_WITH(modulesdir,
+           AS_HELP_STRING([--with-modulesdir=DIR],
+                          [Dir to look for file `uname -r`/modules.builtin [/lib/modules]]),
+                          [modulesdir=$withval], [modulesdir="/lib/modules"])
+AC_DEFINE_UNQUOTED(MODULES_PATH, ["$modulesdir"], [The path to kernel modules.])
+AC_MSG_RESULT([$modulesdir])
+
 ################################################################################
 dnl -- Ensure additional headers required
 AS_IF([test "$READLINE" = "yes"], [
@@ -1946,6 +1957,7 @@ AC_SUBST(kerneldir)
 AC_SUBST(kernelvsn)
 AC_SUBST(libexecdir)
 AC_SUBST(missingkernel)
+AC_SUBST(modulesdir)
 AC_SUBST(systemdsystemunitdir)
 AC_SUBST(systemdutildir)
 AC_SUBST(tmpdir)
index b14474d14fc327ee0c96e2a7c4a3a4196f0868b9..60bb7b3623b72fe652f00bec17ae2e14ae6afd0b 100644 (file)
 /* The path to 'modprobe', if available. */
 #undef MODPROBE_CMD
 
+/* The path to kernel modules. */
+#undef MODULES_PATH
+
 /* Define to 1 to include code that uses dbus notification. */
 #undef NOTIFYDBUS_SUPPORT
 
This page took 0.051646 seconds and 5 git commands to generate.