You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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 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.
Activity