summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonas Ådahl <jadahl@gmail.com>2018-05-21 22:18:03 +0200
committerJonas Ådahl <jadahl@gmail.com>2018-11-06 17:17:36 +0100
commitd68fcbc8879b85a50e54b282814747617d8fbe50 (patch)
treec64d7cab6db0807bc99f4dd6dd0389bda29840f1
parent9dbdf6b724487dee43f5988f2768a0fc3ce707c6 (diff)
downloadmutter-d68fcbc8879b85a50e54b282814747617d8fbe50.tar.gz
cogl: Make cogl-config.h include check explicit
Don't rely on some combination of macros, but an explicit definition to check whether cogl-config.h was included.
-rw-r--r--cogl/cogl-mutter-config.h.in2
-rw-r--r--cogl/cogl/cogl-util.h4
-rw-r--r--cogl/configure.ac2
3 files changed, 5 insertions, 3 deletions
diff --git a/cogl/cogl-mutter-config.h.in b/cogl/cogl-mutter-config.h.in
index 25652ce55..2c8967811 100644
--- a/cogl/cogl-mutter-config.h.in
+++ b/cogl/cogl-mutter-config.h.in
@@ -3,3 +3,5 @@
/* Have GLES 2.0 for rendering */
#undef HAVE_COGL_GLES2
+
+#define COGL_CONFIG_H_INCLUDED 1
diff --git a/cogl/cogl/cogl-util.h b/cogl/cogl/cogl-util.h
index 70259d387..b8132220a 100644
--- a/cogl/cogl/cogl-util.h
+++ b/cogl/cogl/cogl-util.h
@@ -40,9 +40,7 @@
#include <stdio.h>
/* Double check that config.h has been included */
-#if (!defined (PACKAGE_NAME) && \
- !defined (_COGL_IN_TEST_BITMASK) && \
- !defined(COGL_ENABLE_MUTTER_API))
+#ifndef COGL_CONFIG_H_INCLUDED
#error "cogl-config.h must be included before including cogl-util.h"
#endif
diff --git a/cogl/configure.ac b/cogl/configure.ac
index 92ea712ac..4c3f2eb2c 100644
--- a/cogl/configure.ac
+++ b/cogl/configure.ac
@@ -673,6 +673,8 @@ AC_SUBST(COGL_EXTRA_LDFLAGS)
MAINTAINER_CFLAGS=
AC_SUBST(MAINTAINER_CFLAGS)
+AC_DEFINE([COGL_CONFIG_H_INCLUDED], 1, [cogl-config.h was included])
+
AC_OUTPUT(
Makefile
test-fixtures/Makefile