build: do not eschew user-specified includedir

${includedir} is normally set to what the user specified at
./configure time using --includedir, you should not override
it with ${prefix}/include.

Rather, pkgincludedir should be overriden.
Update .gitignore

m4/.gitignore can act as a (useful) placeholder, so there is no need
for an empty file. Add directory anchors (trailing /) to entries that
are a directory, and add the generated pkg-config files (*.pc) to the
ignore list.
Inform C++ compilers about the C linkage for this library's functions
Merge remote-tracking branch 'inai/master'

Signed-off-by: Gergely Nagy <algernon@madhouse-project.org>