AC_DEFUN([ACOPM_TEST_ASSERT], [ AC_MSG_CHECKING([if assert(3) is a no-op]) AC_RUN_IFELSE( [ AC_LANG_PROGRAM( [[ #include ]], [[ 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 ]], [[ int a = 0; assert(a == 8); // why not return a; ]] ) ], [AC_MSG_ERROR([no])], [AC_MSG_RESULT([yes])], [AC_MSG_RESULT([cannot; cross-compiling])] ) ] )