<div dir="ltr">On 23 May 2017 at 14:51, Quentin Glidic <<a href="mailto:sardemff7%2Bwayland@sardemff7.net">sardemff7+wayland@sardemff7.net</a>> wrote:<br>>><br>>>  >> Also add a AC_SUBST-call (it seems previously the pkg-config value was<br>>>  >> never substituted into Makefiles).<br>>>  ><br>>>  > It was, AC_PATH_PROG() does call AC_SUBST().<br>>><br>>> Sure, AC_PATH_PROG() works. As I said, it's the value _from pkg-config_ (if wayland-scanner was not in path) that never makes it into Makefiles.<br>><br>><br>> That’s not how m4 works.<br>> AC_SUBST() is expanded at m4 time, so just having AC_PATH_PROG() will expand AC_SUBST() and thus, the pkg-config value *will* make it to Makefile just fine.<br><br>You are correct and I was confused.<br> <br>>> For background: the yocto build time pkg-config works fine for pretty much everything (PKG_CONFIG_SYSROOT_DIR is used so include and library paths  just work and ${pc_sysrootdir} could be used to find the buildtime sysroot in other cases) ... but it doesn't work for finding the build time _native_ sysroot as we need to do here. Typically this problem is solved by giving the path via a configure option or by using AC_PATH_PROG().<br>><br>><br>> So you want to break the simple (cross-compiling) cases to fix something that doesn’t need fixing?<br><br>I think that is not warranted. <br>* My issue was that every wayland-scanner user was doing something different, often in a way that required patching in Yocto<br>* Weston was fine for us but Pekka gave me feedback that lead me to believe the weston method was not the best solution either<br><br>I did my best to try and resolve both issues. It looks like my attempt was not successful but there should be no reason to say I "want to break" something.<br><br><br>> If you want to make a patch, it should not introduce a regression.<br><br>I think _if_ the goal is to use the same scanner lookup in e.g. mesa and weston, some use case in one or the other is just bound to have a regression.<br><br>> So at this point, we should make a generic patch, ideally (IMO) in wayland-scanner.m4, and have people test it in all their different setup to see if it works as expected. <br>><br>><br>> If you’re not comfortable making one, I’ll do it by this week-end so you can test it in yours.<br><br><br>I'd be happy with you making a patch -- I don't think I could make a patch that met your requirements especially WRT this "build-pkg-config" setup.<br><br>Thanks again,<br> Jussi</div>