My glib 2.0 projects all use PKG_CHECK_MODULES(PROJECT, glib-2.0)
(with a mix of automake 1.4 and 1.8)

Ok, I ended up using PKG_CHECK_MODULES(project, glib-2.0), configure
works! However, I'm setting AM_CFLAGS in Makefile.am, which is now
overrided by project_CFLAGS. How should I give custom compilation flags
in Makefile.am?
With kind regards,
Baurjan.