[BACK]Return to assert.m4 CVS log [TXT][DIR] Up to [local] / acopm / m4

Annotation of acopm/m4/assert.m4, Revision 1.1.1.1

1.1       bountyht    1: AC_DEFUN([ACOPM_TEST_ASSERT],
                      2:        [
                      3:                AC_MSG_CHECKING([if assert(3) is a no-op])
                      4:
                      5:                AC_RUN_IFELSE(
                      6:                        [
                      7:                                AC_LANG_PROGRAM(
                      8:                                        [[
                      9:                                                #include <assert.h>
                     10:                                        ]], [[
                     11:                                                int a = 1;
                     12:                                                assert(--a == 0);
                     13:                                                return a;
                     14:                                        ]]
                     15:                                )
                     16:                        ],
                     17:                        [AC_MSG_RESULT([no])],
                     18:                        [AC_MSG_ERROR([yes])],
                     19:                        [AC_MSG_RESULT([cannot; cross-compiling])]
                     20:                )
                     21:
                     22:                AC_MSG_CHECKING([if assert(3) aborts on failure])
                     23:
                     24:                AC_RUN_IFELSE(
                     25:                        [
                     26:                                AC_LANG_PROGRAM(
                     27:                                        [[
                     28:                                                #include <assert.h>
                     29:                                        ]], [[
                     30:                                                int a = 0;
                     31:                                                assert(a == 8); // why not
                     32:                                                return a;
                     33:                                        ]]
                     34:                                )
                     35:                        ],
                     36:                        [AC_MSG_ERROR([no])],
                     37:                        [AC_MSG_RESULT([yes])],
                     38:                        [AC_MSG_RESULT([cannot; cross-compiling])]
                     39:                )
                     40:        ]
                     41: )

CVSweb