title: Properly include GLib headers with autotools
body: <p>In my normal dev environment (ubuntu), I don't have any issues linking against GLib-2.0, however when I attempt to build on fresh install of Debian Squeeze, I run into errors linking GLib.</p>
  
  <p>configure.ac:</p>
  
  <pre><code>...
  AC_PROG_CC
  AM_PROG_CC_C_O
  CFLAGS="$CFLAGS -Wall -W -Wno-unused-parameter -std=c99 -pedantic"
  
  PKG_CHECK_MODULES(MYAPP, [glib-2.0 &gt;= 2.3.0  gthread-2.0])
  
  LIBS="$LIBS $MYAPP_LIBS"
  
  AC_CONFIG_FILES([Makefile src/Makefile])
  AC_OUTPUT
  </code></pre>
  
  <p>Autotools appears to pass the correct options to gcc:</p>
  
  <p><code>-I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -lgthread-2.0 -lglib-2.0</code> </p>
  
  <p>However, running <code>make</code> I get a compile error: <code>undefined reference to 'g_list_free_full'</code></p>
  
  <p>To verify the libraries are actually installed:</p>
  
  <pre><code>$ dpkg --get-selections | grep glib
  libglib2.0-0                    install
  libglib2.0-data                 install
  libglib2.0-dev                  install
  </code></pre>
  
  <p>Any thoughts?</p>