summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTimothy Pearson <kb9vqf@pearsoncomputing.net>2014-04-01 21:50:50 +0000
committerTimothy Pearson <kb9vqf@pearsoncomputing.net>2014-04-01 21:51:38 +0000
commit98f8df6427a933ee405537128e7e913684a6d791 (patch)
tree5aa29ea4230e99ff8a9bb23abe355bed747b9aeb
parent8083ca83aef5f36ccf7e51e6db8f0310b208f929 (diff)
downloadtdebase-98f8df6427a933ee405537128e7e913684a6d791.tar.gz
tdebase-98f8df6427a933ee405537128e7e913684a6d791.zip
Fix compton-tde FTBFS on older systems
-rw-r--r--CMakeLists.txt4
-rw-r--r--ConfigureChecks.cmake19
-rw-r--r--config.h.cmake6
-rw-r--r--twin/compton-tde/CMakeLists.txt9
-rw-r--r--twin/compton-tde/common.h5
5 files changed, 38 insertions, 5 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 367a74940..c1b7e79bd 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -3,6 +3,9 @@
# (C) 2010-2012 Serghei Amelian
# serghei (DOT) amelian (AT) gmail.com
#
+# (C) 2014 Timothy Pearson
+# kb9vqf (AT) pearsoncomputing (DOT) net
+#
# Improvements and feedback are welcome
#
#################################################
@@ -70,6 +73,7 @@ option( WITH_XRANDR "Enable xrandr support" ${WITH_ALL_OPTIONS} )
option( WITH_XRENDER "Enable xrender support" ${WITH_ALL_OPTIONS} )
option( WITH_XDAMAGE "Enable xdamage support" ${WITH_ALL_OPTIONS} )
option( WITH_XEXT "Enable xext support" ${WITH_ALL_OPTIONS} )
+option( WITH_LIBCONFIG "Enable libconfig support" ${WITH_ALL_OPTIONS} )
option( WITH_XTEST "Enable xtest support" ${WITH_ALL_OPTIONS} )
option( WITH_OPENGL "Enable openGL support" ${WITH_ALL_OPTIONS} )
option( WITH_XSCREENSAVER "Enable xscreensaver support" ${WITH_ALL_OPTIONS} )
diff --git a/ConfigureChecks.cmake b/ConfigureChecks.cmake
index 4fa14ed1e..9dfb6d137 100644
--- a/ConfigureChecks.cmake
+++ b/ConfigureChecks.cmake
@@ -3,6 +3,9 @@
# (C) 2010-2012 Serghei Amelian
# serghei (DOT) amelian (AT) gmail.com
#
+# (C) 2014 Timothy Pearson
+# kb9vqf (AT) pearsoncomputing (DOT) net
+#
# Improvements and feedback are welcome
#
# This file is released under GPL >= 2
@@ -133,6 +136,20 @@ if( WITH_XEXT )
endif( )
+# libconfig (twin/compton-tde)
+if( WITH_LIBCONFIG )
+ pkg_search_module( LIBCONFIG libconfig )
+ if( LIBCONFIG_FOUND )
+ set( HAVE_LIBCONFIG 1 )
+ if( LIBCONFIG_VERSION VERSION_LESS 1.5.0 )
+ set( HAVE_LIBCONFIG_OLD_API 1 )
+ endif( )
+ else( LIBCONFIG_FOUND )
+ tde_message_fatal( "libconfig is requested, but was not found on your system" )
+ endif( )
+endif( )
+
+
# xtest (kxkb)
if( WITH_XTEST )
pkg_search_module( XTEST xtst )
@@ -322,4 +339,4 @@ if( WITH_ELFICON )
message(FATAL_ERROR "\nelficon support was requested, but the libr version on your system may not be compatible with TDE" )
endif( NOT "${LIBR_VERSION}" STREQUAL "0.6.0" )
set( HAVE_ELFICON 1 )
-endif( ) \ No newline at end of file
+endif( )
diff --git a/config.h.cmake b/config.h.cmake
index 35796b3c9..f5ebeebcc 100644
--- a/config.h.cmake
+++ b/config.h.cmake
@@ -36,6 +36,10 @@
// libr
#cmakedefine HAVE_ELFICON 1
+// libconfig
+#cmakedefine HAVE_LIBCONFIG 1
+#cmakedefine HAVE_LIBCONFIG_OLD_API 1
+
// tdm, tdeioslave
#cmakedefine HAVE_TERMIOS_H 1
@@ -203,4 +207,4 @@
#cmakedefine KICKOFF_DIST_CONFIG_SHORTCUT2 "@KICKOFF_DIST_CONFIG_SHORTCUT2@"
// TDE compositor binary name
-#define TDE_COMPOSITOR_BINARY "compton-tde" \ No newline at end of file
+#define TDE_COMPOSITOR_BINARY "compton-tde"
diff --git a/twin/compton-tde/CMakeLists.txt b/twin/compton-tde/CMakeLists.txt
index 65b9c7ed2..7d4f9ace4 100644
--- a/twin/compton-tde/CMakeLists.txt
+++ b/twin/compton-tde/CMakeLists.txt
@@ -13,7 +13,7 @@
if( NOT WITH_XRENDER )
tde_message_fatal( "xrender support is needed to build compton-tde.\n Pass -DWITH_XRENDER=ON to cmake arguments." )
elseif( NOT WITH_XRANDR )
- tde_message_fatal( "xrandr support is needed to build compton-tde.\n Pass -DWITH_XFIXES=ON to cmake arguments." )
+ tde_message_fatal( "xrandr support is needed to build compton-tde.\n Pass -DWITH_XRANDR=ON to cmake arguments." )
elseif( NOT WITH_XFIXES )
tde_message_fatal( "xfixes support is needed to build compton-tde.\n Pass -DWITH_XFIXES=ON to cmake arguments." )
elseif( NOT WITH_XDAMAGE )
@@ -21,11 +21,14 @@ elseif( NOT WITH_XDAMAGE )
elseif( NOT WITH_XEXT )
tde_message_fatal( "xext support is needed to build compton-tde.\n Pass -DWITH_XEXT=ON to cmake arguments." )
elseif( NOT WITH_XINERAMA )
- tde_message_fatal( "xinerama support is needed to build compton-tde.\n Pass -DWITH_XEXT=ON to cmake arguments." )
+ tde_message_fatal( "xinerama support is needed to build compton-tde.\n Pass -DWITH_XINERAMA=ON to cmake arguments." )
+elseif( NOT WITH_LIBCONFIG )
+ tde_message_fatal( "libconfig support is needed to build compton-tde.\n Pass -DWITH_LIBCONFIG=ON to cmake arguments." )
endif( )
include_directories(
+ ${CMAKE_BINARY_DIR}
${TDE_INCLUDE_DIR}
${TQT_INCLUDE_DIRS}
)
@@ -68,6 +71,6 @@ endif ()
tde_add_executable( compton-tde
SOURCES c2.c compton.c opengl.c
- LINK m GL config Xinerama ${XRENDER_LIBRARIES} ${XRANDR_LIBRARIES} ${XFIXES_LIBRARIES} ${XDAMAGE_LIBRARIES} ${XEXT_LIBRARIES} ${XCOMPOSITE_LIBRARIES}
+ LINK m GL Xinerama ${LIBCONFIG_LIBRARIES} ${XRENDER_LIBRARIES} ${XRANDR_LIBRARIES} ${XFIXES_LIBRARIES} ${XDAMAGE_LIBRARIES} ${XEXT_LIBRARIES} ${XCOMPOSITE_LIBRARIES}
DESTINATION ${BIN_INSTALL_DIR}
)
diff --git a/twin/compton-tde/common.h b/twin/compton-tde/common.h
index 275b7b671..5c6392f51 100644
--- a/twin/compton-tde/common.h
+++ b/twin/compton-tde/common.h
@@ -12,6 +12,8 @@
#ifndef COMPTON_COMMON_H
#define COMPTON_COMMON_H
+#include "config.h"
+
// === Options ===
// Debug options, enable them using -D in CFLAGS
@@ -65,6 +67,9 @@
// #define USE_ENV_HOME 1
#define WRITE_PID_FILE 1
#define _TDE_COMP_MGR_VERSION_ 3.00
+#if defined(HAVE_LIBCONFIG_OLD_API)
+#define CONFIG_LIBCONFIG_LEGACY 1
+#endif
#if !defined(CONFIG_C2) && defined(DEBUG_C2)
#error Cannot enable c2 debugging without c2 support.