223f0c75 | 2014-10-06 18:34:08 | François Andriot |
Enable previously disabled build options in config.h |
||
M config.h.cmake |
||
diff --git a/config.h.cmake b/config.h.cmake index 7dcd1ae..b1e4eb3 100644 --- a/config.h.cmake +++ b/config.h.cmake @@ -389,7 +389,7 @@ #cmakedefine HAVE_MEMORY_H 1 /* Define if you want MIT-SHM support */ -#undef HAVE_MITSHM +#cmakedefine HAVE_MITSHM @HAVE_MITSHM@ /* Define if you have mkdtemp */ #cmakedefine HAVE_MKDTEMP 1 @@ -822,13 +822,13 @@ /* Define to the name of the environment variable that determines the dynamic library search path. */ -#undef LTDL_SHLIBPATH_VAR +#cmakedefine LTDL_SHLIBPATH_VAR "@LTDL_SHLIBPATH_VAR@" /* Define to the extension used for shared libraries, say, ".so". */ #undef LTDL_SHLIB_EXT /* Define to the system default library search path. */ -#undef LTDL_SYSSEARCHPATH +#cmakedefine LTDL_SYSSEARCHPATH "@LTDL_SYSSEARCHPATH@" /* Define to the sub-directory in which libtool stores uninstalled libraries. */ @@ -927,10 +927,10 @@ #endif /* where rgb.txt is in */ -#undef X11_RGBFILE +#cmakedefine X11_RGBFILE "@X11_RGBFILE@" /* Defines the executable of xmllint */ -#undef XMLLINT +#cmakedefine XMLLINT "@XMLLINT@" /* Defined if your system has XRandR support */ #cmakedefine XRANDR_SUPPORT 1 @@ -1189,10 +1189,10 @@ #undef __KDE_HAVE_GCC_VISIBILITY /* path to su */ -#define __PATH_SU "@__PATH_SU@" +#cmakedefine __PATH_SU "@__PATH_SU@" /* path to sudo */ -#define __PATH_SUDO "@__PATH_SUDO@" +#cmakedefine __PATH_SUDO "@__PATH_SUDO@" #if defined(__SVR4) && !defined(__svr4__) |
||
e255a8ca | 2014-10-06 18:34:09 | François Andriot |
Fix openpty detection on openbsd |
||
M CMakeLists.txt |
||
diff --git a/CMakeLists.txt b/CMakeLists.txt index 52ee5c1..ac8d023 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -455,16 +455,29 @@ endif( HAVE_RES_INIT) set( CMAKE_REQUIRED_LIBRARIES util ) -check_c_source_runs(" - #include <pty.h> - int main(int argc, char* argv) { - int master_fd, slave_fd; - int result; - result = openpty(&master_fd, &slave_fd, 0, 0, 0); - return 0; - }" - HAVE_OPENPTY -) +if( HAVE_PTY_H ) + check_c_source_runs(" + #include <pty.h> + int main(int argc, char* argv) { + int master_fd, slave_fd; + int result; + result = openpty(&master_fd, &slave_fd, 0, 0, 0); + return 0; + }" + HAVE_OPENPTY + ) +elseif( HAVE_UTIL_H ) + check_c_source_runs(" + #include <util.h> + int main(int argc, char* argv) { + int master_fd, slave_fd; + int result; + result = openpty(&master_fd, &slave_fd, 0, 0, 0); + return 0; + }" + HAVE_OPENPTY + ) +endif( ) if( HAVE_OPENPTY ) set( LIB_UTIL util ) endif( ) |
||
84e3f9e0 | 2014-10-06 18:34:09 | François Andriot |
Allow conditional build of tdehwlib |
||
M CMakeLists.txt M tdecore/CMakeLists.txt M tdecore/kdemacros.h.cmake M tdecore/kinstance.cpp M tdecore/kinstance.h M tdecore/tdeglobal.cpp |
||
diff --git a/CMakeLists.txt b/CMakeLists.txt index ac8d023..45f161b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -85,7 +85,8 @@ OPTION( WITH_GCC_VISIBILITY "Enable fvisibility and fvisibility-inlines-hidden" ${WITH_ALL_OPTIONS} ) OPTION( WITH_INOTIFY "Enable inotify support for tdeio" ON ) OPTION( WITH_GAMIN "Enable FAM/GAMIN support" ${WITH_ALL_OPTIONS} ) -option( WITH_TDEHWLIB_DAEMONS "Enable daemons for TDE hwlib" ${WITH_ALL_OPTIONS} ) +option( WITH_TDEHWLIB "Enable TDE hwlib globally" ON ) +option( WITH_TDEHWLIB_DAEMONS "Enable daemons for TDE hwlib" ${WITH_TDEHWLIB} ) option( WITH_HAL "Enable HAL support" OFF ) option( WITH_DEVKITPOWER "Enable DeviceKit Power support" OFF ) option( WITH_LOGINDPOWER "Enable Logind/Systemd Power support" OFF ) @@ -506,6 +507,10 @@ set( KDELIBSUFF "${LIB_SUFFIX}" ) set( kde_socklen_t socklen_t ) +if( WITH_TDEHWLIB ) + set( __TDE_HAVE_TDEHWLIB 1 ) +endif( WITH_TDEHWLIB ) + ##### check for libdl ########################### diff --git a/tdecore/CMakeLists.txt b/tdecore/CMakeLists.txt index 508ca85..85f5c99 100644 --- a/tdecore/CMakeLists.txt +++ b/tdecore/CMakeLists.txt @@ -12,7 +12,12 @@ add_subdirectory( malloc ) add_subdirectory( network ) add_subdirectory( tdeconfig_compiler ) -add_subdirectory( tdehw ) + +if( WITH_TDEHWLIB ) + add_subdirectory( tdehw ) + set( TDEHW_INCLUDE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/tdehw ) + set( TDEHW_LIB tdehw-static ) +endif( WITH_TDEHWLIB ) if( WITH_LIBART ) add_subdirectory( svgicons ) @@ -25,7 +30,7 @@ ${CMAKE_BINARY_DIR} ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/network - ${CMAKE_CURRENT_SOURCE_DIR}/tdehw + ${TDEHW_INCLUDE_DIR} ${CMAKE_SOURCE_DIR}/dcop ${CMAKE_SOURCE_DIR}/libltdl ${CMAKE_SOURCE_DIR}/tdefx @@ -128,10 +133,10 @@ tde_add_library( ${target} SHARED AUTOMOC SOURCES ${${target}_SRCS} VERSION 14.0.0 - EMBED tdecorenetwork-static tdehw-static + EMBED tdecorenetwork-static ${TDEHW_LIB} LINK ltdlc-static ${KDESVGICONS} DCOP-shared tdefx-shared ${ZLIB_LIBRARIES} ${LIBIDN_LIBRARIES} ${XCOMPOSITE_LIBRARIES} ICE SM ${GAMIN_LIBRARIES} - ${LIBBFD_LIBRARIES} util + ${LIBBFD_LIBRARIES} ${LIB_UTIL} DEPENDENCIES dcopidl dcopidl2cpp DESTINATION ${LIB_INSTALL_DIR} ) diff --git a/tdecore/kdemacros.h.cmake b/tdecore/kdemacros.h.cmake index 766ca62..083cc8c 100644 --- a/tdecore/kdemacros.h.cmake +++ b/tdecore/kdemacros.h.cmake @@ -21,6 +21,7 @@ #define _KDE_MACROS_H_ /* Set by configure */ +#cmakedefine __TDE_HAVE_TDEHWLIB 1 #cmakedefine __KDE_HAVE_GCC_VISIBILITY 1 /** diff --git a/tdecore/kinstance.cpp b/tdecore/kinstance.cpp index 6760c95..cbdf867 100644 --- a/tdecore/kinstance.cpp +++ b/tdecore/kinstance.cpp @@ -24,8 +24,10 @@ #include "tdelocale.h" #include "kcharsets.h" #include "kiconloader.h" +#ifdef __TDE_HAVE_TDEHWLIB #include "tdehardwaredevices.h" #include "tdenetworkconnections.h" +#endif #include "tdeaboutdata.h" #include "kstandarddirs.h" #include "kdebug.h" @@ -72,8 +74,10 @@ : _dirs (0L), _config (0L), _iconLoader (0L), +#ifdef __TDE_HAVE_TDEHWLIB _hardwaredevices (0L), _networkmanager (0L), +#endif _name( name ), _aboutData( new TDEAboutData( name, "", 0 ) ), m_configReadOnly(false) { DEBUG_ADD @@ -92,8 +96,10 @@ : _dirs (0L), _config (0L), _iconLoader (0L), +#ifdef __TDE_HAVE_TDEHWLIB _hardwaredevices (0L), _networkmanager (0L), +#endif _name( aboutData->appName() ), _aboutData( aboutData ), m_configReadOnly(false) { DEBUG_ADD @@ -113,8 +119,10 @@ : _dirs ( src->_dirs ), _config ( src->_config ), _iconLoader ( src->_iconLoader ), +#ifdef __TDE_HAVE_TDEHWLIB _hardwaredevices ( src->_hardwaredevices ), _networkmanager ( src->_networkmanager ), +#endif _name( src->_name ), _aboutData( src->_aboutData ), m_configReadOnly(false) { DEBUG_ADD @@ -133,8 +141,10 @@ src->_dirs = 0L; src->_config = 0L; src->_iconLoader = 0L; +#ifdef __TDE_HAVE_TDEHWLIB src->_hardwaredevices = 0L; src->_networkmanager = 0L; +#endif src->_aboutData = 0L; delete src; } @@ -153,11 +163,13 @@ delete _iconLoader; _iconLoader = 0; +#ifdef __TDE_HAVE_TDEHWLIB delete _hardwaredevices; _hardwaredevices = 0; delete _networkmanager; _networkmanager = 0; +#endif // delete _config; // Do not delete, stored in d->sharedConfig _config = 0; @@ -270,6 +282,7 @@ ** Diff limit reached (max: 250 lines) ** |
||
d227c416 | 2014-10-06 18:34:10 | Slávek Banko |
Fix dependencies in CMake targets |
||
M tdeabc/CMakeLists.txt |
||
** Diff limit reached (max: 250 lines) ** |