Closed Villemoes closed 3 years ago
Urgh, didn't realize 16.04 shipped with a libconfuse without cfg_add_searchpath (it's from v2.8, dated 2015-10-14).
Not sure what to do (other than just drop this and work around the problem I'm trying to solve some other way). Do a build-time check for cfg_add_searchpath and just elide the --includepath option in that case?
I like this in general, but I want to keep it working on older distros. So maybe something like this:
PKG_CHECK_MODULES(CONFUSE, libconfuse >= 2.8,
[AC_DEFINE([HAVE_SEARCHPATH], [1], [Define if cfg_add_searchpath() is available])],
[PKG_CHECK_MODULES(CONFUSE, libconfuse)])
and then #ifdef HAVE_SEARCHPATH
. Just print an error message if it's not supported but used.
And a test would be nice :-).
Thanks, I've tried adding that to configure.ac - it would have taken me a week to figure out how to say that in autotools-speak.
I've tested that it works with a suitably modified meta-ptx to build a real image, but yes, an in-tree test is of course in order. Let me see what the bots say to this version, then I'll look at adding one.
As usual, this expanded into much more than I originally set out to do, but here it is. All tests pass for me, also the negative ones when I crank up the requirement to 4.8 to get genimage built without includepath support.
Feel free to squash the two commits, it's just easier to see the change in the README this way.
If this is accepted I'll work on the meta-ptx parts of this - unsurprisingly, I have other reasons for wanting meta-ptx to point at a newer genimage version anyway.