5 # $4 : $kernel_source_dir
12 SERVER="--disable-server"
16 lustre-zfs|lustre-all)
18 if [ "$1" == "lustre-zfs" ]; then
19 LDISKFS="--disable-ldiskfs"
22 # ZFS and SPL are version locked
23 ZFS_VERSION=$(dkms status -m zfs -k $3 -a $5 | awk -F', ' '{print $2; exit 0}' | grep -v ': added$')
24 if [ -z $ZFS_VERSION ] ; then
25 echo "zfs-dkms package must already be installed and built under DKMS control"
29 SERVER="--enable-server $LDISKFS \
30 --with-linux=$4 --with-linux-obj=$4 \
31 --with-spl=$6/spl-${ZFS_VERSION} \
32 --with-spl-obj=$7/spl/${ZFS_VERSION}/$3/$5 \
33 --with-zfs=$6/zfs-${ZFS_VERSION} \
34 --with-zfs-obj=$7/zfs/${ZFS_VERSION}/$3/$5"
36 KERNEL_STUFF="--with-linux=$4 --with-linux-obj=$4"
40 SERVER="--enable-server --without-zfs --without-spl \
41 --with-linux=$4 --with-linux-obj=$4"
43 KERNEL_STUFF="--with-linux=$4 --with-linux-obj=$4"
47 PACKAGE_CONFIG="/etc/sysconfig/lustre"
49 [[ -r ${PACKAGE_CONFIG} ]] \
50 && source ${PACKAGE_CONFIG} \
51 && shopt -q -s extglob \
54 if [[ ${LUSTRE_DKMS_DISABLE_CDEBUG,,} == @(y|yes) ]]
56 echo --disable-libcfs-cdebug
58 if [[ ${LUSTRE_DKMS_DISABLE_TRACE,,} == @(y|yes) ]]
60 echo --disable-libcfs-trace
62 if [[ ${LUSTRE_DKMS_DISABLE_ASSERT,,} == @(y|yes) ]]
64 echo --disable-libcfs-assert
69 rpm -qa | grep krb5-devel >/dev/null
76 # run a configure pass to clean "--enable-dist" only effect and also to
77 # ensure local/on-target environment to be taken into account for
78 # dkms.mkconf script customizations and before next build/MAKE step
79 ./configure --prefix=/usr --enable-modules --disable-iokit --disable-snmp \
80 --disable-doc --disable-utils --disable-tests --disable-maintainer-mode \
81 $KERNEL_STUFF $GSS $SERVER $DKMS_CONFIG_OPTS \
82 --disable-manpages --disable-mpitests
85 echo "configure error, check $7/$1/$2/build/config.log"