Closed orlitzky closed 4 years ago
Hello @orlitzky
Hey, I'd like to work with this PR... you've targeted -master instead of the -development branch. Could you please re-submit this PR and target develop please?
I think I have de-tangled it.
Tested, works. Merging.
The upstream Lua pkg-config file is named lua.pc, so unless some distribution renames it, OpenDKIM should be looking for "lua" and not "lua5.1" in its PKG_CHECK_MODULES call. In any case, we should definitely be checking for "lua", so this commit appends it to the list of modules we look for. The "lua5.1" module was left alone, because I don't know enough of the history to be sure that removing it is the right thing to do.
When the call to PKG_CHECK_MODULES fails, OpenDKIM falls back to a manual search that looks in /usr/lib, and this can detect 32-bit libraries on a 64-bit system. Therefore it is preferable that the PKG_CHECK_MODULES call succeed.
In the process of adding this fallback, I realized that some additional actions need to be performed in the success branch of the existing (and new) PKG_CHECK_MODULES call. The following three lines were added,
to tell various parts of OpenDKIM that we do indeed have Lua support. Afterwards, it became clear that those three lines could be factored out of every lua check, so that has been done as well.
Closes: https://github.com/trusteddomainproject/OpenDKIM/issues/62 Gentoo-bug: https://bugs.gentoo.org/704556