1 /**
2  * $(B isFreedesktop) is compile-time constant to test if target platform desktop environments usually follow freedesktop specifications.
3  * Currently Linux, all *BSD and Hurd are considered to be freedesktop-compatible, hence isFreedesktop is evaluated to true on these platforms.
4  * This guess is somewhat optimistic, since there are vendor-specific operating systems based on these kernels in the world while their desktops don't implement freedesktop specifications.
5  * Authors: 
6  *  $(LINK2 https://github.com/FreeSlave, Roman Chistokhodov)
7  * Copyright:
8  *  Roman Chistokhodov, 2016
9  * License: 
10  *  $(LINK2 http://www.boost.org/LICENSE_1_0.txt, Boost License 1.0).
11  */
12 
13 module isfreedesktop;
14 
15 version(OSX) {
16     enum isFreedesktop = false;
17 } else version(Android) {
18     enum isFreedesktop = false;
19 } else version(linux) {
20     enum isFreedesktop = true;
21 } else version(FreeBSD) {
22     enum isFreedesktop = true;
23 } else version(OpenBSD) {
24     enum isFreedesktop = true;
25 } else version(NetBSD) {
26     enum isFreedesktop = true;
27 } else version(DragonFlyBSD) {
28     enum isFreedesktop = true;
29 } else version(BSD) {
30     enum isFreedesktop = true;
31 } else version(Hurd) {
32     enum isFreedesktop = true;
33 } else version(Solaris) {
34     enum isFreedesktop = true;
35 } else {
36     enum isFreedesktop = false;
37 }