kmod: fix --enable-static

This commit is contained in:
Alexander Bantyev 2019-11-08 21:14:31 +03:00
parent 3df718e7c3
commit 8983cac44c
No known key found for this signature in database
GPG key ID: E081FF12ADCB4AD5
2 changed files with 17 additions and 3 deletions

View file

@ -1,5 +1,6 @@
{ stdenv, lib, fetchurl, autoreconfHook, pkgconfig
, libxslt, xz, elf-header }:
, libxslt, xz, elf-header
, withStatic ? false }:
let
systems = [ "/run/current-system/kernel-modules" "/run/booted-system/kernel-modules" "" ];
@ -21,10 +22,11 @@ in stdenv.mkDerivation rec {
"--sysconfdir=/etc"
"--with-xz"
"--with-modulesdirs=${modulesDirs}"
];
] ++ lib.optional withStatic "--enable-static";
patches = [ ./module-dir.patch ]
++ lib.optional stdenv.isDarwin ./darwin.patch;
++ lib.optional stdenv.isDarwin ./darwin.patch
++ lib.optional withStatic ./enable-static.patch;
postInstall = ''
for prog in rmmod insmod lsmod modinfo modprobe depmod; do

View file

@ -0,0 +1,12 @@
diff --git a/configure.ac b/configure.ac
index ee72283..b42c42a 100644
--- a/configure.ac
+++ b/configure.ac
@@ -19,7 +19,6 @@ AM_SILENT_RULES([yes])
LT_INIT([disable-static pic-only])
DOLT
-AS_IF([test "x$enable_static" = "xyes"], [AC_MSG_ERROR([--enable-static is not supported by kmod])])
AS_IF([test "x$enable_largefile" = "xno"], [AC_MSG_ERROR([--disable-largefile is not supported by kmod])])
#####################################################################