mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2024-12-26 19:19:32 +03:00
When no kernel source has been pointed to, first attempt to use
/lib/modules/$(uname -r)/source. This will likely fail when building under a mock (http://fedoraproject.org/wiki/Projects/Mock) chroot environment since `uname -r` will report the running kernel which likely is not the kernel in your chroot. To cleanly handle this we fallback to using the first kernel in your chroot. The kernel-devel package which contains all the kernel headers and a few build products such as Module.symver{s} is all the is required. Full source is not needed.
This commit is contained in:
parent
21006d08af
commit
534c4e38cb
@ -104,8 +104,14 @@ AC_DEFUN([SPL_AC_KERNEL], [
|
||||
|
||||
AC_MSG_CHECKING([kernel source directory])
|
||||
if test -z "$kernelsrc"; then
|
||||
sourcelink=`ls -1d /usr/src/kernels/* /usr/src/linux-* \
|
||||
2>/dev/null | grep -v obj | tail -1`
|
||||
headersdir="/lib/modules/$(uname -r)/build"
|
||||
if test -e "$headersdir"; then
|
||||
sourcelink=$(readlink -f "$headersdir")
|
||||
else
|
||||
sourcelink=$(ls -1d /usr/src/kernels/* \
|
||||
/usr/src/linux-* \
|
||||
2>/dev/null | grep -v obj | tail -1)
|
||||
fi
|
||||
|
||||
if test -e ${sourcelink}; then
|
||||
kernelsrc=`readlink -f ${sourcelink}`
|
||||
|
20
configure
vendored
20
configure
vendored
@ -18971,8 +18971,14 @@ fi;
|
||||
echo "$as_me:$LINENO: checking kernel source directory" >&5
|
||||
echo $ECHO_N "checking kernel source directory... $ECHO_C" >&6
|
||||
if test -z "$kernelsrc"; then
|
||||
sourcelink=`ls -1d /usr/src/kernels/* /usr/src/linux-* \
|
||||
2>/dev/null | grep -v obj | tail -1`
|
||||
headersdir="/lib/modules/$(uname -r)/build"
|
||||
if test -e "$headersdir"; then
|
||||
sourcelink=$(readlink -f "$headersdir")
|
||||
else
|
||||
sourcelink=$(ls -1d /usr/src/kernels/* \
|
||||
/usr/src/linux-* \
|
||||
2>/dev/null | grep -v obj | tail -1)
|
||||
fi
|
||||
|
||||
if test -e ${sourcelink}; then
|
||||
kernelsrc=`readlink -f ${sourcelink}`
|
||||
@ -22317,8 +22323,14 @@ fi;
|
||||
echo "$as_me:$LINENO: checking kernel source directory" >&5
|
||||
echo $ECHO_N "checking kernel source directory... $ECHO_C" >&6
|
||||
if test -z "$kernelsrc"; then
|
||||
sourcelink=`ls -1d /usr/src/kernels/* /usr/src/linux-* \
|
||||
2>/dev/null | grep -v obj | tail -1`
|
||||
headersdir="/lib/modules/$(uname -r)/build"
|
||||
if test -e "$headersdir"; then
|
||||
sourcelink=$(readlink -f "$headersdir")
|
||||
else
|
||||
sourcelink=$(ls -1d /usr/src/kernels/* \
|
||||
/usr/src/linux-* \
|
||||
2>/dev/null | grep -v obj | tail -1)
|
||||
fi
|
||||
|
||||
if test -e ${sourcelink}; then
|
||||
kernelsrc=`readlink -f ${sourcelink}`
|
||||
|
Loading…
Reference in New Issue
Block a user