From 2f289ce0970a082b46384b207df69585b6d7174b Mon Sep 17 00:00:00 2001 From: David Adam Date: Tue, 7 Nov 2017 22:08:07 +0800 Subject: [PATCH] cmake: drop unneeded checks Much cruft brought across from autoconf is removed. --- cmake/ConfigureChecks.cmake | 24 +++---------- config_cmake.h.in | 71 ------------------------------------- 2 files changed, 5 insertions(+), 90 deletions(-) diff --git a/cmake/ConfigureChecks.cmake b/cmake/ConfigureChecks.cmake index de6788be7..6508d6640 100644 --- a/cmake/ConfigureChecks.cmake +++ b/cmake/ConfigureChecks.cmake @@ -26,7 +26,6 @@ INCLUDE(CheckTypeSize) CHECK_FUNCTION_EXISTS(backtrace_symbols HAVE_BACKTRACE_SYMBOLS) CHECK_FUNCTION_EXISTS(clock_gettime HAVE_CLOCK_GETTIME) CHECK_FUNCTION_EXISTS(ctermid_r HAVE_CTERMID_R) -CHECK_INCLUDE_FILE_CXX(curses.h HAVE_CURSES_H) CHECK_STRUCT_HAS_MEMBER("struct dirent" d_type dirent.h HAVE_STRUCT_DIRENT_D_TYPE LANGUAGE CXX) CHECK_FUNCTION_EXISTS(dirfd HAVE_DIRFD) CHECK_INCLUDE_FILE_CXX(execinfo.h HAVE_EXECINFO_H) @@ -36,32 +35,20 @@ CHECK_FUNCTION_EXISTS(flock HAVE_FLOCK) CHECK_CXX_SYMBOL_EXISTS(futimens sys/stat.h HAVE_FUTIMENS) CHECK_FUNCTION_EXISTS(futimes HAVE_FUTIMES) CHECK_FUNCTION_EXISTS(getifaddrs HAVE_GETIFADDRS) -CHECK_INCLUDE_FILE_CXX(getopt.h HAVE_GETOPT_H) CHECK_FUNCTION_EXISTS(getpwent HAVE_GETPWENT) CHECK_FUNCTION_EXISTS(gettext HAVE_GETTEXT) -CHECK_INCLUDE_FILE_CXX(inttypes.h HAVE_INTTYPES_H) CHECK_FUNCTION_EXISTS(killpg HAVE_KILLPG) -CHECK_INCLUDE_FILE_CXX(libintl.h HAVE_LIBINTL_H) +CHECK_INCLUDE_FILE_CXX(libintl.h HAVE_LIBINTL_H) # Needed for _nl_msg_cat_cntr CHECK_FUNCTION_EXISTS(lrand48_r HAVE_LRAND48_R) -CHECK_INCLUDE_FILE_CXX(memory.h HAVE_MEMORY_H) CHECK_FUNCTION_EXISTS(mkostemp HAVE_MKOSTEMP) -SET(HAVE_CURSES_H ${CURSES_HAVE_CURSES_H}) SET(HAVE_NCURSES_CURSES_H ${CURSES_HAVE_NCURSES_CURSES_H}) -SET(HAVE_CURSES_H ${CURSES_HAVE_CURSES_H}) SET(HAVE_NCURSES_H ${CURSES_HAVE_NCURSES_H}) CHECK_INCLUDE_FILE_CXX("ncurses/term.h" HAVE_NCURSES_TERM_H) -CHECK_FUNCTION_EXISTS(DIR HAVE_NDIR_H) -CHECK_FUNCTION_EXISTS(shm_open HAVE_SHM_OPEN) CHECK_INCLUDE_FILE_CXX(siginfo.h HAVE_SIGINFO_H) CHECK_INCLUDE_FILE_CXX(spawn.h HAVE_SPAWN_H) -CHECK_INCLUDE_FILE_CXX(stdint.h HAVE_STDINT_H) -CHECK_INCLUDE_FILE_CXX(stdlib.h HAVE_STDLIB_H) CHECK_FUNCTION_EXISTS(std::wcscasecmp HAVE_STD__WCSCASECMP) CHECK_FUNCTION_EXISTS(std::wcsdup HAVE_STD__WCSDUP) CHECK_FUNCTION_EXISTS(std::wcsncasecmp HAVE_STD__WCSNCASECMP) -CHECK_INCLUDE_FILE_CXX(strings.h HAVE_STRINGS_H) -CHECK_INCLUDE_FILE_CXX(string.h HAVE_STRING_H) -CHECK_INCLUDE_FILE_CXX(stropts.h HAVE_STROPTS_H) CHECK_STRUCT_HAS_MEMBER("struct stat" st_ctime_nsec "sys/stat.h" HAVE_STRUCT_STAT_ST_CTIME_NSEC LANGUAGE CXX) CHECK_STRUCT_HAS_MEMBER("struct stat" st_mtimespec.tv_nsec "sys/stat.h" @@ -70,14 +57,10 @@ CHECK_STRUCT_HAS_MEMBER("struct stat" st_mtim.tv_nsec "sys/stat.h" HAVE_STRUCT_S LANGUAGE CXX) CHECK_CXX_SYMBOL_EXISTS(sys_errlist stdio.h HAVE_SYS_ERRLIST) CHECK_INCLUDE_FILE_CXX(sys/ioctl.h HAVE_SYS_IOCTL_H) -CHECK_INCLUDE_FILE_CXX(sys/resource.h HAVE_SYS_RESOURCE_H) CHECK_INCLUDE_FILE_CXX(sys/select.h HAVE_SYS_SELECT_H) -CHECK_INCLUDE_FILE_CXX(sys/stat.h HAVE_SYS_STAT_H) CHECK_INCLUDE_FILE_CXX(sys/sysctl.h HAVE_SYS_SYSCTL_H) -CHECK_INCLUDE_FILE_CXX(sys/types.h HAVE_SYS_TYPES_H) -CHECK_INCLUDE_FILE_CXX(termios.h HAVE_TERMIOS_H) +CHECK_INCLUDE_FILE_CXX(termios.h HAVE_TERMIOS_H) # Needed for TIOCGWINSZ CHECK_INCLUDE_FILE_CXX(term.h HAVE_TERM_H) -CHECK_INCLUDE_FILE_CXX(unistd.h HAVE_UNISTD_H) CHECK_FUNCTION_EXISTS(wcscasecmp HAVE_WCSCASECMP) CHECK_FUNCTION_EXISTS(wcsdup HAVE_WCSDUP) CHECK_FUNCTION_EXISTS(wcslcpy HAVE_WCSLCPY) @@ -96,3 +79,6 @@ SET(CMAKE_EXTRA_INCLUDE_FILES) SET(HAVE__PROC_SELF_STAT (EXISTS "/proc/self/stat")) CHECK_TYPE_SIZE("wchar_t[8]" WCHAR_T_BITS LANGUAGE CXX) + +# Not checked yet: non-varargs tparm ("Solaris tparm kludge") +# Not checked yet: gettext diff --git a/config_cmake.h.in b/config_cmake.h.in index d6f575ecf..4ae4fd6b0 100644 --- a/config_cmake.h.in +++ b/config_cmake.h.in @@ -7,12 +7,6 @@ /* Define to 1 if you have the `ctermid_r' function. */ #cmakedefine HAVE_CTERMID_R 1 -/* Define to 1 if you have the header file. */ -#cmakedefine HAVE_CURSES_H 1 - -/* Define to 1 if you have the header file, and it defines `DIR'. */ -#cmakedefine HAVE_DIRENT_H 1 - /* Define to 1 if you have the `dirfd' function. */ #cmakedefine HAVE_DIRFD 1 @@ -31,18 +25,12 @@ /* Define to 1 if you have the `getifaddrs' function. */ #cmakedefine HAVE_GETIFADDRS 1 -/* Define to 1 if you have the header file. */ -#cmakedefine HAVE_GETOPT_H 1 - /* Define to 1 if you have the `getpwent' function. */ #cmakedefine HAVE_GETPWENT 1 /* Define to 1 if you have the `gettext' function. */ #cmakedefine HAVE_GETTEXT 1 -/* Define to 1 if you have the header file. */ -#cmakedefine HAVE_INTTYPES_H 1 - /* Define to 1 if you have the `killpg' function. */ #cmakedefine HAVE_KILLPG 1 @@ -52,9 +40,6 @@ /* Define to 1 if you have the `lrand48_r' function. */ #cmakedefine HAVE_LRAND48_R 1 -/* Define to 1 if you have the header file. */ -#cmakedefine HAVE_MEMORY_H 1 - /* Define to 1 if you have the `mkostemp' function. */ #cmakedefine HAVE_MKOSTEMP 1 @@ -67,24 +52,12 @@ /* Define to 1 if you have the header file. */ #cmakedefine HAVE_NCURSES_TERM_H 1 -/* Define to 1 if you have the header file, and it defines `DIR'. */ -#cmakedefine HAVE_NDIR_H 1 - -/* Define to 1 if the shm_open() function exists */ -#cmakedefine HAVE_SHM_OPEN 1 - /* Define to 1 if you have the header file. */ #cmakedefine HAVE_SIGINFO_H 1 /* Define to 1 if you have the header file. */ #cmakedefine HAVE_SPAWN_H 1 -/* Define to 1 if you have the header file. */ -#cmakedefine HAVE_STDINT_H 1 - -/* Define to 1 if you have the header file. */ -#cmakedefine HAVE_STDLIB_H 1 - /* Define to 1 if you have the `std::wcscasecmp' function. */ #cmakedefine HAVE_STD__WCSCASECMP 1 @@ -94,15 +67,6 @@ /* Define to 1 if you have the `std::wcsncasecmp' function. */ #cmakedefine HAVE_STD__WCSNCASECMP 1 -/* Define to 1 if you have the header file. */ -#cmakedefine HAVE_STRINGS_H 1 - -/* Define to 1 if you have the header file. */ -#cmakedefine HAVE_STRING_H 1 - -/* Define to 1 if you have the header file. */ -#cmakedefine HAVE_STROPTS_H 1 - /* Define to 1 if `d_type' is a member of `struct dirent'. */ #cmakedefine HAVE_STRUCT_DIRENT_D_TYPE 1 @@ -115,44 +79,24 @@ /* Define to 1 if `st_mtim.tv_nsec' is a member of `struct stat'. */ #cmakedefine HAVE_STRUCT_STAT_ST_MTIM_TV_NSEC 1 -/* Define to 1 if you have the header file, and it defines `DIR'. - */ -#cmakedefine HAVE_SYS_DIR_H 1 - /* Define to 1 if the sys_errlist array is available. */ #cmakedefine HAVE_SYS_ERRLIST 1 /* Define to 1 if you have the header file. */ #cmakedefine HAVE_SYS_IOCTL_H 1 -/* Define to 1 if you have the header file, and it defines `DIR'. - */ -#cmakedefine HAVE_SYS_NDIR_H 1 - -/* Define to 1 if you have the header file. */ -#cmakedefine HAVE_SYS_RESOURCE_H 1 - /* Define to 1 if you have the header file. */ #cmakedefine HAVE_SYS_SELECT_H 1 -/* Define to 1 if you have the header file. */ -#cmakedefine HAVE_SYS_STAT_H 1 - /* Define to 1 if you have the header file. */ #cmakedefine HAVE_SYS_SYSCTL_H 1 -/* Define to 1 if you have the header file. */ -#cmakedefine HAVE_SYS_TYPES_H 1 - /* Define to 1 if you have the header file. */ #cmakedefine HAVE_TERMIOS_H 1 /* Define to 1 if you have the header file. */ #cmakedefine HAVE_TERM_H 1 -/* Define to 1 if you have the header file. */ -#cmakedefine HAVE_UNISTD_H 1 - /* Define to 1 if you have the `wcscasecmp' function. */ #cmakedefine HAVE_WCSCASECMP 1 @@ -192,15 +136,6 @@ /* Define to the full name of this package. */ #define PACKAGE_NAME "fish" -/* Define to the full name and version of this package. */ -// #define PACKAGE_STRING "FIXME" # FISH-BUILD-VERSION-FILE - -/* Define to the one symbol short name of this package. */ -#cmakedefine PACKAGE_TARNAME "fish" 1 - -/* Define to the version of this package. */ -// #define PACKAGE_VERSION "FIXME" - /* Define to 1 if tparm accepts a fixed amount of paramters. */ // #cmakedefine TPARM_SOLARIS_KLUDGE 1 @@ -215,12 +150,6 @@ # define _DARWIN_USE_64_BIT_INODE 1 #endif -/* Number of bits in a file offset, on hosts where this is settable. */ -// TODO #cmakedefine _FILE_OFFSET_BITS 1 - -/* Define for large files, on AIX-style hosts. */ -// TODO #cmakedefine _LARGE_FILES 1 - #if __GNUC__ >= 3 #ifndef __warn_unused #define __warn_unused __attribute__ ((warn_unused_result))