configure: Use /usr/src/fio as a default location for the fio repo

This allows to run ./configure with plain --with-fio argument
depending on its default CONFIG value.

Change-Id: Icb3facc5a07d38030cda836ec49a54fe9535de71
Signed-off-by: Michal Berger <michalx.berger@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1105
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
This commit is contained in:
Michal Berger 2020-03-02 20:32:59 +01:00 committed by Tomasz Zawadzki
parent 631bdfe0f2
commit c3329b52a0

19
configure vendored
View File

@ -55,7 +55,7 @@ function usage()
echo " crypto Build vbdev crypto module." echo " crypto Build vbdev crypto module."
echo " No path required." echo " No path required."
echo " fio Build fio_plugin." echo " fio Build fio_plugin."
echo " example: /usr/src/fio" echo " default: /usr/src/fio"
echo " vhost Build vhost target. Enabled by default." echo " vhost Build vhost target. Enabled by default."
echo " No path required." echo " No path required."
echo " internal-vhost-lib Use the internal copy of rte_vhost. By default, the upstream" echo " internal-vhost-lib Use the internal copy of rte_vhost. By default, the upstream"
@ -363,13 +363,15 @@ for i in "$@"; do
--without-vpp) --without-vpp)
CONFIG[VPP]=n CONFIG[VPP]=n
;; ;;
--with-fio) ;&
--with-fio=*) --with-fio=*)
check_dir "$i" if [[ ${i#*=} != "$i" ]]; then
CONFIG[FIO_SOURCE_DIR]="${i#*=}" CONFIG[FIO_SOURCE_DIR]=$(readlink -f "${i#*=}")
fi
check_dir "--with-fio=${CONFIG[FIO_SOURCE_DIR]}"
CONFIG[FIO_PLUGIN]=y CONFIG[FIO_PLUGIN]=y
;; ;;
--without-fio) --without-fio)
CONFIG[FIO_SOURCE_DIR]=
CONFIG[FIO_PLUGIN]=n CONFIG[FIO_PLUGIN]=n
;; ;;
--with-vtune=*) --with-vtune=*)
@ -521,15 +523,6 @@ else
CONFIG[VIRTIO]="n" CONFIG[VIRTIO]="n"
fi fi
if [ "${CONFIG[FIO_PLUGIN]}" = "y" ]; then
if [ -z "${CONFIG[FIO_SOURCE_DIR]}" ]; then
echo "When fio is enabled, you must specify the fio directory using --with-fio=path"
exit 1
fi
else
CONFIG[FIO_SOURCE_DIR]=
fi
if [ "${CONFIG[VTUNE]}" = "y" ]; then if [ "${CONFIG[VTUNE]}" = "y" ]; then
if [ -z "${CONFIG[VTUNE_DIR]}" ]; then if [ -z "${CONFIG[VTUNE_DIR]}" ]; then
echo "When VTune is enabled, you must specify the VTune directory using --with-vtune=path" echo "When VTune is enabled, you must specify the VTune directory using --with-vtune=path"