configure: only check for kernel headers when no kernel source

configure should not fail if kernel devel package is missing
when user is calling configure with explicit path to kernel source
(specified via KELRNEL_DIR environment variable).

Signed-off-by: Adam Rutkowski <adam.j.rutkowski@intel.com>
This commit is contained in:
Adam Rutkowski 2020-11-16 17:47:50 -06:00
parent 2f6a29b611
commit 02ffc075e4

2
configure vendored
View File

@ -42,7 +42,7 @@ if [ "$SUBMODULES_MISSING" ]; then
MISSING_TOOLS=1 MISSING_TOOLS=1
fi fi
if [ ! -e /lib/modules/$(uname -r)/build/ &> /dev/null ] if [ ! -e /lib/modules/$(uname -r)/build/ &> /dev/null ] && [ "$KERNEL_DIR" == "" ]
then then
echo >&2 "Error: missing kernel headers and/or kernel devel" echo >&2 "Error: missing kernel headers and/or kernel devel"
MISSING_TOOLS=1 MISSING_TOOLS=1