Fix missing configure checks for CMake build

Signed-off-by: Slávek Banko <slavek.banko@axis.cz>
pull/1/head
Slávek Banko 10 years ago
parent 0df5874cec
commit 82dd739ceb

@ -28,6 +28,7 @@ include( CheckIncludeFile )
include( CheckIncludeFileCXX )
include( CheckCXXSourceCompiles )
include( CheckLibraryExists )
include( CheckStructHasMember )
##### include our cmake modules #################

@ -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

@ -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 )

@ -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
)

@ -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
)

Loading…
Cancel
Save