Attention is currently required from: Hoernchen, laforge.
pespin has posted comments on this change by Hoernchen. ( https://gerrit.osmocom.org/c/libosmocore/+/42203?usp=email )
Change subject: fix --disable-log-macros ......................................................................
Patch Set 3:
(1 comment)
File configure.ac:
https://gerrit.osmocom.org/c/libosmocore/+/42203/comment/44212f2a_a8d6b4b6?u... : PS1, Line 511: if test x"$log_macros" == x"yes"
My first attempt is actually the only sane way to do it unless you want to somehow "invert" the yes/ […]
https://www.gnu.org/software/autoconf/manual/autoconf-2.66/html_node/Package...
When using log_macros=$enableval: * If user passes --enable-log-macro: log_macros="yes" * If user passes --disable-log-macro: log_macros="no" * If used passes nothing, the default is applied, ie. "log_macros=$ENABLE_LIBOSMOCORE_NO_LOGGING_DEFAULT])" which is ENABLE_LIBOSMOCORE_NO_LOGGING_DEFAULT="no", so log_macros="no".
The double negation thing, which makes everything too complex and wrong. The problem is actually that when user passing nothing, it ends up with log_macros="no", which should be actually log_macros="yes", because we want to enable log macros by default.
So, my proposal: * Rename ENABLE_LIBOSMOCORE_NO_LOGGING_DEFAULT to ENABLE_LOG_MACROS_DEFAULT * Set ENABLE_LOG_MACROS_DEFAULT="yes" by default in line 244 * Set ENABLE_LOG_MACROS_DEFAULT="no" inside the `if test x"$embedded" = x"yes"` block in line 262 (because I understand that we want logging macros disabled by default when in EMBEDDED, otherwise skip this step) * Change the `if test x"$log_macros" == x"yes"` condition in line 511 as mentioned in my previous comment.