[patch #8452] Add AX_DEBUG_CHECK macro for --enable-debug option

Rhys Ulerich <[email protected]>
Newsgroups gmane.comp.sysutils.autoconf.archive-maintainers
Message-ID <[email protected]>
Follow-up Comment #1, patch #8452 (project autoconf-archive):

I've found a couple of things to be useful in my own versions of such macros. 
You may/may not want to include them here, but I figured I'd share my
experience.

1) Take --enable-debug=no/info/profile/yes with '', '-g', '-g -pg', '-g -O0'
being added into {C,CXX,F,FC,OBJC}FLAGS as a result.
2) Permit controlling what the default behavior of the macro is through an
optional argument.
3) Be careful about where the macro can be used relative to compiler checks so
that it can influence the default compilation flags.
4) Call the resulting define NDEBUG rather than ENABLE_DEBUG so that it turns
off assert calls automatically.

I have attached an example implementing these things.  Like I said, please
adopt these ideas if you see fit.

- Rhys

(file #31356)
    _______________________________________________________

Additional Item Attachment:

File name: ax_check_enable_debug.m4       Size:3 KB


    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/patch/?8452>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.