make/autoconf/lib-x11.m4
changeset 52658 2d18e5ed0f8d
parent 47216 71c04702a3d5
child 52719 91ae63450fa8
equal deleted inserted replaced
52657:533b02f7842c 52658:2d18e5ed0f8d
     1 #
     1 #
     2 # Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
     2 # Copyright (c) 2011, 2018, Oracle and/or its affiliates. All rights reserved.
     3 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     3 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     4 #
     4 #
     5 # This code is free software; you can redistribute it and/or modify it
     5 # This code is free software; you can redistribute it and/or modify it
     6 # under the terms of the GNU General Public License version 2 only, as
     6 # under the terms of the GNU General Public License version 2 only, as
     7 # published by the Free Software Foundation.  Oracle designates this
     7 # published by the Free Software Foundation.  Oracle designates this
    97 
    97 
    98     AC_LANG_PUSH(C)
    98     AC_LANG_PUSH(C)
    99     OLD_CFLAGS="$CFLAGS"
    99     OLD_CFLAGS="$CFLAGS"
   100     CFLAGS="$CFLAGS $SYSROOT_CFLAGS $X_CFLAGS"
   100     CFLAGS="$CFLAGS $SYSROOT_CFLAGS $X_CFLAGS"
   101 
   101 
       
   102     HEADERS_TO_CHECK="X11/extensions/shape.h X11/extensions/Xrender.h X11/extensions/XTest.h X11/Intrinsic.h"
       
   103     # There is no Xrandr extension on AIX
       
   104     if test "x$OPENJDK_TARGET_OS" != xaix; then
       
   105       HEADERS_TO_CHECK="$HEADERS_TO_CHECK X11/extensions/Xrandr.h"
       
   106     fi
       
   107 
   102     # Need to include Xlib.h and Xutil.h to avoid "present but cannot be compiled" warnings on Solaris 10
   108     # Need to include Xlib.h and Xutil.h to avoid "present but cannot be compiled" warnings on Solaris 10
   103     AC_CHECK_HEADERS([X11/extensions/shape.h X11/extensions/Xrender.h X11/extensions/XTest.h X11/Intrinsic.h],
   109     AC_CHECK_HEADERS([$HEADERS_TO_CHECK],
   104         [X11_HEADERS_OK=yes],
   110         [X11_HEADERS_OK=yes],
   105         [X11_HEADERS_OK=no; break],
   111         [X11_HEADERS_OK=no; break],
   106         [
   112         [
   107           # include <X11/Xlib.h>
   113           # include <X11/Xlib.h>
   108           # include <X11/Xutil.h>
   114           # include <X11/Xutil.h>
   109         ]
   115         ]
   110     )
   116     )
   111 
   117 
   112     if test "x$X11_HEADERS_OK" = xno; then
   118     if test "x$X11_HEADERS_OK" = xno; then
   113       HELP_MSG_MISSING_DEPENDENCY([x11])
   119       HELP_MSG_MISSING_DEPENDENCY([x11])
   114       AC_MSG_ERROR([Could not find all X11 headers (shape.h Xrender.h XTest.h Intrinsic.h). $HELP_MSG])
   120       AC_MSG_ERROR([Could not find all X11 headers (shape.h Xrender.h Xrander.h XTest.h Intrinsic.h). $HELP_MSG])
   115     fi
   121     fi
   116 
   122 
   117     # If XLinearGradient isn't available in Xrender.h, signal that it needs to be
   123     # If XLinearGradient isn't available in Xrender.h, signal that it needs to be
   118     # defined in libawt_xawt.
   124     # defined in libawt_xawt.
   119     AC_MSG_CHECKING([if XlinearGradient is defined in Xrender.h])
   125     AC_MSG_CHECKING([if XlinearGradient is defined in Xrender.h])