build2 / libbuild2-autoconf

Autoconf emulation build system module for build2
MIT License
6 stars 2 forks source link

[Help Appreciated] `OpenCV` configuration variables #64

Open helmesjo opened 6 months ago

helmesjo commented 6 months ago

I'm currently in the process of packaging OpenCV which comes with a plethora of configuration variables, and I've started extracted some of them here from eg. cvconfig.h.in (there are others, but this appears to be the main one to get started). It's not clear to me ATM which are OpenCV-specific and which are generic variables (if any), but I figured I'll list them here if anyone wants to chip in on figuring out how each check is determined true/false:

cvconfig.h.in

cv_cpu_config.h.in

boris-kolpackov commented 6 months ago

A couple of notes from a cursory review:

  1. OPENCV_* ones are not likely to belong to autoconf (but it's possible they could be derived from some more general checks).

  2. Quite a few ones like HAVE_EIGEN, HAVE_JPEG, etc., appear to signal the use of a dependency and also don't belong in autoconf, naturally. The correct way to handle these (assuming they are optional dependencies) is with configuration variables.

  3. It makes sense before implementing any check to make sure we don't already have a differently-named ones with equivalent functionality (and which can therefore be reused). I am pretty sure we already have equivalent for WORDS_BIGENDIAN.

  4. Finally, in our experience, it's quite common for there to be a macro defined in config.h.in that is actually not used anywhere in the codebase (i.e., people routinely stop using some functionality but forget to cleanup their config.h.in). So it makes sense to confirm a check is actually used before spending time on implementing it.