configure: fail --with-iscsi-initiator if it's not available

Change-Id: If84bc3302c2d44a439a1028edfa0ceeaf3f32260
Signed-off-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/453709
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
This commit is contained in:
Darek Stojaczyk 2019-05-07 18:55:00 +02:00 committed by Jim Harris
parent 55bd0d3afc
commit 5cb1804002

15
configure vendored
View File

@ -505,6 +505,21 @@ if [[ "${CONFIG[RBD]}" = "y" ]]; then
fi
fi
if [[ "${CONFIG[ISCSI_INITIATOR]}" = "y" ]]; then
# Fedora installs libiscsi to /usr/lib64/iscsi for some reason.
if ! echo -e '#include <iscsi/iscsi.h>\n#include <iscsi/scsi-lowlevel.h>\n' \
'#if LIBISCSI_API_VERSION < 20150621\n' \
'#error\n' \
'#endif\n' \
'int main(void) { return 0; }\n' \
| $BUILD_CMD -L/usr/lib64/iscsi -liscsi - 2>/dev/null; then
echo --with-iscsi-initiator requires libiscsi with
echo 'LIBISCSI_API_VERSION >= 20150621.'
echo Please install then re-run this script.
exit 1
fi
fi
if [[ "${CONFIG[OCF]}" = "y" ]]; then
# If OCF_PATH is a file, assume it is a library and use it to compile with
if [ -f ${CONFIG[OCF_PATH]} ]; then