mirror of
https://github.com/matrix-construct/construct
synced 2024-12-23 22:13:55 +01:00
tools/m4: Add size check comparison macro.
This commit is contained in:
parent
5303e170d3
commit
c7a89fcd89
2 changed files with 9 additions and 1 deletions
|
@ -1120,7 +1120,7 @@ AC_TYPE_INTPTR_T
|
|||
AC_TYPE_UINTPTR_T
|
||||
|
||||
dnl C standard type sizes on this platform
|
||||
AC_CHECK_SIZEOF([char])
|
||||
RB_CHECK_SIZEOF([char], 1)
|
||||
AC_CHECK_SIZEOF([short])
|
||||
AC_CHECK_SIZEOF([int])
|
||||
AC_CHECK_SIZEOF([float])
|
||||
|
|
|
@ -65,3 +65,11 @@ AC_DEFUN([RB_CHK_SYSHEADER],
|
|||
])
|
||||
fi
|
||||
])
|
||||
|
||||
AC_DEFUN([RB_CHECK_SIZEOF],
|
||||
[
|
||||
AC_CHECK_SIZEOF([$1])
|
||||
if [[ "${ac_cv_sizeof_$1}" != "$2" ]]; then
|
||||
AC_MSG_ERROR([sizeof($1) must be $2 not ${ac_cv_sizeof_$1}. Check config.log for compiler error.])
|
||||
fi
|
||||
])
|
||||
|
|
Loading…
Reference in a new issue