From 21afbd946557e93304bdb34199d62594f365799f Mon Sep 17 00:00:00 2001 From: Dennis Schridde Date: Mon, 19 Sep 2011 23:39:39 -0500 Subject: Making it so that the Vala build is optional --- configure.ac | 15 +++++++++++++++ libdbusmenu-glib/Makefile.am | 2 ++ libdbusmenu-gtk/Makefile.am | 2 ++ 3 files changed, 19 insertions(+) diff --git a/configure.ac b/configure.ac index 895f9f8..e284980 100644 --- a/configure.ac +++ b/configure.ac @@ -140,7 +140,17 @@ AM_CONDITIONAL(INTROSPECTION_TEN, [test "x$introspection_ten" = "xyes"]) # Vala API Generation ########################### +AC_ARG_ENABLE([vala], + AC_HELP_STRING([--disable-vala], [Disable vala]), + [enable_vala=$enableval], [enable_vala=auto]) + +AS_IF([test "x$enable_vala" != "xno"],[ + AM_COND_IF([HAVE_INTROSPECTION],,[ + AC_MSG_ERROR([Vala bindings require introspection support, please --enable-introspection]) + ]) AC_PATH_PROG([VALA_API_GEN], [vapigen]) +]) +AM_CONDITIONAL([HAVE_VALA], [test -n "$VALA_API_GEN"]) ########################### # XSLT Processor @@ -228,3 +238,8 @@ AS_IF([test "x$enable_gtk" = "xno"], AC_MSG_NOTICE([ Gtk: yes (gtk$with_gtk)]) ) +AM_COND_IF([HAVE_VALA], + AC_MSG_NOTICE([ Vala bindings: yes]), + AC_MSG_NOTICE([ Vala bindings no]) +) + diff --git a/libdbusmenu-glib/Makefile.am b/libdbusmenu-glib/Makefile.am index 5b04415..7d4ea5d 100644 --- a/libdbusmenu-glib/Makefile.am +++ b/libdbusmenu-glib/Makefile.am @@ -189,6 +189,7 @@ endif # VAPI Files ######################### +if HAVE_VALA if HAVE_INTROSPECTION vapidir = $(datadir)/vala/vapi @@ -200,4 +201,5 @@ Dbusmenu-0.4.vapi: Dbusmenu-0.4.gir CLEANFILES += $(vapi_DATA) endif +endif diff --git a/libdbusmenu-gtk/Makefile.am b/libdbusmenu-gtk/Makefile.am index 4ec464b..b4564d1 100644 --- a/libdbusmenu-gtk/Makefile.am +++ b/libdbusmenu-gtk/Makefile.am @@ -144,6 +144,7 @@ endif # VAPI Files ######################### +if HAVE_VALA if HAVE_INTROSPECTION vapidir = $(datadir)/vala/vapi @@ -167,4 +168,5 @@ DbusmenuGtk$(VER)-0.4.tmp.gir: DbusmenuGtk$(VER)-0.4.gir CLEANFILES += $(vapi_DATA) DbusmenuGtk$(VER)-0.4.tmp.gir endif +endif -- cgit v1.2.3