Commit Graph
3 Commits
Author SHA1 Message Date
Hank Leininger b4b7a81069 Correct the include file path in -I CFLAGS argument.
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.
2018-10-08 21:22:41 -06:00
Hank Leininger cfd97bbbca Use a more standard path for pkg-config files.
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.
2018-10-08 19:08:51 -06:00
Hank Leininger a1f6cbb6c9 Symlink the shared library to pwd.
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.
2018-10-08 18:17:30 -06:00