Adam Borowski <kilob...@angband.pl> writes: >> > AFAICT, the easiest way to handle all this is just to make a missing >> > cross-pkg-config look like a missing pkg-config to the configure >> > script. Then whatever logic the script may have for detecting the >> > "not pkg-config at all" case, will do the right thing for the cross >> > case too. >> >> Currently I just have my configure script completely disable use of >> pkg-config when cross-compiling (by setting PKG_CONFIG=""), but >> obviously this is undesirable if a cross-version of pkg-config was >> actually found... > > How can you link to libraries that require special handling then? > Do you hard-code the compiler/linker arguments? That seems fragile, > especially with library/include paths changing weekly these days.
I'm a little confused as to what your saying here; what seems fragile? Are you saying that "pkg-config is necessary in some cases because some libraries use wacky magic that only pkg-config can provide, so a non-pkg-config fallback in configure will be hard to make work"? If so, that's certainly true, but I'm not sure how it affects my argument -- for libraries where pkg-config is necessary, the current cross-compiling behavior when a cross-pkg-config isn't found is still almost certainly the wrong thing. [If, on the other hand, you're really just asking what I do in the case where pkg-config isn't present, I mostly just assume the pkg-config-using libraries aren't present either (they're all optional); for a few important ones, I fallback to traditional autoconf methods like AC_CHECK_LIB... some libraries, after all, are simple enough that this works fine.] My argument in this thread is just: When cross-compiling, there shouldn't be any default fallback for pkg-config if a cross-pkg-config (${ARCH}-pkg-config) isn't found; the current default behavior is more harmful than useful. configure files that _depend_ on pkg-config being present (and don't use extra magic like you describe), should simply give a fatal error after PKG_PROG_PKG_CONFIG in the case where PKG_CONFIG="" (but then, they should do this already, to handle the case where the system simply has no pkg-config installed at all). -Miles -- Fast, small, soon; pick any 2. -- To UNSUBSCRIBE, email to debian-devel-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/buoty8clt17....@dhlpc061.dev.necel.com