提交 e7f1bd35 编写于 作者: K katleman

Merge

...@@ -36,10 +36,8 @@ default: ...@@ -36,10 +36,8 @@ default:
TEST_FOR_NON_GNUMAKE:sh=echo You are not using GNU make/gmake, this is a requirement. Check your path. 1>&2 && exit 1 TEST_FOR_NON_GNUMAKE:sh=echo You are not using GNU make/gmake, this is a requirement. Check your path. 1>&2 && exit 1
# Assume we have GNU make, but check version. # Assume we have GNU make, but check version.
ifeq (,$(findstring 3.81,$(MAKE_VERSION))) ifeq ($(strip $(foreach v, 3.81 3.82 4.%, $(filter $v, $(MAKE_VERSION)))), )
ifeq (,$(findstring 3.82,$(MAKE_VERSION)))
$(error This version of GNU Make is too low ($(MAKE_VERSION)). Check your path, or upgrade to 3.81 or newer.) $(error This version of GNU Make is too low ($(MAKE_VERSION)). Check your path, or upgrade to 3.81 or newer.)
endif
endif endif
# Locate this Makefile # Locate this Makefile
......
...@@ -212,6 +212,18 @@ AC_DEFUN([BASIC_DEPRECATED_ARG_WITH], ...@@ -212,6 +212,18 @@ AC_DEFUN([BASIC_DEPRECATED_ARG_WITH],
[AC_MSG_WARN([Option --with-$1 is deprecated and will be ignored.])]) [AC_MSG_WARN([Option --with-$1 is deprecated and will be ignored.])])
]) ])
# Register a --enable argument but mark it as deprecated
# $1: The name of the with argument to deprecate, not including --enable-
# $2: The name of the argument to deprecate, in shell variable style (i.e. with _ instead of -)
AC_DEFUN([BASIC_DEPRECATED_ARG_ENABLE],
[
AC_ARG_ENABLE($1, [AS_HELP_STRING([--enable-$1],
[Deprecated. Option is kept for backwards compatibility and is ignored])])
if test "x$enable_$2" != x; then
AC_MSG_WARN([Option --enable-$1 is deprecated and will be ignored.])
fi
])
AC_DEFUN_ONCE([BASIC_INIT], AC_DEFUN_ONCE([BASIC_INIT],
[ [
# Save the original command line. This is passed to us by the wrapper configure script. # Save the original command line. This is passed to us by the wrapper configure script.
...@@ -502,7 +514,7 @@ AC_DEFUN([BASIC_CHECK_MAKE_VERSION], ...@@ -502,7 +514,7 @@ AC_DEFUN([BASIC_CHECK_MAKE_VERSION],
if test "x$IS_GNU_MAKE" = x; then if test "x$IS_GNU_MAKE" = x; then
AC_MSG_NOTICE([Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring.]) AC_MSG_NOTICE([Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring.])
else else
IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP '3.8[[12346789]]'` IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP '\(3\.8[[12]]\)\|\(4\.\)'`
if test "x$IS_MODERN_MAKE" = x; then if test "x$IS_MODERN_MAKE" = x; then
AC_MSG_NOTICE([Found GNU make at $MAKE_CANDIDATE, however this is not version 3.81 or later. (it is: $MAKE_VERSION_STRING). Ignoring.]) AC_MSG_NOTICE([Found GNU make at $MAKE_CANDIDATE, however this is not version 3.81 or later. (it is: $MAKE_VERSION_STRING). Ignoring.])
else else
......
...@@ -33,6 +33,12 @@ AC_DEFUN([HELP_MSG_MISSING_DEPENDENCY], ...@@ -33,6 +33,12 @@ AC_DEFUN([HELP_MSG_MISSING_DEPENDENCY],
# Print a helpful message on how to acquire the necessary build dependency. # Print a helpful message on how to acquire the necessary build dependency.
# $1 is the help tag: freetyp2, cups, pulse, alsa etc # $1 is the help tag: freetyp2, cups, pulse, alsa etc
MISSING_DEPENDENCY=$1 MISSING_DEPENDENCY=$1
if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
cygwin_help $MISSING_DEPENDENCY
elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
msys_help $MISSING_DEPENDENCY
else
PKGHANDLER_COMMAND= PKGHANDLER_COMMAND=
case $PKGHANDLER in case $PKGHANDLER in
...@@ -53,21 +59,48 @@ AC_DEFUN([HELP_MSG_MISSING_DEPENDENCY], ...@@ -53,21 +59,48 @@ AC_DEFUN([HELP_MSG_MISSING_DEPENDENCY],
if test "x$PKGHANDLER_COMMAND" != x; then if test "x$PKGHANDLER_COMMAND" != x; then
HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'." HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
fi fi
fi
]) ])
cygwin_help() { cygwin_help() {
case $1 in case $1 in
unzip) unzip)
PKGHANDLER_COMMAND="cd <location of cygwin setup.exe> && cmd /c setup -q -P unzip" ;; PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P unzip )"
HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
;;
zip) zip)
PKGHANDLER_COMMAND="cd <location of cygwin setup.exe> && cmd /c setup -q -P zip" ;; PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P zip )"
HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
;;
make) make)
PKGHANDLER_COMMAND="cd <location of cygwin setup.exe> && cmd /c setup -q -P make" ;; PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P make )"
HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
;;
freetype2)
if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
HELP_MSG="To install freetype, run:
wget \"http://gnuwin32.sourceforge.net/downlinks/freetype.php\" -O /tmp/freetype-setup.exe
chmod +x /tmp/freetype-setup.exe
/tmp/freetype-setup.exe
Follow GUI prompts, and install to default directory \"C:\Program Files (x86)\GnuWin32\".
After installation, locate lib/libfreetype.dll.a and make a copy with the name freetype.dll."
else
HELP_MSG="You need to build a 64-bit version of freetype.
This is not readily available.
You can find source code and build instructions on
http://www.freetype.org/
If you put the resulting build in \"C:\Program Files\GnuWin32\", it will be found automatically."
fi
;;
* ) * )
break ;; break ;;
esac esac
} }
msys_help() {
PKGHANDLER_COMMAND=""
}
apt_help() { apt_help() {
case $1 in case $1 in
devkit) devkit)
......
...@@ -60,7 +60,7 @@ AC_DEFUN_ONCE([LIB_SETUP_INIT], ...@@ -60,7 +60,7 @@ AC_DEFUN_ONCE([LIB_SETUP_INIT],
FREETYPE2_NOT_NEEDED=yes FREETYPE2_NOT_NEEDED=yes
# If the java runtime framework is disabled, then we need X11. # If the java runtime framework is disabled, then we need X11.
# This will be adjusted below. # This will be adjusted below.
AC_MSG_RESULT([alsa pulse x11]) AC_MSG_RESULT([alsa pulse x11 freetype])
fi fi
if test "x$OPENJDK_TARGET_OS" = xbsd; then if test "x$OPENJDK_TARGET_OS" = xbsd; then
...@@ -79,33 +79,17 @@ AC_DEFUN_ONCE([LIB_SETUP_INIT], ...@@ -79,33 +79,17 @@ AC_DEFUN_ONCE([LIB_SETUP_INIT],
############################################################################### ###############################################################################
# #
# Check for MacOSX support for OpenJDK. If this exists, try to build a JVM # Check for MacOSX support for OpenJDK.
# that uses this API.
# #
AC_ARG_ENABLE([macosx-runtime-support], [AS_HELP_STRING([--disable-macosx-runtime-support],
[disable the use of MacOSX Java runtime support framework @<:@enabled@:>@])],
[MACOSX_RUNTIME_SUPPORT="${enableval}"],[MACOSX_RUNTIME_SUPPORT="no"])
USE_MACOSX_RUNTIME_SUPPORT=no BASIC_DEPRECATED_ARG_ENABLE(macosx-runtime-support, macosx_runtime_support)
AC_MSG_CHECKING([for explicit Java runtime support in the OS])
AC_MSG_CHECKING([for Mac OS X Java Framework])
if test -f /System/Library/Frameworks/JavaVM.framework/Frameworks/JavaRuntimeSupport.framework/Headers/JavaRuntimeSupport.h; then if test -f /System/Library/Frameworks/JavaVM.framework/Frameworks/JavaRuntimeSupport.framework/Headers/JavaRuntimeSupport.h; then
if test "x$MACOSX_RUNTIME_SUPPORT" != xno; then AC_MSG_RESULT([/System/Library/Frameworks/JavaVM.framework])
MACOSX_RUNTIME_SUPPORT=yes
USE_MACOSX_RUNTIME_SUPPORT=yes
AC_MSG_RESULT([yes, does not need alsa freetype2 pulse and X11])
else
AC_MSG_RESULT([yes, but explicitly disabled.])
fi
else else
AC_MSG_RESULT([no]) AC_MSG_RESULT([no])
fi fi
if test "x$OPENJDK_TARGET_OS" = xmacosx && test "x$USE_MACOSX_RUNTIME_SUPPORT" = xno; then
AC_MSG_CHECKING([what is not needed on an X11 build on MacOSX?])
X11_NOT_NEEDED=
FREETYPE2_NOT_NEEDED=
AC_MSG_RESULT([alsa pulse])
fi
]) ])
AC_DEFUN_ONCE([LIB_SETUP_X11], AC_DEFUN_ONCE([LIB_SETUP_X11],
......
...@@ -176,6 +176,7 @@ AC_DEFUN([TOOLCHAIN_SETUP_PATHS], ...@@ -176,6 +176,7 @@ AC_DEFUN([TOOLCHAIN_SETUP_PATHS],
[ [
if test "x$OPENJDK_TARGET_OS" = "xwindows"; then if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
TOOLCHAIN_SETUP_VISUAL_STUDIO_ENV TOOLCHAIN_SETUP_VISUAL_STUDIO_ENV
TOOLCHAIN_SETUP_MSVCR_DLL
BASIC_DEPRECATED_ARG_WITH([dxsdk]) BASIC_DEPRECATED_ARG_WITH([dxsdk])
BASIC_DEPRECATED_ARG_WITH([dxsdk-lib]) BASIC_DEPRECATED_ARG_WITH([dxsdk-lib])
BASIC_DEPRECATED_ARG_WITH([dxsdk-include]) BASIC_DEPRECATED_ARG_WITH([dxsdk-include])
......
...@@ -228,52 +228,113 @@ AC_DEFUN([TOOLCHAIN_SETUP_VISUAL_STUDIO_ENV], ...@@ -228,52 +228,113 @@ AC_DEFUN([TOOLCHAIN_SETUP_VISUAL_STUDIO_ENV],
AC_MSG_NOTICE([or run "bash.exe -l" from a VS command prompt and then run configure from there.]) AC_MSG_NOTICE([or run "bash.exe -l" from a VS command prompt and then run configure from there.])
AC_MSG_ERROR([Cannot continue]) AC_MSG_ERROR([Cannot continue])
fi fi
])
AC_DEFUN([TOOLCHAIN_CHECK_POSSIBLE_MSVCR_DLL],
[
POSSIBLE_MSVCR_DLL="$1"
METHOD="$2"
if test -e "$POSSIBLE_MSVCR_DLL"; then
AC_MSG_NOTICE([Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD])
# Need to check if the found msvcr is correct architecture
AC_MSG_CHECKING([found msvcr100.dll architecture])
MSVCR_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVCR_DLL"`
if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
CORRECT_MSVCR_ARCH=386
else
CORRECT_MSVCR_ARCH=x86-64
fi
if $ECHO "$MSVCR_DLL_FILETYPE" | $GREP $CORRECT_MSVCR_ARCH 2>&1 > /dev/null; then
AC_MSG_RESULT([ok])
MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
AC_MSG_CHECKING([for msvcr100.dll]) AC_MSG_CHECKING([for msvcr100.dll])
AC_MSG_RESULT([$MSVCR_DLL])
else
AC_MSG_RESULT([incorrect, ignoring])
AC_MSG_NOTICE([The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE])
fi
fi
])
AC_DEFUN([TOOLCHAIN_SETUP_MSVCR_DLL],
[
AC_ARG_WITH(msvcr-dll, [AS_HELP_STRING([--with-msvcr-dll], AC_ARG_WITH(msvcr-dll, [AS_HELP_STRING([--with-msvcr-dll],
[copy this msvcr100.dll into the built JDK (Windows only) @<:@probed@:>@])]) [copy this msvcr100.dll into the built JDK (Windows only) @<:@probed@:>@])])
if test "x$with_msvcr_dll" != x; then if test "x$with_msvcr_dll" != x; then
MSVCR_DLL="$with_msvcr_dll" # If given explicitely by user, do not probe. If not present, fail directly.
else TOOLCHAIN_CHECK_POSSIBLE_MSVCR_DLL([$with_msvcr_dll], [--with-msvcr-dll])
if test "x$MSVCR_DLL" = x; then
AC_MSG_ERROR([Could not find a proper msvcr100.dll as specified by --with-msvcr-dll])
fi
fi
if test "x$MSVCR_DLL" = x; then
# Probe: Using well-known location from Visual Studio 10.0
if test "x$VCINSTALLDIR" != x; then if test "x$VCINSTALLDIR" != x; then
CYGWIN_VC_INSTALL_DIR="$VCINSTALLDIR"
BASIC_WINDOWS_REWRITE_AS_UNIX_PATH(CYGWIN_VC_INSTALL_DIR)
if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
MSVCR_DLL=`find "$VCINSTALLDIR" -name msvcr100.dll | grep x64 | head --lines 1` POSSIBLE_MSVCR_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x64/Microsoft.VC100.CRT/msvcr100.dll"
else else
MSVCR_DLL=`find "$VCINSTALLDIR" -name msvcr100.dll | grep x86 | grep -v ia64 | grep -v x64 | head --lines 1` POSSIBLE_MSVCR_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x86/Microsoft.VC100.CRT/msvcr100.dll"
if test "x$MSVCR_DLL" = x; then
MSVCR_DLL=`find "$VCINSTALLDIR" -name msvcr100.dll | head --lines 1`
fi fi
TOOLCHAIN_CHECK_POSSIBLE_MSVCR_DLL([$POSSIBLE_MSVCR_DLL], [well-known location in VCINSTALLDIR])
fi fi
if test "x$MSVCR_DLL" != x; then
AC_MSG_NOTICE([msvcr100.dll found in VCINSTALLDIR: $VCINSTALLDIR])
else
AC_MSG_NOTICE([Warning: msvcr100.dll not found in VCINSTALLDIR: $VCINSTALLDIR])
fi fi
if test "x$MSVCR_DLL" = x; then
# Probe: Check in the Boot JDK directory.
POSSIBLE_MSVCR_DLL="$BOOT_JDK/bin/msvcr100.dll"
TOOLCHAIN_CHECK_POSSIBLE_MSVCR_DLL([$POSSIBLE_MSVCR_DLL], [well-known location in Boot JDK])
fi
if test "x$MSVCR_DLL" = x; then
# Probe: Look in the Windows system32 directory
CYGWIN_SYSTEMROOT="$SYSTEMROOT"
BASIC_WINDOWS_REWRITE_AS_UNIX_PATH(CYGWIN_SYSTEMROOT)
POSSIBLE_MSVCR_DLL="$CYGWIN_SYSTEMROOT/system32/msvcr100.dll"
TOOLCHAIN_CHECK_POSSIBLE_MSVCR_DLL([$POSSIBLE_MSVCR_DLL], [well-known location in SYSTEMROOT])
fi fi
# Try some fallback alternatives
if test "x$MSVCR_DLL" = x; then if test "x$MSVCR_DLL" = x; then
# If visual studio express is installed, there is usually one with the debugger # Probe: If Visual Studio Express is installed, there is usually one with the debugger
if test "x$VS100COMNTOOLS" != x; then if test "x$VS100COMNTOOLS" != x; then
CYGWIN_VS_TOOLS_DIR="$VS100COMNTOOLS/.."
BASIC_WINDOWS_REWRITE_AS_UNIX_PATH(CYGWIN_VS_TOOLS_DIR)
if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
MSVCR_DLL=`find "$VS100COMNTOOLS/.." -name msvcr100.dll | grep -i x64 | head --lines 1` POSSIBLE_MSVCR_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name msvcr100.dll | $GREP -i /x64/ | $HEAD --lines 1`
AC_MSG_NOTICE([msvcr100.dll found in $VS100COMNTOOLS..: $VS100COMNTOOLS..]) else
POSSIBLE_MSVCR_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name msvcr100.dll | $GREP -i /x86/ | $HEAD --lines 1`
fi fi
TOOLCHAIN_CHECK_POSSIBLE_MSVCR_DLL([$POSSIBLE_MSVCR_DLL], [search of VS100COMNTOOLS])
fi fi
fi fi
if test "x$MSVCR_DLL" = x; then if test "x$MSVCR_DLL" = x; then
if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then # Probe: Search wildly in the VCINSTALLDIR. We've probably lost by now.
# Fallback for 32bit builds, look in the windows directory. # (This was the original behaviour; kept since it might turn up something)
if test -f "$SYSTEMROOT/system32/msvcr100.dll"; then if test "x$CYGWIN_VC_INSTALL_DIR" != x; then
AC_MSG_NOTICE([msvcr100.dll found in $SYSTEMROOT/system32]) if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
MSVCR_DLL="$SYSTEMROOT/system32/msvcr100.dll" POSSIBLE_MSVCR_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name msvcr100.dll | $GREP x64 | $HEAD --lines 1`
else
POSSIBLE_MSVCR_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name msvcr100.dll | $GREP x86 | $GREP -v ia64 | $GREP -v x64 | $HEAD --lines 1`
if test "x$POSSIBLE_MSVCR_DLL" = x; then
# We're grasping at straws now...
POSSIBLE_MSVCR_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name msvcr100.dll | $HEAD --lines 1`
fi fi
fi fi
TOOLCHAIN_CHECK_POSSIBLE_MSVCR_DLL([$POSSIBLE_MSVCR_DLL], [search of VCINSTALLDIR])
fi fi
fi fi
if test "x$MSVCR_DLL" = x; then if test "x$MSVCR_DLL" = x; then
AC_MSG_CHECKING([for msvcr100.dll])
AC_MSG_RESULT([no]) AC_MSG_RESULT([no])
AC_MSG_ERROR([Could not find msvcr100.dll !]) AC_MSG_ERROR([Could not find msvcr100.dll. Please specify using --with-msvcr-dll.])
fi fi
AC_MSG_RESULT([$MSVCR_DLL])
BASIC_FIXUP_PATH(MSVCR_DLL) BASIC_FIXUP_PATH(MSVCR_DLL)
]) ])
...@@ -266,8 +266,12 @@ define SetupZipArchive ...@@ -266,8 +266,12 @@ define SetupZipArchive
endif endif
# Find all files in the source tree. # Find all files in the source tree.
$1_ALL_SRCS := $$(call not-containing,_the., \ $1_ALL_SRCS := $$(call not-containing,_the.,$$(call CacheFind,$$($1_FIND_LIST)))
$$(filter $$(addprefix %,$$($1_SUFFIXES)),$$(call CacheFind,$$($1_FIND_LIST))))
# Filter on suffixes if set
ifneq ($$($1_SUFFIXES),)
$1_ALL_SRCS := $$(filter $$(addprefix %, $$($1_SUFFIXES)), $$($1_ALL_SRCS))
endif
ifneq ($$($1_INCLUDES),) ifneq ($$($1_INCLUDES),)
ifneq ($$($1_SUFFIXES),) ifneq ($$($1_SUFFIXES),)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册