16 #
17 # You should have received a copy of the GNU General Public License version
18 # 2 along with this work; if not, write to the Free Software Foundation,
19 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
20 #
21 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
22 # or visit www.oracle.com if you need additional information or have any
23 # questions.
24 #
25
26 AC_DEFUN([TOOLCHAIN_CHECK_POSSIBLE_VISUAL_STUDIO_ROOT],
27 [
28 if test "x$VS_ENV_CMD" = x; then
29 VS100BASE="$1"
30 METHOD="$2"
31 BASIC_WINDOWS_REWRITE_AS_UNIX_PATH(VS100BASE)
32 if test -d "$VS100BASE"; then
33 if test -f "$VS100BASE/$VCVARSFILE"; then
34 AC_MSG_NOTICE([Found Visual Studio installation at $VS100BASE using $METHOD])
35 VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
36 else
37 AC_MSG_NOTICE([Found Visual Studio installation at $VS100BASE using $METHOD])
38 AC_MSG_NOTICE([Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring])
39 fi
40 fi
41 fi
42 ])
43
44 AC_DEFUN([TOOLCHAIN_CHECK_POSSIBLE_WIN_SDK_ROOT],
45 [
46 if test "x$VS_ENV_CMD" = x; then
47 WIN_SDK_BASE="$1"
48 METHOD="$2"
49 BASIC_WINDOWS_REWRITE_AS_UNIX_PATH(WIN_SDK_BASE)
50 if test -d "$WIN_SDK_BASE"; then
51 # There have been cases of partial or broken SDK installations. A missing
52 # lib dir is not going to work.
53 if test ! -d "$WIN_SDK_BASE/../lib"; then
54 AC_MSG_NOTICE([Found Windows SDK installation at $WIN_SDK_BASE using $METHOD])
55 AC_MSG_NOTICE([Warning: Installation is broken, lib dir is missing. Ignoring])
56 elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
57 AC_MSG_NOTICE([Found Windows SDK installation at $WIN_SDK_BASE using $METHOD])
58 VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
59 if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
60 VS_ENV_ARGS="/x86"
61 else
62 VS_ENV_ARGS="/x64"
63 fi
64 else
65 AC_MSG_NOTICE([Found Windows SDK installation at $WIN_SDK_BASE using $METHOD])
66 AC_MSG_NOTICE([Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring])
67 fi
68 fi
69 fi
70 ])
71
72 AC_DEFUN([TOOLCHAIN_FIND_VISUAL_STUDIO_BAT_FILE],
73 [
74 if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
75 VCVARSFILE="vc/bin/vcvars32.bat"
76 else
77 VCVARSFILE="vc/bin/amd64/vcvars64.bat"
78 fi
79
80 VS_ENV_CMD=""
81 VS_ENV_ARGS=""
82 if test "x$with_toolsdir" != x; then
83 TOOLCHAIN_CHECK_POSSIBLE_VISUAL_STUDIO_ROOT([$with_toolsdir/../..], [--with-tools-dir])
|
16 #
17 # You should have received a copy of the GNU General Public License version
18 # 2 along with this work; if not, write to the Free Software Foundation,
19 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
20 #
21 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
22 # or visit www.oracle.com if you need additional information or have any
23 # questions.
24 #
25
26 AC_DEFUN([TOOLCHAIN_CHECK_POSSIBLE_VISUAL_STUDIO_ROOT],
27 [
28 if test "x$VS_ENV_CMD" = x; then
29 VS100BASE="$1"
30 METHOD="$2"
31 BASIC_WINDOWS_REWRITE_AS_UNIX_PATH(VS100BASE)
32 if test -d "$VS100BASE"; then
33 if test -f "$VS100BASE/$VCVARSFILE"; then
34 AC_MSG_NOTICE([Found Visual Studio installation at $VS100BASE using $METHOD])
35 VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
36 # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
37 # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
38 # TODO: improve detection for other versions of VS
39 PLATFORM_TOOLSET="v100"
40 else
41 AC_MSG_NOTICE([Found Visual Studio installation at $VS100BASE using $METHOD])
42 AC_MSG_NOTICE([Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring])
43 fi
44 fi
45 fi
46 ])
47
48 AC_DEFUN([TOOLCHAIN_CHECK_POSSIBLE_WIN_SDK_ROOT],
49 [
50 if test "x$VS_ENV_CMD" = x; then
51 WIN_SDK_BASE="$1"
52 METHOD="$2"
53 BASIC_WINDOWS_REWRITE_AS_UNIX_PATH(WIN_SDK_BASE)
54 if test -d "$WIN_SDK_BASE"; then
55 # There have been cases of partial or broken SDK installations. A missing
56 # lib dir is not going to work.
57 if test ! -d "$WIN_SDK_BASE/../lib"; then
58 AC_MSG_NOTICE([Found Windows SDK installation at $WIN_SDK_BASE using $METHOD])
59 AC_MSG_NOTICE([Warning: Installation is broken, lib dir is missing. Ignoring])
60 elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
61 AC_MSG_NOTICE([Found Windows SDK installation at $WIN_SDK_BASE using $METHOD])
62 VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
63 if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
64 VS_ENV_ARGS="/x86"
65 else
66 VS_ENV_ARGS="/x64"
67 fi
68 # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
69 # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
70 # TODO: improve detection for other versions of SDK
71 PLATFORM_TOOLSET="Windows7.1SDK"
72 else
73 AC_MSG_NOTICE([Found Windows SDK installation at $WIN_SDK_BASE using $METHOD])
74 AC_MSG_NOTICE([Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring])
75 fi
76 fi
77 fi
78 ])
79
80 AC_DEFUN([TOOLCHAIN_FIND_VISUAL_STUDIO_BAT_FILE],
81 [
82 if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
83 VCVARSFILE="vc/bin/vcvars32.bat"
84 else
85 VCVARSFILE="vc/bin/amd64/vcvars64.bat"
86 fi
87
88 VS_ENV_CMD=""
89 VS_ENV_ARGS=""
90 if test "x$with_toolsdir" != x; then
91 TOOLCHAIN_CHECK_POSSIBLE_VISUAL_STUDIO_ROOT([$with_toolsdir/../..], [--with-tools-dir])
|