Build setup

To check for libanjuta library and setup compiler flags, add the following lines in your projects's configure.in file:

PKG_CONFIG_PACKAGE(LIBANJUTA, libanjuta >= 2.0)
AC_SUBST(LIBANJUTA_CFLAGS)
AC_SUBST(LIBANJUTA_LIBS)
			

Configure variables LIBANJUTA_CFLAGS and LIBANJUTA_LIBS will contain the necessary compiler flags and libraries to include and are available to be used in your Makefile.am file. In your Makefile.am (of the directory where your plugin sources reside), use above configure variables.

Add the following lines in Makefile.am to install the UI file correctly. If you plugin doesn't have a UI, this could be skipped.

# Plugin UI file
anjuta_uidir = $(datadir)/anjuta/ui
anjuta_ui_DATA =  anjuta-hello.ui
			

Following lines to install the icon file.

# Plugin Icon file
plugin_icondir = $(datadir)/pixmaps/anjuta
plugin_icon_DATA = anjuta-hello-plugin.png
			

Following lines to install the plugin description file. This make rule will automatically merge translations and create .plugin file from .plugin.in file.

# Plugin description file
plugin_in_files = anjuta-hello.plugin.in
%.plugin: %.plugin.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*po) ; \
	$(INTLTOOL_MERGE) $(top_srcdir)/po $< $@ -d -u \
		-c $(top_builddir)/po/.intltool-merge-cache
anjuta_plugindir = $(libdir)/anjuta
anjuta_plugin_DATA = $(plugin_in_files:.plugin.in=.plugin)
			

Add following lines to build and install our plugin shared library. Notice that we are using libanjuta configure variables now.

INCLUDES = $(LIBANJUTA_CFLAGS)
plugin_LTLIBRARIES = libanjuta-hello.la
libanjuta_hello_SOURCES = \
	hello-world.c \
	hello-world.h
libanjuta_hello_LIADD = $(LIBANJUTA_LIBS)