summaryrefslogtreecommitdiff
path: root/vapigen
diff options
context:
space:
mode:
authorEvan Nemerson <evan@coeus-group.com>2012-10-23 20:04:12 -0700
committerEvan Nemerson <evan@coeus-group.com>2013-02-08 00:36:08 -0800
commit868964eb5d26f0ee8541babd1240abe0f672f715 (patch)
treed370777a5621b02ae864b5b8b83feba8cbba1130 /vapigen
parente8f01d3db5d57e4ee0427a6c2f02f926835f8db7 (diff)
downloadvala-868964eb5d26f0ee8541babd1240abe0f672f715.tar.gz
vapigen.m4: emit error if no GOBJECT_INTROSPECTION_* macro is called
Fixes bug 684275.
Diffstat (limited to 'vapigen')
-rw-r--r--vapigen/vapigen.m411
1 files changed, 8 insertions, 3 deletions
diff --git a/vapigen/vapigen.m4 b/vapigen/vapigen.m4
index 051ccd2e4..2c435e74b 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)[@:>@])],,[