Add (and install) svg for the new krunner interface.
[kdebase/uwolfer.git] / workspace / ConfigureChecks.cmake
blob5e3ce9268a1c41b3968e33579f11065043346668
1 include(UnixAuth)
2 include(CheckTypeSize)
3 include(FindPkgConfig)
5 macro_optional_find_package(XKB) # kxkb, kdm
7 if (PAM_FOUND)
8     set(KDE4_COMMON_PAM_SERVICE "kde" CACHE STRING "The PAM service to use unless overridden for a particular app.")
10     macro(define_pam_service APP)
11         string(TOUPPER ${APP}_PAM_SERVICE var)
12         set(cvar KDE4_${var})
13         set(${cvar} "${KDE4_COMMON_PAM_SERVICE}" CACHE STRING "The PAM service for ${APP}.")
14         mark_as_advanced(${cvar})
15         set(${var} "\"${${cvar}}\"")
16     endmacro(define_pam_service)
18     macro(install_pam_service APP)
19         string(TOUPPER KDE4_${APP}_PAM_SERVICE cvar)
20         install(CODE "
21 set(DESTDIR_VALUE \"\$ENV{DESTDIR}\")
22 if (NOT DESTDIR_VALUE)
23     exec_program(\"${CMAKE_SOURCE_DIR}/workspace/mkpamserv\" ARGS ${${cvar}} RETURN_VALUE ret)
24     if (NOT ret)
25         exec_program(\"${CMAKE_SOURCE_DIR}/workspace/mkpamserv\" ARGS -P ${${cvar}}-np)
26     endif (NOT ret)
27 endif (NOT DESTDIR_VALUE)
28         ")
29     endmacro(install_pam_service)
31     define_pam_service(KDM)
32     define_pam_service(kcheckpass)
33     define_pam_service(kscreensaver)
35 else (PAM_FOUND)
37     macro(install_pam_service APP)
38     endmacro(install_pam_service)
40 endif (PAM_FOUND)
42 find_program(some_x_program NAMES iceauth xrdb xterm)
43 if (NOT some_x_program)
44     set(some_x_program /usr/bin/xrdb)
45     message("Warning: Could not determine X binary directory. Assuming /usr/bin.")
46 endif (NOT some_x_program)
47 get_filename_component(proto_xbindir "${some_x_program}" PATH)
48 get_filename_component(XBINDIR "${proto_xbindir}" ABSOLUTE)
49 get_filename_component(xrootdir "${XBINDIR}" PATH)
50 set(XLIBDIR "${xrootdir}/lib/X11")
52 check_function_exists(getpassphrase HAVE_GETPASSPHRASE)
53 check_function_exists(vsyslog HAVE_VSYSLOG)
54 check_function_exists(statvfs HAVE_STATVFS)
56 check_include_files(limits.h HAVE_LIMITS_H)
57 check_include_files(sys/time.h HAVE_SYS_TIME_H)     # ksmserver, ksplashml, sftp
58 check_include_files(stdint.h HAVE_STDINT_H)         # kcontrol/kfontinst
59 check_include_files("sys/stat.h;sys/vfs.h" HAVE_SYS_VFS_H) # statvfs for plasma/solid
60 check_include_files("sys/stat.h;sys/statvfs.h" HAVE_SYS_STATVFS_H) # statvfs for plasma/solid
61 check_include_files(sys/param.h HAVE_SYS_PARAM_H)
62 check_include_files("sys/param.h;sys/mount.h" HAVE_SYS_MOUNT_H)
63 check_include_files("sys/types.h;sys/statfs.h" HAVE_SYS_STATFS_H)
64 check_function_exists(statfs HAVE_STATFS)
65 macro_bool_to_01(FONTCONFIG_FOUND HAVE_FONTCONFIG) # kcontrol/{fonts,kfontinst}
66 macro_bool_to_01(OPENGL_FOUND HAVE_OPENGL) # kwin
67 macro_bool_to_01(X11_XShm_FOUND HAVE_XSHM) # kwin, ksplash
68 macro_bool_to_01(X11_XTest_FOUND HAVE_XTEST) # khotkeys, kxkb, kdm
69 macro_bool_to_01(X11_Xcomposite_FOUND HAVE_XCOMPOSITE) # kicker, kwin
70 macro_bool_to_01(X11_Xcursor_FOUND HAVE_XCURSOR) # many uses
71 macro_bool_to_01(X11_Xdamage_FOUND HAVE_XDAMAGE) # kwin
72 macro_bool_to_01(X11_Xfixes_FOUND HAVE_XFIXES) # klipper, kicker, kwin
73 macro_bool_to_01(X11_Xinerama_FOUND HAVE_XINERAMA)
74 macro_bool_to_01(X11_Xrandr_FOUND HAVE_XRANDR) # kwin
75 macro_bool_to_01(X11_Xrender_FOUND HAVE_XRENDER) # kcontrol/style, kicker
76 macro_bool_to_01(X11_xf86misc_FOUND HAVE_XF86MISC) # kdesktop and kcontrol/lock
77 macro_bool_to_01(X11_dpms_FOUND HAVE_DPMS) # kdesktop
78 macro_bool_to_01(X11_XSync_FOUND HAVE_XSYNC) # kwin
80 set(CMAKE_EXTRA_INCLUDE_FILES sys/socket.h)
81 check_type_size("struct ucred" STRUCT_UCRED)       # kio_fonts
83 check_function_exists(getpeereid  HAVE_GETPEEREID) # kdesu
85 pkg_check_modules (XRANDR_1_2   xrandr>=1.2)
86 macro_bool_to_01(XRANDR_1_2_FOUND HAS_RANDR_1_2)