diff --git a/CMakeLists.txt b/CMakeLists.txt index 857b9ad4..52c97bea 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -28,6 +28,7 @@ include( CheckIncludeFile ) include( CheckIncludeFileCXX ) include( CheckCXXSourceCompiles ) include( CheckLibraryExists ) +include( CheckStructHasMember ) ##### include our cmake modules ################# diff --git a/config.h.cmake b/config.h.cmake index 9e0cfbad..d8c1211e 100644 --- a/config.h.cmake +++ b/config.h.cmake @@ -16,6 +16,7 @@ #cmakedefine SUPPORT_JINGLE 1 #cmakedefine HAVE_GLIB 1 #cmakedefine HAVE_SPEEX 1 +#cmakedefine HAVE_TM_GMTOFF 1 // kopete/plugins/nowlistening #cmakedefine HAVE_XMMS 1 @@ -25,7 +26,11 @@ #cmakedefine HAVE_NET_IF_PPP_H 1 // krcd / krfb +#cmakedefine HAVE_GETNAMEINFO 1 +#cmakedefine HAVE_GETIFADDRS 1 #cmakedefine HAVE_SLP 1 +#cmakedefine HAVE_STRUCT_SOCKADDR_SA_LEN 1 +#cmakedefine HAVE_SYS_SOCKIO_H 1 // ktalkd #cmakedefine HAVE_SYS_TYPES_H 1 @@ -33,12 +38,14 @@ #cmakedefine HAVE_SYS_FILE_H 1 #cmakedefine HAVE_UNISTD_H 1 #cmakedefine HAVE_UTMP_H 1 +#cmakedefine HAVE_UTMPX_H 1 #cmakedefine HAVE_VSNPRINTF 1 -#define SCANDIR_NEEDS_CONST 1 +#cmakedefine SCANDIR_NEEDS_CONST 1 + // only for Linux -#define PROC_FIND_USER 1 -#define UTMP_AND_PROC_FIND_USER 1 -#define ALL_PROCESSES_AND_PROC_FIND_USER 1 +#cmakedefine PROC_FIND_USER 1 +#cmakedefine UTMP_AND_PROC_FIND_USER 1 +#cmakedefine ALL_PROCESSES_AND_PROC_FIND_USER 1 // wifi #cmakedefine WITHOUT_ARTS 1 diff --git a/kopete/ConfigureChecks.cmake b/kopete/ConfigureChecks.cmake index b6ec6758..ef0a250f 100644 --- a/kopete/ConfigureChecks.cmake +++ b/kopete/ConfigureChecks.cmake @@ -33,3 +33,6 @@ if ( HAVE_LINUX_VIDEODEV_H ) endif ( ) # -- End linux-videodev.h ---------------------------------------------- +### Check for tm_gmtoff in tm struct +check_struct_has_member( "struct tm" tm_gmtoff time.h HAVE_TM_GMTOFF ) + diff --git a/krfb/ConfigureChecks.cmake b/krfb/ConfigureChecks.cmake index 2de58a4d..4a760e97 100644 --- a/krfb/ConfigureChecks.cmake +++ b/krfb/ConfigureChecks.cmake @@ -16,3 +16,14 @@ pkg_search_module( XTST xtst ) if( NOT XTST_FOUND ) tde_message_fatal( "xtst is required, but was not found on your system" ) endif( ) + +check_function_exists( getnameinfo HAVE_GETNAMEINFO ) +check_function_exists( getifaddrs HAVE_GETIFADDRS ) +check_include_file( sys/sockio.h HAVE_SYS_SOCKIO_H ) + +check_struct_has_member( + "struct sockaddr" sa_len + "sys/types.h;sys/socket.h;netinet/in.h" + HAVE_STRUCT_SOCKADDR_SA_LEN +) + diff --git a/ktalkd/ConfigureChecks.cmake b/ktalkd/ConfigureChecks.cmake index 8238322f..923854b0 100644 --- a/ktalkd/ConfigureChecks.cmake +++ b/ktalkd/ConfigureChecks.cmake @@ -14,5 +14,23 @@ check_include_file( sys/stat.h HAVE_SYS_STAT_H ) check_include_file( sys/file.h HAVE_SYS_FILE_H ) check_include_file( unistd.h HAVE_UNISTD_H ) check_include_file( utmp.h HAVE_UTMP_H ) +check_include_file( utmpx.h HAVE_UTMPX_H ) check_function_exists( vsnprintf HAVE_VSNPRINTF ) + +if( ${CMAKE_SYSTEM_NAME} STREQUAL "Linux" ) + set( PROC_FIND_USER 1 CACHE INTERNAL "" FORCE ) + set( UTMP_AND_PROC_FIND_USER 1 CACHE INTERNAL "" FORCE ) + set( ALL_PROCESSES_AND_PROC_FIND_USER 1 CACHE INTERNAL "" FORCE ) +endif( ) + +check_c_source_compiles(" + #include + int select_process(const struct dirent *d) { return 0; } + + int main(int argc, char *argv[]) { + struct dirent **namelist; + (void) scandir(\"/proc\", &namelist, select_process, 0 /*no sort*/); + }" + SCANDIR_NEEDS_CONST +)