public static OSFamily getOSFamilyFromGNUString ( String gnuString ) { final String nativeOs = ( gnuString != null ? gnuString . toLowerCase ( ) : "" ) ; final OSFamily retval ; if ( nativeOs . startsWith ( "mingw" ) || nativeOs . startsWith ( "cygwin" ) ) retval = OSFamily . WINDOWS ; else if ( nativeOs . startsWith ( "darwin" ) ) retval = OSFamily . MAC ; else if ( nativeOs . startsWith ( "linux" ) ) retval = OSFamily . LINUX ; else retval = OSFamily . UNKNOWN ; return retval ; }
Return an OS Family from parsing a GNU autoconf triple .