[gtk+] Modernize the xReply check
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] Modernize the xReply check
- Date: Sat, 7 Mar 2015 23:27:00 +0000 (UTC)
commit 4938aa9c6b7da48f9c313fc545191733cb8a7ec1
Author: Matthias Clasen <mclasen redhat com>
Date: Sat Mar 7 18:25:57 2015 -0500
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
configure.ac | 26 ++++++++++----------------
1 files changed, 10 insertions(+), 16 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index ccbd350..6720d52 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
-
- 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_MSG_RESULT([no])],
- [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <X11/extensions/XIproto.h>
- #include <X11/Xlibint.h>]],
- [[xReply *rep = NULL;
- 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 if <X11/extensions/XIproto.h> is needed for xReply.
+
+ AC_CHECK_TYPE([xReply], ,
+ [AC_CHECK_TYPE([xReply],
+ [AC_DEFINE([NEED_XIPROTO_H_FOR_XREPLY], 1,
+ [Define if <X11/extensions/XIproto.h> needed for xReply])],
+ [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.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]