]> git.ipfire.org Git - thirdparty/vala.git/commitdiff
vapigen.m4: emit error if no GOBJECT_INTROSPECTION_* macro is called
authorEvan Nemerson <evan@coeus-group.com>
Wed, 24 Oct 2012 03:04:12 +0000 (20:04 -0700)
committerEvan Nemerson <evan@coeus-group.com>
Fri, 8 Feb 2013 08:36:08 +0000 (00:36 -0800)
Fixes bug 684275.

vapigen/vapigen.m4

index 051ccd2e46ead04c5b900fc0b9fbf84484c4eac5..2c435e74b33f994483c9073e1c55d64038b58d7b 100644 (file)
@@ -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)[@:>@])],,[