3 ms·
That only works for language features though, it doesn't allow detecting OS/library features.
by Denvercoder9 3y ago
That only works for language features though, it doesn't allow detecting OS/library features.
- db48x 3y agoVery true, but don’t forget that Autoconf checks for “interesting” compiler choices as well as library and OS features. And then there is libtool, which abstracts out the differences between how compilers generate shared libraries so that you only have to understand one way of doing it and it will work on all of them.
- cryptonector 3y agoAutoconf lets you check for all sorts of things: - instruction set architecture - OS versions - ABIs - libraries (whether they are installed) - and what functionality they provide - commands/executables - anything you can write a macro to check All stuff too disparate to reliably have the OS be able to answer every question you might have about it and the stuff installed on it. You can't wait for any such system to learn how to answer the questions you might have about it, so some things you can only detect, either at build configuration time, build time, or run time.
- kllrnohj 3y agohttps://en.cppreference.com/w/cpp/preprocessor/include https://en.cppreference.com/w/cpp/preprocessor/include __has_include and other compile-time checking would work here (eg type_traits and enable_if)