253 if test $? -eq 0 ; then
254 AC_MSG_RESULT([yes])
255 else
256 AC_MSG_RESULT([no])
257 # This might be the VS linker. Don't exclude it later on.
258 CYGWIN_LINK=""
259 fi
260 fi
261
262 # First-hand choice is to locate and run the vsvars bat file.
263 TOOLCHAIN_FIND_VISUAL_STUDIO
264
265 if test "x$VS_ENV_CMD" != x; then
266 # We have found a Visual Studio environment on disk, let's extract variables from the vsvars bat file.
267 BASIC_FIXUP_EXECUTABLE(VS_ENV_CMD)
268
269 # Lets extract the variables that are set by vcvarsall.bat/vsvars32.bat/vsvars64.bat
270 AC_MSG_NOTICE([Trying to extract Visual Studio environment variables])
271
272 # We need to create a couple of temporary files.
273 VS_ENV_TMP_DIR="$OUTPUT_ROOT/vs-env"
274 $MKDIR -p $VS_ENV_TMP_DIR
275
276 # Cannot use the VS10 setup script directly (since it only updates the DOS subshell environment).
277 # Instead create a shell script which will set the relevant variables when run.
278 WINPATH_VS_ENV_CMD="$VS_ENV_CMD"
279 BASIC_WINDOWS_REWRITE_AS_WINDOWS_MIXED_PATH([WINPATH_VS_ENV_CMD])
280 WINPATH_BASH="$BASH"
281 BASIC_WINDOWS_REWRITE_AS_WINDOWS_MIXED_PATH([WINPATH_BASH])
282
283 # Generate a DOS batch file which runs $VS_ENV_CMD, and then creates a shell
284 # script (executable by bash) that will setup the important variables.
285 EXTRACT_VC_ENV_BAT_FILE="$VS_ENV_TMP_DIR/extract-vs-env.bat"
286 $ECHO "@echo off" > $EXTRACT_VC_ENV_BAT_FILE
287 # This will end up something like:
288 # call C:/progra~2/micros~2.0/vc/bin/amd64/vcvars64.bat
289 $ECHO "call $WINPATH_VS_ENV_CMD $VS_ENV_ARGS" >> $EXTRACT_VC_ENV_BAT_FILE
290 # These will end up something like:
291 # C:/CygWin/bin/bash -c 'echo VS_PATH=\"$PATH\" > localdevenv.sh
292 # The trailing space for everyone except PATH is no typo, but is needed due
293 # to trailing \ in the Windows paths. These will be stripped later.
|
253 if test $? -eq 0 ; then
254 AC_MSG_RESULT([yes])
255 else
256 AC_MSG_RESULT([no])
257 # This might be the VS linker. Don't exclude it later on.
258 CYGWIN_LINK=""
259 fi
260 fi
261
262 # First-hand choice is to locate and run the vsvars bat file.
263 TOOLCHAIN_FIND_VISUAL_STUDIO
264
265 if test "x$VS_ENV_CMD" != x; then
266 # We have found a Visual Studio environment on disk, let's extract variables from the vsvars bat file.
267 BASIC_FIXUP_EXECUTABLE(VS_ENV_CMD)
268
269 # Lets extract the variables that are set by vcvarsall.bat/vsvars32.bat/vsvars64.bat
270 AC_MSG_NOTICE([Trying to extract Visual Studio environment variables])
271
272 # We need to create a couple of temporary files.
273 VS_ENV_TMP_DIR="$CONFIGURE_SUPPORT/vs-env"
274 $MKDIR -p $VS_ENV_TMP_DIR
275
276 # Cannot use the VS10 setup script directly (since it only updates the DOS subshell environment).
277 # Instead create a shell script which will set the relevant variables when run.
278 WINPATH_VS_ENV_CMD="$VS_ENV_CMD"
279 BASIC_WINDOWS_REWRITE_AS_WINDOWS_MIXED_PATH([WINPATH_VS_ENV_CMD])
280 WINPATH_BASH="$BASH"
281 BASIC_WINDOWS_REWRITE_AS_WINDOWS_MIXED_PATH([WINPATH_BASH])
282
283 # Generate a DOS batch file which runs $VS_ENV_CMD, and then creates a shell
284 # script (executable by bash) that will setup the important variables.
285 EXTRACT_VC_ENV_BAT_FILE="$VS_ENV_TMP_DIR/extract-vs-env.bat"
286 $ECHO "@echo off" > $EXTRACT_VC_ENV_BAT_FILE
287 # This will end up something like:
288 # call C:/progra~2/micros~2.0/vc/bin/amd64/vcvars64.bat
289 $ECHO "call $WINPATH_VS_ENV_CMD $VS_ENV_ARGS" >> $EXTRACT_VC_ENV_BAT_FILE
290 # These will end up something like:
291 # C:/CygWin/bin/bash -c 'echo VS_PATH=\"$PATH\" > localdevenv.sh
292 # The trailing space for everyone except PATH is no typo, but is needed due
293 # to trailing \ in the Windows paths. These will be stripped later.
|