package/libnids: disable libnet only if not available
authorGuillaume W. Bres <guillaume.bressaix@gmail.com>
Wed, 24 Jun 2020 12:17:42 +0000 (14:17 +0200)
committerYann E. MORIN <yann.morin.1998@free.fr>
Wed, 24 Jun 2020 19:16:43 +0000 (21:16 +0200)
commit9a54b16058e1d3fafdafe1ccb4dad8803cb34312
treeaa85eecb3d98b91a814e0e75843e60a7dcd5b2d8
parent5a7d6bab6c81236db1e83af886433706d6e3941e
package/libnids: disable libnet only if not available

libnids can be built against an existing libnet lib,
take advantage of that.

Unfortunately, pkg-config is not available for libnet,
so configure --with-libnet is our only option at the
moment.

--with-libnet expects a build directory,
not an installation path like in our context.
We use --with-libnet=yes to skip tests that would fail.
In this situation, 'LIBNET' goes undefined, so we
need to define it ourselves.
This works because we make sure -lnet is installed
prior anything related to libnids.

Signed-off-by: Guillaume W. Bres <guillaume.bressaix@gmail.com>
[yann.morin.1998@free.fr: slightly compact the code]
Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
package/libnids/libnids.mk