From: Evan Nemerson Date: Wed, 24 Oct 2012 03:04:12 +0000 (-0700) Subject: vapigen.m4: emit error if no GOBJECT_INTROSPECTION_* macro is called X-Git-Tag: 0.19.0~29 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=868964eb5d26f0ee8541babd1240abe0f672f715;p=thirdparty%2Fvala.git vapigen.m4: emit error if no GOBJECT_INTROSPECTION_* macro is called Fixes bug 684275. --- 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)[@:>@])],,[