Commit c3329b52 authored by Michal Berger's avatar Michal Berger Committed by Tomasz Zawadzki
Browse files

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: default avatarMichal Berger <michalx.berger@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1105


Tested-by: default avatarSPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: default avatarDarek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-by: default avatarBen Walker <benjamin.walker@intel.com>
parent 631bdfe0
Loading
Loading
Loading
Loading
+6 −13
Original line number Diff line number Diff line
@@ -55,7 +55,7 @@ function usage()
	echo " crypto                    Build vbdev crypto module."
	echo "                           No path required."
	echo " fio                       Build fio_plugin."
	echo "                           example: /usr/src/fio"
	echo "                           default: /usr/src/fio"
	echo " vhost                     Build vhost target. Enabled by default."
	echo "                           No path required."
	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)
			CONFIG[VPP]=n
			;;
		--with-fio) ;&
		--with-fio=*)
			check_dir "$i"
			CONFIG[FIO_SOURCE_DIR]="${i#*=}"
			if [[ ${i#*=} != "$i" ]]; then
				CONFIG[FIO_SOURCE_DIR]=$(readlink -f "${i#*=}")
			fi
			check_dir "--with-fio=${CONFIG[FIO_SOURCE_DIR]}"
			CONFIG[FIO_PLUGIN]=y
			;;
		--without-fio)
			CONFIG[FIO_SOURCE_DIR]=
			CONFIG[FIO_PLUGIN]=n
			;;
		--with-vtune=*)
@@ -521,15 +523,6 @@ else
	CONFIG[VIRTIO]="n"
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 [ -z "${CONFIG[VTUNE_DIR]}" ]; then
		echo "When VTune is enabled, you must specify the VTune directory using --with-vtune=path"