diff --git a/install b/install
index d2380e1625ac3004817aef0e40edb21327fb157b..91c1a130f28df96dd0930759ed5c7ca0872b8864 100755
--- a/install
+++ b/install
@@ -1,6 +1,9 @@
 #! /bin/bash
 
+##
+
 source script/discover_os
+source script/show_solutions
 discover_os
 
 ## Check and try to install the prerequisites
@@ -24,7 +27,39 @@ if [ $? -ne 0 ]; then
   exit 1
 fi
 
-## Take all the options with the exception of --enable-install-req
+## check for an install dir file or option
+
+i_dir=" "
+if [ -f install_deps_dir ]; then
+ i_dir=$(install_deps_dir)
+fi
+
+getopts i: i_dir_opt
+
+case $i_dir_opt in
+  i)
+    i_dir="$OPTARG"
+    ;;
+  \?)
+    ;;
+esac
+
+if [ x"$i_dir" == x" " ]; then
+ i_dir="$HOME"
+fi
+
+echo -e "\033[1;34;5mDEPENCENCIES INSTALLATION DIR      \033[0m"
+echo -e "Every required dependencies if needed will be installed into: \033[1;34;5m$i_dir\033[0m"
+echo -e "if you want to install somewhere else do ./install -i /somewhere/else"
+commands[0]="Continue"
+possible_solutions "${commands[@]}"
+
+
+echo -e "Installing requirements into: $i_dir "
+
+##
+
+## Take all the options with the exception of -d or -i
 
 install_req=1
 configure_options=""
@@ -32,7 +67,7 @@ configure_options=""
 for var in $@
 do
     echo $var
-    if [ x"$var" != x"--disable-install-req" ] ; then
+    if [ x"$var" != x"-d" ] ; then
        configure_options="$configure_options $var"
     else
        install_req=0
@@ -72,7 +107,7 @@ else
                 echo "Error the installation of MPI failed"
                 exit 1
             fi
-            ./script/install_MPI.sh
+            ./script/install_MPI.sh $i_dir
             MPI_installed=1
             export PATH="$PATH:${HOME}/MPI/bin"
             echo $PATH
@@ -83,7 +118,7 @@ else
                 echo "Error the installation of METIS failed"
                 exit 1
             fi
-            ./script/install_Metis.sh
+            ./script/install_Metis.sh $i_dir
             METIS_installed=1
             configure_options=" $configure_options --with-metis=${HOME}/METIS "
         elif [ $conf_err -eq 202 ]; then
@@ -92,7 +127,7 @@ else
                 echo "Error the installation of Boost failed"
                 exit 1
             fi
-            ./script/install_BOOST.sh
+            ./script/install_BOOST.sh $i_dir
             BOOST_installed=1
             configure_options=" $configure_options --with-boost=${HOME}/BOOST "
         elif [ $conf_err -ne 0 ]; then
