% Copyright (C) 1993, Digital Equipment Corporation
% All rights reserved.
% See the file COPYRIGHT for a full description.

readonly _UnixPieces = {
  % AIX?
  "CYGWIN"  : [ "uin-common" ],
  "HPUX"    : [ "uin-common" ],
  "INTERIX" : [ "uin-common" ],
  % IRIX?
  "LINUX"   : [ "uin-common" ],
  "MINGW"   : [ "uin-common" ],
  "NT"      : [ "uin-common" ],
  "SOLgnu"  : [ "solaris-2-x", "uin-common" ],
  "SOLsun"  : [ "solaris-2-x", "uin-common" ],
  "SOLARIS" : [ "uin-common" ],
  "VMS"     : [ "uin-common" ], % both are available, depending on #if

  % both are available, depending on #if
  % We use a define for a more important purpose (socklen_t),
  % and it gives us this too.
  "ALPHA_OSF" : [ "uin-len" ],

  % BSD/Darwin have an 8 bit family and an 8 bit length field added
  "DARWIN"  : [ "uin-len" ],
  "NETBSD"  : [ "uin-len" ],
  "FREEBSD" : [ "uin-len" ],
  "OPENBSD" : [ "uin-len" ],
}

include_dir ("Common")

if _UnixPieces contains TARGET
  local pieces = _UnixPieces {TARGET}
  foreach f in pieces
    include_dir (f)
  end
else
  if _UnixPieces contains TARGET_OS
    local pieces = _UnixPieces {TARGET_OS}
    foreach f in pieces
      include_dir (f)
    end
  else
    error (format ("unix: unsupported platform: \"%s\"%s", TARGET, CR))
  end
end
