diff --git a/configure.ac b/configure.ac index ccbd350b53..6720d5296b 100644 --- a/configure.ac +++ b/configure.ac @@ -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 + # Check if is needed for xReply. - AC_MSG_CHECKING([if is needed for xReply]) - AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include ]], - [[xReply *rep = NULL; - rep = rep;]])], - [AC_MSG_RESULT([no])], - [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include - #include ]], - [[xReply *rep = NULL; - rep = rep;]])], - [AC_MSG_RESULT([yes]) - AC_DEFINE([NEED_XIPROTO_H_FOR_XREPLY], [1], - [Define if needed for xReply])], - [AC_MSG_RESULT([unknown]) - AC_MSG_ERROR([xReply type unavailable. X11 is too old])])]) + AC_CHECK_TYPE([xReply], , + [AC_CHECK_TYPE([xReply], + [AC_DEFINE([NEED_XIPROTO_H_FOR_XREPLY], 1, + [Define if needed for xReply])], + [AC_MSG_ERROR([xReply type unavailable. X11 is too old])], + [[#include + #include ]])], + [[#include ]]) # Check for XKB support.