summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorVictor Kareh <[email protected]>2017-09-11 11:02:14 -0400
committerraveit65 <[email protected]>2017-11-10 19:51:41 +0100
commitac93ac087d5a443eae0d052ba9d0bbb38ca44214 (patch)
tree71db14413cb062858bc6d730e30430c3d19e66e2 /configure.ac
parent5257294e75dd188a26a2848a41370fa3770d2447 (diff)
downloadmarco-ac93ac087d5a443eae0d052ba9d0bbb38ca44214.tar.bz2
marco-ac93ac087d5a443eae0d052ba9d0bbb38ca44214.tar.xz
XPresent extension support - first pass
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac17
1 files changed, 15 insertions, 2 deletions
diff --git a/configure.ac b/configure.ac
index f2ac9ba3..cf2b5485 100644
--- a/configure.ac
+++ b/configure.ac
@@ -154,7 +154,7 @@ AC_CHECK_HEADERS(execinfo.h, [AC_CHECK_FUNCS(backtrace)])
AM_GLIB_GNU_GETTEXT
-PKG_CHECK_MODULES(ALL, glib-2.0 >= 2.36.0)
+PKG_CHECK_MODULES(ALL, glib-2.0 >= 2.36.0 xpresent)
PKG_CHECK_MODULES(MARCO_MESSAGE, gtk+-3.0 >= $GTK_MIN_VERSION)
PKG_CHECK_MODULES(MARCO_WINDOW_DEMO, gtk+-3.0 >= $GTK_MIN_VERSION)
@@ -415,7 +415,19 @@ if test "x$found_xsync" = "xyes"; then
AC_DEFINE(HAVE_XSYNC, , [Have the Xsync extension library])
fi
-MARCO_LIBS="$MARCO_LIBS $XSYNC_LIBS $RANDR_LIBS $SHAPE_LIBS $X_LIBS $X_PRE_LIBS -lX11 $X_EXTRA_LIBS -lm"
+XPRESENT_LIBS=
+found_xpresent=no
+AC_CHECK_LIB(Xpresent, XPresentPixmap,
+ [AC_CHECK_HEADER(X11/extensions/Xpresent.h,
+ XPRESENT_LIBS=-lXpresent found_xpresent=yes,,
+ [#include <X11/Xlib.h>])],
+ , $ALL_X_LIBS)
+
+if test "x$found_xpresent" = "xyes"; then
+ AC_DEFINE(HAVE_PRESENT, , [Have the Xpresent extension library])
+fi
+
+MARCO_LIBS="$MARCO_LIBS $XSYNC_LIBS $RANDR_LIBS $SHAPE_LIBS $XPRESENT_LIBS $X_LIBS $X_PRE_LIBS -lX11 $X_EXTRA_LIBS -lm"
MARCO_MESSAGE_LIBS="$MARCO_MESSAGE_LIBS $X_LIBS $X_PRE_LIBS -lX11 $X_EXTRA_LIBS"
MARCO_WINDOW_DEMO_LIBS="$MARCO_WINDOW_DEMO_LIBS $X_LIBS $X_PRE_LIBS -lX11 $X_EXTRA_LIBS"
MARCO_PROPS_LIBS="$MARCO_PROPS_LIBS $X_LIBS $X_PRE_LIBS -lX11 $X_EXTRA_LIBS"
@@ -523,6 +535,7 @@ marco-$VERSION:
Shape extension: ${found_shape}
Resize-and-rotate: ${found_randr}
Xsync: ${found_xsync}
+ Xpresent: ${found_xpresent}
Render: ${have_xrender}
Xcursor: ${have_xcursor}
"