generic: review configuration checks

since kde-runtime was merged into kde-workspace some checks definitions are
duplicated in config-runtime headers thus it is removed.

missing function and header checks were added, most of which also missing in
kde-runtime and kde-workspace so that is by no means mistake made during the
merge.

the check for libkstat for Solaris is actually done via /dev/kstat existence
check from ksysguardd/Solaris/Solaris.cmake.

Signed-off-by: Ivailo Monev <xakepa10@laimg.moc>
This commit is contained in:
Ivailo Monev 2020-02-24 19:41:26 +00:00
parent adca7b485e
commit f39596ee19
18 changed files with 38 additions and 149 deletions

View file

@ -100,6 +100,14 @@ if(Q_WS_X11)
endif()
endif(Q_WS_X11)
macro_optional_find_package(Freetype)
set_package_properties(Freetype PROPERTIES
DESCRIPTION "Freely available software library to render fonts"
URL "https://www.freetype.org"
PURPOSE "Needed to build font configuration and installation tools"
TYPE OPTIONAL
)
macro_optional_find_package(Fontconfig)
set_package_properties(Fontconfig PROPERTIES
DESCRIPTION "Font access configuration library"
@ -175,7 +183,6 @@ check_include_files(sys/wait.h HAVE_SYS_WAIT_H)
check_include_files(sys/time.h HAVE_SYS_TIME_H)
include(ConfigureChecks.cmake)
configure_file(config-runtime.h.cmake ${CMAKE_BINARY_DIR}/config-runtime.h)
configure_file(config-unix.h.cmake ${CMAKE_BINARY_DIR}/config-unix.h )
configure_file(config-X11.h.cmake ${CMAKE_BINARY_DIR}/config-X11.h )
if(NOT CMAKE_INSTALL_PREFIX STREQUAL "/usr")

View file

@ -8,6 +8,7 @@ set_package_properties(PAM PROPERTIES
include(CMakePushCheckState)
include(CheckTypeSize)
include(CheckSymbolExists)
if (PAM_FOUND)
set(KDE4_COMMON_PAM_SERVICE "kde" CACHE STRING "The PAM service to use unless overridden for a particular app.")
@ -56,19 +57,15 @@ set(XKBDIR "${xrootdir}/share/X11")
check_function_exists(getpassphrase HAVE_GETPASSPHRASE)
check_function_exists(vsyslog HAVE_VSYSLOG)
check_function_exists(statvfs HAVE_STATVFS)
check_function_exists(nice HAVE_NICE)
check_include_files(string.h HAVE_STRING_H)
check_include_files(sys/select.h HAVE_SYS_SELECT_H)
check_include_files(limits.h HAVE_LIMITS_H)
check_include_files(sys/time.h HAVE_SYS_TIME_H) # ksmserver, ksplashml, sftp
check_include_files(stdint.h HAVE_STDINT_H) # kcontrol/kfontinst
check_include_files("sys/stat.h;sys/vfs.h" HAVE_SYS_VFS_H) # statvfs for plasma/solid
check_include_files("sys/stat.h;sys/statvfs.h" HAVE_SYS_STATVFS_H) # statvfs for plasma/solid
check_include_files(sys/param.h HAVE_SYS_PARAM_H)
check_include_files("sys/param.h;sys/mount.h" HAVE_SYS_MOUNT_H)
check_include_files("sys/types.h;sys/statfs.h" HAVE_SYS_STATFS_H)
check_include_files(unistd.h HAVE_UNISTD_H)
check_include_files(malloc.h HAVE_MALLOC_H)
check_function_exists(statfs HAVE_STATFS)
macro_bool_to_01(FONTCONFIG_FOUND HAVE_FONTCONFIG) # kcontrol/{fonts,kfontinst}
macro_bool_to_01(FREETYPE_FOUND HAVE_FREETYPE) # kcontrol/fonts
macro_bool_to_01(X11_XShm_FOUND HAVE_XSHM) # kwin, ksplash
@ -93,11 +90,14 @@ macro_bool_to_01(X11_xf86misc_FOUND HAVE_XF86MISC) # kdesktop and kcontrol/lock
macro_bool_to_01(X11_dpms_FOUND HAVE_DPMS) # kdesktop
macro_bool_to_01(X11_XSync_FOUND HAVE_XSYNC) # kwin
set(CMAKE_EXTRA_INCLUDE_FILES sys/socket.h)
check_type_size("struct ucred" STRUCT_UCRED) # kio_fonts
check_function_exists(setpriority HAVE_SETPRIORITY) # kscreenlocker
cmake_reset_check_state()
set(CMAKE_REQUIRED_LIBRARIES ${X11_Xext_LIB})
check_symbol_exists(DPMSCapable "X11/Xlib.h;X11/extensions/dpms.h" HAVE_DPMSCAPABLE_PROTO)
check_symbol_exists(DPMSInfo "X11/Xlib.h;X11/extensions/dpms.h" HAVE_DPMSINFO_PROTO)
cmake_pop_check_state()
cmake_reset_check_state()
set(CMAKE_REQUIRED_INCLUDES ${X11_Xrandr_INCLUDE_PATH}/Xrandr.h)
set(CMAKE_REQUIRED_LIBRARIES ${X11_Xrandr_LIB})

View file

@ -1,37 +0,0 @@
/* config-runtime.h. Generated by cmake from config-runtime.h.cmake */
/* Define if you have long long as datatype */
#cmakedefine HAVE_LONG_LONG 1
/* Define to 1 if you have the `nice' function. */
#cmakedefine HAVE_NICE 1
/* Define to 1 if you have the `sigaction' function. */
#cmakedefine HAVE_SIGACTION 1
/* Define to 1 if you have the `sigset' function. */
#cmakedefine HAVE_SIGSET 1
/* Define to 1 if you have the <string.h> header file. */
#cmakedefine HAVE_STRING_H 1
/* Define to 1 if you have the <sys/select.h> header file. */
#cmakedefine HAVE_SYS_SELECT_H 1
/* Define to 1 if you have the <sys/socket.h> header file. */
#cmakedefine HAVE_SYS_SOCKET_H 1
/* Define to 1 if you have the <sys/time.h> header file. */
#cmakedefine HAVE_SYS_TIME_H 1
/* Define to 1 if you have the <sys/types.h> header file. */
#cmakedefine HAVE_SYS_TYPES_H 1
/* Define to 1 if you have the <sys/wait.h> header file. */
#cmakedefine HAVE_SYS_WAIT_H 1
/* Define to 1 if you have the <unistd.h> header file. */
#cmakedefine HAVE_UNISTD_H 1
/* Number of bits in a file offset, on hosts where this is settable. */
#define _FILE_OFFSET_BITS 64

View file

@ -15,105 +15,39 @@
/* Defines if your system has the freetype library */
#cmakedefine HAVE_FREETYPE 1
/* Define if you have gethostname */
#cmakedefine HAVE_GETHOSTNAME 1
/* Define if you have the gethostname prototype */
#cmakedefine HAVE_GETHOSTNAME_PROTO 1
/* Defines if you have Solaris' libkstat */
/* #undef HAVE_KSTAT */
/* Define if you have long long as datatype */
#cmakedefine HAVE_LONG_LONG 1
/* Define to 1 if you have the `nice' function. */
#cmakedefine HAVE_NICE 1
/* Define to 1 if you have the <sasl.h> header file. */
#cmakedefine HAVE_SASL_H 1
/* Define to 1 if you have the `getpassphrase' function. */
#cmakedefine HAVE_GETPASSPHRASE 1
/* Define to 1 if you have the <sasl/sasl.h> header file. */
#cmakedefine HAVE_SASL_SASL_H 1
/* Define to 1 if you have the `vsyslog' function. */
#cmakedefine HAVE_VSYSLOG 1
/* Define to 1 if you have the `setpriority' function. */
#cmakedefine HAVE_SETPRIORITY 1
/* Define to 1 if you have the `sigaction' function. */
#cmakedefine HAVE_SIGACTION 1
/* Define to 1 if you have the `sigset' function. */
#cmakedefine HAVE_SIGSET 1
/* Define to 1 if you have statvfs */
#cmakedefine HAVE_STATVFS 1
/* Define to 1 if you have the <string.h> header file. */
#cmakedefine HAVE_STRING_H 1
/* Define if you have the struct ucred */
#cmakedefine HAVE_STRUCT_UCRED 1
/* Define to 1 if you have the <sys/loadavg.h> header file. */
#cmakedefine HAVE_SYS_LOADAVG_H 1
/* Define to 1 if you have the <sys/mount.h> header file. */
#cmakedefine HAVE_SYS_MOUNT_H 1
/* Define to 1 if you have the <sys/param.h> header file. */
#cmakedefine HAVE_SYS_PARAM_H 1
/* Define to 1 if you have the <sys/statfs.h> header file. */
#cmakedefine HAVE_SYS_STATFS_H 1
/* Define to 1 if you have the <sys/statvfs.h> header file. */
#cmakedefine HAVE_SYS_STATVFS_H 1
/* Define to 1 if you have statfs(). */
#cmakedefine HAVE_STATFS 1
/* Define to 1 if you have the <sys/select.h> header file. */
#cmakedefine HAVE_SYS_SELECT_H 1
/* Define to 1 if you have the <sys/socket.h> header file. */
#cmakedefine HAVE_SYS_SOCKET_H 1
/* Define to 1 if you have the <sys/time.h> header file. */
#cmakedefine HAVE_SYS_TIME_H 1
/* Define to 1 if you have the <sys/types.h> header file. */
#cmakedefine HAVE_SYS_TYPES_H 1
/* Define to 1 if you have the <sys/vfs.h> header file. */
#cmakedefine HAVE_SYS_VFS_H 1
/* Define to 1 if you have the <sys/wait.h> header file. */
#cmakedefine HAVE_SYS_WAIT_H 1
/* Define to 1 if you have the <unistd.h> header file. */
#cmakedefine HAVE_UNISTD_H 1
/* Define to 1 if you have the <stdint.h> header file. */
#cmakedefine HAVE_STDINT_H 1
/* Define to 1 if you have the <limits.h> header file. */
#cmakedefine HAVE_LIMITS_H 1
/* Define to 1 if you have the <malloc.h> header file. */
#cmakedefine HAVE_MALLOC_H 1
/* Define if you have unsetenv */
#cmakedefine HAVE_UNSETENV 1
/* Define if you have the unsetenv prototype */
#cmakedefine HAVE_UNSETENV_PROTO 1
/* Define if you have usleep */
#cmakedefine HAVE_USLEEP 1
/* Define if you have the usleep prototype */
#cmakedefine HAVE_USLEEP_PROTO 1
/* Define to 1 if you have the `vsnprintf' function. */
#cmakedefine HAVE_VSNPRINTF 1
/* KDE's default home directory */
#cmakedefine KDE_DEFAULT_HOME "${KDE_DEFAULT_HOME}"
@ -126,12 +60,6 @@
/* KDE's static data directory */
#define KDE_DATADIR "${KDE4_DATA_INSTALL_DIR}"
/* Define where your java executable is */
#undef PATH_JAVA
/* Define to 1 if you can safely include both <sys/time.h> and <time.h>. */
#cmakedefine TIME_WITH_SYS_TIME 1
/* X binaries directory */
#cmakedefine XBINDIR "${XBINDIR}"

View file

@ -1,12 +1,3 @@
macro_optional_find_package(Freetype)
set_package_properties(Freetype PROPERTIES
DESCRIPTION "A font rendering engine"
URL "http://www.freetype.org"
PURPOSE "Needed to build kfontinst, a simple font installer."
TYPE OPTIONAL
)
set(libkxftconfig_SRCS
${CMAKE_CURRENT_SOURCE_DIR}/fonts/kxftconfig.cpp
)

View file

@ -21,7 +21,7 @@
#include "kcmdnssd.h"
#include <sys/stat.h>
#include <config-runtime.h>
#include <config-workspace.h>
#include <QtDBus/QtDBus>

View file

@ -18,7 +18,7 @@
#include "iconthemes.h"
#include <config-runtime.h>
#include <config-workspace.h>
#include <stdlib.h>
#include <unistd.h>

View file

@ -21,7 +21,7 @@
#include "fish.h"
#include <config-runtime.h>
#include <config-workspace.h>
#include "config-fish.h"
#include <QFile>
#include <QDateTime>

View file

@ -20,7 +20,7 @@
#include "kio_floppy.h"
#include <config-runtime.h>
#include <config-workspace.h>
#ifdef HAVE_STRING_H
#include <string.h>

View file

@ -19,7 +19,7 @@
#include "program.h"
#include <config-runtime.h>
#include <config-workspace.h>
#include <unistd.h>
#include <fcntl.h>
#include <sys/ioctl.h>

View file

@ -21,7 +21,7 @@
#include "kio_nfs.h"
#include <config-runtime.h>
#include <config-workspace.h>
#include <sys/types.h>
#include <sys/stat.h>

View file

@ -19,7 +19,7 @@
Boston, MA 02110-1301, USA.
*/
#include <config-runtime.h>
#include <config-workspace.h>
#include <arpa/inet.h>

View file

@ -19,7 +19,7 @@
Boston, MA 02110-1301, USA.
*/
#include <config-runtime.h>
#include <config-workspace.h>
#include <arpa/inet.h>

View file

@ -21,7 +21,7 @@
#include "kio_sftp.h"
#include <config-runtime.h>
#include <config-workspace.h>
#include <cerrno>
#include <cstring>

View file

@ -21,7 +21,7 @@
#include "djvucreator.h"
#include <config-runtime.h>
#include <config-workspace.h>
#include <assert.h>
#include <stdlib.h>

View file

@ -58,7 +58,7 @@
#include <kde_file.h>
#include <kdemacros.h>
#include <config-runtime.h> // For HAVE_NICE
#include <config-workspace.h> // For HAVE_NICE
#include <kio/thumbcreator.h>
#include <kio/thumbsequencecreator.h>
#include <kconfiggroup.h>

View file

@ -28,7 +28,7 @@
#include <klocale.h>
#include <kservicetypetrader.h>
#include <config-runtime.h>
#include <config-workspace.h>
#include "knotifyconfig.h"
#include "ksolidnotify.h"

View file

@ -39,7 +39,7 @@
#include <kstandarddirs.h>
#include <kconfiggroup.h>
#include <kurl.h>
#include <config-runtime.h>
#include <config-workspace.h>
#include <kcomponentdata.h>
#include <knotifyconfig.h>
#include <kmediaplayer.h>