src/lib/Makefile.in install headers into ${prefix}/include/ndpi,
but the shipped libndpi.pc.in specifies a different path. Therefore
anything trying to build using $(pkg-config --cflags libndpi) will
fail to find the nDPI headers.
This patch simply makes libndpi.pc.in agree with src/lib/Makefile.in.
The Linuxes I've checked all seem to use /usr/{,local/}lib*/pkgconfig,
not /usr/libdata/. I think FreeBSD does use /usr/libdata/ but also
supports /usr/lib*/pkgconfig, although I have not tested this change
on a FreeBSD system.
DESTDIR is used, for instance, by distros to facilitate installing
to a temp path for testing / package-building.
In general nDPI supports DESTDIR (yay!), but using an absolute path
for the target of the library link has two problems:
1) If DESTDIR is set to /some/tmp/path, we end up with a link that
points to /some/tmp/path/usr/lib/libndpi-x.y.z, which is definitely
not what is intended - once the package is installed, the link is
broken.
2) Absolute links are problematic for distributions; pointing to
/usr/lib/libndpi-x.y.z during package build-and-test would point to
either a nonexistent file, or an old and possibly wrong one.
Both of these are avoided if we just link to the target with no path
at all.