consider the following configure.ac snippet: PKG_CHECK_MODULES(CHEESE, clutter-1.0 clutter-gst-1.0) If both are present, you should end up with CHEESE_CFLAGS and CHEESE_LIBS being set. Except if an error occurs when running --libs: $ pkg-config --exists --print-errors "clutter-1.0 clutter-gst-1.0" && echo success success $ pkg-config --libs --print-errors "clutter-1.0 clutter-gst-1.0" Package 'clutter-gst' requires 'clutter-1.0 < 1.3.0' but version of Clutter is 1.5.3 pkg-config should check for version compatibility during --exists, and error out appropriately, otherwise configure tests will silently succeed, and CFLAGS will be empty and cause compilation failures.
Had the same problem trying to build gnome-shell: $ pkg-config --libs gobject-2.0 gio-2.0 gio-unix-2.0 dbus-glib-1 gtk+-3.0 mutter-plugins gjs-gi-1.0 libgnome-menu gconf-2.0 gdk-x11-3.0 clutter-x11-1.0 clutter-glx-1.0 libstartup-notification-1.0 gobject-introspection-1.00 Package 'JavaScript' requires 'nspr >= 4.8.6' but version of NSPR is 4.8.4
*** This bug has been marked as a duplicate of bug 36039 ***
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.