cmake: check more headers and sizeof
This commit is contained in:
parent
2b63980758
commit
90f5bf796d
|
@ -270,28 +270,26 @@ if(ENABLE_PYTHON_BINDINGS AND NOT CYTHON AND NOT PYTHONLIBS_FOUND)
|
||||||
message(FATAL_ERROR "python bindings were requested (ENABLE_PYTHON_BINDINGS=1) but dependencies are not met.")
|
message(FATAL_ERROR "python bindings were requested (ENABLE_PYTHON_BINDINGS=1) but dependencies are not met.")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
# # Checks for header files.
|
# Checks for header files.
|
||||||
# AC_HEADER_ASSERT
|
# XXX AC_HEADER_ASSERT adds --disable-assert which sets -DNDEBUG
|
||||||
# AC_CHECK_HEADERS([ \
|
check_include_file("arpa/inet.h" HAVE_ARPA_INET_H)
|
||||||
# arpa/inet.h \
|
check_include_file("fcntl.h" HAVE_FCNTL_H)
|
||||||
# fcntl.h \
|
check_include_file("inttypes.h" HAVE_INTTYPES_H)
|
||||||
# inttypes.h \
|
check_include_file("limits.h" HAVE_LIMITS_H)
|
||||||
# limits.h \
|
check_include_file("netdb.h" HAVE_NETDB_H)
|
||||||
# netdb.h \
|
check_include_file("netinet/in.h" HAVE_NETINET_IN_H)
|
||||||
# netinet/in.h \
|
check_include_file("pwd.h" HAVE_PWD_H)
|
||||||
# pwd.h \
|
check_include_file("stddef.h" HAVE_STDDEF_H)
|
||||||
# stddef.h \
|
check_include_file("stdint.h" HAVE_STDINT_H)
|
||||||
# stdint.h \
|
check_include_file("stdlib.h" HAVE_STDLIB_H)
|
||||||
# stdlib.h \
|
check_include_file("string.h" HAVE_STRING_H)
|
||||||
# string.h \
|
check_include_file("sys/socket.h" HAVE_SYS_SOCKET_H)
|
||||||
# sys/socket.h \
|
check_include_file("sys/time.h" HAVE_SYS_TIME_H)
|
||||||
# sys/time.h \
|
check_include_file("syslog.h" HAVE_SYSLOG_H)
|
||||||
# syslog.h \
|
check_include_file("time.h" HAVE_TIME_H)
|
||||||
# time.h \
|
check_include_file("unistd.h" HAVE_UNISTD_H)
|
||||||
# unistd.h \
|
|
||||||
# ])
|
# Checks for typedefs, structures, and compiler characteristics.
|
||||||
#
|
|
||||||
# # Checks for typedefs, structures, and compiler characteristics.
|
|
||||||
# AC_TYPE_SIZE_T
|
# AC_TYPE_SIZE_T
|
||||||
# AC_TYPE_SSIZE_T
|
# AC_TYPE_SSIZE_T
|
||||||
# AC_TYPE_UINT8_T
|
# AC_TYPE_UINT8_T
|
||||||
|
@ -309,21 +307,15 @@ endif()
|
||||||
# AC_C_BIGENDIAN
|
# AC_C_BIGENDIAN
|
||||||
# AC_C_INLINE
|
# AC_C_INLINE
|
||||||
# AC_SYS_LARGEFILE
|
# AC_SYS_LARGEFILE
|
||||||
#
|
|
||||||
# AC_CHECK_MEMBER([struct tm.tm_gmtoff], [have_struct_tm_tm_gmtoff=yes],
|
include(CheckStructHasMember)
|
||||||
# [have_struct_tm_tm_gmtoff=no], [[#include <time.h>]])
|
CHECK_STRUCT_HAS_MEMBER("struct tm" tm_gmtoff time.h HAVE_STRUCT_TM_TM_GMTOFF)
|
||||||
#
|
|
||||||
# if test "x$have_struct_tm_tm_gmtoff" = "xyes"; then
|
# Check size of pointer to decide we need 8 bytes alignment adjustment.
|
||||||
# AC_DEFINE([HAVE_STRUCT_TM_TM_GMTOFF], [1],
|
include(CheckTypeSize)
|
||||||
# [Define to 1 if you have `struct tm.tm_gmtoff` member.])
|
check_type_size("int *" SIZEOF_INT_P)
|
||||||
# fi
|
check_type_size("time_t" SIZEOF_TIME_T)
|
||||||
#
|
|
||||||
# # Check size of pointer to decide we need 8 bytes alignment
|
|
||||||
# # adjustment.
|
|
||||||
# AC_CHECK_SIZEOF([int *])
|
|
||||||
#
|
|
||||||
# AC_CHECK_SIZEOF([time_t])
|
|
||||||
#
|
|
||||||
# # Checks for library functions.
|
# # Checks for library functions.
|
||||||
#
|
#
|
||||||
# # Don't check malloc, since it does not play nicely with C++ stdlib
|
# # Don't check malloc, since it does not play nicely with C++ stdlib
|
||||||
|
|
|
@ -16,3 +16,9 @@
|
||||||
|
|
||||||
/* Define to 1 if you have `neverbleed` library. */
|
/* Define to 1 if you have `neverbleed` library. */
|
||||||
#cmakedefine HAVE_NEVERBLEED 1
|
#cmakedefine HAVE_NEVERBLEED 1
|
||||||
|
|
||||||
|
/* sizeof(int *) */
|
||||||
|
#cmakedefine SIZEOF_INT_P @SIZEOF_INT_P@
|
||||||
|
|
||||||
|
/* sizeof(time_t) */
|
||||||
|
#cmakedefine SIZEOF_TIME_T @SIZEOF_TIME_T@
|
||||||
|
|
Loading…
Reference in New Issue