common/autoconf/toolchain_windows.m4

Wed, 27 Apr 2016 01:39:08 +0800

author
aoqi
date
Wed, 27 Apr 2016 01:39:08 +0800
changeset 0
75a576e87639
child 1133
50aaf272884f
permissions
-rw-r--r--

Initial load
http://hg.openjdk.java.net/jdk8u/jdk8u/
changeset: 1170:d117f01bfb4f
tag: jdk8u25-b17

aoqi@0 1 #
aoqi@0 2 # Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
aoqi@0 3 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
aoqi@0 4 #
aoqi@0 5 # This code is free software; you can redistribute it and/or modify it
aoqi@0 6 # under the terms of the GNU General Public License version 2 only, as
aoqi@0 7 # published by the Free Software Foundation. Oracle designates this
aoqi@0 8 # particular file as subject to the "Classpath" exception as provided
aoqi@0 9 # by Oracle in the LICENSE file that accompanied this code.
aoqi@0 10 #
aoqi@0 11 # This code is distributed in the hope that it will be useful, but WITHOUT
aoqi@0 12 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
aoqi@0 13 # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
aoqi@0 14 # version 2 for more details (a copy is included in the LICENSE file that
aoqi@0 15 # accompanied this code).
aoqi@0 16 #
aoqi@0 17 # You should have received a copy of the GNU General Public License version
aoqi@0 18 # 2 along with this work; if not, write to the Free Software Foundation,
aoqi@0 19 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
aoqi@0 20 #
aoqi@0 21 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
aoqi@0 22 # or visit www.oracle.com if you need additional information or have any
aoqi@0 23 # questions.
aoqi@0 24 #
aoqi@0 25
aoqi@0 26 AC_DEFUN([TOOLCHAIN_CHECK_POSSIBLE_VISUAL_STUDIO_ROOT],
aoqi@0 27 [
aoqi@0 28 if test "x$VS_ENV_CMD" = x; then
aoqi@0 29 VS100BASE="$1"
aoqi@0 30 METHOD="$2"
aoqi@0 31 BASIC_WINDOWS_REWRITE_AS_UNIX_PATH(VS100BASE)
aoqi@0 32 if test -d "$VS100BASE"; then
aoqi@0 33 if test -f "$VS100BASE/$VCVARSFILE"; then
aoqi@0 34 AC_MSG_NOTICE([Found Visual Studio installation at $VS100BASE using $METHOD])
aoqi@0 35 VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
aoqi@0 36 else
aoqi@0 37 AC_MSG_NOTICE([Found Visual Studio installation at $VS100BASE using $METHOD])
aoqi@0 38 AC_MSG_NOTICE([Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring])
aoqi@0 39 fi
aoqi@0 40 fi
aoqi@0 41 fi
aoqi@0 42 ])
aoqi@0 43
aoqi@0 44 AC_DEFUN([TOOLCHAIN_CHECK_POSSIBLE_WIN_SDK_ROOT],
aoqi@0 45 [
aoqi@0 46 if test "x$VS_ENV_CMD" = x; then
aoqi@0 47 WIN_SDK_BASE="$1"
aoqi@0 48 METHOD="$2"
aoqi@0 49 BASIC_WINDOWS_REWRITE_AS_UNIX_PATH(WIN_SDK_BASE)
aoqi@0 50 if test -d "$WIN_SDK_BASE"; then
aoqi@0 51 # There have been cases of partial or broken SDK installations. A missing
aoqi@0 52 # lib dir is not going to work.
aoqi@0 53 if test ! -d "$WIN_SDK_BASE/../lib"; then
aoqi@0 54 AC_MSG_NOTICE([Found Windows SDK installation at $WIN_SDK_BASE using $METHOD])
aoqi@0 55 AC_MSG_NOTICE([Warning: Installation is broken, lib dir is missing. Ignoring])
aoqi@0 56 elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
aoqi@0 57 AC_MSG_NOTICE([Found Windows SDK installation at $WIN_SDK_BASE using $METHOD])
aoqi@0 58 VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
aoqi@0 59 if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
aoqi@0 60 VS_ENV_ARGS="/x86"
aoqi@0 61 else
aoqi@0 62 VS_ENV_ARGS="/x64"
aoqi@0 63 fi
aoqi@0 64 else
aoqi@0 65 AC_MSG_NOTICE([Found Windows SDK installation at $WIN_SDK_BASE using $METHOD])
aoqi@0 66 AC_MSG_NOTICE([Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring])
aoqi@0 67 fi
aoqi@0 68 fi
aoqi@0 69 fi
aoqi@0 70 ])
aoqi@0 71
aoqi@0 72 AC_DEFUN([TOOLCHAIN_FIND_VISUAL_STUDIO_BAT_FILE],
aoqi@0 73 [
aoqi@0 74 if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
aoqi@0 75 VCVARSFILE="vc/bin/vcvars32.bat"
aoqi@0 76 else
aoqi@0 77 VCVARSFILE="vc/bin/amd64/vcvars64.bat"
aoqi@0 78 fi
aoqi@0 79
aoqi@0 80 VS_ENV_CMD=""
aoqi@0 81 VS_ENV_ARGS=""
aoqi@0 82 if test "x$with_toolsdir" != x; then
aoqi@0 83 TOOLCHAIN_CHECK_POSSIBLE_VISUAL_STUDIO_ROOT([$with_toolsdir/../..], [--with-tools-dir])
aoqi@0 84 fi
aoqi@0 85
aoqi@0 86 if test "x$with_toolsdir" != x && test "x$VS_ENV_CMD" = x; then
aoqi@0 87 # Having specified an argument which is incorrect will produce an instant failure;
aoqi@0 88 # we should not go on looking
aoqi@0 89 AC_MSG_NOTICE([The path given by --with-tools-dir does not contain a valid Visual Studio installation])
aoqi@0 90 AC_MSG_NOTICE([Please point to the VC/bin directory within the Visual Studio installation])
aoqi@0 91 AC_MSG_ERROR([Cannot locate a valid Visual Studio installation])
aoqi@0 92 fi
aoqi@0 93
aoqi@0 94 if test "x$VS100COMNTOOLS" != x; then
aoqi@0 95 TOOLCHAIN_CHECK_POSSIBLE_VISUAL_STUDIO_ROOT([$VS100COMNTOOLS/../..], [VS100COMNTOOLS variable])
aoqi@0 96 fi
aoqi@0 97 if test "x$PROGRAMFILES" != x; then
aoqi@0 98 TOOLCHAIN_CHECK_POSSIBLE_VISUAL_STUDIO_ROOT([$PROGRAMFILES/Microsoft Visual Studio 10.0], [well-known name])
aoqi@0 99 fi
aoqi@0 100 TOOLCHAIN_CHECK_POSSIBLE_VISUAL_STUDIO_ROOT([C:/Program Files/Microsoft Visual Studio 10.0], [well-known name])
aoqi@0 101 TOOLCHAIN_CHECK_POSSIBLE_VISUAL_STUDIO_ROOT([C:/Program Files (x86)/Microsoft Visual Studio 10.0], [well-known name])
aoqi@0 102
aoqi@0 103 if test "x$ProgramW6432" != x; then
aoqi@0 104 TOOLCHAIN_CHECK_POSSIBLE_WIN_SDK_ROOT([$ProgramW6432/Microsoft SDKs/Windows/v7.1/Bin], [well-known name])
aoqi@0 105 fi
aoqi@0 106 if test "x$PROGRAMW6432" != x; then
aoqi@0 107 TOOLCHAIN_CHECK_POSSIBLE_WIN_SDK_ROOT([$PROGRAMW6432/Microsoft SDKs/Windows/v7.1/Bin], [well-known name])
aoqi@0 108 fi
aoqi@0 109 if test "x$PROGRAMFILES" != x; then
aoqi@0 110 TOOLCHAIN_CHECK_POSSIBLE_WIN_SDK_ROOT([$PROGRAMFILES/Microsoft SDKs/Windows/v7.1/Bin], [well-known name])
aoqi@0 111 fi
aoqi@0 112 TOOLCHAIN_CHECK_POSSIBLE_WIN_SDK_ROOT([C:/Program Files/Microsoft SDKs/Windows/v7.1/Bin], [well-known name])
aoqi@0 113 TOOLCHAIN_CHECK_POSSIBLE_WIN_SDK_ROOT([C:/Program Files (x86)/Microsoft SDKs/Windows/v7.1/Bin], [well-known name])
aoqi@0 114 ])
aoqi@0 115
aoqi@0 116 # Check if the VS env variables were setup prior to running configure.
aoqi@0 117 # If not, then find vcvarsall.bat and run it automatically, and integrate
aoqi@0 118 # the set env variables into the spec file.
aoqi@0 119 AC_DEFUN([TOOLCHAIN_SETUP_VISUAL_STUDIO_ENV],
aoqi@0 120 [
aoqi@0 121 # Store path to cygwin link.exe to help excluding it when searching for
aoqi@0 122 # VS linker. This must be done before changing the PATH when looking for VS.
aoqi@0 123 AC_PATH_PROG(CYGWIN_LINK, link)
aoqi@0 124 if test "x$CYGWIN_LINK" != x; then
aoqi@0 125 AC_MSG_CHECKING([if the first found link.exe is actually the Cygwin link tool])
aoqi@0 126 "$CYGWIN_LINK" --version > /dev/null
aoqi@0 127 if test $? -eq 0 ; then
aoqi@0 128 AC_MSG_RESULT([yes])
aoqi@0 129 else
aoqi@0 130 AC_MSG_RESULT([no])
aoqi@0 131 # This might be the VS linker. Don't exclude it later on.
aoqi@0 132 CYGWIN_LINK=""
aoqi@0 133 fi
aoqi@0 134 fi
aoqi@0 135
aoqi@0 136 # First-hand choice is to locate and run the vsvars bat file.
aoqi@0 137 TOOLCHAIN_FIND_VISUAL_STUDIO_BAT_FILE
aoqi@0 138 if test "x$VS_ENV_CMD" != x; then
aoqi@0 139 # We have found a Visual Studio environment on disk, let's extract variables from the vsvars bat file.
aoqi@0 140 BASIC_FIXUP_EXECUTABLE(VS_ENV_CMD)
aoqi@0 141
aoqi@0 142 # Lets extract the variables that are set by vcvarsall.bat/vsvars32.bat/vsvars64.bat
aoqi@0 143 AC_MSG_NOTICE([Trying to extract Visual Studio environment variables])
aoqi@0 144 cd $OUTPUT_ROOT
aoqi@0 145 # FIXME: The code betweeen ---- was inlined from a separate script and is not properly adapted
aoqi@0 146 # to autoconf standards.
aoqi@0 147
aoqi@0 148 #----
aoqi@0 149
aoqi@0 150 # Cannot use the VS10 setup script directly (since it only updates the DOS subshell environment)
aoqi@0 151 # but calculate the difference in Cygwin environment before/after running it and then
aoqi@0 152 # apply the diff.
aoqi@0 153
aoqi@0 154 if test "x$OPENJDK_BUILD_OS_ENV" = xwindows.cygwin; then
aoqi@0 155 _vs10varsall=`cygpath -a -m -s "$VS_ENV_CMD"`
aoqi@0 156 _dosvs10varsall=`cygpath -a -w -s $_vs10varsall`
aoqi@0 157 _dosbash=`cygpath -a -w -s \`which bash\`.*`
aoqi@0 158 else
aoqi@0 159 _dosvs10varsall=`cmd //c echo $VS_ENV_CMD`
aoqi@0 160 _dosbash=`cmd //c echo \`which bash\``
aoqi@0 161 fi
aoqi@0 162
aoqi@0 163 # generate the set of exported vars before/after the vs10 setup
aoqi@0 164 $ECHO "@echo off" > localdevenvtmp.bat
aoqi@0 165 $ECHO "$_dosbash -c \"export -p\" > localdevenvtmp.export0" >> localdevenvtmp.bat
aoqi@0 166 $ECHO "call $_dosvs10varsall $VS_ENV_ARGS" >> localdevenvtmp.bat
aoqi@0 167 $ECHO "$_dosbash -c \"export -p\" > localdevenvtmp.export1" >> localdevenvtmp.bat
aoqi@0 168
aoqi@0 169 # Now execute the newly created bat file.
aoqi@0 170 # The | cat is to stop SetEnv.Cmd to mess with system colors on msys
aoqi@0 171 cmd /c localdevenvtmp.bat | cat
aoqi@0 172
aoqi@0 173 # apply the diff (less some non-vs10 vars named by "!")
aoqi@0 174 $SORT localdevenvtmp.export0 | $GREP -v "!" > localdevenvtmp.export0.sort
aoqi@0 175 $SORT localdevenvtmp.export1 | $GREP -v "!" > localdevenvtmp.export1.sort
aoqi@0 176 $COMM -1 -3 localdevenvtmp.export0.sort localdevenvtmp.export1.sort > localdevenv.sh
aoqi@0 177
aoqi@0 178 # cleanup
aoqi@0 179 $RM localdevenvtmp*
aoqi@0 180 #----
aoqi@0 181 cd $CURDIR
aoqi@0 182 if test ! -s $OUTPUT_ROOT/localdevenv.sh; then
aoqi@0 183 AC_MSG_RESULT([no])
aoqi@0 184 AC_MSG_NOTICE([Could not succesfully extract the envionment variables needed for the VS setup.])
aoqi@0 185 AC_MSG_NOTICE([Try setting --with-tools-dir to the VC/bin directory within the VS installation])
aoqi@0 186 AC_MSG_NOTICE([or run "bash.exe -l" from a VS command prompt and then run configure from there.])
aoqi@0 187 AC_MSG_ERROR([Cannot continue])
aoqi@0 188 fi
aoqi@0 189
aoqi@0 190 # Now set all paths and other env variables. This will allow the rest of
aoqi@0 191 # the configure script to find and run the compiler in the proper way.
aoqi@0 192 AC_MSG_NOTICE([Setting extracted environment variables])
aoqi@0 193 . $OUTPUT_ROOT/localdevenv.sh
aoqi@0 194 else
aoqi@0 195 # We did not find a vsvars bat file, let's hope we are run from a VS command prompt.
aoqi@0 196 AC_MSG_NOTICE([Cannot locate a valid Visual Studio installation, checking current environment])
aoqi@0 197 fi
aoqi@0 198
aoqi@0 199 # At this point, we should have corrent variables in the environment, or we can't continue.
aoqi@0 200 AC_MSG_CHECKING([for Visual Studio variables])
aoqi@0 201
aoqi@0 202 if test "x$VCINSTALLDIR" != x || test "x$WindowsSDKDir" != x || test "x$WINDOWSSDKDIR" != x; then
aoqi@0 203 if test "x$INCLUDE" = x || test "x$LIB" = x; then
aoqi@0 204 AC_MSG_RESULT([present but broken])
aoqi@0 205 AC_MSG_ERROR([Your VC command prompt seems broken, INCLUDE and/or LIB is missing.])
aoqi@0 206 else
aoqi@0 207 AC_MSG_RESULT([ok])
aoqi@0 208 # Remove any trailing \ from INCLUDE and LIB to avoid trouble in spec.gmk.
aoqi@0 209 VS_INCLUDE=`$ECHO "$INCLUDE" | $SED 's/\\\\$//'`
aoqi@0 210 VS_LIB=`$ECHO "$LIB" | $SED 's/\\\\$//'`
aoqi@0 211 # Remove any paths containing # (typically F#) as that messes up make
aoqi@0 212 PATH=`$ECHO "$PATH" | $SED 's/[[^:#]]*#[^:]*://g'`
aoqi@0 213 VS_PATH="$PATH"
aoqi@0 214 AC_SUBST(VS_INCLUDE)
aoqi@0 215 AC_SUBST(VS_LIB)
aoqi@0 216 AC_SUBST(VS_PATH)
aoqi@0 217 fi
aoqi@0 218 else
aoqi@0 219 AC_MSG_RESULT([not found])
aoqi@0 220
aoqi@0 221 if test "x$VS_ENV_CMD" = x; then
aoqi@0 222 AC_MSG_NOTICE([Cannot locate a valid Visual Studio or Windows SDK installation on disk,])
aoqi@0 223 AC_MSG_NOTICE([nor is this script run from a Visual Studio command prompt.])
aoqi@0 224 else
aoqi@0 225 AC_MSG_NOTICE([Running the extraction script failed.])
aoqi@0 226 fi
aoqi@0 227 AC_MSG_NOTICE([Try setting --with-tools-dir to the VC/bin directory within the VS installation])
aoqi@0 228 AC_MSG_NOTICE([or run "bash.exe -l" from a VS command prompt and then run configure from there.])
aoqi@0 229 AC_MSG_ERROR([Cannot continue])
aoqi@0 230 fi
aoqi@0 231 ])
aoqi@0 232
aoqi@0 233 AC_DEFUN([TOOLCHAIN_CHECK_POSSIBLE_MSVCR_DLL],
aoqi@0 234 [
aoqi@0 235 POSSIBLE_MSVCR_DLL="$1"
aoqi@0 236 METHOD="$2"
aoqi@0 237 if test -e "$POSSIBLE_MSVCR_DLL"; then
aoqi@0 238 AC_MSG_NOTICE([Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD])
aoqi@0 239
aoqi@0 240 # Need to check if the found msvcr is correct architecture
aoqi@0 241 AC_MSG_CHECKING([found msvcr100.dll architecture])
aoqi@0 242 MSVCR_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVCR_DLL"`
aoqi@0 243 if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
aoqi@0 244 CORRECT_MSVCR_ARCH=386
aoqi@0 245 else
aoqi@0 246 CORRECT_MSVCR_ARCH=x86-64
aoqi@0 247 fi
aoqi@0 248 if $ECHO "$MSVCR_DLL_FILETYPE" | $GREP $CORRECT_MSVCR_ARCH 2>&1 > /dev/null; then
aoqi@0 249 AC_MSG_RESULT([ok])
aoqi@0 250 MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
aoqi@0 251 AC_MSG_CHECKING([for msvcr100.dll])
aoqi@0 252 AC_MSG_RESULT([$MSVCR_DLL])
aoqi@0 253 else
aoqi@0 254 AC_MSG_RESULT([incorrect, ignoring])
aoqi@0 255 AC_MSG_NOTICE([The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE])
aoqi@0 256 fi
aoqi@0 257 fi
aoqi@0 258 ])
aoqi@0 259
aoqi@0 260 AC_DEFUN([TOOLCHAIN_SETUP_MSVCR_DLL],
aoqi@0 261 [
aoqi@0 262 AC_ARG_WITH(msvcr-dll, [AS_HELP_STRING([--with-msvcr-dll],
aoqi@0 263 [copy this msvcr100.dll into the built JDK (Windows only) @<:@probed@:>@])])
aoqi@0 264
aoqi@0 265 if test "x$with_msvcr_dll" != x; then
aoqi@0 266 # If given explicitely by user, do not probe. If not present, fail directly.
aoqi@0 267 TOOLCHAIN_CHECK_POSSIBLE_MSVCR_DLL([$with_msvcr_dll], [--with-msvcr-dll])
aoqi@0 268 if test "x$MSVCR_DLL" = x; then
aoqi@0 269 AC_MSG_ERROR([Could not find a proper msvcr100.dll as specified by --with-msvcr-dll])
aoqi@0 270 fi
aoqi@0 271 fi
aoqi@0 272
aoqi@0 273 if test "x$MSVCR_DLL" = x; then
aoqi@0 274 # Probe: Using well-known location from Visual Studio 10.0
aoqi@0 275 if test "x$VCINSTALLDIR" != x; then
aoqi@0 276 CYGWIN_VC_INSTALL_DIR="$VCINSTALLDIR"
aoqi@0 277 BASIC_WINDOWS_REWRITE_AS_UNIX_PATH(CYGWIN_VC_INSTALL_DIR)
aoqi@0 278 if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
aoqi@0 279 POSSIBLE_MSVCR_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x64/Microsoft.VC100.CRT/msvcr100.dll"
aoqi@0 280 else
aoqi@0 281 POSSIBLE_MSVCR_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x86/Microsoft.VC100.CRT/msvcr100.dll"
aoqi@0 282 fi
aoqi@0 283 TOOLCHAIN_CHECK_POSSIBLE_MSVCR_DLL([$POSSIBLE_MSVCR_DLL], [well-known location in VCINSTALLDIR])
aoqi@0 284 fi
aoqi@0 285 fi
aoqi@0 286
aoqi@0 287 if test "x$MSVCR_DLL" = x; then
aoqi@0 288 # Probe: Check in the Boot JDK directory.
aoqi@0 289 POSSIBLE_MSVCR_DLL="$BOOT_JDK/bin/msvcr100.dll"
aoqi@0 290 TOOLCHAIN_CHECK_POSSIBLE_MSVCR_DLL([$POSSIBLE_MSVCR_DLL], [well-known location in Boot JDK])
aoqi@0 291 fi
aoqi@0 292
aoqi@0 293 if test "x$MSVCR_DLL" = x; then
aoqi@0 294 # Probe: Look in the Windows system32 directory
aoqi@0 295 CYGWIN_SYSTEMROOT="$SYSTEMROOT"
aoqi@0 296 BASIC_WINDOWS_REWRITE_AS_UNIX_PATH(CYGWIN_SYSTEMROOT)
aoqi@0 297 POSSIBLE_MSVCR_DLL="$CYGWIN_SYSTEMROOT/system32/msvcr100.dll"
aoqi@0 298 TOOLCHAIN_CHECK_POSSIBLE_MSVCR_DLL([$POSSIBLE_MSVCR_DLL], [well-known location in SYSTEMROOT])
aoqi@0 299 fi
aoqi@0 300
aoqi@0 301 if test "x$MSVCR_DLL" = x; then
aoqi@0 302 # Probe: If Visual Studio Express is installed, there is usually one with the debugger
aoqi@0 303 if test "x$VS100COMNTOOLS" != x; then
aoqi@0 304 CYGWIN_VS_TOOLS_DIR="$VS100COMNTOOLS/.."
aoqi@0 305 BASIC_WINDOWS_REWRITE_AS_UNIX_PATH(CYGWIN_VS_TOOLS_DIR)
aoqi@0 306 if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
aoqi@0 307 POSSIBLE_MSVCR_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name msvcr100.dll | $GREP -i /x64/ | $HEAD --lines 1`
aoqi@0 308 else
aoqi@0 309 POSSIBLE_MSVCR_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name msvcr100.dll | $GREP -i /x86/ | $HEAD --lines 1`
aoqi@0 310 fi
aoqi@0 311 TOOLCHAIN_CHECK_POSSIBLE_MSVCR_DLL([$POSSIBLE_MSVCR_DLL], [search of VS100COMNTOOLS])
aoqi@0 312 fi
aoqi@0 313 fi
aoqi@0 314
aoqi@0 315 if test "x$MSVCR_DLL" = x; then
aoqi@0 316 # Probe: Search wildly in the VCINSTALLDIR. We've probably lost by now.
aoqi@0 317 # (This was the original behaviour; kept since it might turn up something)
aoqi@0 318 if test "x$CYGWIN_VC_INSTALL_DIR" != x; then
aoqi@0 319 if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
aoqi@0 320 POSSIBLE_MSVCR_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name msvcr100.dll | $GREP x64 | $HEAD --lines 1`
aoqi@0 321 else
aoqi@0 322 POSSIBLE_MSVCR_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name msvcr100.dll | $GREP x86 | $GREP -v ia64 | $GREP -v x64 | $HEAD --lines 1`
aoqi@0 323 if test "x$POSSIBLE_MSVCR_DLL" = x; then
aoqi@0 324 # We're grasping at straws now...
aoqi@0 325 POSSIBLE_MSVCR_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name msvcr100.dll | $HEAD --lines 1`
aoqi@0 326 fi
aoqi@0 327 fi
aoqi@0 328
aoqi@0 329 TOOLCHAIN_CHECK_POSSIBLE_MSVCR_DLL([$POSSIBLE_MSVCR_DLL], [search of VCINSTALLDIR])
aoqi@0 330 fi
aoqi@0 331 fi
aoqi@0 332
aoqi@0 333 if test "x$MSVCR_DLL" = x; then
aoqi@0 334 AC_MSG_CHECKING([for msvcr100.dll])
aoqi@0 335 AC_MSG_RESULT([no])
aoqi@0 336 AC_MSG_ERROR([Could not find msvcr100.dll. Please specify using --with-msvcr-dll.])
aoqi@0 337 fi
aoqi@0 338
aoqi@0 339 BASIC_FIXUP_PATH(MSVCR_DLL)
aoqi@0 340 ])

mercurial