X-Git-Url: https://git.dogcows.com/gitweb?a=blobdiff_plain;f=m4%2Fx11.m4;fp=m4%2Fx11.m4;h=fc7b36e191b9a16727abd314c40f685cf51ab3fa;hb=3d71bfd20857da4d42997da500f327b229bf9e80;hp=2eae1db5f719dda94b7799a7bfeaa94ab22e3803;hpb=6e83a82e5b5206c8199e392df5f089c0b4122fe1;p=chaz%2Fopenbox diff --git a/m4/x11.m4 b/m4/x11.m4 index 2eae1db5..fc7b36e1 100644 --- a/m4/x11.m4 +++ b/m4/x11.m4 @@ -397,6 +397,60 @@ AC_DEFUN([X11_EXT_XINERAMA], fi ]) +# X11_EXT_SYNC() +# +# Check for the presence of the "Sync" X Window System extension. +# Defines "SYNC", sets the $(SYNC) variable to "yes", and sets the $(LIBS) +# appropriately if the extension is present. +AC_DEFUN([X11_EXT_SYNC], +[ + AC_REQUIRE([X11_DEVEL]) + + # Store these + OLDLIBS=$LIBS + OLDCPPFLAGS=$CPPFLAGS + + CPPFLAGS="$CPPFLAGS $X_CFLAGS" + LIBS="$LIBS $X_LIBS" + + AC_CHECK_LIB([Xext], [XSyncInitialize], + AC_MSG_CHECKING([for X11/extensions/sync.h]) + AC_TRY_LINK( + [ + #include + #include + #include + ], + [ + XSyncValueType foo; + ], + [ + AC_MSG_RESULT([yes]) + SYNC="yes" + AC_DEFINE([SYNC], [1], [Found the XSync extension]) + + XSYNC_CFLAGS="" + XSYNC_LIBS="-lXext" + AC_SUBST(XSYNC_CFLAGS) + AC_SUBST(XSYNC_LIBS) + ], + [ + AC_MSG_RESULT([no]) + SYNC="no" + ]) + ) + + LIBS=$OLDLIBS + CPPFLAGS=$OLDCPPFLAGS + + AC_MSG_CHECKING([for the Sync extension]) + if test "$SYNC" = "yes"; then + AC_MSG_RESULT([yes]) + else + AC_MSG_RESULT([no]) + fi +]) + # X11_SM() # # Check for the presence of SMlib for session management.