Skip to content

Commit 2662a72

Browse files
committed
configure cleanup on windows
Redirect stdout on the python bogosity detector. This is printing pwd to the terminal currently. Reformat the bogus python/cmake messages so they format correctly. echo does not always escape newlines (it doesn't here), and multiline strings don't whitespace munch.
1 parent eaa5bf3 commit 2662a72

File tree

1 file changed

+27
-9
lines changed

1 file changed

+27
-9
lines changed

configure

Lines changed: 27 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1169,12 +1169,21 @@ do
11691169
#
11701170
# Consequently here we try to detect when that happens and print an
11711171
# error if it does.
1172-
if $CFG_PYTHON -c 'import sys; print sys.argv[1]' `pwd` | grep '^/'
1172+
if $CFG_PYTHON -c 'import sys; print sys.argv[1]' `pwd` | grep '^/' > /dev/null
11731173
then
1174-
err "python is silently translating windows paths to MSYS paths \
1175-
and the build will fail if this python is used.\n\n \
1176-
Either an official python install must be used or an \
1177-
alternative python package in MinGW must be used."
1174+
err "
1175+
1176+
python is silently translating windows paths to MSYS paths \
1177+
and the build will fail if this python is used.
1178+
1179+
Either an official python install must be used or an \
1180+
alternative python package in MinGW must be used.
1181+
1182+
If you are building under msys2 try installing the mingw-w64-x86_64-python2 \
1183+
package instead of python2:
1184+
1185+
$ pacman -R python2 && pacman -S mingw-w64-x86_64-python2
1186+
"
11781187
fi
11791188

11801189
# MSVC requires cmake because that's how we're going to build LLVM
@@ -1185,10 +1194,19 @@ do
11851194
# detect that here and error.
11861195
if ! "$CFG_CMAKE" --help | sed -n '/^Generators/,$p' | grep 'Visual Studio' > /dev/null
11871196
then
1188-
err "cmake does not support Visual Studio generators.\n\n \
1189-
This is likely due to it being an msys/cygwin build of cmake, \
1190-
rather than the required windows version, built using MinGW \
1191-
or Visual Studio."
1197+
err "
1198+
1199+
cmake does not support Visual Studio generators.
1200+
1201+
This is likely due to it being an msys/cygwin build of cmake, \
1202+
rather than the required windows version, built using MinGW \
1203+
or Visual Studio.
1204+
1205+
If you are building under msys2 try installing the mingw-w64-x86_64-cmake \
1206+
package instead of cmake:
1207+
1208+
$ pacman -R cmake && pacman -S mingw-w64-x86_64-cmake
1209+
"
11921210
fi
11931211

11941212
# Use the REG program to figure out where VS is installed

0 commit comments

Comments
 (0)