17761
by Oswald Buddenhagen
make kdm & kcheckpass "cmake-clean" (i think). |
1 |
include(UnixAuth) |
46088.1.8
by Aaron Seigo
log the PAM library discovery |
2 |
macro_log_feature(PAM_FOUND "libpam" "PAM Libraries" "https://www.kernel.org/pub/linux/libs/pam/" FALSE "" "Required for screen unlocking and optionally used by the KDM log in manager") |
23192
by Benjamin Reed
cmake 2.4.6 made me include this for check_type_size not to fail |
3 |
include(CheckTypeSize) |
25209
by Laurent Montel
Fix compile. |
4 |
include(FindPkgConfig) |
17761
by Oswald Buddenhagen
make kdm & kcheckpass "cmake-clean" (i think). |
5 |
|
19059
by David Faure
Make konsole free of config.h |
6 |
macro_optional_find_package(XKB) # kxkb, kdm |
7 |
||
17761
by Oswald Buddenhagen
make kdm & kcheckpass "cmake-clean" (i think). |
8 |
if (PAM_FOUND) |
9 |
set(KDE4_COMMON_PAM_SERVICE "kde" CACHE STRING "The PAM service to use unless overridden for a particular app.") |
|
10 |
||
11 |
macro(define_pam_service APP) |
|
12 |
string(TOUPPER ${APP}_PAM_SERVICE var) |
|
13 |
set(cvar KDE4_${var}) |
|
14 |
set(${cvar} "${KDE4_COMMON_PAM_SERVICE}" CACHE STRING "The PAM service for ${APP}.") |
|
15 |
mark_as_advanced(${cvar}) |
|
16 |
set(${var} "\"${${cvar}}\"") |
|
17 |
endmacro(define_pam_service) |
|
18 |
||
19 |
macro(install_pam_service APP) |
|
20 |
string(TOUPPER KDE4_${APP}_PAM_SERVICE cvar) |
|
21 |
install(CODE " |
|
39284
by Michael Jansen
Indent the install_pam_service macro so it is more easily identified as |
22 |
set(DESTDIR_VALUE \"\$ENV{DESTDIR}\") |
23 |
if (NOT DESTDIR_VALUE) |
|
24 |
exec_program(\"${KDEBASE_WORKSPACE_SOURCE_DIR}/mkpamserv\" ARGS ${${cvar}} RETURN_VALUE ret) |
|
25 |
if (NOT ret) |
|
26 |
exec_program(\"${KDEBASE_WORKSPACE_SOURCE_DIR}/mkpamserv\" ARGS -P ${${cvar}}-np) |
|
27 |
endif (NOT ret) |
|
28 |
endif (NOT DESTDIR_VALUE) |
|
29 |
")
|
|
17761
by Oswald Buddenhagen
make kdm & kcheckpass "cmake-clean" (i think). |
30 |
endmacro(install_pam_service) |
31 |
||
32 |
define_pam_service(KDM) |
|
33 |
define_pam_service(kscreensaver) |
|
34 |
||
35 |
else (PAM_FOUND) |
|
36 |
||
37 |
macro(install_pam_service APP) |
|
38 |
endmacro(install_pam_service) |
|
39 |
||
40 |
endif (PAM_FOUND) |
|
41 |
||
21440
by Dirk Mueller
two days and still noone has fixed kdebase not being able to compile :( |
42 |
find_program(some_x_program NAMES iceauth xrdb xterm) |
24766
by Oswald Buddenhagen
more robust |
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) |
|
21440
by Dirk Mueller
two days and still noone has fixed kdebase not being able to compile :( |
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) |
|
21427
by Oswald Buddenhagen
ok, back to XBINDIR - some programs might be missing and we don't want |
50 |
set(XLIBDIR "${xrootdir}/lib/X11") |
21418
by Oswald Buddenhagen
replace XBINDIR with some PROGRAM_<foo>s. |
51 |
|
17761
by Oswald Buddenhagen
make kdm & kcheckpass "cmake-clean" (i think). |
52 |
check_function_exists(getpassphrase HAVE_GETPASSPHRASE) |
53 |
check_function_exists(vsyslog HAVE_VSYSLOG) |
|
25399
by Alex Merry
Use statvfs() if available to get disk space (recommended on Linux by LSB and required on NetBSD and Solaris). |
54 |
check_function_exists(statvfs HAVE_STATVFS) |
19159
by Luboš Luňák
HAVE_XINERAMA |
55 |
|
20270
by David Faure
Major config.h cleanup, moved much stuff to config-X11.h and to config-fish.h |
56 |
check_include_files(limits.h HAVE_LIMITS_H) |
21228
by Dirk Mueller
starting to separate out configure checks. for now its a copy |
57 |
check_include_files(sys/time.h HAVE_SYS_TIME_H) # ksmserver, ksplashml, sftp |
22359
by Craig Drummond
Fix #include of stdint.h |
58 |
check_include_files(stdint.h HAVE_STDINT_H) # kcontrol/kfontinst |
23420
by Adriaan de Groot
Make-it-compile on FreeBSD, which needs extra includes for the VFS stuff in Solid. Tested on Mandriva One 2007 and FBSD 6-STABLE. |
59 |
check_include_files("sys/stat.h;sys/vfs.h" HAVE_SYS_VFS_H) # statvfs for plasma/solid |
25399
by Alex Merry
Use statvfs() if available to get disk space (recommended on Linux by LSB and required on NetBSD and Solaris). |
60 |
check_include_files("sys/stat.h;sys/statvfs.h" HAVE_SYS_STATVFS_H) # statvfs for plasma/solid |
23420
by Adriaan de Groot
Make-it-compile on FreeBSD, which needs extra includes for the VFS stuff in Solid. Tested on Mandriva One 2007 and FBSD 6-STABLE. |
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) |
|
24976
by Adriaan de Groot
Try to detect statfs() better; need the sys/statfs.h on Solaris, but that has a 4-argument version of the function (undocumented), so it still doesn't compile. |
63 |
check_include_files("sys/types.h;sys/statfs.h" HAVE_SYS_STATFS_H) |
46002.10.1
by Philipp Knechtges
libkworkspace: tuning glibc allocator |
64 |
check_include_files(unistd.h HAVE_UNISTD_H) |
65 |
check_include_files(malloc.h HAVE_MALLOC_H) |
|
24958
by Adriaan de Groot
Check for the existence of statfs() - it's available on Linux and FreeBSD, but Solaris has only statvfs(). |
66 |
check_function_exists(statfs HAVE_STATFS) |
20270
by David Faure
Major config.h cleanup, moved much stuff to config-X11.h and to config-fish.h |
67 |
macro_bool_to_01(FONTCONFIG_FOUND HAVE_FONTCONFIG) # kcontrol/{fonts,kfontinst} |
29913
by Luboš Luňák
Add missing freetype check. |
68 |
macro_bool_to_01(FREETYPE_FOUND HAVE_FREETYPE) # kcontrol/fonts |
20270
by David Faure
Major config.h cleanup, moved much stuff to config-X11.h and to config-fish.h |
69 |
macro_bool_to_01(OPENGL_FOUND HAVE_OPENGL) # kwin |
70 |
macro_bool_to_01(X11_XShm_FOUND HAVE_XSHM) # kwin, ksplash |
|
71 |
macro_bool_to_01(X11_XTest_FOUND HAVE_XTEST) # khotkeys, kxkb, kdm |
|
72 |
macro_bool_to_01(X11_Xcomposite_FOUND HAVE_XCOMPOSITE) # kicker, kwin |
|
73 |
macro_bool_to_01(X11_Xcursor_FOUND HAVE_XCURSOR) # many uses |
|
74 |
macro_bool_to_01(X11_Xdamage_FOUND HAVE_XDAMAGE) # kwin |
|
75 |
macro_bool_to_01(X11_Xfixes_FOUND HAVE_XFIXES) # klipper, kicker, kwin |
|
46674
by Michael Palimaka
Add configure option to control usage of Xinerama. |
76 |
if(WITH_XINERAMA) |
77 |
macro_bool_to_01(X11_Xinerama_FOUND HAVE_XINERAMA) |
|
78 |
else(WITH_XINERAMA) |
|
79 |
set(HAVE_XINERAMA 0) |
|
80 |
endif(WITH_XINERAMA) |
|
20270
by David Faure
Major config.h cleanup, moved much stuff to config-X11.h and to config-fish.h |
81 |
macro_bool_to_01(X11_Xrandr_FOUND HAVE_XRANDR) # kwin |
82 |
macro_bool_to_01(X11_Xrender_FOUND HAVE_XRENDER) # kcontrol/style, kicker |
|
25619
by Luboš Luňák
Consistent naming for xf86misc - include and flag are xf86misc, lib is Xxf86misc. |
83 |
macro_bool_to_01(X11_xf86misc_FOUND HAVE_XF86MISC) # kdesktop and kcontrol/lock |
20270
by David Faure
Major config.h cleanup, moved much stuff to config-X11.h and to config-fish.h |
84 |
macro_bool_to_01(X11_dpms_FOUND HAVE_DPMS) # kdesktop |
21345
by Luboš Luňák
XSYNC, not XSHM |
85 |
macro_bool_to_01(X11_XSync_FOUND HAVE_XSYNC) # kwin |
21576
by Dirk Mueller
move configure checks for kfontinst |
86 |
|
22753
by Craig Drummond
Fix checking for "struct ucred" |
87 |
set(CMAKE_EXTRA_INCLUDE_FILES sys/socket.h) |
88 |
check_type_size("struct ucred" STRUCT_UCRED) # kio_fonts |
|
89 |
||
21576
by Dirk Mueller
move configure checks for kfontinst |
90 |
check_function_exists(getpeereid HAVE_GETPEEREID) # kdesu |
34830
by Luigi Toscano
add a check for setpriority() that got lost during KDE4 porting somehow |
91 |
check_function_exists(setpriority HAVE_SETPRIORITY) # kscreenlocker |
25209
by Laurent Montel
Fix compile. |
92 |
|
46669
by Viranch Mehta
Fix XRandR include path |
93 |
set(CMAKE_REQUIRED_INCLUDES ${X11_Xrandr_INCLUDE_PATH}/Xrandr.h) |
46018
by Dario Freddi
pkg-config check for XRandR apparently was not reliable: use check_function_exists instead |
94 |
set(CMAKE_REQUIRED_LIBRARIES ${X11_Xrandr_LIB}) |
46021
by Dario Freddi
Restore old variable names to avoid build breakages |
95 |
check_function_exists(XRRGetScreenSizeRange XRANDR_1_2_FOUND) |
96 |
macro_bool_to_01(XRANDR_1_2_FOUND HAS_RANDR_1_2) |
|
97 |
check_function_exists(XRRGetScreenResourcesCurrent XRANDR_1_3_FOUND) |
|
98 |
macro_bool_to_01(XRANDR_1_3_FOUND HAS_RANDR_1_3) |