diff --git a/configure b/configure
index c9977cfeaa52f78a7e788cf34d212ae36e3f5a44..9163aeaadd123af2ef5d8cfdb3063aa1d7720c77 100755
--- a/configure
+++ b/configure
@@ -1244,7 +1244,7 @@ if test "$lshared" = "yes" ; then
   echo "PIC=-fPIC" >> config.mak
 fi
 echo "EXTRALIBS=$extralibs" >> config.mak
-version=`grep '#define FFMPEG_VERSION ' $source_path/libavcodec/avcodec.h |
+version=`grep '#define FFMPEG_VERSION ' "$source_path/libavcodec/avcodec.h" |
  cut -d '"' -f 2`
 echo "VERSION=$version" >>config.mak
 # if you do not want to use encoders, disable that.
@@ -1460,10 +1460,10 @@ if test "$source_path_used" = "yes" ; then
             mkdir -p $dir
     done
     for f in $FILES ; do
-        ln -sf $source_path/$f $f
+        ln -sf "$source_path/$f" $f
     done
 fi
-echo "SRC_PATH=$source_path" >> config.mak
+echo "SRC_PATH='$source_path'" >> config.mak
 
 if test "$amr_wb" = "yes" ; then
   echo "#define AMR_WB 1" >> $TMPH
diff --git a/tests/regression.sh b/tests/regression.sh
index c3d24f30cea8bc774d227975d63ca00359697e59..ddaaf391d11fb4f1a2db22fb8869b9243a4e3e55 100755
--- a/tests/regression.sh
+++ b/tests/regression.sh
@@ -5,14 +5,14 @@
 #
 #set -x
 # Even in the 21st century some diffs are not supporting -u.
-diff -u $0 $0 > /dev/null 2>&1
+diff -u "$0" "$0" > /dev/null 2>&1
 if [ $? -eq 0 ]; then
   diff_cmd="diff -u"
 else
   diff_cmd="diff"
 fi
 
-diff -w $0 $0 > /dev/null 2>&1
+diff -w "$0" "$0" > /dev/null 2>&1
 if [ $? -eq 0 ]; then
   diff_cmd="$diff_cmd -w"
 fi
@@ -644,7 +644,7 @@ fi
 
 
 
-if $diff_cmd $logfile $reffile ; then
+if $diff_cmd "$logfile" "$reffile" ; then
     echo 
     echo Regression test succeeded.
     exit 0