AX_CHECK_ENABLE_DEBUG([no]) clears -O2 flag

Jens Georg <[email protected]> Tue, 14 Mar 2017 11:29:41 +0100
Newsgroups gmane.comp.sysutils.autoconf.archive-maintainers
Message-ID <[email protected]>
Hi,

the AX_CHECK_ENABLE_DEBUG macro, when run with "no", deliberately sets 
the CFLAGS variable to an empty value.

This causes the AC_PROG_CC (or AX_CC_MAXOPT) checks later to discard 
their result in favor of the apparently externally supplied CFLAGS.

Is this behavior intentional? (I mean apart from clearing the -g from 
the default options)

Is there a work-around?