From 4fd879cfc898e53e75506ac33fe53116b3649856 Mon Sep 17 00:00:00 2001 From: Tor Lillqvist Date: Sun, 25 Oct 2020 01:54:14 +0300 Subject: Fix the find_msvc function for building on WSL Use the PROGRAMFILESX86 environment variable that autogen.sh exports. Use the $formatted_path_unix return value from PathFormat. Change-Id: Ifa2c05e57248a9c05d60ebf7b93fbdc1c1e59b1b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104764 Tested-by: Jenkins Reviewed-by: Tor Lillqvist --- configure.ac | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'configure.ac') diff --git a/configure.ac b/configure.ac index 06793fc606cd..7580e90413fb 100644 --- a/configure.ac +++ b/configure.ac @@ -3744,10 +3744,14 @@ find_msvc() unset vctest vcnum vcnumwithdot vcbuildnumber vs_versions_to_check "$1" - vswhere="$(perl -e 'print $ENV{"ProgramFiles(x86)"}')" + if test "$build_os" = wsl; then + vswhere="$PROGRAMFILESX86" + else + vswhere="$(perl -e 'print $ENV{"ProgramFiles(x86)"}')" + fi vswhere+="\\Microsoft Visual Studio\\Installer\\vswhere.exe" PathFormat "$vswhere" - vswhere=$formatted_path + vswhere=$formatted_path_unix for ver in $vsversions; do vswhereoutput=`$vswhere -version "@<:@ $ver , $(expr $ver + 1) @:}@" -requires Microsoft.VisualStudio.Component.VC.Tools.x86.x64 -property installationPath | head -1` # Fall back to all MS products (this includes VC++ Build Tools) @@ -3757,7 +3761,7 @@ find_msvc() fi if test -n "$vswhereoutput"; then PathFormat "$vswhereoutput" - vctest=$formatted_path + vctest=$formatted_path_unix break fi done -- cgit