1 dnl AX_MALLOC_ATTRIBUTE - see if gcc will take __attribute__((malloc)) 2 AC_DEFUN([AX_MALLOC_ATTRIBUTE], 3 [ 4 AC_MSG_CHECKING([whether malloc attribute is understood]) 5 SAVE_CFLAGS=$CFLAGS 6 CFLAGS="-Werror $CFLAGS" 7 AC_TRY_COMPILE(,[ 8 void monkey() __attribute__((malloc)); 9 ],AC_MSG_RESULT([yes]); AC_DEFINE(MALLOC_ATTRIBUTE_OK, 1, [whether malloc attribute is understood]), AC_MSG_RESULT([no])) 10 CFLAGS=$SAVE_CFLAGS 11 ] 12 ) 13