tools="no"
fi
if test "x$tools" != "xno"; then
- ivo_requires="xinerama xrandr xdamage xfixes xcursor xtst xrender xext x11 pixman-1"
+ ivo_requires="xrandr xdamage xfixes xcursor xtst xrender xext x11 pixman-1"
+ extra_cflags=""
+
+ ignore="xinerama"
+ PKG_CHECK_MODULES(IVO_EXTRA, [$ignore],
+ [AC_CHECK_HEADERS([X11/extensions/Xinerama.h], [ivo_requires="$ignore $ivo_requires"], [],
+ [#include <X11/Xlibint.h>
+ #include <X11/Xproto.h>
+ ])], [ignore=""])
+
+ ignore="xcb-dri3 xcb-sync x11-xcb xshmfence x11"
+ PKG_CHECK_MODULES(IVO_EXTRA, [$ignore], [ivo_requires="$ivo_requires $ignore"; extra_cflags="-DDRI3"], [ignore=""])
+
PKG_CHECK_MODULES(IVO, [$ivo_requires], [ivo="yes"], [ivo="no"])
- PKG_CHECK_MODULES(IVO_DRI3, [xcb-dri3 xcb-sync x11-xcb xshmfence x11], [ivo_dri3="yes"], [ivo_dri3="no"])
- if test "x$ivo_dri3" = "xyes"; then
- IVO_CFLAGS="$IVO_CFLAGS $IVO_DRI3_CFLAGS -DDRI3"
- IVO_LIBS="$IVO_LIBS $IVO_DRI3_LIBS"
- fi
AC_CHECK_HEADER([sys/timerfd.h], [], [ivo="no"])
if test "x$ivo" = "xno"; then
if test "x$tools" = "xyes"; then
fi
tools="no"
fi
+
+ IVO_CFLAGS="$IVO_CFLAGS $extra_cflags"
fi
if test "x$tools" != "xno"; then
tools_msg="$tools_msg intel-virtual-output"
#error Failed to find the right header for X11 MIT-SHM protocol definitions
#endif
#include <X11/extensions/Xdamage.h>
+#if HAVE_X11_EXTENSIONS_XINERAMA_H
#include <X11/extensions/Xinerama.h>
+#define USE_XINERAMA
+#endif
#include <X11/extensions/Xrandr.h>
#include <X11/extensions/Xrender.h>
#include <X11/Xcursor/Xcursor.h>
return 0;
}
+#if defined(USE_XINERAMA)
+static int xinerama_active(struct display *display)
+{
+ int active = 0;
+ if (XineramaQueryExtension(display->dpy, &display->xinerama_event, &display->xinerama_error))
+ active = XineramaIsActive(display->dpy);
+ return active;
+}
+#else
+#define xinerama_active(d) 0
+#endif
+
static int add_display(struct context *ctx, Display *dpy)
{
struct display *display;
display->rr_event,
display->rr_error));
- if (XineramaQueryExtension(dpy, &display->xinerama_event, &display->xinerama_error))
- display->xinerama_active = XineramaIsActive(dpy);
+ display->xinerama_active = xinerama_active(display);
DBG(X11, ("%s: xinerama_active?=%d, event=%d, error=%d\n",
DisplayString(dpy),
display->xinerama_active,
return 0;
}
+#if defined(USE_XINERAMA)
static int last_display_add_clones__xinerama(struct context *ctx)
{
struct display *display = last_display(ctx);
reverse_clone_list(display);
return 0;
}
+#else
+#define last_display_add_clones__xinerama(ctx) -1
+#endif
static int last_display_add_clones__display(struct context *ctx)
{