generic: cleanup configuration checks

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
This commit is contained in:
Ivailo Monev 2016-05-02 18:10:43 +00:00
parent 8f440a8574
commit 3828e55f8a
8 changed files with 3 additions and 47 deletions

View file

@ -34,17 +34,13 @@ check_include_files(stdio.h HAVE_STDIO_H) # various
check_include_files(stdlib.h HAVE_STDLIB_H) # various
check_include_files(string.h HAVE_STRING_H) # various
check_include_files(strings.h HAVE_STRINGS_H) # various
check_include_files(malloc.h HAVE_MALLOC_H) # unused?
check_include_files(sys/time.h TIME_WITH_SYS_TIME) # kdecore, kioslave
check_include_files(crt_externs.h HAVE_CRT_EXTERNS_H) # kinit, config.h
check_include_files(alloca.h HAVE_ALLOCA_H) # kdecore
check_include_files(fstab.h HAVE_FSTAB_H) # kio, kdecore
check_include_files(limits.h HAVE_LIMITS_H) # various
check_include_files(mntent.h HAVE_MNTENT_H) # solid, kio, kdecore
check_include_files(sysent.h HAVE_SYSENT_H) # kdecore
check_include_files(sys/stat.h HAVE_SYS_STAT_H) # various
check_include_files(sys/ucred.h HAVE_SYS_UCRED_H) # kio
check_include_files(sys/types.h HAVE_SYS_TYPES_H) # various
check_include_files(sys/select.h HAVE_SYS_SELECT_H) # various
check_include_files(sys/param.h HAVE_SYS_PARAM_H) # various
@ -53,7 +49,6 @@ check_include_files(sys/mntent.h HAVE_SYS_MNTENT_H) # solid,
check_include_files("sys/param.h;sys/mount.h" HAVE_SYS_MOUNT_H) # kio, kdecore
check_include_files(unistd.h HAVE_UNISTD_H) # various
check_include_files(stdint.h HAVE_STDINT_H) # various
check_include_files(paths.h HAVE_PATHS_H) # kdecore, kio
check_include_files(errno.h HAVE_ERRNO_H) # various
check_include_files(sys/time.h HAVE_SYS_TIME_H) # various
@ -71,8 +66,6 @@ macro_bool_to_01(X11_Xrender_FOUND HAVE_XRENDER) # kio
# macro. Note that some symbols require multiple includes in a
# specific order. Refer to the man page for each symbol for which a
# check is to be added to get the proper set of headers.
check_symbol_exists(strcmp "string.h" HAVE_STRCMP) # libltdl
check_symbol_exists(strrchr "string.h" HAVE_STRRCHR) # libltdl
check_symbol_exists(strtoll "stdlib.h" HAVE_STRTOLL) # kioslave
check_symbol_exists(S_ISSOCK "sys/stat.h" HAVE_S_ISSOCK) # config.h
check_symbol_exists(vsnprintf "stdio.h" HAVE_VSNPRINTF) # config.h
@ -189,14 +182,6 @@ if (UNIX)
check_function_exists(tcsetattr HAVE_TCSETATTR)
endif (UNIX)
# it seems this isn't used anywhere
#find_library(ICE_LIB NAMES ICE PATHS /usr/X11/lib)
#check_library_exists(${ICE_LIB} _IceTransNoListen "" HAVE__ICETRANSNOLISTEN)
#set(CMAKE_REQUIRED_LIBRARIES crypt)
#check_function_exists(crypt "" HAVE_CRYPT)
#set(CMAKE_REQUIRED_LIBRARIES)
check_function_exists(getmntinfo HAVE_GETMNTINFO) # kdecore, kio
check_function_exists(initgroups HAVE_INITGROUPS) # kde3support/k3process, kdesu
check_function_exists(mkstemps HAVE_MKSTEMPS) # dcop, kdecore/fakes.c
@ -248,7 +233,3 @@ check_cxx_source_compiles("
check_struct_member(dirent d_type dirent.h HAVE_DIRENT_D_TYPE) # kdecore, kioslave/file
# TODO: for the more capable cmake authors: we need at least gcc's and MSVC's version in here
set (KDE_COMPILER_VERSION ${CMAKE_C_COMPILER})
string(REGEX REPLACE ^.*/ "" KDE_COMPILER_VERSION ${KDE_COMPILER_VERSION})

View file

@ -1,5 +1,5 @@
#define KDE_COMPILER_VERSION "${KDE_COMPILER_VERSION}"
#define KDE_COMPILER_VERSION "${CMAKE_C_COMPILER_VERSION}"
#define KDE_COMPILING_OS "${CMAKE_SYSTEM}"

View file

@ -22,9 +22,6 @@
/* Define to 1 if you have strings.h */
#cmakedefine HAVE_STRINGS_H 1
/* Define to 1 if you have malloc.h */
#cmakedefine HAVE_MALLOC_H 1
/* define if message translations are enabled */
#cmakedefine ENABLE_NLS 1
@ -42,12 +39,9 @@
#cmakedefine HAVE_SYS_MNTENT_H 1
#cmakedefine HAVE_SYS_MOUNT_H 1
#cmakedefine HAVE_ALLOCA_H 1
#cmakedefine HAVE_CRT_EXTERNS_H 1
#cmakedefine HAVE_FSTAB_H 1
#cmakedefine HAVE_LIMITS_H 1
#cmakedefine HAVE_MNTENT_H 1
#cmakedefine HAVE_PATHS_H 1
#cmakedefine HAVE_UNISTD_H 1
#cmakedefine HAVE_XTEST 1
@ -72,11 +66,9 @@
#cmakedefine HAVE_SETENV 1
#cmakedefine HAVE_SETEUID 1
#cmakedefine HAVE_SETMNTENT 1
#cmakedefine HAVE_STRCMP 1
#cmakedefine HAVE_STRLCPY 1
#cmakedefine HAVE_STRLCAT 1
#cmakedefine HAVE_STRCASESTR 1
#cmakedefine HAVE_STRRCHR 1
#cmakedefine HAVE_STRTOLL 1
#cmakedefine HAVE_UNSETENV 1
#cmakedefine HAVE_USLEEP 1

View file

@ -47,9 +47,6 @@
#ifndef HAVE_SETENV
#ifdef HAVE_ALLOCA_H
#include <alloca.h>
#endif
#ifdef HAVE_STRING_H
#include <string.h>
#endif
@ -80,9 +77,6 @@ KDECORE_EXPORT int setenv(const char *name, const char *value, int overwrite) {
#ifndef HAVE_UNSETENV
#ifdef HAVE_ALLOCA_H
#include <alloca.h>
#endif
#ifdef HAVE_STRING_H
#include <string.h>
#endif

View file

@ -31,9 +31,6 @@
static Qt::CaseSensitivity cs = Qt::CaseSensitive;
#ifdef HAVE_VOLMGT
#include <volmgt.h>
#endif
#ifdef HAVE_SYS_MNTTAB_H
#include <sys/mnttab.h>
#endif

View file

@ -37,9 +37,6 @@
#ifdef HAVE_TEST
#include <test.h>
#endif
#ifdef HAVE_PATHS_H
#include <paths.h>
#endif
#include <QtCore/QDir>

View file

@ -76,10 +76,6 @@
#include <netwm.h>
#endif
#ifdef HAVE_PATHS_H
#include <paths.h>
#endif
#ifdef Q_WS_X11
#include <X11/Xlib.h>
#include <X11/Xutil.h>

View file

@ -211,14 +211,13 @@ QList<KServiceAction> KDesktopFileActions::builtinServices( const KUrl& _url )
}
if (offerUnmount) {
QString text;
#ifdef HAVE_VOLMGT
/*
* Solaris' volume management can only umount+eject
*/
text = i18n("Eject");
QString text = i18n("Eject");
#else
text = i18n("Unmount");
QString text = i18n("Unmount");
#endif
KServiceAction unmount("unmount", text, QString(), QString(), false);
unmount.setData(QVariant(ST_UNMOUNT));