title: Autoconf without GLib breaks with syntax error on configure
body: <p>If I don't have pkg-config installed nor glib my configure breaks with a syntax error when running <code>./configure</code>. Is there a way to break with <code>AC_MSG_ERROR</code>?</p>
  
  <pre><code>./configure: line 4001: syntax error near unexpected token `GLIB2,'
  ./configure: line 4001: `  PKG_CHECK_MODULES(GLIB2, glib-2.0, , as_fn_error $? "glib needed" "$LINENO" 5)'
  </code></pre>
  
  <p>--</p>
  
  <pre><code>AC_ARG_ENABLE(GTK, [], [gtk="$enabled"], gtk=no)
  
  if test "$gtk" = "yes"; then
      AC_CHECK_LIB([gtk-x11-2.0], [gtk_init], [], [AC_MSG_ERROR([gtk needed])])
  else
      AC_CHECK_PROG(HAVE_PKG_CONFIG, pkg-config, yes)
      if test x"$HAVE_PKG_CONFIG" != x"yes" ; then
          AC_MSG_ERROR([pkg-config])
      fi
      PKG_CHECK_MODULES(GLIB2, glib-2.0, [], AC_MSG_ERROR([glib needed]))
      AC_SUBST(GLIB2_CFLAGS)
      AC_SUBST(GLIB2_LIBS)
      AC_CHECK_LIB([glib-2.0], [g_list_append], [], [AC_MSG_ERROR([glib needed])])
  fi
  
  AM_CONDITIONAL([GTK], [test "x$gtk" = "xyes"])
  </code></pre>