Commit 4938aa9c authored by Matthias Clasen's avatar Matthias Clasen

Modernize the xReply check

Using AC_CHECK_TYPE instead of AC_TRY_COMPILE avoids compiler
warnings from -Werror.
parent 1f3328c0
......@@ -1031,22 +1031,16 @@ if test "x$enable_x11_backend" = xyes; then
AC_CHECK_FUNC(XextFindDisplay, :,
AC_MSG_ERROR([*** libX11 and libXext not found. Check 'config.log' for more details.]))
# Check for xReply
AC_MSG_CHECKING([if <X11/extensions/XIproto.h> is needed for xReply])
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <X11/Xlibint.h>]],
[[xReply *rep = NULL;
rep = rep;]])],
[AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <X11/extensions/XIproto.h>
#include <X11/Xlibint.h>]],
[[xReply *rep = NULL;
rep = rep;]])],
# Check if <X11/extensions/XIproto.h> is needed for xReply.
AC_CHECK_TYPE([xReply], ,
[Define if <X11/extensions/XIproto.h> needed for xReply])],
AC_MSG_ERROR([xReply type unavailable. X11 is too old])])])
[AC_MSG_ERROR([xReply type unavailable. X11 is too old])],
[[#include <X11/extensions/XIproto.h>
#include <X11/Xlibint.h>]])],
[[#include <X11/Xlibint.h>]])
# Check for XKB support.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment