File: [local] / acopm / m4 / assert.m4 (download)
Revision 1.1.1.1 (vendor branch), Sat May 8 15:42:18 2021 UTC (3 years, 2 months ago) by bountyht
Branch: alphachat, MAIN
CVS Tags: start, HEAD Changes since 1.1: +0 -0 lines
Initial import
|
AC_DEFUN([ACOPM_TEST_ASSERT],
[
AC_MSG_CHECKING([if assert(3) is a no-op])
AC_RUN_IFELSE(
[
AC_LANG_PROGRAM(
[[
#include <assert.h>
]], [[
int a = 1;
assert(--a == 0);
return a;
]]
)
],
[AC_MSG_RESULT([no])],
[AC_MSG_ERROR([yes])],
[AC_MSG_RESULT([cannot; cross-compiling])]
)
AC_MSG_CHECKING([if assert(3) aborts on failure])
AC_RUN_IFELSE(
[
AC_LANG_PROGRAM(
[[
#include <assert.h>
]], [[
int a = 0;
assert(a == 8); // why not
return a;
]]
)
],
[AC_MSG_ERROR([no])],
[AC_MSG_RESULT([yes])],
[AC_MSG_RESULT([cannot; cross-compiling])]
)
]
)