From 51d9014bbeb89cfce19d3849256080d358f2423e Mon Sep 17 00:00:00 2001
From: Hans Ulrich Niedermann <hun@n-dimensional.de>
Date: Wed, 5 Oct 2016 17:25:14 +0200
Subject: [PATCH 1/6] m4: Make sure GOBJECT_INTROSPECTION_CHECK macro is
 defined

If the GOBJECT_INTROSPECTION_CHECK macro is not defined, abort
the aclocal m4 run at the single place where it can be fixed
easily with a helpful error message.

If we do not abort here, autoreconf will just fail later on
encountering the then undefined HAVE_INTROSPECTION conditionals
in some Makefile.am files.
---
 configure.ac | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/configure.ac b/configure.ac
index 23a390f..5b3d877 100644
--- a/configure.ac
+++ b/configure.ac
@@ -517,6 +517,14 @@ if test -z "$enable_introspection"; then
   enable_introspection=no
 fi
 
+dnl Abort the aclocal m4 run here in case GOBJECT_INTROSPECTION_CHECK
+dnl is undefined.  If we do not abort here, autoreconf will just fail
+dnl later on encountering the then undefined HAVE_INTROSPECTION
+dnl conditionals in some Makefile.am files.  However, these
+dnl Makefile.am files do not contain any clue as to where and how to
+dnl fix the actual issue of the missing macro definition.
+m4_ifndef([GOBJECT_INTROSPECTION_CHECK],
+          [m4_fatal([Do install the gnome-introspection devel package for the `introspection.m4' file which defines the GOBJECT_INTROSPECTION_CHECK macro.])])
 GOBJECT_INTROSPECTION_CHECK([1.0])
 
 dnl ================== portability checks ===========================================
-- 
2.7.4

