diff options
author | samelian <samelian@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-11-26 22:30:32 +0000 |
---|---|---|
committer | samelian <samelian@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-11-26 22:30:32 +0000 |
commit | 42c7fad6ee00ca07b7dc70fa8ef7aee30a8c85f5 (patch) | |
tree | 998fa8cd70c8aff9f2b7408a362e285a90300eb3 | |
parent | cbe1627f4697af787d9795f283743944417c5faa (diff) | |
download | tdelibs-42c7fad6ee00ca07b7dc70fa8ef7aee30a8c85f5.tar.gz tdelibs-42c7fad6ee00ca07b7dc70fa8ef7aee30a8c85f5.zip |
[kdelibs] more system checks
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdelibs@1201140 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
-rw-r--r-- | CMakeLists.txt | 79 | ||||
-rw-r--r-- | config.h.cmake | 86 | ||||
-rw-r--r-- | kdefx/CMakeLists.txt | 2 | ||||
-rw-r--r-- | kdesu/CMakeLists.txt | 2 |
4 files changed, 124 insertions, 45 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index f96c4d2be..2f46d5a0b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -29,6 +29,7 @@ include( CheckFunctionExists ) include( CheckCSourceCompiles ) include( CheckTypeSize ) include( CheckCSourceRuns ) +include( CheckLibraryExists ) ##### include our cmake modules ################# @@ -61,6 +62,7 @@ OPTION( WITH_LUA "Enable LUA support" OFF ) OPTION( WITH_TIFF "Enable tiff support" OFF ) OPTION( WITH_JASPER "Enable jasper (jpeg2k) support" OFF ) OPTION( WITH_OPENEXR "Enable openexr support" OFF ) +OPTION( WITH_UTEMPTER "Use utempter for utmp management" OFF ) OPTION( WITH_ASPELL "Enable aspell support" OFF ) OPTION( WITH_HSPELL "Enable hspell support" OFF ) @@ -165,6 +167,7 @@ check_include_file( "termios.h" HAVE_TERMIOS_H ) check_include_file( "termio.h" HAVE_TERMIO_H ) check_include_file( "unistd.h" HAVE_UNISTD_H ) check_include_file( "util.h" HAVE_UTIL_H ) +check_include_file( "values.h" HAVE_VALUES_H ) # FIXME I'm not sure if test TIME_WITH_SYS_TIME are correct check_include_file( "sys/time.h" HAVE_SYS_TIME_H ) @@ -189,6 +192,7 @@ check_function_exists( srandom HAVE_SRANDOM ) check_symbol_exists( srandom "stdlib.h" HAVE_SRANDOM_PROTO ) check_function_exists( seteuid HAVE_SETEUID ) +check_function_exists( setegid HAVE_SETEGID ) check_function_exists( gethostname HAVE_GETHOSTNAME ) check_symbol_exists( gethostname "unistd.h" HAVE_GETHOSTNAME_PROTO ) @@ -214,6 +218,12 @@ check_symbol_exists( mkstemps "stdlib.h" HAVE_MKSTEMPS_PROTO ) check_function_exists( initgroups HAVE_INITGROUPS ) check_symbol_exists( initgroups "grp.h" HAVE_INITGROUPS_PROTO ) +check_function_exists( strlcat HAVE_STRLCAT ) +check_symbol_exists( strlcat "string.h" HAVE_STRLCAT_PROTO ) + +check_function_exists( strlcpy HAVE_STRLCPY ) +check_symbol_exists( strlcpy "string.h" HAVE_STRLCPY_PROTO ) + check_symbol_exists( S_ISSOCK "sys/stat.h" HAVE_S_ISSOCK ) check_symbol_exists( gethostbyname2 "netdb.h" HAVE_GETHOSTBYNAME2 ) @@ -252,6 +262,37 @@ check_function_exists( _finite HAVE_FUNC__FINITE ) check_function_exists( finite HAVE_FUNC_FINITE ) check_function_exists( isinf HAVE_FUNC_ISINF ) check_function_exists( freeaddrinfo HAVE_FREEADDRINFO ) +check_function_exists( strtoll HAVE_STRTOLL ) +check_function_exists( socket HAVE_SOCKET ) +check_function_exists( strfmon HAVE_STRFMON ) +check_function_exists( stpcpy HAVE_STPCPY ) +check_function_exists( readdir_r HAVE_READDIR_R ) +check_function_exists( tcgetattr HAVE_TCGETATTR ) +check_function_exists( tcsetattr HAVE_TCSETATTR ) +check_function_exists( strcasecmp HAVE_STRCASECMP ) +check_function_exists( strchr HAVE_STRCHR ) +check_function_exists( strcmp HAVE_STRCMP ) +check_function_exists( strrchr HAVE_STRRCHR ) +check_function_exists( ptsname HAVE_PTSNAME ) +check_function_exists( unlockpt HAVE_UNLOCKPT ) +check_function_exists( _getpty HAVE__GETPTY ) +check_function_exists( __argz_count HAVE___ARGZ_COUNT ) +check_function_exists( __argz_next HAVE___ARGZ_NEXT ) +check_function_exists( __argz_stringify HAVE___ARGZ_STRINGIFY ) +check_function_exists( sendfile HAVE_SENDFILE ) +check_function_exists( rindex HAVE_RINDEX ) +check_function_exists( putenv HAVE_PUTENV ) +check_function_exists( poll HAVE_POLL ) +check_function_exists( memcpy HAVE_MEMCPY ) +check_function_exists( madvise HAVE_MADVISE ) +check_function_exists( getgroups HAVE_GETGROUPS ) +check_function_exists( getcwd HAVE_GETCWD ) +check_function_exists( dlerror HAVE_DLERROR ) +check_function_exists( crypt HAVE_CRYPT ) +check_function_exists( bcopy HAVE_BCOPY ) +check_function_exists( alloca HAVE_ALLOCA ) +check_function_exists( mmap HAVE_MMAP ) +check_function_exists( munmap HAVE_MUNMAP ) check_type_size( "char*" SIZEOF_CHAR_P ) check_type_size( "int" SIZEOF_INT ) @@ -322,6 +363,21 @@ if( HAVE_RES_INIT ) set( RESOLV_LIBRARIES resolv ) endif( HAVE_RES_INIT) +set( CMAKE_REQUIRED_LIBRARIES util ) +check_c_source_runs(" + #include <pty.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 +) +if( HAVE_OPENPTY ) + set( LIB_UTIL util ) +endif( ) + # restore CMAKE_REQUIRED_LIBRARIES set( CMAKE_REQUIRED_LIBRARIES ${bak_CMAKE_REQUIRED_LIBRARIES} ) unset( bak_CMAKE_REQUIRED_LIBRARIES ) @@ -364,6 +420,20 @@ if( NOT HAVE_LIBDL-NOTFOUND ) endif( NOT HAVE_LIBDL-NOTFOUND ) +##### check for utempter ######################## + +if( WITH_UTEMPTER ) + check_include_file( utempter.h HAVE_UTEMPTER_H ) + check_library_exists( utempter addToUtmp "" HAVE_ADDTOUTEMP ) + if( HAVE_UTEMPTER_H AND HAVE_ADDTOUTEMP ) + set( HAVE_UTEMPTER 1 ) + set( UTEMPTER_LIBRARY utempter ) + else( ) + message(FATAL_ERROR "\nutempter are requested, but not found on your system" ) + endif( ) +endif( ) + + ##### check for zlib ############################ find_package( ZLIB ) @@ -470,6 +540,14 @@ if( XRANDR_FOUND ) endif( XRANDR_FOUND ) +##### check for xrender ######################### + +pkg_search_module( XRENDER xrender ) +if( XRENDER_FOUND ) + set( HAVE_XRENDER 1 ) +endif( XRENDER_FOUND ) + + ##### check for libxml-2.0 ###################### pkg_search_module( LIBXML2 libxml-2.0 ) @@ -586,6 +664,7 @@ if( WITH_SSL ) message(FATAL_ERROR "\nSSL support are requested, but openssl is not found on your system" ) endif( NOT SSL_FOUND ) set( KSSL_HAVE_SSL 1 ) + set( HAVE_SSL 1 ) endif( WITH_SSL ) diff --git a/config.h.cmake b/config.h.cmake index c07e7bba6..871c9f4bf 100644 --- a/config.h.cmake +++ b/config.h.cmake @@ -33,7 +33,7 @@ #undef GSSAPI_MIT /* Define to 1 if you have `alloca', as a function or macro. */ -#undef HAVE_ALLOCA +#cmakedefine HAVE_ALLOCA 1 /* Define to 1 if you have the <alloca.h> header file. */ #cmakedefine HAVE_ALLOCA_H 1 @@ -51,7 +51,7 @@ #undef HAVE_BACKTRACE /* Define to 1 if you have the `bcopy' function. */ -#undef HAVE_BCOPY +#cmakedefine HAVE_BCOPY 1 /* You _must_ have bool */ #undef HAVE_BOOL @@ -72,7 +72,7 @@ #cmakedefine HAVE_CRT_EXTERNS_H 1 /* Defines if your system has the crypt function */ -#undef HAVE_CRYPT +#cmakedefine HAVE_CRYPT 1 /* Define to 1 if you have the <ctype.h> header file. */ #cmakedefine HAVE_CTYPE_H 1 @@ -96,7 +96,7 @@ #cmakedefine HAVE_DLD_H 1 /* Define to 1 if you have the `dlerror' function. */ -#undef HAVE_DLERROR +#cmakedefine HAVE_DLERROR 1 /* Define to 1 if you have the <dlfcn.h> header file. */ #cmakedefine HAVE_DLFCN_H 1 @@ -144,10 +144,10 @@ #cmakedefine HAVE_GETADDRINFO 1 /* Define to 1 if you have the `getcwd' function. */ -#undef HAVE_GETCWD +#cmakedefine HAVE_GETCWD 1 /* Define to 1 if you have the `getgroups' function. */ -#undef HAVE_GETGROUPS +#cmakedefine HAVE_GETGROUPS 1 /* Define to 1 if you have the `gethostbyname2' function. */ #cmakedefine HAVE_GETHOSTBYNAME2 1 @@ -297,13 +297,13 @@ #cmakedefine HAVE_MACHINE_SOUNDCARD_H 1 /* Define to 1 if you have the `madvise' function. */ -#undef HAVE_MADVISE +#cmakedefine HAVE_MADVISE 1 /* Define to 1 if you have the <malloc.h> header file. */ #cmakedefine HAVE_MALLOC_H 1 /* Define to 1 if you have the `memcpy' function. */ -#undef HAVE_MEMCPY +#cmakedefine HAVE_MEMCPY 1 /* Define to 1 if you have the <memory.h> header file. */ #cmakedefine HAVE_MEMORY_H 1 @@ -321,22 +321,22 @@ #cmakedefine HAVE_MKSTEMP 1 /* Define if you have mkstemps */ -#cmakedefine HAVE_MKSTEMPS +#cmakedefine HAVE_MKSTEMPS 1 /* Define if you have the mkstemps prototype */ -#cmakedefine HAVE_MKSTEMPS_PROTO +#cmakedefine HAVE_MKSTEMPS_PROTO 1 /* Define if you have the mkstemp prototype */ -#cmakedefine HAVE_MKSTEMP_PROTO +#cmakedefine HAVE_MKSTEMP_PROTO 1 /* Define to 1 if you have a working `mmap' system call. */ -#undef HAVE_MMAP +#cmakedefine HAVE_MMAP 1 /* Define to 1 if you have the <mntent.h> header file. */ #cmakedefine HAVE_MNTENT_H 1 /* Define to 1 if you have the `munmap' function. */ -#undef HAVE_MUNMAP +#cmakedefine HAVE_MUNMAP 1 /* Define to 1 if you have the <ndir.h> header file, and it defines `DIR'. */ #cmakedefine HAVE_NDIR_H 1 @@ -360,7 +360,7 @@ #undef HAVE_OLD_SSL_API /* Define to 1 if you have the `openpty' function. */ -#undef HAVE_OPENPTY +#cmakedefine HAVE_OPENPTY 1 /* Define to 1 if you have the <paths.h> header file. */ #cmakedefine HAVE_PATHS_H 1 @@ -369,7 +369,7 @@ #undef HAVE_PCREPOSIX /* Define to 1 if you have the `poll' function. */ -#undef HAVE_POLL +#cmakedefine HAVE_POLL 1 /* Define to 1 if the assembler supports AltiVec instructions. */ #undef HAVE_PPC_ALTIVEC @@ -378,7 +378,7 @@ #undef HAVE_PRELOADED_SYMBOLS /* Define to 1 if you have the `ptsname' function. */ -#undef HAVE_PTSNAME +#cmakedefine HAVE_PTSNAME 1 /* Define to 1 if you have the <pty.h> header file. */ #cmakedefine HAVE_PTY_H 1 @@ -387,7 +387,7 @@ #cmakedefine HAVE_PUNYCODE_H 1 /* Define to 1 if you have the `putenv' function. */ -#undef HAVE_PUTENV +#cmakedefine HAVE_PUTENV 1 /* Define if you have random */ #cmakedefine HAVE_RANDOM 1 @@ -396,7 +396,7 @@ #cmakedefine HAVE_RANDOM_PROTO 1 /* Define to 1 if you have the `readdir_r' function. */ -#undef HAVE_READDIR_R +#cmakedefine HAVE_READDIR_R 1 /* Define if you have res_init */ #cmakedefine HAVE_RES_INIT 1 @@ -408,13 +408,13 @@ #cmakedefine HAVE_REVOKE 1 /* Define to 1 if you have the `rindex' function. */ -#undef HAVE_RINDEX +#cmakedefine HAVE_RINDEX 1 /* Define if you want sendfile() support */ -#undef HAVE_SENDFILE +#cmakedefine HAVE_SENDFILE 1 /* Define to 1 if you have the `setegid' function. */ -#undef HAVE_SETEGID +#cmakedefine HAVE_SETEGID 1 /* Define if you have setenv */ #cmakedefine HAVE_SETENV 1 @@ -456,7 +456,7 @@ #cmakedefine HAVE_SNPRINTF 1 /* Define to 1 if you have the `socket' function. */ -#undef HAVE_SOCKET +#cmakedefine HAVE_SOCKET 1 /* Define if you have srandom */ #cmakedefine HAVE_SRANDOM 1 @@ -465,7 +465,7 @@ #cmakedefine HAVE_SRANDOM_PROTO 1 /* If we are going to use OpenSSL */ -#undef HAVE_SSL +#cmakedefine HAVE_SSL 1 /* Define to 1 if you have the <stdint.h> header file. */ #cmakedefine HAVE_STDINT_H 1 @@ -477,19 +477,19 @@ #cmakedefine HAVE_STDLIB_H 1 /* Define to 1 if you have the `stpcpy' function. */ -#undef HAVE_STPCPY +#cmakedefine HAVE_STPCPY 1 /* Define to 1 if you have the `strcasecmp' function. */ -#undef HAVE_STRCASECMP +#cmakedefine HAVE_STRCASECMP 1 /* Define to 1 if you have the `strchr' function. */ -#undef HAVE_STRCHR +#cmakedefine HAVE_STRCHR 1 /* Define to 1 if you have the `strcmp' function. */ -#undef HAVE_STRCMP +#cmakedefine HAVE_STRCMP 1 /* Define to 1 if you have the `strfmon' function. */ -#undef HAVE_STRFMON +#cmakedefine HAVE_STRFMON 1 /* Define to 1 if you have the <stringprep.h> header file. */ #cmakedefine HAVE_STRINGPREP_H 1 @@ -501,22 +501,22 @@ #cmakedefine HAVE_STRING_H 1 /* Define if you have strlcat */ -#undef HAVE_STRLCAT +#cmakedefine HAVE_STRLCAT 1 /* Define if you have the strlcat prototype */ -#undef HAVE_STRLCAT_PROTO +#cmakedefine HAVE_STRLCAT_PROTO 1 /* Define if you have strlcpy */ -#cmakedefine HAVE_STRLCPY +#cmakedefine HAVE_STRLCPY 1 /* Define if you have the strlcpy prototype */ -#undef HAVE_STRLCPY_PROTO +#cmakedefine HAVE_STRLCPY_PROTO 1 /* Define to 1 if you have the `strrchr' function. */ -#undef HAVE_STRRCHR +#cmakedefine HAVE_STRRCHR 1 /* Define to 1 if you have the `strtoll' function. */ -#undef HAVE_STRTOLL +#cmakedefine HAVE_STRTOLL 1 /* Define to 1 if the system has the type `struct addrinfo'. */ #cmakedefine HAVE_STRUCT_ADDRINFO 1 @@ -600,10 +600,10 @@ #cmakedefine HAVE_S_ISSOCK 1 /* Define to 1 if you have the `tcgetattr' function. */ -#undef HAVE_TCGETATTR +#cmakedefine HAVE_TCGETATTR 1 /* Define to 1 if you have the `tcsetattr' function. */ -#undef HAVE_TCSETATTR +#cmakedefine HAVE_TCSETATTR 1 /* Define to 1 if you have the <termios.h> header file. */ #cmakedefine HAVE_TERMIOS_H 1 @@ -615,7 +615,7 @@ #cmakedefine HAVE_UNISTD_H 1 /* Define to 1 if you have the `unlockpt' function. */ -#undef HAVE_UNLOCKPT +#cmakedefine HAVE_UNLOCKPT 1 /* Define if you have unsetenv */ #cmakedefine HAVE_UNSETENV 1 @@ -630,7 +630,7 @@ #cmakedefine HAVE_USLEEP_PROTO 1 /* Define if you have the utempter helper for utmp managment */ -#undef HAVE_UTEMPTER +#cmakedefine HAVE_UTEMPTER 1 /* Define to 1 if you have the <util.h> header file. */ #cmakedefine HAVE_UTIL_H 1 @@ -672,10 +672,10 @@ #undef HAVE_X86_SSE2 /* Defined if your system has XRender support */ -#undef HAVE_XRENDER +#cmakedefine HAVE_XRENDER 1 /* Define to 1 if you have the `_getpty' function. */ -#undef HAVE__GETPTY +#cmakedefine HAVE__GETPTY 1 /* Define to 1 if you have the `_IceTransNoListen' function. */ #undef HAVE__ICETRANSNOLISTEN @@ -687,13 +687,13 @@ #cmakedefine HAVE__USR_SRC_SYS_I386_ISA_SOUND_AWE_VOICE_H 1 /* Define to 1 if you have the `__argz_count' function. */ -#undef HAVE___ARGZ_COUNT +#cmakedefine HAVE___ARGZ_COUNT 1 /* Define to 1 if you have the `__argz_next' function. */ -#undef HAVE___ARGZ_NEXT +#cmakedefine HAVE___ARGZ_NEXT 1 /* Define to 1 if you have the `__argz_stringify' function. */ -#undef HAVE___ARGZ_STRINGIFY +#cmakedefine HAVE___ARGZ_STRINGIFY 1 /* The prefix to use as fallback */ #define KDEDIR "@KDEDIR@" diff --git a/kdefx/CMakeLists.txt b/kdefx/CMakeLists.txt index 7e89cd047..d9f4d3b07 100644 --- a/kdefx/CMakeLists.txt +++ b/kdefx/CMakeLists.txt @@ -47,6 +47,6 @@ set( ${target}_SRCS tde_add_library( ${target} SHARED AUTOMOC SOURCES ${${target}_SRCS} VERSION 4.2.0 - LINK ${TQT_LIBRARIES} + LINK ${TQT_LIBRARIES} ${XRENDER_LIBRARIES} DESTINATION ${LIB_INSTALL_DIR} ) diff --git a/kdesu/CMakeLists.txt b/kdesu/CMakeLists.txt index eff5c36e3..258bb066c 100644 --- a/kdesu/CMakeLists.txt +++ b/kdesu/CMakeLists.txt @@ -46,7 +46,7 @@ set( ${target}_SRCS tde_add_library( ${target} SHARED SOURCES ${${target}_SRCS} VERSION 4.2.0 - LINK kdecore-shared + LINK kdecore-shared ${LIB_UTIL} DESTINATION ${LIB_INSTALL_DIR} ) |