diff --git a/m4/ax_cuda.m4 b/m4/ax_cuda.m4
index da7dc73fe9a41cc1aa81ddc2ad42fb2f1b28e8a0..cdf6e17f76f7541a733fa277b5ae3dfbd3311442 100644
--- a/m4/ax_cuda.m4
+++ b/m4/ax_cuda.m4
@@ -57,8 +57,12 @@ AS_IF([test "x$NVCC_EXIST" = "xno"],[],[
           # If $build_cpu contains "_64", append "64" to CUDA_LIBS
           AS_IF([echo $build_cpu | grep -q "_64"],
                 [
-                 AS_IF([ ! test -d {CUDA_LIBS}lib64 ], [ CUDA_LIBS+="64"  ])
-                 AS_IF([ ! command -v bumblebee >/dev/null  ], [ CUDA_LIBS+=" -L/usr/lib64/nvidia-bumblebee/ "  ])
+                 AS_IF([ test -d {CUDA_LIBS}lib64 ], [ CUDA_LIBS+="64"  ])
+                 AS_IF([ command -v bumblebee >/dev/null  ], [ CUDA_LIBS+=" -L/usr/lib64/nvidia-bumblebee/ "  ])
+                 AS_IF([ test -d /usr/local/cuda/lib64  ], [ CUDA_LIBS+=" -L/usr/local/cuda/lib64 "  ],
+                       [
+                        AS_IF([ test -d /usr/local/cuda/lib ],[ CUDA_LIBS+=" -L/usr/local/cuda/lib  "  ])
+                       ])
                 ])
 
           # Append " -lcuda -lcudart" to CUDA_LIBS
diff --git a/script/install_BOOST.sh b/script/install_BOOST.sh
index dd8e9342362399152360fc7ef7c7fd75d6672b8b..6d0daab43ee20f4de5110b683249e6c25c179589 100755
--- a/script/install_BOOST.sh
+++ b/script/install_BOOST.sh
@@ -1,8 +1,8 @@
 #!/bin/bash 
 
-# check if the directory ${HOME}/MPI exist
+# check if the directory $1/MPI exist
 
-if [ -d "${HOME}/BOOST" ]; then
+if [ -d "$1/BOOST" ]; then
   echo "BOOST already installed"
   exit 0
 fi
@@ -11,6 +11,6 @@ wget http://ppmcore.mpi-cbg.de/upload/boost_1_58_0.tar.bz2
 tar -xvf boost_1_58_0.tar.bz2
 cd boost_1_58_0
 ./bootstrap.sh
-mkdir ${HOME}/BOOST
-./b2 -j 4 install --prefix=$HOME/BOOST
+mkdir $1/BOOST
+./b2 -j 4 install --prefix=$1/BOOST
 
diff --git a/script/install_MPI.sh b/script/install_MPI.sh
index cb6a4c1dc9df95b4e784c5a7ca1b234363385f57..ffc4a7dffadaaa60b9ab1b82b2ffc36489c6c3bd 100755
--- a/script/install_MPI.sh
+++ b/script/install_MPI.sh
@@ -1,8 +1,8 @@
 #!/bin/bash 
 
-# check if the directory ${HOME}/MPI exist
+# check if the directory $1/MPI exist
 
-if [ -d "${HOME}/MPI" ]; then
+if [ -d "$1/MPI" ]; then
   echo "MPI already installed"
   exit 0
 fi
@@ -10,7 +10,7 @@ fi
 wget http://www.open-mpi.de/software/ompi/v1.8/downloads/openmpi-1.8.7.tar.bz2
 tar -xvf openmpi-1.8.7.tar.bz2
 cd openmpi-1.8.7
-sh ./configure --prefix=${HOME}/MPI --enable-opal-multi-threads --enable-mpi-f90
+sh ./configure --prefix=$1/MPI --enable-opal-multi-threads --enable-mpi-f90
 make -j 4
-mkdir ${HOME}/MPI
+mkdir $1/MPI
 make install
diff --git a/script/install_Metis.sh b/script/install_Metis.sh
index 2a90dfa362f6d3c114039d89e399782142a36b11..f92cd9c9c42840da8d0f5d99c4112fd05f864702 100755
--- a/script/install_Metis.sh
+++ b/script/install_Metis.sh
@@ -1,8 +1,8 @@
 #! /bin/bash
 
-# check if the directory ${HOME}/METIS exist
+# check if the directory $1/METIS exist
 
-if [ -d "${HOME}/METIS" ]; then
+if [ -d "$1/METIS" ]; then
   echo "METIS already installed"
   exit 0
 fi
@@ -10,8 +10,8 @@ fi
 wget http://ppmcore.mpi-cbg.de/upload/metis-5.1.0.tar.gz
 tar -xf metis-5.1.0.tar.gz
 cd metis-5.1.0
-make config shared=1 prefix=${HOME}/METIS
+make config shared=1 prefix=$1/METIS
 make -j 4
-mkdir ${HOME}/METIS
+mkdir $1/METIS
 make install