meator opened a new issue, #6110: URL: https://github.com/apache/couchdb/issues/6110
### Version _No response_ ### Describe the problem you're encountering Hardcoded include paths are used in several places in couchdb. couchdb is at least considerate enough to check both `/usr/include`, `/usr/local/include` and even `/opt/homebrew/include/` in the code I reviewed, but this is still insufficient when cross compiling or when building in strange environments like Nix. The `/opt/homebrew/include/` include paths is especially telling. Adding a include path to the hardcoded list of library paths every time a supported target of couchdb needs it is bad. For example [this file](https://github.com/apache/couchdb/blob/main/src/couch/rebar.config.script#L155) includes plenty of hardcoded library paths. ### Expected Behaviour `pkg-config` should be used to get the appropriate paths. If pkg-config works well on all target environments supported by couchdb, it can fully replace the hardcoded lists, improving the readability and portability of the build system. Even if pkg-config cannot be used on all supported couchdb systems, the advantages it provides justify it being added as one of the lookup methods (preferably the first) in my opinion. The lookup can fall back to hardcoded paths on systems where pkg-config isn't available. ### Steps to Reproduce _No response_ ### Your Environment _No response_ ### Additional Context _No response_ -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
