Building a program using GtkSpell

The instructions below are written for the GTK+3 variant. For the GTK+2 variant, if it was compiled, it is sufficient to replace gtkspell-3.0 with gtkspell-2.0 and gtk+-3.0 with gtk+-2.0.

Simple Programs

The program must be compiled with the GtkSpell C flags and built with the GtkSpell libs. Depending on how your program is compiled, you must include the module gtkspell-3.0 along with gtk+-3.0 in your calls to pkg-config.

Building Using Autoconf

In configure.ac, modify the call to PKG_CHECK_MODULES to include gtkspell-3.0, like this:

PKG_CHECK_MODULES(MYPROGRAM, gtk+-3.0 gtkspell-3.0)

To pass the necessary flags to the compiler, you should add @MYPROGRAM_CFLAGS@ and @MYPROGRAM_LIBS@ to the respective Makefile.am, i.e.

AM_CPPFLAGS = @MYPROGRAM_CFLAGS@
mylibrary_la_LIBADD = @MYPROGRAM_LIBS@

For the substitutions to work, you need to add to configure.ac the lines

AC_SUBST(MYPROGRAM_CFLAGS)
AC_SUBST(MYPROGRAM_LIBS)