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

Build error in trunk for json modules (mod_md using md_json plus mod_log_json)

When trying to do a reallyall modules build I get an error during compilation of md_json. The compile command does not contain and "-I" flag for the jansson library. For mod_log_json, which gets build a bit earlier, the include path flag correctly contains jansson.

Looking at modules.mk in the generated modules/loggers directory versus modules/md the corresponding MOD_CFLAGS setting is already missing there (for mod_md).

I think the culprit is, that both modules use the m4 macro APACHE_CHECK_JANSSON which checks for jansson and also sets up the build variables for the module using it. That macro uses a cache variable so I suspect it is only running for the first module calling it and shortcuts for any other module, not setting up the vars for them.

For example during the run fpr mod_log_json I get

checking for jansson... checking for user-provided jansson base directory... /path/to/my/jansson
  setting MOD_CFLAGS to "-I/path/to/my/jansson/include"

but for mod_md only

checking for jansson... (cached) yes

Maybe we need to split the macro in two parts, the first one finding jansson and saving the path in a variable. That part could be cached. The second one for setting up the variables which must run every time.