summaryrefslogtreecommitdiffstats
path: root/ConfigureChecks.cmake
diff options
context:
space:
mode:
Diffstat (limited to 'ConfigureChecks.cmake')
-rw-r--r--ConfigureChecks.cmake124
1 files changed, 51 insertions, 73 deletions
diff --git a/ConfigureChecks.cmake b/ConfigureChecks.cmake
index 455fcab01..640849814 100644
--- a/ConfigureChecks.cmake
+++ b/ConfigureChecks.cmake
@@ -23,6 +23,11 @@ tde_setup_largefiles( )
find_package( TQt )
find_package( TDE )
+# strlcat and strlcpy check
+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 )
##### look for the usb.ids file, Its location can be set EG: -DWITH_USBIDS="/opt/share/misc/usb.ids"
@@ -45,19 +50,6 @@ if( WITH_USBIDS )
endif( WITH_USBIDS )
-##### check for libdl ###########################
-
-set( DL_LIBRARIES dl )
-check_library_exists( ${DL_LIBRARIES} dlopen /lib HAVE_LIBDL )
-if( NOT HAVE_LIBDL )
- unset( DL_LIBRARIES )
- check_function_exists( dlopen HAVE_DLOPEN )
- if( HAVE_DLOPEN )
- set( HAVE_LIBDL 1 )
- endif( HAVE_DLOPEN )
-endif( NOT HAVE_LIBDL )
-
-
# stdint.h (drkonqi)
if( BUILD_DRKONQI )
check_include_file( stdint.h HAVE_STDINT_H )
@@ -70,12 +62,6 @@ if( BUILD_TDM OR BUILD_TDEIOSLAVES )
endif( )
-# sys/bitypes.h (drkonqi)
-if( BUILD_DRKONQI )
- check_include_file( sys/bitypes.h HAVE_SYS_BITYPES_H )
-endif( )
-
-
# sys/ioctl.h (tdeioslave/fish, kcontrol/info)
if( BUILD_TDEIOSLAVES OR BUILD_KCONTROL )
check_include_file( sys/ioctl.h HAVE_SYS_IOCTL_H )
@@ -95,7 +81,7 @@ if( BUILD_KSMSERVER OR BUILD_KSPLASHML OR BUILD_TDEIOSLAVES )
endif( )
# libssh (tdeioslave/sftp)
-if( BUILD_TDEIOSLAVES )
+if( BUILD_TDEIOSLAVES AND WITH_SFTP )
pkg_search_module( LIBSSH libssh )
if( NOT LIBSSH_FOUND )
tde_message_fatal( "LibSSH is required, but was not found on your system" )
@@ -112,7 +98,7 @@ if( BUILD_KCHECKPASS OR BUILD_TDM )
check_include_file( "security/pam_appl.h" SECURITY_PAM_APPL_H )
endif( )
if( HAVE_PAM AND SECURITY_PAM_APPL_H )
- set( PAM_LIBRARY pam ${DL_LIBRARIES} )
+ set( PAM_LIBRARY pam ${CMAKE_DL_LIBS} )
else( )
tde_message_fatal( "pam are requested, but not found on your system" )
endif( )
@@ -139,7 +125,7 @@ endif( NOT HAVE_CRYPT )
if( WITH_TDEHWLIB )
tde_save_and_set( CMAKE_REQUIRED_INCLUDES "${TDE_INCLUDE_DIR}" )
check_cxx_source_compiles( "
- #include <kdemacros.h>
+ #include <tdemacros.h>
#ifndef __TDE_HAVE_TDEHWLIB
#error tdecore is not build with tdehwlib
#endif
@@ -154,11 +140,11 @@ if( WITH_TDEHWLIB )
endif( )
-# udev (tsak)
-if( BUILD_TSAK )
- pkg_search_module( UDEV udev )
+# udev (tsak, tdekbdledsync)
+if( BUILD_TSAK OR BUILD_TDEKBDLEDSYNC )
+ pkg_search_module( UDEV libudev )
if( NOT UDEV_FOUND )
- tde_message_fatal( "udev is required, but was not found on your system" )
+ tde_message_fatal( "udev library is required, but was not found on your system" )
endif( )
endif( )
@@ -270,12 +256,12 @@ if( WITH_LIBCONFIG )
endif( )
-# pcre (twin/compton-tde)
-if( WITH_PCRE )
- pkg_search_module( LIBPCRE libpcre )
- if( NOT LIBPCRE_FOUND )
- tde_message_fatal( "pcre support is requested, but not found on your system" )
- endif( NOT LIBPCRE_FOUND )
+# pcre2 (twin/compton-tde)
+if( WITH_PCRE2 )
+ pkg_check_modules( LIBPCRE2 libpcre2-8 libpcre2-posix )
+ if( NOT LIBPCRE2_FOUND )
+ tde_message_fatal( "pcre2 support was requested, but not found on your system" )
+ endif( )
endif( )
@@ -387,15 +373,6 @@ if( BUILD_TDEIOSLAVES OR BUILD_KSYSGUARD )
endif( )
-# strlcat, strlcpy
-if( BUILD_KSYSGUARD OR BUILD_KCHECKPASS )
- 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 )
-endif( )
-
-
# getifaddrs (kcontrol, tdm)
if( BUILD_KCONTROL OR BUILD_TDM )
check_function_exists( getifaddrs HAVE_GETIFADDRS )
@@ -490,9 +467,9 @@ if( WITH_ELFICON )
if( NOT LIBR_FOUND )
message(FATAL_ERROR "\nelficon support was requested, but libr was not found on your system" )
endif( NOT LIBR_FOUND )
- if( NOT "${LIBR_VERSION}" STREQUAL "0.6.0" )
+ if( "${LIBR_VERSION}" VERSION_LESS "0.6" )
message(FATAL_ERROR "\nelficon support was requested, but the libr version on your system may not be compatible with TDE" )
- endif( NOT "${LIBR_VERSION}" STREQUAL "0.6.0" )
+ endif( "${LIBR_VERSION}" VERSION_LESS "0.6" )
set( HAVE_ELFICON 1 )
endif( )
@@ -511,30 +488,16 @@ endif( )
if( BUILD_KXKB )
if( NOT X11_XKB_RULES_DIR )
- pkg_search_module( XKB_CONFIG xkeyboard-config )
- if( XKB_CONFIG_FOUND )
- execute_process(
- COMMAND ${PKG_CONFIG_EXECUTABLE} --variable=xkb_base xkeyboard-config
- OUTPUT_VARIABLE KB_RULES_DIR
- OUTPUT_STRIP_TRAILING_WHITESPACE
- )
- if( NOT "${KB_RULES_DIR}" STREQUAL "" )
- string(REGEX REPLACE "/xkb$" "/" X11_XKB_RULES_DIR "${KB_RULES_DIR}" )
- endif( )
+ pkg_get_variable( KB_RULES_DIR xkeyboard-config xkb_base )
+ if( KB_RULES_DIR )
+ string(REGEX REPLACE "/xkb$" "/" X11_XKB_RULES_DIR "${KB_RULES_DIR}" )
endif( )
endif( )
if( NOT X11_XKB_RULES_DIR )
- pkg_search_module( XKBCOMP xkbcomp )
- if( XKBCOMP_FOUND )
- execute_process(
- COMMAND ${PKG_CONFIG_EXECUTABLE} --variable=xkbconfigdir xkbcomp
- OUTPUT_VARIABLE KB_RULES_DIR
- OUTPUT_STRIP_TRAILING_WHITESPACE
- )
- if( NOT "${KB_RULES_DIR}" STREQUAL "" )
- string(REGEX REPLACE "/xkb$" "/" X11_XKB_RULES_DIR "${KB_RULES_DIR}" )
- endif( )
+ pkg_get_variable( KB_RULES_DIR xkbcomp xkbconfigdir )
+ if( KB_RULES_DIR )
+ string(REGEX REPLACE "/xkb$" "/" X11_XKB_RULES_DIR "${KB_RULES_DIR}" )
endif( )
endif( )
@@ -556,16 +519,8 @@ if( BUILD_KXKB )
endif( )
if( NOT X11_XKB_RULES_DIR )
- execute_process(
- COMMAND ${PKG_CONFIG_EXECUTABLE} --variable=libdir xkbfile
- OUTPUT_VARIABLE KB_RULES_LIBDIR
- OUTPUT_STRIP_TRAILING_WHITESPACE
- )
- execute_process(
- COMMAND ${PKG_CONFIG_EXECUTABLE} --variable=prefix xkbfile
- OUTPUT_VARIABLE KB_RULES_PREFIX
- OUTPUT_STRIP_TRAILING_WHITESPACE
- )
+ pkg_get_variable( KB_RULES_LIBDIR xkbfile libdir)
+ pkg_get_variable( KB_RULES_PREFIX xkbfile prefix)
if( KB_RULES_LIBDIR AND KB_RULES_PREFIX )
find_file( RULES_FILE
NAMES xorg xfree86
@@ -589,6 +544,20 @@ if( BUILD_KXKB )
message( STATUS "No additional XKb rules directory found" )
endif( )
+ if( WITH_XKB_TRANSLATIONS )
+ if( NOT XKB_CONFIG_LOCALE_DIR )
+ pkg_get_variable( XKB_CONFIG_DATADIR xkeyboard-config datadir )
+ if( XKB_CONFIG_DATADIR )
+ set( XKB_CONFIG_LOCALE_DIR "${XKB_CONFIG_DATADIR}/locale" CACHE INTERNAL "" )
+ message( STATUS "Found xkeybord-config locale dir: ${XKB_CONFIG_LOCALE_DIR}" )
+ endif( )
+ endif( )
+
+ if( NOT XKB_CONFIG_LOCALE_DIR )
+ tde_message_fatal( "Translations for xkb messages were requested but the xkeyboard-config locale directory could not be determined." )
+ endif( )
+ endif( )
+
endif( )
if( BUILD_KCONTROL OR BUILD_TDM )
@@ -690,4 +659,13 @@ if( BUILD_KCONTROL OR BUILD_TDM )
endif( BUILD_KCONTROL OR BUILD_TDM )
+# XInput (kcontrol/input/touchpad.cpp)
+if( BUILD_KCONTROL )
+ pkg_search_module( XINPUT xi )
+ if( NOT XINPUT_FOUND )
+ tde_message_fatal( "XInput is required, but was not found on your system" )
+ endif( )
+endif ( BUILD_KCONTROL )
+
+
check_include_files( "sys/time.h;sys/loadavg.h" HAVE_SYS_LOADAVG_H )