Commit graph

37 commits

Author SHA1 Message Date
Ivan Nardi
334cc23a8e
Build system improvements and fixes (#3026)
- Fixed some typos and inconsistent option names in error messages
- Improved Git Detection in configure script
- Added informative warnings when optional dependencies are missing
- Improve error handling on autogen.sh script
- Simplify fuzzing Makefile, creating common FUZZ_LINK_COMMAND template for all fuzz targets
- Added *_DEPENDENCIES declarations for fuzz targets with dictionaries
- Implemented incremental corpus building to avoid unnecessary rebuilds

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-authored-by: Claude <noreply@anthropic.com>
2025-11-18 10:32:04 +01:00
Ivan Nardi
6ab338928c
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
2025-11-03 11:58:59 +01:00
Petr
c35a5ca087
shell: reformatted, fixed inspections, typos (#2506)
Reformatted shell scripts according to [ShellCheck](https://github.com/koalaman/shellcheck/).

I. Most common changes:
1. https://github.com/koalaman/shellcheck/wiki/SC2086
	`$var` → `"$var"`
	Note: this isn't always necessary and I've been careful not to substitute where it wasn't necessary in meaning.
2. https://github.com/koalaman/shellcheck/wiki/SC2006
	`` `command` `` → `$(command)`
3. https://github.com/koalaman/shellcheck/wiki/SC2004
	`$(( $a + $b ))` → `$(( a + b ))`
4. https://github.com/koalaman/shellcheck/wiki/SC2164
	`cd "$dir"` → `cd "$dir" || exit 1`
5. https://github.com/koalaman/shellcheck/wiki/SC2166
	`[ check1 -o check2 ]` → `[ check1 ] || [ check2 ]`
6. https://github.com/koalaman/shellcheck/wiki/SC2002
	`cat "${file}" | wc -c` → `< "${file}" wc -c`
	Note: this looks a bit uglier but works faster.

II. Some special changes:
1. In file `utils/common.sh`:
	https://github.com/koalaman/shellcheck/wiki/SC2112
	This script is interpreted by `sh`, not by `bash`, but uses the keyword `function`.
	So I replaced `#!/usr/bin/env sh` to `#!/usr/bin/env bash`.
2. After that I thought of replacing all shebangs to `#!/usr/bin/env bash` for consistency and cross-platform compatibility, especially since most of the files already use bash.
3. But in cases when it was `#!/bin/sh -e` or `#!/bin/bash -eu` another problem appears:
	https://github.com/koalaman/shellcheck/wiki/SC2096
	So I decided to make all shebangs look uniform:
	```
	#!/usr/bin/env bash
	set -e (or set -eu) (if needed)
	```
4. In file `tests/ossfuzz.sh`:
	https://github.com/koalaman/shellcheck/wiki/SC2162
	`read i` → `read -r i`
	Note: I think that there is no need in special treatment for backslashes, but I could be wrong.
5. In file `tests/do.sh.in`:
	https://github.com/koalaman/shellcheck/wiki/SC2035
	`ls *.*cap*` → `ls -- *.*cap*`
6. In file `utils/verify_dist_tarball.sh`:
	https://github.com/koalaman/shellcheck/wiki/SC2268
	`[ "x${TARBALL}" = x ]` → `[ -z "${TARBALL}" ]`
7. In file `utils/check_symbols.sh`:
	https://github.com/koalaman/shellcheck/wiki/SC2221
	`'[ndpi_utils.o]'|'[ndpi_memory.o]'|'[roaring.o]')` → `'[ndpi_utils.o]'|'[ndpi_memory.o]')`
8. In file `autogen.sh`:
	https://github.com/koalaman/shellcheck/wiki/SC2145
	`echo "./configure $@"` → `echo "./configure $*"`
	https://github.com/koalaman/shellcheck/wiki/SC2068
	`./configure $@` → `./configure "$@"`

III. `LIST6_MERGED` and `LIST_MERGED6`
	There were typos with this variables in files `utils/aws_ip_addresses_download.sh`, `utils/aws_ip_addresses_download.sh` and `utils/microsoft_ip_addresses_download.sh` where variable `LIST6_MERGED` was defined, but `LIST_MERGED6` was removed by `rm`.
	I changed all `LIST_MERGED6` to `LIST6_MERGED`.

Not all changes are absolutely necessary, but some may save you from future bugs.
2024-07-18 17:32:49 +02:00
Toni Uhlig
c3df3a12aa Fixed msys2 build warnings and re-activated CI Mingw64 build.
* Removed Visual Studio leftovers. Maintaining an autotools project with VS integration requires some additional overhead.

Signed-off-by: Toni Uhlig <matzeton@googlemail.com>
Signed-off-by: lns <matzeton@googlemail.com>
2022-04-14 19:17:48 +02:00
Toni
cf931fda6b
Get rid of configure.seed as it comes with some disadvantages. (#1328)
* using Autotools best-practices to achieve (hopefully) the same result

Signed-off-by: Toni Uhlig <matzeton@googlemail.com>
2021-10-10 13:13:52 +02:00
Luca Deri
cb26a8c82d Moved to 4.1.0 2021-07-26 09:40:50 +02:00
Toni
399755607d
Disable tests that require libgcrypt if --disable-gcrypt set. (#1121)
Signed-off-by: Toni Uhlig <matzeton@googlemail.com>
2021-01-21 08:59:06 +01:00
Luca Deri
6c0a809de8 Initial 3.5 commit 2020-10-19 16:23:03 +02:00
Luca Deri
64929a75e0 3.4 nDPI Release 2020-10-19 16:18:25 +02:00
borisVanhoof
b0c4d01734
don't pass arguments to ./configure as 1 string (#1027)
this causes the following error if there are arguments after --host :
'checking host system type... config.sub: too many arguments'

Co-authored-by: sahnalys12 <boris.vanhoof_ext@softathome.com>
Co-authored-by: Luca Deri <lucaderi@users.noreply.github.com>
2020-09-29 18:02:08 +02:00
Toni
656323c334
Added missing files to `make dist' target which are not required to build nDPI but still somehow essential. (#1024)
Signed-off-by: Toni Uhlig <matzeton@googlemail.com>
2020-09-29 17:58:33 +02:00
lucaderi
ebfb5e7f01 Check for CentOS 6 2020-06-26 09:01:58 +02:00
Toni Uhlig
f38a8bd7a5
fixed autoconf version check
Signed-off-by: Toni Uhlig <matzeton@googlemail.com>
2020-06-25 20:02:23 +02:00
lucaderi
3034e53d00 CentOS6 fix (santize won't work as too old system)
Fixes warning
2020-06-25 10:22:16 +02:00
Luca Deri
493bffb3e0 Added check for pkg-config presence 2020-04-19 21:48:24 +02:00
Alfredo Cardigliano
2972e29097 Moved to 3.3 2020-02-20 10:15:11 +01:00
Luca Deri
65d526d8f6 Code cleanup 2019-12-09 15:28:44 +01:00
Luca Deri
8ae5da1472 Moved to 3.1 release 2019-10-04 07:45:57 +00:00
Simone Mainardi
93582a4204 Bump to version 2.9 2019-03-01 18:06:28 +01:00
Alfredo Cardigliano
c7260b6436 Moved to 2.7 2018-12-21 10:50:23 +01:00
Luca
a98c0a81be Added target for shared liubrary creation
Added target for install
Fixes #593
2018-08-25 10:50:16 +02:00
Luca Deri
89b3b085af Moved to 2.5.0 2018-08-22 08:45:13 +02:00
Luca
667e77c609 Major code cleanup
Converted some not popular protocols to NDPI_PROTOCOL_GENERIC with category detection
2018-07-21 16:02:54 +02:00
Yingpei Zeng
ac31c1ba98
Add chmod +x to the generated configure file
Fix an error when running autogen.sh on Ubuntu (16.04 LTS):
./autogen.sh: 49: ./autogen.sh: ./configure: Permission denied
2018-03-06 15:14:38 +08:00
Luca Deri
6a9fc935eb Added fix for invalid RTP/Skype detection
Added change in config.h generated by nDPI to avoid name clashes (the GNU autotools are really outdated)
2018-02-21 08:18:37 +01:00
Luca Deri
6e7a1022b2 Added PACKAGE_XXX rename to avoid name clashes when nDPI is used inside another project that use the autotools 2018-02-19 18:50:23 +01:00
Bjørn Forsman
9fa6119f14 autogen.sh: break overlong sed line 2018-02-18 18:47:42 +01:00
Bjørn Forsman
be38c3d90e autogen.sh: which -> command -v
command -v is a POSIX standard, available in all POSIX sh. which is not.
Prefer command -v for portability.
2018-02-18 18:46:04 +01:00
Bjørn Forsman
6ba79afc23 autogen.sh: /bin/rm -> rm
For portability, don't assume that /bin/rm exists, rely on $PATH lookup
instead.

This fixes building in sandboxed Nix(pkgs) builds.
2018-02-18 18:45:09 +01:00
Simone Mainardi
b5a8c6bae8 Bump to version 2.3 2017-12-03 19:09:11 +01:00
Luca
22beb7714d Implements #376 2017-08-29 20:56:08 +02:00
theirix
41d7430442 Call configure with args from autogen 2016-04-01 17:18:23 +03:00
Michele Campus
37912b6045 fix quic.c and add libtoolize option to autogen.sh 2015-06-20 18:35:04 +02:00
Luca Deri
4cded5dc98 Added autoreconf check 2015-05-23 07:20:14 +02:00
Luca Deri
3caf906c9a Fixes to catch missing GNU tools 2015-05-23 07:15:24 +02:00
Luca Deri
68ac979dc5 Win32 fixes 2015-05-18 13:00:02 +02:00
Luca Deri
2e5ceac844 Initial import from SVN 2015-04-19 07:25:59 +02:00