diff options
author | Slávek Banko <[email protected]> | 2015-06-26 13:05:45 +0200 |
---|---|---|
committer | Slávek Banko <[email protected]> | 2015-06-26 13:30:19 +0200 |
commit | 86e9e2420c147bf64ae64aafd2e75576dc40e7b6 (patch) | |
tree | e76bfc213ded08ebb1e8a9e92865e0a7f3cd995a | |
parent | 3fc864f49b40c1ed45e330f454674f825639efbc (diff) | |
download | tdenetwork-86e9e2420c147bf64ae64aafd2e75576dc40e7b6.tar.gz tdenetwork-86e9e2420c147bf64ae64aafd2e75576dc40e7b6.zip |
Fix missing configure checks for CMake build
Signed-off-by: Slávek Banko <[email protected]>
(cherry picked from commit 82dd739ceb246c8d8d10faf03b1a2267d8352d16)
-rw-r--r-- | CMakeLists.txt | 1 | ||||
-rw-r--r-- | config.h.cmake | 15 | ||||
-rw-r--r-- | kopete/ConfigureChecks.cmake | 3 | ||||
-rw-r--r-- | krfb/ConfigureChecks.cmake | 11 | ||||
-rw-r--r-- | ktalkd/ConfigureChecks.cmake | 18 |
5 files changed, 44 insertions, 4 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 81df9962..f584a60b 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 9e24956f..0973a0e6 100644 --- a/krfb/ConfigureChecks.cmake +++ b/krfb/ConfigureChecks.cmake @@ -13,3 +13,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 <dirent.h> + 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 +) |