summaryrefslogtreecommitdiffstats
path: root/twin
diff options
context:
space:
mode:
authorSlávek Banko <slavek.banko@axis.cz>2014-04-28 01:31:08 +0200
committerSlávek Banko <slavek.banko@axis.cz>2014-04-29 02:01:03 +0200
commitd7235b31b1f53695559f23aa0e62b9f347229502 (patch)
treec8a0f5293912b244ed13351845c22a8031f4cec7 /twin
parent7c55134dee71ab9a2f916ed2f61d33c45a7681df (diff)
downloadtdebase-d7235b31b1f53695559f23aa0e62b9f347229502.tar.gz
tdebase-d7235b31b1f53695559f23aa0e62b9f347229502.zip
twin/compton: make CONFIG_XSYNC autoconfigurable to fix FTBFS with older libXext versions which doesn't provide XSyncFence
Diffstat (limited to 'twin')
-rw-r--r--twin/compton-tde/CMakeLists.txt10
-rw-r--r--twin/compton-tde/common.h2
-rw-r--r--twin/compton-tde/compton_config.h.cmake4
3 files changed, 10 insertions, 6 deletions
diff --git a/twin/compton-tde/CMakeLists.txt b/twin/compton-tde/CMakeLists.txt
index 1f6d6e682..ebaf38f33 100644
--- a/twin/compton-tde/CMakeLists.txt
+++ b/twin/compton-tde/CMakeLists.txt
@@ -28,31 +28,35 @@ include_directories(
# TDE to compton config option map
# WITH_XINNERAMA -> CONFIG_XINERAMA
# WITH_XRANDR -> CONFIG_XANDR
+# HAVE_XEXT_XSYNCFENCE -> CONFIG_XSYNC
# WITH_OPENGL -> CONFIG_VSYNC_OPENGL
# WITH_OPENGL -> CONFIG_VSYNC_OPENGL_GLSL
# WITH_OPENGL -> CONFIG_VSYNC_OPENGL_FBO
-# WITH_OPENGL -> CONFIG_GLX_XSYNC
# WITH_PCRE -> CONFIG_REGEX_PCRE
# WITH_PCRE -> CONFIG_REGEX_PCRE_JIT
# WITH_LIBCONFIG -> CONFIG_LIBCONFIG
#
# HAVE_LIBCONFIG_OLD_API -> CONFIG_LIBCONFIG_LEGACY (set up in compton_config.h)
+# CONFIG_XSYNC -> CONFIG_GLX_SYNC
#
# CONFIG_DBUS - always ON
# CONFIG_C2 - always ON
-# CONFIG_XSYNC - always ON (utilieses Xext)
# TODO: think about some configuration option for CONFIG_VSYNC_DRM
+# NOTE: HAVE__XEXT_XSYNCFENCE is an automatically detected feature that shows
+# that libXext provides coresponding feature.
add_definitions("-std=c99")
set( compton_SRCS compton.c )
+set( CONFIG_XSYNC ${HAVE_XEXT_XSYNCFENCE} )
+
if( WITH_OPENGL )
set( CONFIG_VSYNC_OPENGL ${WITH_OPENGL} )
set( CONFIG_VSYNC_OPENGL_GLSL ${WITH_OPENGL} )
set( CONFIG_VSYNC_OPENGL_FBO ${WITH_OPENGL} )
- set( CONFIG_GLX_XSYNC ${WITH_OPENGL} )
+ set( CONFIG_GLX_SYNC ${CONFIG_XSYNC} )
list( APPEND compton_LIBRARIES ${GL_LIBRARIES})
list( APPEND compton_SRCS opengl.c )
endif( )
diff --git a/twin/compton-tde/common.h b/twin/compton-tde/common.h
index 6f61e7822..8a7bae6d5 100644
--- a/twin/compton-tde/common.h
+++ b/twin/compton-tde/common.h
@@ -61,7 +61,7 @@
// Whether to enable X Sync support.
// #define CONFIG_XSYNC 1
// Whether to enable GLX Sync support.
-// #define CONFIG_GLX_XSYNC 1
+// #define CONFIG_GLX_SYNC 1
// TDE specific options
// #define USE_ENV_HOME 1
diff --git a/twin/compton-tde/compton_config.h.cmake b/twin/compton-tde/compton_config.h.cmake
index a77d93b57..bf3f22543 100644
--- a/twin/compton-tde/compton_config.h.cmake
+++ b/twin/compton-tde/compton_config.h.cmake
@@ -21,7 +21,7 @@
#define CONFIG_C2 1
// Whether to enable X Sync support.
-#define CONFIG_XSYNC 1
+#cmakedefine CONFIG_XSYNC 1
// Whether to enable OpenGL support
#cmakedefine CONFIG_VSYNC_OPENGL 1
@@ -30,7 +30,7 @@
// Whether to enable GLX FBO support
#cmakedefine CONFIG_VSYNC_OPENGL_FBO 1
// Whether to enable GLX Sync support.
-#cmakedefine CONFIG_GLX_XSYNC 1
+#cmakedefine CONFIG_GLX_SYNC 1
// Whether to enable Xranr support
#cmakedefine CONFIG_XRANDR 1