NNAAMMEE
    sysarch - defines system specific variables using the uname system
    command

SSYYNNOOPPSSIISS
    sysarch [OPTION]... [VARIABLE] [VARIABLE]

DDEESSCCRRIIPPTTIIOONN
    ssyyssaarrcchh provides a uniform description of a system, including the
    underlying hardware, the operating system, and the unique operating
    system characteristics.  Its intent is to identify important system
    characteristics which determine the interoperability of software with
    hardware/operating system platforms.

    Compatibility between operating systems sometimes occurs.  It's often
    possible to run programs compiled on one flavor of Linux on another.  It
    is rare for software compiled on newer platforms to run on older ones,
    however.  While ssyyssaarrcchh can't determine which systems are compatible, it
    tries to present enough salient information so that it is possible to
    provide a hierarchy of compatibility.

    ssyyssaarrcchh encodes system information into a set of variables.  It will
    generate code for various shells and GNU make which can be used to
    incorporate those variables into scripts and Makefiles.

OOPPTTIIOONNSS  AANNDD  AARRGGUUMMEENNTTSS
    ssyyssaarrcchh takes an optional argument specifying the name of a variable to
    output. If no options or arguments are specified they are all output.

  GGeenneerraall  OOppttiioonnss
    Options which take a value accept it either as the following argument,
    or attached with an "=", e.g. "--pfx P_" or "--pfx=P_".

    ----eexxppoorrtt
        Output code which creates environment, rather than shell, variables.
        Only releveant for shells.

    ----ppffxx _p_f_x
        Prepend _p_f_x to variable names.  It may contain only letters, digits,
        and underscores, and may not start with a digit.

    ----hheellpp
        Print this usage information and exit.

  OOuuttppuutt  FFoorrmmaattss
    Output formats are specified either using the ----oouuttppuutt option, or simply
    by prefixing the format name with "--" and treating it as an option:

       --output csh
       --csh

    If no variables are specified on the command line, the default output
    format is "nice".  If variables are specified, it defaults to "value".

    To list the supported formats, use

       --output -list

    The following formats are supported:

    ccsshh|ttccsshh|sshh|kksshh| bbaasshh
        Output commands in the appropriate shell to create the variables.

    mmaakkee
        Create static mmaakkee compatible macro assignments.  Macro names are in
        upper case.

    ggmmaakkee__eexxttrraacctt
        Create dynamic GNU mmaakkee compatible macro assignments using a call to
        ssyyssaarrcchh. Macro names are in upper case.

        The call is to "$(_SYSARCH)", which defaults to the installed
        ssyyssaarrcchh.  To use a different one, define "_SYSARCH" before the
        generated assignments, or on the mmaakkee command line.

    ggmmaakkee__ccaatt
        Create the output required by the code output by "--output
        gmake_extract".

    mmaakkee__dduummpp
        Generate mmaakkee target commands to output the ssyyssaarrcchh generated
        macros.  Useful as part of a mmaakkee "debug" style target.

    ppeerrll
        Output Perl code generating scalar variables.

    ppeerrll__hhaasshh
        Output Perl code for the contents of a hash.  It does not generate
        the wrapper code required to actually create the hash.

        In the ppeerrll and ppeerrll__hhaasshh formats, list variables (e.g. 
        "platforms") are output as array references, even if they have a
        single element.

    yyaammll
        Output a YAML document.  Values are single quoted, so that e.g. a
        version of 8.10 isn't read as a number.  List variables (e.g. 
        "platforms") are output as sequences, even if they have a single
        element.

    vvaalluuee
        Output only the variables' values.

    nnuull Output each variable's name and value, each terminated by a NUL
        character.  As neither can contain a NUL, no quoting is required,
        making this the most robust format for other programs to parse.

        The values of list variables (e.g. "platforms") end with a colon, so
        that a list with a single element can be distinguished from a
        scalar.  Remove it before splitting the list on colons.

    nniiccee
        A more human readable format.

