[vala] vapigen.m4: emit error if no GOBJECT_INTROSPECTION_* macro is called



commit 868964eb5d26f0ee8541babd1240abe0f672f715
Author: Evan Nemerson <evan coeus-group com>
Date:   Tue Oct 23 20:04:12 2012 -0700

    vapigen.m4: emit error if no GOBJECT_INTROSPECTION_* macro is called
    
    Fixes bug 684275.

 vapigen/vapigen.m4 |   11 ++++++++---
 1 files changed, 8 insertions(+), 3 deletions(-)
---
diff --git a/vapigen/vapigen.m4 b/vapigen/vapigen.m4
index 051ccd2..2c435e7 100644
--- a/vapigen/vapigen.m4
+++ b/vapigen/vapigen.m4
@@ -16,15 +16,20 @@ dnl You should have received a copy of the GNU Lesser General Public
 dnl License along with this library; if not, write to the Free Software
 dnl Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
 
-# VAPIGEN_CHECK([VERSION], [API_VERSION], [FOUND-INTROSPECTION], [DEFAULT])
+# VAPIGEN_CHECK([VERSION], [API_VERSION], [FOUND_INTROSPECTION], [DEFAULT])
 # --------------------------------------
 # Check vapigen existence and version
 #
 # See http://live.gnome.org/Vala/UpstreamGuide for detailed documentation
 AC_DEFUN([VAPIGEN_CHECK],
 [
-  AC_BEFORE([GOBJECT_INTROSPECTION_CHECK],[$0])
-  AC_BEFORE([GOBJECT_INTROSPECTION_REQUIRE],[$0])
+  AS_IF([test "x$3" != "xyes"], [
+      m4_provide_if([GOBJECT_INTROSPECTION_CHECK], [], [
+          m4_provide_if([GOBJECT_INTROSPECTION_REQUIRE], [], [
+              AC_MSG_ERROR([[You must call GOBJECT_INTROSPECTION_CHECK or GOBJECT_INTROSPECTION_REQUIRE before using VAPIGEN_CHECK unless using the FOUND_INTROSPECTION argument is "yes"]])
+            ])
+        ])
+    ])
 
   AC_ARG_ENABLE([vala],
     [AS_HELP_STRING([--enable-vala[=@<:@no/auto/yes@:>@]],[build Vala bindings @<:@default=]ifelse($4,,auto,$4)[@:>@])],,[


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]