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.

https://bugzilla.gnome.org/show_bug.cgi?id=535929
parent 1f3328c0
...@@ -1031,22 +1031,16 @@ if test "x$enable_x11_backend" = xyes; then ...@@ -1031,22 +1031,16 @@ if test "x$enable_x11_backend" = xyes; then
AC_CHECK_FUNC(XextFindDisplay, :, AC_CHECK_FUNC(XextFindDisplay, :,
AC_MSG_ERROR([*** libX11 and libXext not found. Check 'config.log' for more details.])) AC_MSG_ERROR([*** libX11 and libXext not found. Check 'config.log' for more details.]))
# Check for xReply # Check if <X11/extensions/XIproto.h> is needed for xReply.
AC_MSG_CHECKING([if <X11/extensions/XIproto.h> is needed for xReply]) AC_CHECK_TYPE([xReply], ,
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <X11/Xlibint.h>]], [AC_CHECK_TYPE([xReply],
[[xReply *rep = NULL; [AC_DEFINE([NEED_XIPROTO_H_FOR_XREPLY], 1,
rep = rep;]])], [Define if <X11/extensions/XIproto.h> needed for xReply])],
[AC_MSG_RESULT([no])], [AC_MSG_ERROR([xReply type unavailable. X11 is too old])],
[AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <X11/extensions/XIproto.h> [[#include <X11/extensions/XIproto.h>
#include <X11/Xlibint.h>]], #include <X11/Xlibint.h>]])],
[[xReply *rep = NULL; [[#include <X11/Xlibint.h>]])
rep = rep;]])],
[AC_MSG_RESULT([yes])
AC_DEFINE([NEED_XIPROTO_H_FOR_XREPLY], [1],
[Define if <X11/extensions/XIproto.h> needed for xReply])],
[AC_MSG_RESULT([unknown])
AC_MSG_ERROR([xReply type unavailable. X11 is too old])])])
# Check for XKB support. # 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