You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

160 lines
5.4 KiB

  1. include(CheckIncludeFiles)
  2. include(CheckFunctionExists)
  3. include(CheckLibraryExists)
  4. include(CheckSymbolExists)
  5. include(CheckTypeSize)
  6. include(CheckCSourceCompiles)
  7. include(CheckCXXSourceCompiles)
  8. #check_include_files(dlfcn.h HAVE_DLFCN_H )
  9. set(LOG4CPLUS_HAVE_ERRNO_H 1)
  10. set(LOG4CPLUS_HAVE_ICONV_H 1)
  11. set(LOG4CPLUS_HAVE_LIMITS_H 1)
  12. set(LOG4CPLUS_HAVE_SYS_TYPES_H 1)
  13. set(LOG4CPLUS_HAVE_SYS_SOCKET_H 1)
  14. set(LOG4CPLUS_HAVE_SYS_SYSCALL_H 1)
  15. set(LOG4CPLUS_HAVE_SYS_TIME_H 1)
  16. set(LOG4CPLUS_HAVE_SYS_TIMEB_H 1)
  17. set(LOG4CPLUS_HAVE_SYS_STAT_H 1)
  18. set(LOG4CPLUS_HAVE_SYS_FILE_H 1)
  19. set(LOG4CPLUS_HAVE_SYSLOG_H 1)
  20. set(LOG4CPLUS_HAVE_ARPA_INET_H 1)
  21. set(LOG4CPLUS_HAVE_NETINET_IN_H 1)
  22. set(LOG4CPLUS_HAVE_NETINET_TCP_H 1)
  23. set(LOG4CPLUS_HAVE_NETDB_H 1)
  24. set(LOG4CPLUS_HAVE_UNISTD_H 1)
  25. set(LOG4CPLUS_HAVE_FCNTL_H 1)
  26. set(LOG4CPLUS_HAVE_STDIO_H 1)
  27. set(LOG4CPLUS_HAVE_STDARG_H 1)
  28. set(LOG4CPLUS_HAVE_STDLIB_H 1)
  29. set(LOG4CPLUS_HAVE_TIME_H 1)
  30. set(LOG4CPLUS_HAVE_WCHAR_H 1)
  31. set(LOG4CPLUS_HAVE_POLL_H 1)
  32. # set(HAVE_INTTYPES_H 1)
  33. # set(HAVE_MEMORY_H 1)
  34. # set(HAVE_STDINT_H 1)
  35. # set(HAVE_STRINGS_H 1)
  36. # set(HAVE_STRING_H 1)
  37. #check_include_files("stdlib.h;stdio.h;stdarg.h;string.h;float.h" STDC_HEADERS )
  38. find_library(LIBADVAPI32 advapi32)
  39. find_library(LIBKERNEL32 kernel32)
  40. find_library(LIBNSL nsl)
  41. find_library(LIBRT rt)
  42. find_library(LIBICONV iconv)
  43. find_library(LIBPOSIX4 posix4)
  44. find_library(LIBCPOSIX cposix)
  45. find_library(LIBSOCKET socket)
  46. find_library(LIBWS2_32 ws2_32)
  47. set(LOG4CPLUS_HAVE_GMTIME_R 1)
  48. set(LOG4CPLUS_HAVE_LOCALTIME_R 1)
  49. set(LOG4CPLUS_HAVE_GETTIMEOFDAY 1)
  50. set(LOG4CPLUS_HAVE_GETPID 1)
  51. set(LOG4CPLUS_HAVE_POLL 1)
  52. set(LOG4CPLUS_HAVE_PIPE 1)
  53. #set(LOG4CPLUS_HAVE_PIPE2 )
  54. set(LOG4CPLUS_HAVE_FTIME 1)
  55. set(LOG4CPLUS_HAVE_STAT 1)
  56. set(LOG4CPLUS_HAVE_LSTAT 1)
  57. set(LOG4CPLUS_HAVE_FCNTL 1)
  58. set(LOG4CPLUS_HAVE_FLOCK 1)
  59. set(LOG4CPLUS_HAVE_LOCKF 1)
  60. set(LOG4CPLUS_HAVE_HTONS 1)
  61. set(LOG4CPLUS_HAVE_NTOHS 1)
  62. set(LOG4CPLUS_HAVE_HTONL 1)
  63. set(LOG4CPLUS_HAVE_NTOHL 1)
  64. set(LOG4CPLUS_HAVE_SHUTDOWN 1)
  65. set(LOG4CPLUS_HAVE_VSNPRINTF 1)
  66. #set(LOG4CPLUS_HAVE__VSNPRINTF )
  67. #set(LOG4CPLUS_HAVE_VSPRINTF_S )
  68. #set(LOG4CPLUS_HAVE_VSWPRINTF_S )
  69. #set(LOG4CPLUS_HAVE_VFPRINTF_S )
  70. #set(LOG4CPLUS_HAVE_VFWPRINTF_S )
  71. #set(LOG4CPLUS_HAVE__VSNPRINTF_S )
  72. #set(LOG4CPLUS_HAVE__VSNWPRINTF_S )
  73. set(LOG4CPLUS_HAVE_MBSTOWCS 1)
  74. set(LOG4CPLUS_HAVE_WCSTOMBS 1)
  75. set(LOG4CPLUS_HAVE_ENAMETOOLONG 1)
  76. set(LOG4CPLUS_HAVE_GETTID 1)
  77. set(LOG4CPLUS_HAVE_FUNCTION_MACRO 1)
  78. set(LOG4CPLUS_HAVE_PRETTY_FUNCTION_MACRO 1)
  79. set(LOG4CPLUS_HAVE_FUNC_SYMBOL 1)
  80. set(LOG4CPLUS_HAVE___SYNC_ADD_AND_FETCH 1)
  81. set(LOG4CPLUS_HAVE___SYNC_SUB_AND_FETCH 1)
  82. set(LOG4CPLUS_HAVE_GNU_VARIADIC_MACROS 1)
  83. set(LOG4CPLUS_HAVE_C99_VARIADIC_MACROS 1)
  84. #set(LOG4CPLUS_HAVE_CLOCK_GETTIME )
  85. #set(LOG4CPLUS_HAVE_CLOCK_NANOSLEEP )
  86. set(LOG4CPLUS_HAVE_NANOSLEEP 1)
  87. #set(LOG4CPLUS_HAVE_ICONV_OPEN )
  88. #set(LOG4CPLUS_HAVE_ICONV_CLOSE )
  89. #set(LOG4CPLUS_HAVE_ICONV )
  90. #set(LOG4CPLUS_HAVE_GETHOSTBYNAME_R)
  91. set(LOG4CPLUS_HAVE_GETADDRINFO 1)
  92. set(LOG4CPLUS_DECLSPEC_EXPORT "__attribute__ ((visibility(\"default\")))" )
  93. set(LOG4CPLUS_DECLSPEC_IMPORT "__attribute__ ((visibility(\"default\")))" )
  94. set(LOG4CPLUS_DECLSPEC_PRIVATE "__attribute__ ((visibility(\"hidden\")))" )
  95. set(LOG4CPLUS_HAVE_TLS_SUPPORT 1)
  96. set(LOG4CPLUS_THREAD_LOCAL_VAR "__thread")
  97. #set(LOG4CPLUS_HAVE_CXX11_ATOMICS )
  98. #set(socklen_t)
  99. set(HAVE_STDLIB_H ${LOG4CPLUS_HAVE_STDLIB_H} )
  100. set(HAVE_SYS_STAT_H ${LOG4CPLUS_HAVE_SYS_STAT_H} )
  101. set(HAVE_SYS_TYPES_H ${LOG4CPLUS_HAVE_SYS_TYPES_H} )
  102. set(HAVE_SYS_FILE_H ${LOG4CPLUS_HAVE_SYS_FILE_H} )
  103. set(HAVE_UNISTD_H ${LOG4CPLUS_HAVE_UNISTD_H} )
  104. set(HAVE_FTIME ${LOG4CPLUS_HAVE_FTIME} )
  105. set(HAVE_GETPID ${LOG4CPLUS_HAVE_GETPID} )
  106. set(HAVE_GETTIMEOFDAY ${LOG4CPLUS_HAVE_GETTIMEOFDAY} )
  107. set(HAVE_GETADDRINFO ${LOG4CPLUS_HAVE_GETADDRINFO} )
  108. set(HAVE_GETHOSTBYNAME_R ${LOG4CPLUS_HAVE_GETHOSTBYNAME_R} )
  109. set(HAVE_GMTIME_R ${LOG4CPLUS_HAVE_GMTIME_R} )
  110. set(HAVE_HTONL ${LOG4CPLUS_HAVE_HTONL} )
  111. set(HAVE_HTONS ${LOG4CPLUS_HAVE_HTONS} )
  112. set(HAVE_ICONV_OPEN ${LOG4CPLUS_HAVE_ICONV_OPEN} )
  113. set(HAVE_ICONV_CLOSE ${LOG4CPLUS_HAVE_ICONV_CLOSE} )
  114. set(HAVE_ICONV ${LOG4CPLUS_HAVE_ICONV} )
  115. set(HAVE_LSTAT ${LOG4CPLUS_HAVE_LSTAT} )
  116. set(HAVE_FCNTL ${LOG4CPLUS_HAVE_FCNTL} )
  117. set(HAVE_LOCKF ${LOG4CPLUS_HAVE_LOCKF} )
  118. set(HAVE_FLOCK ${LOG4CPLUS_HAVE_FLOCK} )
  119. set(HAVE_LOCALTIME_R ${LOG4CPLUS_HAVE_LOCALTIME_R} )
  120. set(HAVE_NTOHL ${LOG4CPLUS_HAVE_NTOHL} )
  121. set(HAVE_NTOHS ${LOG4CPLUS_HAVE_NTOHS} )
  122. set(HAVE_STAT ${LOG4CPLUS_HAVE_STAT} )
  123. set(HAVE_VFPRINTF_S ${LOG4CPLUS_HAVE_VFPRINTF_S} )
  124. set(HAVE_VFWPRINTF_S ${LOG4CPLUS_HAVE_VFWPRINTF_S} )
  125. set(HAVE_VSNPRINTF ${LOG4CPLUS_HAVE_VSNPRINTF} )
  126. set(HAVE_VSPRINTF_S ${LOG4CPLUS_HAVE_VSPRINTF_S} )
  127. set(HAVE_VSWPRINTF_S ${LOG4CPLUS_HAVE_VSWPRINTF_S} )
  128. set(HAVE__VSNPRINTF ${LOG4CPLUS_HAVE__VSNPRINTF} )
  129. set(HAVE__VSNPRINTF_S ${LOG4CPLUS_HAVE__VSNPRINTF_S} )
  130. set(HAVE__VSNWPRINTF_S ${LOG4CPLUS_HAVE__VSNWPRINTF_S} )
  131. set(HAVE_FUNCTION_MACRO ${LOG4CPLUS_HAVE_FUNCTION_MACRO} )
  132. set(HAVE_PRETTY_FUNCTION_MACRO ${LOG4CPLUS_HAVE_PRETTY_FUNCTION_MACRO} )
  133. set(HAVE___SYNC_ADD_AND_FETCH ${LOG4CPLUS_HAVE___SYNC_ADD_AND_FETCH} )
  134. set(HAVE___SYNC_SUB_AND_FETCH ${LOG4CPLUS_HAVE___SYNC_SUB_AND_FETCH} )