build: add --enable-more-logging configure option
NM core uses nm-logging which is entirely configurable at runtime. Other components use glib-logging, which can also be partly configured via G_MESSAGES_DEBUG. It makes sense to have a compile time option to enable some logging statements that are only useful for heavy debugging. For glib-logging, this is a way to enable/disable extra logging. For nm-logging, we could alternatively configure a least log-level that is enabled at compile time (that way, we could configure to prune all LOGL_TRACE logging). While that might be useful (too), this gives an alternative way to disable/enable logging. Add a configure option --enable-more-logging and a NM_MORE_LOGGING define for that. If we don't find this useful after a while, we can simply remove it, because our logging statements are not part of a "stable" behavior.
This commit is contained in:
@@ -856,6 +856,12 @@ if test "${enable_more_asserts}" = "yes"; then
|
||||
AC_DEFINE(NM_MORE_ASSERTS, [1], [Define if more asserts are enabled])
|
||||
fi
|
||||
|
||||
AC_ARG_ENABLE(more-logging,
|
||||
AS_HELP_STRING([--enable-more-logging], [Enable more debug logging (default: no)]))
|
||||
if test "${enable_more_logging}" = "yes"; then
|
||||
AC_DEFINE(NM_MORE_LOGGING, [1], [Define if more asserts are enabled])
|
||||
fi
|
||||
|
||||
AC_ARG_ENABLE(lto, AS_HELP_STRING([--enable-lto], [Enable Link Time Optimization for smaller size (default: no)]))
|
||||
if (test "${enable_lto}" = "yes"); then
|
||||
CFLAGS="-flto $CFLAGS"
|
||||
|
Reference in New Issue
Block a user