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 SPL_VERSION=$(dkms status -m spl -k $3 -a $5 | awk -F', ' '{print $2; exit 0}' | grep -v ': added$')
23 if [ -z $SPL_VERSION ] ; then
24 echo "spl-dkms package must already be installed and built under DKMS control"
27 ZFS_VERSION=$(dkms status -m zfs -k $3 -a $5 | awk -F', ' '{print $2; exit 0}' | grep -v ': added$')
28 if [ -z $ZFS_VERSION ] ; then
29 echo "zfs-dkms package must already be installed and built under DKMS control"
33 SERVER="--enable-server $LDISKFS \
34 --with-linux=$4 --with-linux-obj=$4 \
35 --with-spl=$6/spl-${SPL_VERSION} \
36 --with-spl-obj=$7/spl/${SPL_VERSION}/$3/$5 \
37 --with-zfs=$6/zfs-${ZFS_VERSION} \
38 --with-zfs-obj=$7/zfs/${ZFS_VERSION}/$3/$5"
40 KERNEL_STUFF="--with-linux=$4 --with-linux-obj=$4"
44 SERVER="--enable-server --without-zfs --without-spl \
45 --with-linux=$4 --with-linux-obj=$4"
47 KERNEL_STUFF="--with-linux=$4 --with-linux-obj=$4"
51 PACKAGE_CONFIG="/etc/sysconfig/lustre"
53 [[ -r ${PACKAGE_CONFIG} ]] \
54 && source ${PACKAGE_CONFIG} \
55 && shopt -q -s extglob \
58 if [[ ${LUSTRE_DKMS_DISABLE_CDEBUG,,} == @(y|yes) ]]
60 echo --disable-libcfs-cdebug
62 if [[ ${LUSTRE_DKMS_DISABLE_TRACE,,} == @(y|yes) ]]
64 echo --disable-libcfs-trace
66 if [[ ${LUSTRE_DKMS_DISABLE_ASSERT,,} == @(y|yes) ]]
68 echo --disable-libcfs-assert
73 rpm -qa | grep krb5-devel >/dev/null
80 # run a configure pass to clean "--enable-dist" only effect and also to
81 # ensure local/on-target environment to be taken into account for
82 # dkms.mkconf script customizations and before next build/MAKE step
83 ./configure --prefix=/usr --enable-modules --disable-iokit --disable-snmp \
84 --disable-doc --disable-utils --disable-tests --disable-maintainer-mode \
85 $KERNEL_STUFF $GSS $SERVER $DKMS_CONFIG_OPTS \
86 --disable-manpages --disable-mpitests
89 echo "configure error, check $7/$1/$2/build/config.log"