OpenBSD 7.0 (snapshot of -current)
With the current autotools setup, out-of-tree builds are not possible due to the global include directory not being part of VPATH, not being populated in the build tree and being passed as a hardcoded relative path.
I'm not sure if this was ever considered to be used, but it would definitely be nice, as I tend to build from source using different configurations (for supporting various database backends, different component configurations and similar).
Steps to reproduce:
- Bootstrap the autotools (./bootstrap.sh)
- Create a build directory (mkdir build-opt && cd $_)
- Configure the build system to your liking (../configure CFLAGS='-O3 -fomit-frame-pointer' --enable-agent)
- Build the project (gmake)
The build system assumes that it's configured in the root of the source tree, so the include path to the global header directory passed to -I is incorrect. The above example creates a build tree as a subdirectory of the source tree, but the issue is more notable when having the build tree elsewhere, say, under /tmp. I've attached a log as an example.
I would expect out-of-tree builds to just work.