]> git.ipfire.org Git - thirdparty/dracut.git/blobdiff - configure
add support for creating secureboot signed UEFI images
[thirdparty/dracut.git] / configure
index 0bd3d2dc23a8fda72188ddf73b295bba9f8eece8..b55fb6090a90186fcd3f625cf30fd9f59b50b00a 100755 (executable)
--- a/configure
+++ b/configure
@@ -7,6 +7,8 @@ prefix=/usr
 
 enable_documentation=yes
 
+PKG_CONFIG="${PKG_CONFIG:-pkg-config}"
+
 # Little helper function for reading args from the commandline.
 # it automatically handles -a b and -a=b variants, and returns 1 if
 # we need to shift $3.
@@ -50,6 +52,11 @@ while (($# > 0)); do
     shift
 done
 
+if ! ${PKG_CONFIG} --exists --print-errors " libkmod >= 23 "; then
+    echo "dracut needs pkg-config and libkmod >= 23." >&2
+    exit 1
+fi
+
 cat > Makefile.inc.$$ <<EOF
 prefix ?= ${prefix}
 libdir ?= ${libdir:-${prefix}/lib}
@@ -59,6 +66,8 @@ sbindir ?= ${sbindir:-${prefix}/sbin}
 mandir ?= ${mandir:-${prefix}/share/man}
 enable_documentation ?= ${enable_documentation:-yes}
 bindir ?= ${bindir:-${prefix}/bin}
+KMOD_CFLAGS ?= $(${PKG_CONFIG} --cflags " libkmod >= 23 ")
+KMOD_LIBS ?= $(${PKG_CONFIG} --libs " libkmod >= 23 ")
 EOF
 
 {