diff --git a/build/autoconf/mozprog.m4 b/build/autoconf/mozprog.m4 index 7bafa4cdd49..00e8dd9177c 100644 --- a/build/autoconf/mozprog.m4 +++ b/build/autoconf/mozprog.m4 @@ -48,7 +48,7 @@ AC_DEFUN(MOZ_PATH_PROG, if test "$msyshost"; then case "[$]$1" in /*) - $1="$(cd "$(dirname "[$]$1")" && pwd -W)/$(basename "[$]$1")" + $1="$(cd \"$(dirname \"[$]$1\")\" && pwd -W)/$(basename \"[$]$1\")" if test -e "[$]$1.exe"; then $1="[$]$1.exe" fi @@ -61,7 +61,7 @@ AC_DEFUN(MOZ_PATH_PROGS, if test "$msyshost"; then case "[$]$1" in /*) - $1="$(cd "$(dirname "[$]$1")" && pwd -W)/$(basename "[$]$1")" + $1="$(cd \"$(dirname \"[$]$1\")\" && pwd -W)/$(basename \"[$]$1\")" if test -e "[$]$1.exe"; then $1="[$]$1.exe" fi diff --git a/js/src/build/autoconf/mozprog.m4 b/js/src/build/autoconf/mozprog.m4 index 7bafa4cdd49..00e8dd9177c 100644 --- a/js/src/build/autoconf/mozprog.m4 +++ b/js/src/build/autoconf/mozprog.m4 @@ -48,7 +48,7 @@ AC_DEFUN(MOZ_PATH_PROG, if test "$msyshost"; then case "[$]$1" in /*) - $1="$(cd "$(dirname "[$]$1")" && pwd -W)/$(basename "[$]$1")" + $1="$(cd \"$(dirname \"[$]$1\")\" && pwd -W)/$(basename \"[$]$1\")" if test -e "[$]$1.exe"; then $1="[$]$1.exe" fi @@ -61,7 +61,7 @@ AC_DEFUN(MOZ_PATH_PROGS, if test "$msyshost"; then case "[$]$1" in /*) - $1="$(cd "$(dirname "[$]$1")" && pwd -W)/$(basename "[$]$1")" + $1="$(cd \"$(dirname \"[$]$1\")\" && pwd -W)/$(basename \"[$]$1\")" if test -e "[$]$1.exe"; then $1="[$]$1.exe" fi