OOUUTTPPUUTT  VVAARRIIAABBLLEESS
  HHaarrddwwaarree  IIddeennttiiffiiccaattiioonn
    hhww__ccppuu
        The most specific description of the actual CPU.

    hhww__ccppuu__ggeenneerriicc
        The generic description for the CPU.  This is _n_o_t the most generic
        one with which the CPU is compatible.  For example,

            athlon_64 => x86_64,  not i686
            core2     => x86_64,  not i686
            pentium4  => i686

    hhww__ccppuuss
        A colon separated list of models or families of CPU's with which the
        hardware is compatible, from least to most generic.

    For example, for an AMD Athlon64 CPU,

      hw_cpu  = athlon_64
      hw_cpus = athlon_64:x86_64:i686

  SSyysstteemm  IIddeennttiiffiiccaattiioonn
    The system designation represents the combination of operating system,
    kernel, and optionally vendor or distribution name.

    OOSS, ooss__ttyyppee
        The operating system name.  OOSS has historical significance for
        Linux, and retains the value "Linux" for it.

        For other operating systems, OOSS and ooss__ttyyppee are equivalent.  ooss__ttyyppee
        is the lowercased name (i.e. "linux" rather than "Linux") and is
        typically equivalent to the OOSSTTYYPPEE environment variable.

        Note that "Linux" represents both the kernel and the accompanying
        system software.  This is often represented as GNU/Linux, similar to
        Debian GNU/kFreeBSD, Debian GNU/NetBSD and GNU/Hurd.  The latter set
        aren't available to the authors, so we're not worrying about them
        yet.

    ooss__vveennddoorr
        ooss__vveennddoorr is the vendor or distribution name.  Some vendors provide
        multiple distributions (e.g. Red Hat Fedora, Red Hat Enterprise
        Linux) -- ooss__vveennddoorr is then the combination (e.g. "RHF", "RHEL").

        On Linux, the distribution and its version are taken from
        _/_e_t_c_/_o_s_-_r_e_l_e_a_s_e.  For historical compatibility, some distributions
        have fixed names ("RHEL", "RockyLinux", "CentOS", "RHF", "debian",
        "Ubuntu"); for others, ooss__vveennddoorr is the distribution's "NAME" with
        everything but letters and digits removed.  Systems without
        _/_e_t_c_/_o_s_-_r_e_l_e_a_s_e, or whose _/_e_t_c_/_o_s_-_r_e_l_e_a_s_e has no numeric
        "VERSION_ID" (e.g. rolling releases such as Debian testing), are not
        supported.

  SSyysstteemm  VVeerrssiioonn
    System version information is complex.  It might refer to the version
    given to a particular distribution or release (such as Fedora Core 3 or
    4).  For some applications the kernel version is more important, or
    perhaps the version of glibc. ssyyssaarrcchh provides all of that information.

    kkeerrnn__vveerrssiioonn
        kkeerrnn__vveerrssiioonn is the kernel version.  On Linux it is the base kernel,
        without any vendor specific version information.

    kkeerrnn__vveerrssiioonn__mmaajj
        kkeerrnn__vveerrssiioonn__mmaajj contains just the most significant kernel version
        (e.g. 2.6 for Linux, 8.8 for Darwin).

    kkeerrnn__vveerrssiioonnss
        A colon separated list of kernels with which this is compatible.

    ooss__vveerrssiioonn, ooss__vveerrssiioonn__mmaajj
        ooss__vveerrssiioonn is the vendor supplied operation system version. 
        ooss__vveerrssiioonn__mmaajj is the most significant part (e.g, for OSX 10.4 vs.
        10.4.8).

    ooss__vveerrssiioonnss
        A colon separated list of operating system versions with which this
        operating system is backwards compatible.

    ooss__uuvveerrssiioonn, ooss__uuvveerrssiioonn__mmaajj
        The version of the operating system component most important for
        user space applications.  For Linux this is chosen to be the version
        of glibc.  This may not be restrictive enough for some applications
        (e.g. if one distribution ships with a different version of
        lliibbrreeaaddlliinnee). ooss__vveerrssiioonn__mmaajj is the most significant part (e.g., 2.3
        vs. 2.3.6).

    ooss__uuvveerrssiioonnss
        A colon separated list of user space component versions with which
        this operating system is backwards compatible.  For Linux it is
        assumed that previous minor (in the glibc sense) releases are
        backwards compatible.

  PPllaattffoorrmm
    A platform is the combination of hardware and operating system
    specifications.  It's a triad with one of the following combinations:

      <hw_cpu>-<os_type>-<os_uversion>
      <hw_cpu>-<OS>-<os_version>

    where "<OS>" is

     <os_type>_<os_vendor>

    except for macOS (Darwin) where it is

     <os_type>

    It is assumed that ooss__uuvveerrssiioonn is constant for a given ooss__vveerrssiioonn.

   _H_o_s_t_ _S_y_s_t_e_m
    These variables describe the host system's platform

    ppllaattffoorrmm
    ppllaattffoorrmm__nnaattiivvee
        Aliases for ppllaattffoorrmm__ooss__nnaattiivvee.

    ppllaattffoorrmm__ggeenneerriicc
        An alias for ppllaattffoorrmm__uuooss__ggeenneerriicc.

    ppllaattffoorrmm__ooss__nnaattiivvee
        The most detailed specification including the OS
        vendor/distribution.  Equivalent to

          <hw_cpu>-<OS>-<os_version>

    ppllaattffoorrmm__ooss__ggeenneerriicc
        This specification allows for a more generic hardware and OS
        specification, allowing for compatibility within minor OS and
        hardware variations.  This is equivalent to

          <hw_cpu_generic>-<OS>-<os_version_maj>

    ppllaattffoorrmm__uuooss__nnaattiivvee
        The most detailed specification using the user space component
        version.  Equivalent to

          <hw_cpu>-<os_type>-<os_uversion>

    ppllaattffoorrmm__uuooss__ggeenneerriicc
        Equivalent to

          <hw_cpu_generic>-<OS>-<os_uversion_maj>

   _C_o_m_p_a_t_i_b_l_e_ _p_l_a_t_f_o_r_m_s
    These variables provide lists of compatible platforms

    ppllaattffoorrmmss
        A colon separated list of compatible platforms, with hardware being
        the most important element for compatibility.  This is a combination
        of ppllaattffoorrmmss__ooss and ppllaattffoorrmmss__uuooss.

    ppllaattffoorrmmss__ooss
        A colon separated list of compatible platforms of the form

          <hw_cpu>-<OS>-<os_version>

        With Hardware being the most important element for compatibility.

    ppllaattffoorrmmss__uuooss
        A colon separated list of compatible platforms of the form

          <hw_cpu>-<os_type>-<os_uversion>

        with hardware being the most important element for compatibility.

WWHHAATT  DDOOEESS  TTHHIISS  AALLLL  MMEEAANN??
    Well, that depends upon how its being used.  First off, use ppllaattffoorrmmss
    and ssyyssaarrcchh's accompanying ssyyssppaatthhssuubbsstt program to create compatibility
    hierarchies for executable and library search paths.

    ppllaattffoorrmm__ggeenneerriicc is nnoott the lowest common denominator.  It's essentially
    the most generic specification that can be natively created (i.e.
    compiled) on the platform.  Because it purports to specify user space
    compatibility, use it on Linux if you're sure that your application will
    run on multiple Linux distributions based solely on gglliibbcc compatibility.
    If, however, your application links against libraries in a combination
    that differs between distributions, you might as well use
    ppllaattffoorrmm__ooss__ggeenneerriicc.

CCOOPPYYRRIIGGHHTT  AANNDD  LLIICCEENNSSEE
    This software is Copyright 2007 The Smithsonian Astrophysical
    Observatory and is released under the GNU General Public License.  You
    may find a copy at: <http://www.fsf.org/copyleft/gpl.html>

AAUUTTHHOORRSS
    M. Tibbetts <mtibbetts@cfa.harvard.edu>

    D. Jerius  <djerius@cfa.harvard.edu>

