diff --git a/configure b/configure
index 2d9437083899313c0d3f7d896df0158e0f2ebb0a..0e7884f4107915ca58ece3868ed242221bed5bbc 100755
--- a/configure
+++ b/configure
@@ -230,7 +230,7 @@ do
         if [ x"$CXX" == x"" ]; then
                 conf_options="$conf_options"
         else
-                conf_options="$conf_options -DCUDA_HOST_COMPILER=$CXX"
+		conf_options="$conf_options -DCMAKE_CUDA_HOST_COMPILER=$(which $CXX)"
         fi
        conf_options="$conf_options -DENABLE_GPU=ON"
        ;;
diff --git a/install b/install
index 2d3eb3ccd88d5f77347bda1a1adb9753dc170d2d..da8aef516a563413262cd8d12c17214d8072d575 100755
--- a/install
+++ b/install
@@ -361,7 +361,11 @@ else
             elif [ x"$CXX" == x"clang++" ]; then
               ./script/install_BOOST.sh $i_dir $ncore darwin
             else
-              ./script/install_BOOST.sh $i_dir $ncore gcc
+	      if [ x"$CXX" == x"gcc" ]; then
+              	./script/install_BOOST.sh $i_dir $ncore gcc
+	      else
+		./script/install_BOOST.sh $i_dir $ncore gcc $(which $CXX) $dgc_major $dgc_middle
+	      fi
             fi
             BOOST_installed=1
             configure_options=" $configure_options --with-boost=$i_dir/BOOST "
diff --git a/script/install_BOOST.sh b/script/install_BOOST.sh
index c4a1f6a8fcc436d79f6264ad0a83851aa83d00b0..93668d2dbf1112cc592c6eead70df9f2298ab8f4 100755
--- a/script/install_BOOST.sh
+++ b/script/install_BOOST.sh
@@ -10,8 +10,23 @@ fi
 wget http://ppmcore.mpi-cbg.de/upload/boost_1_68_0.tar.bz2
 tar -xvf boost_1_68_0.tar.bz2
 cd boost_1_68_0
+if [ x"$4" != x"" ]; then
+	if [ -f $HOME/user-config.jam ]; then
+		mv $HOME/user-config.jam $HOME/user-config.jam_bck
+	fi
+	if [ x"$5" != x"" ]; then
+		echo "using gcc : $5.$6 : $4 ; " > $HOME/user-config.jam
+	else
+		echo "using gcc : : $4 ; " > $HOME/user-config.jam
+	fi
+fi
 ./bootstrap.sh --with-toolset=$3
 mkdir $1/BOOST
 ./b2 -j $2 install --prefix=$1/BOOST
 rm -rf boost_1_68_0
 
+if [ -f $HOME/user-config.jam_bck ]; then
+	mv $HOME/user-config.jam_bck $HOME/user-config.jam
+fi
+rm -rf boost_1_68_0.tar.bz2
+