Timothy Pearson 10 years ago
commit 89a87055f0

@ -85,7 +85,8 @@ OPTION( WITH_PCRE "Enable pcre regex support for kjs" ON )
OPTION( WITH_GCC_VISIBILITY "Enable fvisibility and fvisibility-inlines-hidden" ${WITH_ALL_OPTIONS} ) OPTION( WITH_GCC_VISIBILITY "Enable fvisibility and fvisibility-inlines-hidden" ${WITH_ALL_OPTIONS} )
OPTION( WITH_INOTIFY "Enable inotify support for tdeio" ON ) OPTION( WITH_INOTIFY "Enable inotify support for tdeio" ON )
OPTION( WITH_GAMIN "Enable FAM/GAMIN support" ${WITH_ALL_OPTIONS} ) 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_HAL "Enable HAL support" OFF )
option( WITH_DEVKITPOWER "Enable DeviceKit Power support" OFF ) option( WITH_DEVKITPOWER "Enable DeviceKit Power support" OFF )
option( WITH_LOGINDPOWER "Enable Logind/Systemd Power support" OFF ) option( WITH_LOGINDPOWER "Enable Logind/Systemd Power support" OFF )
@ -455,16 +456,29 @@ if( HAVE_RES_INIT )
endif( HAVE_RES_INIT) endif( HAVE_RES_INIT)
set( CMAKE_REQUIRED_LIBRARIES util ) set( CMAKE_REQUIRED_LIBRARIES util )
check_c_source_runs(" if( HAVE_PTY_H )
#include <pty.h> check_c_source_runs("
int main(int argc, char* argv) { #include <pty.h>
int master_fd, slave_fd; int main(int argc, char* argv) {
int result; int master_fd, slave_fd;
result = openpty(&master_fd, &slave_fd, 0, 0, 0); int result;
return 0; result = openpty(&master_fd, &slave_fd, 0, 0, 0);
}" return 0;
HAVE_OPENPTY }"
) 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 ) if( HAVE_OPENPTY )
set( LIB_UTIL util ) set( LIB_UTIL util )
endif( ) endif( )
@ -493,6 +507,10 @@ set( LTDL_OBJDIR \".\" )
set( KDELIBSUFF "${LIB_SUFFIX}" ) set( KDELIBSUFF "${LIB_SUFFIX}" )
set( kde_socklen_t socklen_t ) set( kde_socklen_t socklen_t )
if( WITH_TDEHWLIB )
set( __TDE_HAVE_TDEHWLIB 1 )
endif( WITH_TDEHWLIB )
##### check for libdl ########################### ##### check for libdl ###########################

@ -389,7 +389,7 @@
#cmakedefine HAVE_MEMORY_H 1 #cmakedefine HAVE_MEMORY_H 1
/* Define if you want MIT-SHM support */ /* Define if you want MIT-SHM support */
#undef HAVE_MITSHM #cmakedefine HAVE_MITSHM @HAVE_MITSHM@
/* Define if you have mkdtemp */ /* Define if you have mkdtemp */
#cmakedefine HAVE_MKDTEMP 1 #cmakedefine HAVE_MKDTEMP 1
@ -822,13 +822,13 @@
/* Define to the name of the environment variable that determines the dynamic /* Define to the name of the environment variable that determines the dynamic
library search path. */ library search path. */
#undef LTDL_SHLIBPATH_VAR #cmakedefine LTDL_SHLIBPATH_VAR "@LTDL_SHLIBPATH_VAR@"
/* Define to the extension used for shared libraries, say, ".so". */ /* Define to the extension used for shared libraries, say, ".so". */
#undef LTDL_SHLIB_EXT #undef LTDL_SHLIB_EXT
/* Define to the system default library search path. */ /* 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. /* Define to the sub-directory in which libtool stores uninstalled libraries.
*/ */
@ -927,10 +927,10 @@
#endif #endif
/* where rgb.txt is in */ /* where rgb.txt is in */
#undef X11_RGBFILE #cmakedefine X11_RGBFILE "@X11_RGBFILE@"
/* Defines the executable of xmllint */ /* Defines the executable of xmllint */
#undef XMLLINT #cmakedefine XMLLINT "@XMLLINT@"
/* Defined if your system has XRandR support */ /* Defined if your system has XRandR support */
#cmakedefine XRANDR_SUPPORT 1 #cmakedefine XRANDR_SUPPORT 1
@ -1189,10 +1189,10 @@ int snprintf(char *str, size_t n, char const *fmt, ...);
#undef __KDE_HAVE_GCC_VISIBILITY #undef __KDE_HAVE_GCC_VISIBILITY
/* path to su */ /* path to su */
#define __PATH_SU "@__PATH_SU@" #cmakedefine __PATH_SU "@__PATH_SU@"
/* path to sudo */ /* path to sudo */
#define __PATH_SUDO "@__PATH_SUDO@" #cmakedefine __PATH_SUDO "@__PATH_SUDO@"
#if defined(__SVR4) && !defined(__svr4__) #if defined(__SVR4) && !defined(__svr4__)

@ -79,6 +79,13 @@ add_custom_command(
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/scripts WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/scripts
) )
add_custom_target(
addressee_files
DEPENDS
${CMAKE_CURRENT_BINARY_DIR}/addressee.cpp
${CMAKE_CURRENT_BINARY_DIR}/addressee.h
${CMAKE_CURRENT_BINARY_DIR}/field.cpp
)
##### tdeabc ###################################### ##### tdeabc ######################################
@ -103,7 +110,7 @@ tde_add_library( ${target} SHARED AUTOMOC
SOURCES ${${target}_SRCS} SOURCES ${${target}_SRCS}
VERSION 1.2.0 VERSION 1.2.0
LINK vcards-static vcard-shared tdeio-shared tderesources-shared LINK vcards-static vcard-shared tdeio-shared tderesources-shared
DEPENDENCIES addressee.h dcopidl DEPENDENCIES addressee_files dcopidl
DESTINATION ${LIB_INSTALL_DIR} DESTINATION ${LIB_INSTALL_DIR}
) )

