#Meson needs to learn that Linux is not an operating system unto itself.
No really, like 95% checks for host_machine.system() == 'linux' are wrong, unless you really care about *kernel* specifics like Linux kernel modules. Typically what you want to check is:
- is my compiler GCC / Clang? (use the Meson compiler object for that!)
- is my libc (a recent enough) glibc?
- does this system use a "freedesktop" GUI stack?
- etc etc
I suppose this is the confusion about the fact that "Linux" is not a platform
It's a kernel
It seems we haven't got a shared definition of what "Linux" encompasses
Oh well...
@abbienormal but then they return 'android' when Android is detected, even though it too is running on the Linux kernel! You'd then think 'linux' means GNU/Linux then, but no, it still returns 'linux' on non-GNU non-Android Linux systems too.
@lanodan @abbienormal hm, what do you mean, which non-Apple Unix stuff?
@bugaevc @abbienormal Like CMake scripts with if(APPLE AND NOT UNIX)
or C preprocessors macros with !defined(__APPLE__) && defined(__unix__)
@lanodan @abbienormal if (UNIX AND NOT APPLE) you mean, but yeah, I see.
I would argue that that is an OK pattern if they really want to single out Darwin (maybe for Mach-O or something), but not quite right if what they actually care about is freedesktop-ish vs Cocoa-ish. You can certainly have GNUstep on non-Apple systems, and run a regular X11 desktop on Darwin.