|
1 | 1 | #
|
2 |
| -# Copyright (c) 2011, 2020, Oracle and/or its affiliates. All rights reserved. |
| 2 | +# Copyright (c) 2011, 2022, Oracle and/or its affiliates. All rights reserved. |
3 | 3 | # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
4 | 4 | #
|
5 | 5 | # This code is free software; you can redistribute it and/or modify it
|
@@ -96,24 +96,29 @@ AC_DEFUN_ONCE([LIB_SETUP_X11],
|
96 | 96 | OLD_CFLAGS="$CFLAGS"
|
97 | 97 | CFLAGS="$CFLAGS $SYSROOT_CFLAGS $X_CFLAGS"
|
98 | 98 |
|
99 |
| - HEADERS_TO_CHECK="X11/extensions/shape.h X11/extensions/Xrender.h X11/extensions/XTest.h X11/Intrinsic.h" |
100 |
| - # There is no Xrandr extension on AIX |
101 | 99 | if test "x$OPENJDK_TARGET_OS" = xaix; then
|
| 100 | + # There is no Xrandr extension on AIX. Code is duplicated to avoid autoconf |
| 101 | + # 2.71+ warning "AC_CHECK_HEADERS: you should use literals" |
102 | 102 | X_CFLAGS="$X_CFLAGS -DNO_XRANDR"
|
| 103 | + AC_CHECK_HEADERS([X11/extensions/shape.h X11/extensions/Xrender.h X11/extensions/XTest.h X11/Intrinsic.h], |
| 104 | + [X11_HEADERS_OK=yes], |
| 105 | + [X11_HEADERS_OK=no; break], |
| 106 | + [ |
| 107 | + # include <X11/Xlib.h> |
| 108 | + # include <X11/Xutil.h> |
| 109 | + ] |
| 110 | + ) |
103 | 111 | else
|
104 |
| - HEADERS_TO_CHECK="$HEADERS_TO_CHECK X11/extensions/Xrandr.h" |
| 112 | + AC_CHECK_HEADERS([X11/extensions/shape.h X11/extensions/Xrender.h X11/extensions/XTest.h X11/Intrinsic.h X11/extensions/Xrandr.h], |
| 113 | + [X11_HEADERS_OK=yes], |
| 114 | + [X11_HEADERS_OK=no; break], |
| 115 | + [ |
| 116 | + # include <X11/Xlib.h> |
| 117 | + # include <X11/Xutil.h> |
| 118 | + ] |
| 119 | + ) |
105 | 120 | fi
|
106 | 121 |
|
107 |
| - # Need to include Xlib.h and Xutil.h to avoid "present but cannot be compiled" warnings on Solaris 10 |
108 |
| - AC_CHECK_HEADERS([$HEADERS_TO_CHECK], |
109 |
| - [X11_HEADERS_OK=yes], |
110 |
| - [X11_HEADERS_OK=no; break], |
111 |
| - [ |
112 |
| - # include <X11/Xlib.h> |
113 |
| - # include <X11/Xutil.h> |
114 |
| - ] |
115 |
| - ) |
116 |
| -
|
117 | 122 | if test "x$X11_HEADERS_OK" = xno; then
|
118 | 123 | HELP_MSG_MISSING_DEPENDENCY([x11])
|
119 | 124 | AC_MSG_ERROR([Could not find all X11 headers (shape.h Xrender.h Xrandr.h XTest.h Intrinsic.h). $HELP_MSG])
|
|
0 commit comments