configure: Don't allow --enable-gdk-pixbuf with --disable-glib
configure: Don't allow --enable-gdk-pixbuf with --disable-glib

The GDK pixbuf support requires being able to propagate errors from
GDKPixbuf as GErrors. This won't work if we are using the builtin
version of GLib because any attempt to call g_error_free from within
Cogl will use the internal version which will free the error using the
wrong slice allocator. It probably doesn't make much sense to build
without glib but with gdk-pixbuf so there's not much point in trying
to work around this situation.

Previously if you specified --enable-gdk-pixbuf but gdk-pixbuf was not
available it would silently disable it. This pach also fixes it so
that it will report an error in that case.

If --enable-gdk-pixbuf is not specified it will now default to
enabling it only if both glib is enabled and gdk-pixbuf is available.

This patch looks slightly longer than it ought to be because it moves
the check for glib up to above the descisions about the image backend.

Reviewed-by: Robert Bragg <robert@linux.intel.com>

(cherry picked from commit 8b1eabdc08da89a57792f9eb666e893a6cbb4e26)

Distrotech/cogl,Distrotech/cogl,Distrotech/cogl,Distrotech/cogl