Start to reduce dependence on glib

Since we've had several developers from admirable projects say they
would like to use Cogl but would really prefer not to pull in
gobject,gmodule and glib as extra dependencies we are investigating if
we can get to the point where glib is only an optional dependency.
Actually we feel like we only make minimal use of glib anyway, so it may
well be quite straightforward to achieve this.

This adds a --disable-glib configure option that can be used to disable
features that depend on glib.

Actually --disable-glib doesn't strictly disable glib at this point
because it's more helpful if cogl continues to build as we make
incremental progress towards this.

The first use of glib that this patch tackles is the use of
g_return_val_if_fail and g_return_if_fail which have been replaced with
equivalent _COGL_RETURN_VAL_IF_FAIL and _COGL_RETURN_IF_FAIL macros.

Reviewed-by: Neil Roberts <neil@linux.intel.com>
This commit is contained in:
Robert Bragg
2011-10-13 22:34:30 +01:00
parent fd67ddd56e
commit b72f255c0a
49 changed files with 381 additions and 300 deletions

View File

@ -25,6 +25,7 @@
*/
#include <cogl.h>
#include <cogl-util.h>
#include <cogl-euler.h>
#include <math.h>
@ -151,8 +152,8 @@ cogl_euler_equal (gconstpointer v1, gconstpointer v2)
const CoglEuler *a = v1;
const CoglEuler *b = v2;
g_return_val_if_fail (v1 != NULL, FALSE);
g_return_val_if_fail (v2 != NULL, FALSE);
_COGL_RETURN_VAL_IF_FAIL (v1 != NULL, FALSE);
_COGL_RETURN_VAL_IF_FAIL (v2 != NULL, FALSE);
if (v1 == v2)
return TRUE;