Add support for out-of-tree builds (#2993)

Initial work to support out-of-tree builds
```
./autogen.sh
mkdir build
cd build
../configure
make
make check
```
IMPORTANT: `autogen.sh` doesn't call `configure` automatically anymore!!

You have to do: `./autogen.sh && ./configure --$OPTIONS`.
A little bit annoying but the pattern `autogen && configure && make` is
very common on Linux.

Known issues:
* `make doc` doesn't work in out-of-tree builds, yet
* Windows/MinGW/DPDK (out-of-tree) builds have not been tested, so it is unlikely they work

See: #2992
This commit is contained in:
Ivan Nardi 2025-11-03 11:58:59 +01:00 committed by GitHub
parent e9751cec26
commit 6ab338928c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
26 changed files with 308 additions and 180 deletions

View file

@ -50,7 +50,7 @@ jobs:
"apt-get -y update &&
apt-get -y install git wdiff colordiff autoconf automake libtool pkg-config gettext libjson-c-dev flex bison libpcap-dev rrdtool librrd-dev &&
git config --global --add safe.directory $(realpath .) &&
env CC=gcc ./autogen.sh --enable-option-checking=fatal --enable-debug-messages &&
env CC=gcc ./autogen.sh && ./configure --enable-option-checking=fatal --enable-debug-messages &&
make -j $(nproc) all &&
make -C example ndpiSimpleIntegration &&
make -C rrdtool &&
@ -74,7 +74,7 @@ jobs:
"apt-get -y update &&
apt-get -y install git wdiff colordiff autoconf automake libtool pkg-config gettext libjson-c-dev flex bison libpcap-dev rrdtool librrd-dev &&
git config --global --add safe.directory $(realpath .) &&
env CC=gcc ./autogen.sh --enable-option-checking=fatal --enable-debug-messages &&
env CC=gcc ./autogen.sh && ./configure --enable-option-checking=fatal --enable-debug-messages &&
make -j $(nproc) all &&
make -C example ndpiSimpleIntegration &&
make -C rrdtool &&