configure: handle the assignment of non-existent and specified DIR
Change-Id: I13e270cb12c8f2796928c72338e50d30b5c8b08e Signed-off-by: GangCao <gang.cao@intel.com> Reviewed-on: https://review.gerrithub.io/403260 Tested-by: SPDK Automated Test System <sys_sgsw@intel.com> Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com> Reviewed-by: Jim Harris <james.r.harris@intel.com>
This commit is contained in:
parent
7f2ff992ee
commit
1723a800cf
13
configure
vendored
13
configure
vendored
@ -47,6 +47,15 @@ function usage()
|
|||||||
echo ""
|
echo ""
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function check_dir() {
|
||||||
|
arg="$1"
|
||||||
|
dir="${arg#*=}"
|
||||||
|
if [ ! -d "$dir" ]; then
|
||||||
|
echo "$arg: directory not found"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
for i in "$@"; do
|
for i in "$@"; do
|
||||||
case "$i" in
|
case "$i" in
|
||||||
-h|--help)
|
-h|--help)
|
||||||
@ -114,6 +123,7 @@ for i in "$@"; do
|
|||||||
CONFIG_RDMA=n
|
CONFIG_RDMA=n
|
||||||
;;
|
;;
|
||||||
--with-dpdk=*)
|
--with-dpdk=*)
|
||||||
|
check_dir "$i"
|
||||||
CONFIG_DPDK_DIR=$(readlink -f ${i#*=})
|
CONFIG_DPDK_DIR=$(readlink -f ${i#*=})
|
||||||
;;
|
;;
|
||||||
--without-dpdk)
|
--without-dpdk)
|
||||||
@ -130,12 +140,14 @@ for i in "$@"; do
|
|||||||
;;
|
;;
|
||||||
--with-nvml=*)
|
--with-nvml=*)
|
||||||
CONFIG_NVML=y
|
CONFIG_NVML=y
|
||||||
|
check_dir "$i"
|
||||||
CONFIG_NVML_DIR=$(readlink -f ${i#*=})
|
CONFIG_NVML_DIR=$(readlink -f ${i#*=})
|
||||||
;;
|
;;
|
||||||
--without-nvml)
|
--without-nvml)
|
||||||
CONFIG_NVML=n
|
CONFIG_NVML=n
|
||||||
;;
|
;;
|
||||||
--with-fio=*)
|
--with-fio=*)
|
||||||
|
check_dir "$i"
|
||||||
FIO_SOURCE_DIR="${i#*=}"
|
FIO_SOURCE_DIR="${i#*=}"
|
||||||
CONFIG_FIO_PLUGIN=y
|
CONFIG_FIO_PLUGIN=y
|
||||||
;;
|
;;
|
||||||
@ -144,6 +156,7 @@ for i in "$@"; do
|
|||||||
CONFIG_FIO_PLUGIN=n
|
CONFIG_FIO_PLUGIN=n
|
||||||
;;
|
;;
|
||||||
--with-vtune=*)
|
--with-vtune=*)
|
||||||
|
check_dir "$i"
|
||||||
VTUNE_SOURCE_DIR="${i#*=}"
|
VTUNE_SOURCE_DIR="${i#*=}"
|
||||||
CONFIG_VTUNE=y
|
CONFIG_VTUNE=y
|
||||||
;;
|
;;
|
||||||
|
Loading…
Reference in New Issue
Block a user