diff options
Diffstat (limited to 'configure.cmake')
-rw-r--r-- | configure.cmake | 31 |
1 files changed, 19 insertions, 12 deletions
diff --git a/configure.cmake b/configure.cmake index 5b1afd66439..f9eb784fe80 100644 --- a/configure.cmake +++ b/configure.cmake @@ -147,10 +147,9 @@ IF(UNIX) FIND_PACKAGE(Threads) SET(CMAKE_REQUIRED_LIBRARIES - ${LIBM} ${LIBNSL} ${LIBBIND} ${LIBCRYPT} ${LIBSOCKET} ${LIBDL} ${CMAKE_THREAD_LIBS_INIT} ${LIBRT}) + ${LIBM} ${LIBNSL} ${LIBBIND} ${LIBCRYPT} ${LIBSOCKET} ${LIBDL} ${CMAKE_THREAD_LIBS_INIT} ${LIBRT} ${LIBEXECINFO}) - LIST(LENGTH CMAKE_REQUIRED_LIBRARIES required_libs_length) - IF(${required_libs_length} GREATER 0) + IF(CMAKE_REQUIRED_LIBRARIES) LIST(REMOVE_DUPLICATES CMAKE_REQUIRED_LIBRARIES) ENDIF() LINK_LIBRARIES(${CMAKE_THREAD_LIBS_INIT}) @@ -181,6 +180,7 @@ ENDIF() # Tests for header files # INCLUDE (CheckIncludeFiles) +INCLUDE (CheckIncludeFileCXX) CHECK_INCLUDE_FILES ("stdlib.h;stdarg.h;string.h;float.h" STDC_HEADERS) CHECK_INCLUDE_FILES (sys/types.h HAVE_SYS_TYPES_H) @@ -188,7 +188,8 @@ CHECK_INCLUDE_FILES (alloca.h HAVE_ALLOCA_H) CHECK_INCLUDE_FILES (aio.h HAVE_AIO_H) CHECK_INCLUDE_FILES (arpa/inet.h HAVE_ARPA_INET_H) CHECK_INCLUDE_FILES (crypt.h HAVE_CRYPT_H) -CHECK_INCLUDE_FILES (cxxabi.h HAVE_CXXABI_H) +CHECK_INCLUDE_FILE_CXX (cxxabi.h HAVE_CXXABI_H) +CHECK_INCLUDE_FILES (bfd.h BFD_H_EXISTS) CHECK_INCLUDE_FILES (dirent.h HAVE_DIRENT_H) CHECK_INCLUDE_FILES (dlfcn.h HAVE_DLFCN_H) CHECK_INCLUDE_FILES (execinfo.h HAVE_EXECINFO_H) @@ -239,7 +240,6 @@ CHECK_INCLUDE_FILES (sys/socket.h HAVE_SYS_SOCKET_H) CHECK_INCLUDE_FILES (sys/stat.h HAVE_SYS_STAT_H) CHECK_INCLUDE_FILES (sys/stream.h HAVE_SYS_STREAM_H) CHECK_INCLUDE_FILES (sys/termcap.h HAVE_SYS_TERMCAP_H) -CHECK_INCLUDE_FILES ("time.h;sys/timeb.h" HAVE_SYS_TIMEB_H) CHECK_INCLUDE_FILES ("curses.h;term.h" HAVE_TERM_H) CHECK_INCLUDE_FILES (asm/termbits.h HAVE_ASM_TERMBITS_H) CHECK_INCLUDE_FILES (termbits.h HAVE_TERMBITS_H) @@ -260,6 +260,14 @@ CHECK_INCLUDE_FILES ("stdlib.h;sys/un.h" HAVE_SYS_UN_H) CHECK_INCLUDE_FILES (vis.h HAVE_VIS_H) CHECK_INCLUDE_FILES (wchar.h HAVE_WCHAR_H) CHECK_INCLUDE_FILES (wctype.h HAVE_WCTYPE_H) +CHECK_INCLUDE_FILES (sys/sockio.h HAVE_SYS_SOCKIO_H) + +IF(BFD_H_EXISTS) + IF(NOT_FOR_DISTRIBUTION) + SET(NON_DISTRIBUTABLE_WARNING 1) + SET(HAVE_BFD_H 1) + ENDIF() +ENDIF() IF(HAVE_SYS_STREAM_H) # Needs sys/stream.h on Solaris @@ -391,6 +399,7 @@ CHECK_FUNCTION_EXISTS (pread HAVE_PREAD) CHECK_FUNCTION_EXISTS (pthread_attr_create HAVE_PTHREAD_ATTR_CREATE) CHECK_FUNCTION_EXISTS (pthread_attr_getstacksize HAVE_PTHREAD_ATTR_GETSTACKSIZE) CHECK_FUNCTION_EXISTS (pthread_attr_setscope HAVE_PTHREAD_ATTR_SETSCOPE) +CHECK_FUNCTION_EXISTS (pthread_attr_getguardsize HAVE_PTHREAD_ATTR_GETGUARDSIZE) CHECK_FUNCTION_EXISTS (pthread_attr_setstacksize HAVE_PTHREAD_ATTR_SETSTACKSIZE) CHECK_FUNCTION_EXISTS (pthread_condattr_create HAVE_PTHREAD_CONDATTR_CREATE) CHECK_FUNCTION_EXISTS (pthread_condattr_setclock HAVE_PTHREAD_CONDATTR_SETCLOCK) @@ -429,7 +438,6 @@ CHECK_FUNCTION_EXISTS (strlcat HAVE_STRLCAT) CHECK_FUNCTION_EXISTS (strsignal HAVE_STRSIGNAL) CHECK_FUNCTION_EXISTS (fgetln HAVE_FGETLN) CHECK_FUNCTION_EXISTS (strpbrk HAVE_STRPBRK) -CHECK_FUNCTION_EXISTS (strsep HAVE_STRSEP) CHECK_FUNCTION_EXISTS (strstr HAVE_STRSTR) CHECK_FUNCTION_EXISTS (strtok_r HAVE_STRTOK_R) CHECK_FUNCTION_EXISTS (strtol HAVE_STRTOL) @@ -486,7 +494,7 @@ CHECK_FUNCTION_EXISTS(rdtscll HAVE_RDTSCLL) # Tests for symbols # -CHECK_SYMBOL_EXISTS(sys_errlist "stdio.h" HAVE_SYS_ERRLIST) +#CHECK_SYMBOL_EXISTS(sys_errlist "stdio.h" HAVE_SYS_ERRLIST) CHECK_SYMBOL_EXISTS(madvise "sys/mman.h" HAVE_DECL_MADVISE) CHECK_SYMBOL_EXISTS(tzname "time.h" HAVE_TZNAME) CHECK_SYMBOL_EXISTS(lrand48 "stdlib.h" HAVE_LRAND48) @@ -1018,13 +1026,12 @@ if available and 'smp' configuration otherwise.") MARK_AS_ADVANCED(WITH_ATOMIC_LOCKS MY_ATOMIC_MODE_RWLOCK MY_ATOMIC_MODE_DUMMY) IF(WITH_VALGRIND) - CHECK_INCLUDE_FILES("valgrind/memcheck.h;valgrind/valgrind.h" - HAVE_VALGRIND_HEADERS) - IF(HAVE_VALGRIND_HEADERS) - SET(HAVE_VALGRIND 1) - ENDIF() + SET(HAVE_valgrind 1) ENDIF() +CHECK_INCLUDE_FILES("valgrind/memcheck.h;valgrind/valgrind.h" + HAVE_VALGRIND) + #-------------------------------------------------------------------- # Check for IPv6 support #-------------------------------------------------------------------- |