@ -12,7 +12,12 @@
add_subdirectory( malloc ) add_subdirectory( malloc )
add_subdirectory( network ) add_subdirectory( network )
add_subdirectory( tdeconfig_compiler ) 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 ) if( WITH_LIBART )
add_subdirectory( svgicons ) add_subdirectory( svgicons )
@ -25,7 +30,7 @@ include_directories(
${CMAKE_BINARY_DIR} ${CMAKE_BINARY_DIR}
${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}
${CMAKE_CURRENT_SOURCE_DIR}/network ${CMAKE_CURRENT_SOURCE_DIR}/network
${CMAKE_CURRENT_SOURCE_DIR}/tdehw ${TDEHW_INCLUDE_DIR}
${CMAKE_SOURCE_DIR}/dcop ${CMAKE_SOURCE_DIR}/dcop
${CMAKE_SOURCE_DIR}/libltdl ${CMAKE_SOURCE_DIR}/libltdl
${CMAKE_SOURCE_DIR}/tdefx ${CMAKE_SOURCE_DIR}/tdefx
@ -128,10 +133,10 @@ set( ${target}_SRCS
tde_add_library( ${target} SHARED AUTOMOC tde_add_library( ${target} SHARED AUTOMOC
SOURCES ${${target}_SRCS} SOURCES ${${target}_SRCS}
VERSION 14.0.0 VERSION 14.0.0
EMBED tdecorenetwork-static tdehw-static EMBED tdecorenetwork-static ${TDEHW_LIB}
LINK ltdlc-static ${KDESVGICONS} DCOP-shared tdefx-shared ${ZLIB_LIBRARIES} LINK ltdlc-static ${KDESVGICONS} DCOP-shared tdefx-shared ${ZLIB_LIBRARIES}
${LIBIDN_LIBRARIES} ${XCOMPOSITE_LIBRARIES} ICE SM ${GAMIN_LIBRARIES} ${LIBIDN_LIBRARIES} ${XCOMPOSITE_LIBRARIES} ICE SM ${GAMIN_LIBRARIES}
${LIBBFD_LIBRARIES} util ${LIBBFD_LIBRARIES} ${LIB_UTIL}
DEPENDENCIES dcopidl dcopidl2cpp DEPENDENCIES dcopidl dcopidl2cpp
DESTINATION ${LIB_INSTALL_DIR} DESTINATION ${LIB_INSTALL_DIR}
) )

@ -21,6 +21,7 @@
#define _KDE_MACROS_H_ #define _KDE_MACROS_H_
/* Set by configure */ /* Set by configure */
#cmakedefine __TDE_HAVE_TDEHWLIB 1
#cmakedefine __KDE_HAVE_GCC_VISIBILITY 1 #cmakedefine __KDE_HAVE_GCC_VISIBILITY 1
/** /**

@ -24,8 +24,10 @@
#include "tdelocale.h" #include "tdelocale.h"
#include "kcharsets.h" #include "kcharsets.h"
#include "kiconloader.h" #include "kiconloader.h"
#ifdef __TDE_HAVE_TDEHWLIB
#include "tdehardwaredevices.h" #include "tdehardwaredevices.h"
#include "tdenetworkconnections.h" #include "tdenetworkconnections.h"
#endif
#include "tdeaboutdata.h" #include "tdeaboutdata.h"
#include "kstandarddirs.h" #include "kstandarddirs.h"
#include "kdebug.h" #include "kdebug.h"
@ -72,8 +74,10 @@ TDEInstance::TDEInstance( const TQCString& name)
: _dirs (0L), : _dirs (0L),
_config (0L), _config (0L),
_iconLoader (0L), _iconLoader (0L),
#ifdef __TDE_HAVE_TDEHWLIB
_hardwaredevices (0L), _hardwaredevices (0L),
_networkmanager (0L), _networkmanager (0L),
#endif
_name( name ), _aboutData( new TDEAboutData( name, "", 0 ) ), m_configReadOnly(false) _name( name ), _aboutData( new TDEAboutData( name, "", 0 ) ), m_configReadOnly(false)
{ {
DEBUG_ADD DEBUG_ADD
@ -92,8 +96,10 @@ TDEInstance::TDEInstance( const TDEAboutData * aboutData )
: _dirs (0L), : _dirs (0L),
_config (0L), _config (0L),
_iconLoader (0L), _iconLoader (0L),
#ifdef __TDE_HAVE_TDEHWLIB
_hardwaredevices (0L), _hardwaredevices (0L),
_networkmanager (0L), _networkmanager (0L),
#endif
_name( aboutData->appName() ), _aboutData( aboutData ), m_configReadOnly(false) _name( aboutData->appName() ), _aboutData( aboutData ), m_configReadOnly(false)
{ {
DEBUG_ADD DEBUG_ADD
@ -113,8 +119,10 @@ TDEInstance::TDEInstance( TDEInstance* src )
: _dirs ( src->_dirs ), : _dirs ( src->_dirs ),
_config ( src->_config ), _config ( src->_config ),
_iconLoader ( src->_iconLoader ), _iconLoader ( src->_iconLoader ),
#ifdef __TDE_HAVE_TDEHWLIB
_hardwaredevices ( src->_hardwaredevices ), _hardwaredevices ( src->_hardwaredevices ),
_networkmanager ( src->_networkmanager ), _networkmanager ( src->_networkmanager ),
#endif
_name( src->_name ), _aboutData( src->_aboutData ), m_configReadOnly(false) _name( src->_name ), _aboutData( src->_aboutData ), m_configReadOnly(false)
{ {
DEBUG_ADD DEBUG_ADD
@ -133,8 +141,10 @@ TDEInstance::TDEInstance( TDEInstance* src )
src->_dirs = 0L; src->_dirs = 0L;
src->_config = 0L; src->_config = 0L;
src->_iconLoader = 0L; src->_iconLoader = 0L;
#ifdef __TDE_HAVE_TDEHWLIB
src->_hardwaredevices = 0L; src->_hardwaredevices = 0L;
src->_networkmanager = 0L; src->_networkmanager = 0L;
#endif
src->_aboutData = 0L; src->_aboutData = 0L;
delete src; delete src;
} }
@ -153,11 +163,13 @@ TDEInstance::~TDEInstance()
delete _iconLoader; delete _iconLoader;
_iconLoader = 0; _iconLoader = 0;
#ifdef __TDE_HAVE_TDEHWLIB
delete _hardwaredevices; delete _hardwaredevices;
_hardwaredevices = 0; _hardwaredevices = 0;
delete _networkmanager; delete _networkmanager;
_networkmanager = 0; _networkmanager = 0;
#endif
// delete _config; // Do not delete, stored in d->sharedConfig // delete _config; // Do not delete, stored in d->sharedConfig
_config = 0; _config = 0;
@ -270,6 +282,7 @@ TDEIconLoader *TDEInstance::iconLoader() const
return _iconLoader; return _iconLoader;
} }
#ifdef __TDE_HAVE_TDEHWLIB
TDEHardwareDevices *TDEInstance::hardwareDevices() const TDEHardwareDevices *TDEInstance::hardwareDevices() const
{ {
DEBUG_CHECK_ALIVE DEBUG_CHECK_ALIVE
@ -289,6 +302,7 @@ TDEGlobalNetworkManager *TDEInstance::networkManager() const
return _networkmanager; return _networkmanager;
} }
#endif
void TDEInstance::newIconLoader() const void TDEInstance::newIconLoader() const
{ {

@ -18,6 +18,9 @@
#ifndef _KINSTANCE_H #ifndef _KINSTANCE_H
#define _KINSTANCE_H #define _KINSTANCE_H
#include <tqstring.h>
#include "tdelibs_export.h"
class TDEStandardDirs; class TDEStandardDirs;
class TDEAboutData; class TDEAboutData;
class TDEConfig; class TDEConfig;
@ -27,11 +30,10 @@ class TQFont;
class TDEInstancePrivate; class TDEInstancePrivate;
class KMimeSourceFactory; class KMimeSourceFactory;
class TDESharedConfig; class TDESharedConfig;
#ifdef __TDE_HAVE_TDEHWLIB
class TDEHardwareDevices; class TDEHardwareDevices;
class TDEGlobalNetworkManager; class TDEGlobalNetworkManager;
#endif
#include <tqstring.h>
#include "tdelibs_export.h"
/** /**
@ -110,6 +112,7 @@ class TDECORE_EXPORT TDEInstance
*/ */
TDEIconLoader *iconLoader() const; TDEIconLoader *iconLoader() const;
#ifdef __TDE_HAVE_TDEHWLIB
/** /**
* Returns a TDEHardwareDevices object. * Returns a TDEHardwareDevices object.
* @return the hardwaredevices object. * @return the hardwaredevices object.
@ -121,6 +124,7 @@ class TDECORE_EXPORT TDEInstance
* @return the networkmanager object. * @return the networkmanager object.
*/ */
TDEGlobalNetworkManager *networkManager() const; TDEGlobalNetworkManager *networkManager() const;
#endif
/** /**
* Re-allocate the global iconloader. * Re-allocate the global iconloader.
@ -168,8 +172,10 @@ private:
mutable TDEConfig *_config; mutable TDEConfig *_config;
mutable TDEIconLoader *_iconLoader; mutable TDEIconLoader *_iconLoader;
#ifdef __TDE_HAVE_TDEHWLIB
mutable TDEHardwareDevices *_hardwaredevices; mutable TDEHardwareDevices *_hardwaredevices;
mutable TDEGlobalNetworkManager *_networkmanager; mutable TDEGlobalNetworkManager *_networkmanager;
#endif
mutable void *_placeholder; mutable void *_placeholder;
TQCString _name; TQCString _name;

@ -34,8 +34,10 @@
#include <tdelocale.h> #include <tdelocale.h>
#include <kcharsets.h> #include <kcharsets.h>
#include <kiconloader.h> #include <kiconloader.h>
#ifdef __TDE_HAVE_TDEHWLIB
#include <tdehardwaredevices.h> #include <tdehardwaredevices.h>
#include <tdenetworkconnections.h> #include <tdenetworkconnections.h>
#endif
#include <kstandarddirs.h> #include <kstandarddirs.h>
#include <kinstance.h> #include <kinstance.h>
#include "kstaticdeleter.h" #include "kstaticdeleter.h"
@ -81,6 +83,7 @@ TDEIconLoader *TDEGlobal::iconLoader()
return _instance->iconLoader(); return _instance->iconLoader();
} }
#ifdef __TDE_HAVE_TDEHWLIB
TDEHardwareDevices *TDEGlobal::hardwareDevices() TDEHardwareDevices *TDEGlobal::hardwareDevices()
{ {
MYASSERT(_instance); MYASSERT(_instance);
@ -94,6 +97,7 @@ TDEGlobalNetworkManager *TDEGlobal::networkManager()
return _instance->networkManager(); return _instance->networkManager();
} }
#endif
TDEInstance *TDEGlobal::instance() TDEInstance *TDEGlobal::instance()
{ {

Loading…
Cancel
Save