buildsys: use variable for glib-genmarshal

When doing cross-compilation, the path returned by pkg-config for
glib-genmarshal can be incorrect (because it is the runtime path,
not the build-time path).

Change to use pkg-config to get the variable.

This allows overridig the path at configure time, by using the configure
option GLIB_GENMARSHAL=/path/toglib-genmarshal

Signed-off-by: "Yann E. MORIN" <>
[smcv: Fix typo in commit message]
Reviewed-by: Simon McVittie <>
5 jobs for master