summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorTor Lillqvist <tml@collabora.com>2020-10-25 01:54:14 +0300
committerTor Lillqvist <tml@collabora.com>2020-10-25 07:38:11 +0100
commit4fd879cfc898e53e75506ac33fe53116b3649856 (patch)
treecf92173d199202965175cfd442dfb3b4f78474e5 /configure.ac
parent187bdeb38f6c82fa492080ad379e40ec01458824 (diff)
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 <tml@collabora.com>
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac10
1 files changed, 7 insertions, 3 deletions
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