Hi Rolf, On Thu, Jan 17, 2019 at 11:03:26PM +0100, Rolf Ade wrote: > Could you please be a bit more specific about the problem: tDOM with > which configure flags cross-compilied on what platform for which > target platform does not build? If only to give me a chance to check > that your patch fixes the problem.
The configure flags are selected by the Debian package. You can find them in debian/rules: https://sources.debian.org/src/tdom/0.9.1-1/debian/rules/#L29 I perform all such QA builds on amd64. The target architecture is left unspecified, because tdom does not evaluate it as it is not a compiler. > If I patch tDOM with your code it still builds correct for me (with > --enable-html5, which, from your patch, do you use and is the culprit, > and without and so on). So I'm somewhat tempted to check-in, if I have > evidence that this does otherwise good. That's intended. The patch is written in a w way to minimize the potential to affect native builds. Unless you perform a cross build, it'll continue to use plain pkg-config like before. > I've to confess that for the build system I mostly cargo cult TEA. > Could you please explain in short how "tdom confuses the meaning of > aclocal.m4 and acinclude.m4 and therefore [you] cannot run aclocal"? aclocal.m4 and acinclude.m4 serve different needs. The former is meant to be generated by aclocal. It scans macro archives from upstream projects and embeds those macros that tdom needs into a long aclocal.m4. acinclude.m4 is meant as an additional file, which is not replaced by aclocal, but rather included by aclocal. tdom's aclocal.m4 doesn't look like it was generated by aclocal to me. The autoconf manual has a few words along the same lines: https://www.gnu.org/software/automake/manual/html_node/Complete.html For using macros like PKG_CHECK_MODULES or PKG_PROG_PKG_CONFIG from pkg-config's pkg.m4, we need aclocal to copy them to aclocal.m4 as far as I understand. Using PKG_CHECK_MODULES is particularly useful, because it condenses a lot of functionality in a single call: PKG_CHECK_MODULES([HTML5],[gumbo],[AC_DEFINE(TDOM_HAVE_GUMBO)],[]) For the static case, a similar call to PKG_CHECK_MODULES_STATIC can be used. The call above will create variables HTML5_CFLAGS and HTML5_LIBS and will automatically AC_SUBST them considerably shortening your m4 code in addition to just working correctly for cross compilation. Hope this helps Helmut