Commit e5629657 authored by Giovanni La Mura's avatar Giovanni La Mura
Browse files

Fix configure argument parsing and openpm options

parent 4728e2aa
Loading
Loading
Loading
Loading
+6 −6
Original line number Diff line number Diff line
@@ -76,11 +76,11 @@ function print_help {
    echo "--disble-gdb              Disable GNU debugger.                           "
    echo "--disble-ilp64            Disable 64-bit integers.                        "
    echo "--disble-offload          Disable GPU offloading.                         "
    echo "--disble-omp              Disable OpenMP multi-threading.                 "
    echo "--disble-openmp           Disable OpenMP multi-threading.                 "
    echo "--enable-debug=FEATURE    Enable debug output of specified feature.       "
    echo "--enable-fortran          Enable FORTRAN compilation (DEFAULT).           "
    echo "--enable-nvtx             Enable NVTX profiling tools.                    "
    echo "--enable-omp              Enable OpenMP multi-threading (DEFAULT).        "
    echo "--enable-openmp           Enable OpenMP multi-threading (DEFAULT).        "
    echo "--enable-optimize=OPT     Use OPT-level compiler optimization.            "
    echo "--enable-refinement       Use iterative refinement of matrix inversion.   "
    echo "--enable-shared           Use shared libraries (default is static).       "
@@ -132,10 +132,10 @@ EOF

# Script execution
num_args=${#@}
args="$@"
declare -a args=("$@")

# Argument parsing section
for arg in $args
for arg in "${args[@]}"
do
    cut_arg=$(echo $arg | cut -d '=' -f1)
    if [ "x$cut_arg" = "x--help" ]; then
@@ -151,7 +151,7 @@ do
	BUILDFORTRAN="no"
    elif [ "x$cut_arg" = "x--disable-offload" ]; then
	OFFLOAD="no"
    elif [ "x$cut_arg" = "x--disable-omp" ]; then
    elif [ "x$cut_arg" = "x--disable-openmp" ]; then
	OMPMODE="no"
    elif [ "x$cut_arg" = "x--enable-debug" ]; then
	dbg_feature=$(echo $arg | cut -d '=' -f2)
@@ -169,7 +169,7 @@ do
	BUILDFORTRAN="yes"
    elif [ "x$cut_arg" = "x--enable-nvtx" ]; then
	NVTXFLAGS=" -DUSE_NVTX"
    elif [ "x$cut_arg" = "x--enable-omp" ]; then
    elif [ "x$cut_arg" = "x--enable-openmp" ]; then
	OMPMODE="yes"
    elif [ "x$cut_arg" = "x--enable-optimize" ]; then
	opt_level=$(echo $arg | cut -d '=' -f2)