8139413: Use --with-x to set X11 root directory

Reviewed-by: erikj
This commit is contained in:
Magnus Ihse Bursie 2015-10-12 11:49:29 +02:00
parent 119988f54a
commit 2cb9e233b7
2 changed files with 37 additions and 9 deletions

View File

@ -4587,7 +4587,7 @@ VS_SDK_PLATFORM_NAME_2013=
#CUSTOM_AUTOCONF_INCLUDE
# Do not change or remove the following line, it is needed for consistency checks:
DATE_WHEN_GENERATED=1444224363
DATE_WHEN_GENERATED=1444643341
###############################################################################
#
@ -46678,10 +46678,24 @@ $as_echo "$as_me: WARNING: X11 is not used, so --with-x is ignored" >&2;}
X_CFLAGS=
X_LIBS=
else
# Check if the user has specified sysroot, but not --x-includes or --x-libraries.
# Make a simple check for the libraries at the sysroot, and setup --x-includes and
# --x-libraries for the sysroot, if that seems to be correct.
if test "x$OPENJDK_TARGET_OS" = "xlinux"; then
if test "x${with_x}" = xno; then
as_fn_error $? "It is not possible to disable the use of X11. Remove the --without-x option." "$LINENO" 5
fi
if test "x${with_x}" != x && test "x${with_x}" != xyes; then
# The user has specified a X11 base directory. Use it for includes and
# libraries, unless explicitely overridden.
if test "x$x_includes" = xNONE; then
x_includes="${with_x}/include"
fi
if test "x$x_libraries" = xNONE; then
x_libraries="${with_x}/lib"
fi
else
# Check if the user has specified sysroot, but not --with-x, --x-includes or --x-libraries.
# Make a simple check for the libraries at the sysroot, and setup --x-includes and
# --x-libraries for the sysroot, if that seems to be correct.
if test "x$SYSROOT" != "x"; then
if test "x$x_includes" = xNONE; then
if test -f "$SYSROOT/usr/X11R6/include/X11/Xlib.h"; then

View File

@ -35,10 +35,24 @@ AC_DEFUN_ONCE([LIB_SETUP_X11],
X_CFLAGS=
X_LIBS=
else
# Check if the user has specified sysroot, but not --x-includes or --x-libraries.
# Make a simple check for the libraries at the sysroot, and setup --x-includes and
# --x-libraries for the sysroot, if that seems to be correct.
if test "x$OPENJDK_TARGET_OS" = "xlinux"; then
if test "x${with_x}" = xno; then
AC_MSG_ERROR([It is not possible to disable the use of X11. Remove the --without-x option.])
fi
if test "x${with_x}" != x && test "x${with_x}" != xyes; then
# The user has specified a X11 base directory. Use it for includes and
# libraries, unless explicitely overridden.
if test "x$x_includes" = xNONE; then
x_includes="${with_x}/include"
fi
if test "x$x_libraries" = xNONE; then
x_libraries="${with_x}/lib"
fi
else
# Check if the user has specified sysroot, but not --with-x, --x-includes or --x-libraries.
# Make a simple check for the libraries at the sysroot, and setup --x-includes and
# --x-libraries for the sysroot, if that seems to be correct.
if test "x$SYSROOT" != "x"; then
if test "x$x_includes" = xNONE; then
if test -f "$SYSROOT/usr/X11R6/include/X11/Xlib.h"; then