summaryrefslogtreecommitdiffstats
path: root/ktalkd/ConfigureChecks.cmake
diff options
context:
space:
mode:
authorSlávek Banko <slavek.banko@axis.cz>2015-06-26 13:05:45 +0200
committerSlávek Banko <slavek.banko@axis.cz>2015-06-26 13:30:19 +0200
commit86e9e2420c147bf64ae64aafd2e75576dc40e7b6 (patch)
treee76bfc213ded08ebb1e8a9e92865e0a7f3cd995a /ktalkd/ConfigureChecks.cmake
parent3fc864f49b40c1ed45e330f454674f825639efbc (diff)
downloadtdenetwork-86e9e2420c147bf64ae64aafd2e75576dc40e7b6.tar.gz
tdenetwork-86e9e2420c147bf64ae64aafd2e75576dc40e7b6.zip
Fix missing configure checks for CMake build
Signed-off-by: Slávek Banko <slavek.banko@axis.cz> (cherry picked from commit 82dd739ceb246c8d8d10faf03b1a2267d8352d16)
Diffstat (limited to 'ktalkd/ConfigureChecks.cmake')
-rw-r--r--ktalkd/ConfigureChecks.cmake18
1 files changed, 18 insertions, 0 deletions
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
+)