Building GtkImageView

## Building GtkImageView Building GtkImageView — How to compile and install GtkImageView. |

To compile and install GtkImageView, follow these steps:

`$ ./configure # Add --enable-gtk-doc to build the documentation`
`$ make`
`$ make install`

Optionally, you may want to run `make check` to build the testsuite. You can verify that installation succeded by running pkg-config:

`$ pkg-config --modversion gtkimageview`
`1.6.4`

### Building with waf

GtkImageView can also be built using the build tool waf. The waf binary is distributed with GtkImageView, so the only prerequisite to using it is that Python 2.4 or later is installed. Waf is the offically preferred way to build GtkImageView with, so please try it out. Autotools still works ofcourse.

These commands builds and installs GtkImageView with waf:

`$ ./waf configure # Add --enable-gtk-doc to build the documentation`
`$ ./waf build`
`$ ./waf install`

The test programs and demos are built by specifying specific build targets to waf build:

`$ ./waf build --demos # Builds demos`
`$ ./waf build --tests # Builds tests`

All the binaries are, by default, placed in the `build/default/tests` directory.

### Known problems

During compilation with GCC version 4.2.1 or newer, you may get errors similar to the following:

`$ make`
`...`
`gutils.h:316: warning: C99 inline functions are not supported; using GNU89`
`gutils.h:316: warning: to disable this warning use -fgnu89-inline or the gnu_inline function attribute`

These warnings are caused by a change in the meaning of the `inline` keyword in recent versions of GCC. But GLib has not yet adapted to the change. Fortunately, the fix is simple. Invoke configure like this:

`$ CFLAGS=-fgnu89-inline ./configure`

Note that the `-fgnu89-inline` is only recognized in GCC 4.2.1 and above.