Sorry for going off-topic from your question, but I'd really like to know what you're using in place of autotools and cmake on that system. Are you just using standard GNU make or a similar make tool? Have you looked at CDetect? I've used it with make on AIX.
As far as circular dependencies with libraries (like with pkg-config requiring glib which requires pkg-config), I try to avoid these situations whenever possible. For instance, I replaced pkg-config with pkgconf which has no circular dependencies.