[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

From: Rhys Ulerich
Subject: [patch #8452] Add AX_DEBUG_CHECK macro for --enable-debug option
Date: Sun, 11 May 2014 13:13:55 +0000
User-agent: Mozilla/5.0 (X11; Linux i686) AppleWebKit/537.36 (KHTML, like Gecko) Ubuntu Chromium/34.0.1847.116 Chrome/34.0.1847.116 Safari/537.36

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

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:


  Message sent via/by Savannah

reply via email to

[Prev in Thread] Current Thread [Next in Thread]