title: Autotools PKG_CHECK_MODULES isn't setting variables
body: <p>My first autotools project, might be something simple and dumb: it's creating a makefile that can't find glib and other 3rd party libraries. (Running Ubuntu Linux, compiling a C static library if that matters.)</p>
  
  <p>Configure.ac includes these lines:</p>
  
  <pre><code>PKG_CHECK_MODULES([libglib], [glib-2.0 &gt;= 2.28])
  PKG_CHECK_MODULES([libobject], [gobject-2.0 &gt;= 2.28])
  PKG_CHECK_MODULES([libuuid], [uuid])
  </code></pre>
  
  <p>Makefile.am is as follows</p>
  
  <pre><code>lib_LIBRARIES=libblah.a
  libblah_a_SOURCES=blah.c util.c
  libblah_a_CPPFLAGS=$(libglib_CFLAGS) $(libobject_CFLAGS) $(libuuid_CFLAGS)
  libblah_a_LIBADD=$(libglib_LIBS) $(libobject_LIBS) $(libuuid_LIBS)
  </code></pre>
  
  <p>Running autoreconf --install generates Makefile.in with this:</p>
  
  <pre><code>libglib_CFLAGS = @libglib_CFLAGS@
  libglib_LIBS = @libglib_LIBS@
  libobject_CFLAGS = @libobject_CFLAGS@
  libobject_LIBS = @libobject_LIBS@
  libuuid_CFLAGS = @libuuid_CFLAGS@
  libuuid_LIBS = @libuuid_LIBS@
  </code></pre>
  
  <p>Looks good! Except then the configure script claims it found these libraries yet spits out a Makefile that converts the above line into this uselessness:</p>
  
  <pre><code>libglib_CFLAGS = 
  libglib_LIBS = 
  libobject_CFLAGS = 
  libobject_LIBS = 
  libuuid_CFLAGS = 
  libuuid_LIBS = 
  </code></pre>
  
  <p>Help!</p>
  
  <p>Edit: Here is the full configure.ac file:</p>
  
  <pre><code>AC_INIT([amblah], [1.0], [bug-automake@gnu.org])
  AM_INIT_AUTOMAKE([-Wall -Werror foreign])
  AC_PROG_CC
  AC_CONFIG_HEADERS([config.h])
  AC_CONFIG_FILES([
   Makefile
   libblah/Makefile
   tests/Makefile
  ])
  AC_OUTPUT
  AC_PROG_RANLIB
  PKG_PROG_PKG_CONFIG(0.26)
  PKG_CHECK_MODULES([libglib], [glib-2.0 &gt;= 2.28])
  PKG_CHECK_MODULES([libobject], [gobject-2.0 &gt;= 2.28])
  PKG_CHECK_MODULES([libuuid], [uuid])
  </code></pre>