# Format is:
# '[foo]' indicates the start of a section foo (and the end of the
# 	  previous section).
# 'A = B' means that property 'A' has value 'B'
# '#' indicates a comment (NB: Comments must be on separate lines)
#
# Any given key may appear at most ONCE in a given section. The exception
# is the "inherit" key which can appear as many times as necessary.
#
# Each option value has one of the following types:
# Key: 		Any identifier consisting of alphanumeric characters
#		See "String" for the rules about spaces.
# Bool: 	yes/no/true/false.
# String: 	Any sequence of characters.  Spaces are stripped from 
#		the start and end of the string, and then leading or
#		trailing doublequotes are ignored.  If you really want a
#		single ", then use """.
# StringList: 	A sequence of strings.  Strings are separated by spaces,
#		unless the first character is a comma, in which case
#		the list is comma separated.
#		For example, 
#			" foo = bar baz ",
#			" foo =,bar,baz"
#			" foo =bar baz"
#		represent the same list.  This is mainly so that
#               the "-Wopts=" flag can be used without gratuitous 
#		quoting.
# 
# Additionally, the form "$foo" means the key "foo"
# 
# Finally (and _only_ in list expressions), the form `$?condition w1 w2 w3 : w4 ;'
# evaluates to `w1 w2 w3' if condition is true, `w4' otherwise.  The branches 
# are treated as lists, so conditions can be nested if necessary.
#
# The following can be used as conditions:
#  stdc: 	`-Wstdc' was specified
#  link: 	the program is linking its arguments to an executable
#  compile: 	the program is compiling C  code (one of `link' and `compile' will be true)
#  shared: 	`-Wshared' was specified
#  optimize:	`-O' was specified
#  nonstdfloat: `-Wnonstdfloat' was specified
#  stdfloat: 	`-Wnonstdfloat' was not specified
#  profile: 	`-p' was specified.
#
# The following keys are used by unicl:
#   inherit:   	Key.  
#       This specifies that if a key is not found in the current section,
#	then the named section should be searched.  The section `default' is
#   	always searched last, and there is no need to inherit this section.
#   cc-name:   	String
#   link-name:	String
#	Name of C compiler and linker, respectively.
#   include:	String
#	Name of `-I' option
#   include-sep: Flag
#	Indicates if a space is needed between -I and its argument.

#++++++++++++++++++++++++++
# SunOS 5.5 and newer on SPARC generic
# compiler: 
#    WorkShop Compilers 4.2 30 Oct 1996 C 4.2
#    SC4.0 18 Oct 1995 C 4.0
[sun4os55c]
  cc-name = cc
  cc-opts = -w -D__USE_CC -I/usr/openwin/include 
# for shared use :  cc-opts = -D__USE_CC -I/usr/openwin/include -K PIC
  link-opts = -L/usr/openwin/lib -lnsl -lsocket
  fortran-name-scheme = underscore
  fortran-cmplx-fns = return-void
  fortran-libraries = -L/opt/SUNWspro/SC4.0/lib -lF77 -lsunmath
[sun4os55c-v8]
  inherit=sun4os55c
  cc-opts = -D__USE_CC -I/usr/openwin/include -xcg92 
#--------------------------


#++++++++++++++++++++++++++
# SunOS 5.5 and newer on SPARC v8
# compiler:
#    gcc 2.7.2 and newer
[sun4os55g-v8]
# For fortran: -Cruntime=foam,nag,F77,sunmath
  inherit     = sun4os55g
  link-optimize = -O3 -mv8
  cc-optimize = -O3 -mv8
  optimize      = -O3 -mv8
  lib-default-path = 
#--------------------------


#++++++++++++++++++++++++++
# SunOS 5.5 and newer on SPARC generic
# compiler:
#    gcc 2.7.2 and newer
[sun4os55g]
  inherit     = gcc
  link-optimize = -O3
  cc-optimize      = -O3
# these enforce ieee
  ieee-opts = -ffloat-store 
# if we dont-care
  fast-opts = -ffast-math -O3
  cc-opts = -w $?stdc -ansi -D__EXTENSIONS__ : -traditional ; $?stdfloat $ieee-opts : $fast-opts ;
# for shared use :   cc-opts = -fPIC $?stdc -ansi -D__EXTENSIONS__ : -traditional ; $?stdfloat $ieee-opts : $fast-opts ;
  fortran-name-scheme = underscore
  fortran-cmplx-fns = return-void
  fortran-libraries = -L/opt/SUNWspro/SC4.0/lib -lF77 -lsunmath
  link-opts = -L/usr/openwin/lib -lnsl -lsocket

#++++++++++++++++++++++++++
# SunOS 4.1.x on SPARC generic
# compiler:
#    Sun cc (non-ansi)
[suncc]
  inherit = sun4os4c
  
[sun4os4c]
  compile-only = -c
  cc-opts = -fsingle
  include-sep = false
  generate-stdc = false
  fortran-name-scheme = underscore
  fortran-cmplx-fns = return-void

[sun4os4g]
  inherit = gcc
  link-optimize = -O3
  optimize      = -O3 
  fortran-name-scheme = underscore
  fortran-cmplx-fns = return-void
  libpath-sep	=  false
  output-name-sep = true 
  link-opts = -L/usr/openwin/lib

[sun4os4c-v8]
  inherit = sun4os4c

[sun4os4g-v8]
  inherit = sun4os4g
  link-optimize = -O3 -mv8
  optimize      = -O3 -mv8

#++++++++++++++++++++++++++
# IRIX 5.x on MIPS1
[irixmips]
  fortran-name-scheme = underscore
  fortran-cmplx-fns = disallowed

[irixmips1]
   inherit = irixmips
   opts = -mips1
  output-name-sep = true


[irixmips2]
   inherit = irixmips
   opts = -mips2

#++++++++++++++++++++++++++
# IRIX 6.x on MIPS3
[irixmips3]
   generate-stdc=false
   include-sep = false
   inherit   = irixmips
#these enforce ieee
   ieee-opts=-OPT:IEEE_arithmetic=1 -OPT:IEEE_comparisons=ON
#if we don't care ieee-ly
   fast-opts = -Ofast
#
   cc-opts   = -w -Xt -mips3  -n32 -OPT:Olimit=0 $?stdfloat $ieee-opts : $fast-opts ;
   std-cc-opts   = -w -Xa -mips3  -n32 -OPT:Olimit=0  $?stdfloat $ieee-opts : $fast-opts ;
   link-opts = -mips3 -n32 -Wl,-w $?stdfloat : -IPA ;
   cc-optimize = -O2
   link-optimize = -O2
   libpath-sep	=  false
   profile	=  -ProfilingNotAvailable

#++++++++++++++++++++++++++
[irixmips3A]
# newer version of cc [720] does not like fold_arith_limit
   inherit=irixmips3
   cc-opts = -mips3  -n32 -OPT:Olimit=0  -woff all $?stdfloat $ieee-opts : $fast-opts ;

#++++++++++++++++++++++++++
[irixmips4]
#these enforce ieee
   ieee-opts=-OPT:IEEE_arithmetic=1 -OPT:IEEE_comparisons=ON
#if we don't care ieee-ly
   fast-opts = -Ofast -IPA
    inherit=irixmips3
    cc-opts   = -mips4  -64 -OPT:Olimit=0  -OPT:fold_arith_limit=8000 -woff all $?stdfloat $ieee-opts : $fast-opts ;
    link-opts = -mips4 -64 -Wl,-w $?stdfloat : -IPA ;

#++++++++++++++++++++++++++
[irixgcc]
   inherit=gcc
#++++++++++++++++++++++++++

[linuxcore]
# We use "-O2" because -O3 can cause trouble.
  inherit       = gcc
  link-optimize = -O2
  cc-optimize = -O2
# if we dont-care
  cc-opts = $gcc-hacks -w $?stdfloat $ieee-opts : $fast-opts ; 
#for shared use :  cc-opts = -fPIC $?stdfloat $ieee-opts : $fast-opts ; 
# add the X libraries 
  link-opts = -L /usr/X11/lib
  debug-optimize-ok = true
# Fortran compiler
# inherit = NAGWare-f95-compiler-unix
  inherit = GNU-f77-compiler-unix

#++++++++++++++++++++++++++
[linux]
  inherit       = linuxcore
# these enforce ieee
#  ieee-opts = -ffloat-store -mieee-fp
  ieee-opts = -ffloat-store
  fast-opts = -ffast-math -O2
#  cc-name = gcc32
#  link-name = gcc32
  cc-name = gcc
  link-name = gcc

#++++++++++++++++++++++++++
[linuxaxp]
  inherit 	= linuxcore
  ieee-opts = -ffloat-store
  fast-opts = -ffast-math -O2

#++++++++++++++++++++++++++
[linux-486]
  inherit 	= linux
  link-optimize = -O2 -m486
  optimize      = -O2 -m486

#++++++++++++++++++++++++++
[linuxglibc]
  inherit       = linux

#++++++++++++++++++++++++++
[linuxglibc-486]
  inherit 	= linuxglibc
  link-optimize = -O2 -m486
  optimize      = -O2 -m486
  fortran-name-scheme = underscore-bug
  fortran-cmplx-fns = return-void

#++++++++++++++++++++++++++
[linuxglibc2.1]
  inherit       = linux

#++++++++++++++++++++++++++
[linuxglibc2.1-486]
  inherit       = linuxglibc2.1
  link-optimize = -O2 -m486
  optimize      = -O2 -m486
  fortran-name-scheme = underscore-bug
  fortran-cmplx-fns = return-void

#++++++++++++++++++++++++++
[linuxglibc2.2]
  inherit       = linux

#++++++++++++++++++++++++++
[linuxglibc2.3]
  inherit       = linux

#++++++++++++++++++++++++++
[linuxglibc2.4]
  inherit       = linux

#++++++++++++++++++++++++++
[linuxglibc2.5]
  inherit       = linux

#++++++++++++++++++++++++++
[linuxglibc2.6]
  inherit       = linux

#++++++++++++++++++++++++++
[linuxglibc-unknown]
  inherit       = linux

#++++++++++++++++++++++++++
[linuxglibc-2_96]
# The GCC 2.96 shipped with RH 7.0 is severely broken. Do not use
# -ffloat-store otherwise fiWORD_FR_SFLO/fiSFLO_FR_WORD will not work.
  inherit	= linux
# On Linux Alpha, this option doesn't work.
  ieee-opts	= -mieee-fp

#++++++++++++++++++++++++++
[linuxglibc-2_96-alpha]
# The GCC 2.96 shipped with RH 7.0 is severely broken. Do not use
# -ffloat-store otherwise fiWORD_FR_SFLO/fiSFLO_FR_WORD will not work.
  inherit	= linux
  ieee-opts	= 

#++++++++++++++++++++++++++
[win32gcc]
  inherit=gcc
  cc-opts= -mno-cygwin
  link-opts= -mno-cygwin

#++++++++++++++++++++++++++
[win32msvc]
  compile-only	= /c 
  define	= /D
  define-sep	= true 	
  cc-name   = cl
  cc-opts   = /nologo /W0
  include	= /I 
  library	= 
  library-sep	= false 
  link-opts = /nologo /W0
  link-post = /link /stack:0x200000
  link-name = cl
  optimize  = /O2 
  output-name = /Fe
  output-name-sep = false
  expand-libs = true
  lib-ext   = lib
  lib-extra =
  debug = /Zi /Yd
 
#++++++++++++++++++++++++++
[axposf1-widget]
  inherit = axposf1v4

#++++++++++++++++++++++++++
[axposf1v3]
  cc-name = cc
  cc-debug = -g3
  link-debug = -g3
  comp-ieee-opts = -fprm d  -no_fp_reorder -ieee_with_inexact 
  link-ieee-opts = -fprm d  -ieee_with_inexact 
  cc-non-std-float =  -fprm d -fast 
  link-non-std-float =  -fprm d -fast 
  cc-opts = -w $?stdfloat $comp-ieee-opts : $cc-non-std-float  ;
  std-cc-opts = -std $cc-opts
  link-opts = $?stdfloat $link-ieee-opts : $link-non-std-float ;
  include-sep = false
  output-name-sep = true
  libpath-sep = false
  profile       = -pg 
  cc-optimize      = -O3
  link-optimize      = -O3
  fortran-name-scheme = underscore
  fortran-cmplx-fns = disallowed
  fortran-libraries = -lfor
  debug-optimize-ok = true
  debug-profile-ok  = true 

#++++++++++++++++++++++++++
[axposf1v4]
  cc-name = cc
  cc-debug = -g3
  link-debug = -g3
  comp-ieee-opts = -fprm d  -no_fp_reorder -ieee_with_inexact 
  link-ieee-opts = -fprm d  -no_fp_reorder -ieee_with_inexact 
  cc-non-std-float =  -fprm d -fast 
  link-non-std-float =  -fprm d -fast 
  cc-opts = -w $?stdfloat $comp-ieee-opts : $cc-non-std-float  ;
  std-cc-opts = -std $cc-opts
  link-opts = $?stdfloat $link-ieee-opts : $link-non-std-float ;
  include-sep = false
  output-name-sep = true
  libpath-sep = false
  profile       = -pg 
  cc-optimize      = -O3
  link-optimize      = -O3
  fortran-name-scheme = underscore
  fortran-cmplx-fns = disallowed
  fortran-libraries = -lfor
  debug-optimize-ok = true
  debug-profile-ok  = true 

#++++++++++++++++++++++++++
[hpux-broken-opt]
  inherit=hpux
  optimize = 
  link-optimize = 
  non-std-float = 
  
#++++++++++++++++++++++++++
[hpux]
  std-cc-opts = -Ae  
  cc-opts = -Ae -w -D_HPUX_SOURCE
  optimize = -O +Oconservative +Onolimit
  link-optimize = -O +Oconservative
  link-opts = -Wl,+vnocompatwarnings
  non-std-float = -O
  fortran-name-scheme = no-underscore
  fortran-cmplx-fns = return-struct

[aix-rs6000]
  fortran-name-scheme = no-underscore
  fortran-cmplx-fns = disallowed

[rs4]
  cc-opts=-w
  optimize= -O2 -qmaxmem=6000
  local-optimize-more= -O3 -qmaxmem=10000
  inherit = aix-rs6000
  cc-non-std-float = $local-optimize-more
  link-non-std-float = 
  std-cc-non-std-float = $cc-non-std-float
  std-link-non-std-float =

[rs3.2]
  inherit = aix-rs6000

[rsgcc]
  inherit = gcc
  fortran-cmplx-fns = disallowed

[gcc]
  cc-name   = gcc
  link-name = gcc
  link-optimize = -O3
  optimize      = -O3
  debug-optimize-ok = true
  debug-profile-ok  = true 
# GCC 2.8.1 is pretty lax about -o and passes it straight to ld. This
# causes problems on RedHat Linux 5.2 where ld has an option -oformat
  output-name-sep = true
# On some platforms string literals are stored in read-only segments.
# This causes problems when users write Aldor programs in which a
# string literal is used as a buffer. The result is a segfault that
# is extremely hard to track down, even for experienced Aldor coders.
  gcc-hacks = -fwritable-strings

# ----
# These are to test various C generation options
[fortran-cmplx-void]
  fortran-cmplx-fns   = return-void
  fortran-name-scheme = underscore

[fortran-cmplx-struct]
  fortran-cmplx-fns = return-struct
  fortran-name-scheme = underscore
# ---

[default]
	# -g
   debug = -g
   cc-debug = $debug
   link-debug = $debug
   std-link-debug = $link-debug
   std-cc-debug = $cc-debug

	# -p 
   profile	= -pg 
   link-profile	= $profile 
   cc-profile   = $profile
   std-cc-profile = $cc-profile
   std-link-profile = $link-profile

	# -O 
   optimize	 = -O 
   link-optimize = $optimize 
   cc-optimize   = $optimize
   std-cc-optimize   = $cc-optimize   
   std-link-optimize = $link-optimize

	# -Wfnonstd 
   non-std-float = $optimize
   cc-non-std-float = $cc-optimize
   link-non-std-float = $link-optimize
   std-cc-non-std-float = $cc-optimize
   std-link-non-std-float = $link-optimize

	# -Wopts
   opts = 
   cc-opts = $opts
   link-opts = $opts
   std-cc-opts = $cc-opts
   std-link-opts = $link-opts

	# -Wpost
   post = 
   cc-post = $post
   link-post = $post
   std-cc-post = $cc-post
   std-link-post = $link-post

	# -Wtwixt
   twixt = 
   cc-twixt = $twixt
   link-twixt = $twixt
   std-cc-twixt = $cc-twixt
   std-link-twixt = $link-twixt

	# name
   cc-name	= gcc 
   link-name	= $cc-name 
   std-cc-name 	= $cc-name
   std-link-name = $std-cc-name 

	# -l 
   library	= -l 
   library-sep	= false 
   lib-extra	= m

	# -L 
   libpath	= -L 
   libpath-sep	= true 
   expand-libs	= false
   lib-ext = a
   library-default-path	= 


	# -D 
   define	= -D
   define-sep	= false 	

	# -U 
   undefine	= -U
   undefine-sep	= false 

	# -I 
   include	= -I 
   include-sep	= true 
   include-default-path	= 

	# -c 
   compile-only	= -c 

	# -o 
   output-name = -o
   output-name-sep = false

	# General things 
   debug-profile-ok	= false
   debug-optimize-ok	= false

	# Aldor looks for these things
   generate-stdc   = true
   fortran-libraries = 
   fortran-cmplx-fns = disallowed
   fortran-name-scheme = underscore


# ---
# Keys for NAG's f95 compiler on Unix
#    fortran-io-init-fun:      must have type () -> ()
[NAGWare-f95-compiler-unix]
  fortran-name-scheme = underscore-bug
  fortran-cmplx-fns = return-void
  fortran-libraries = -L/usr/local/lib/NAGWare -lf95 -lm
  fortran-io-init-fun = f90_io_init

# ---
# Keys for GNU f77
[GNU-f77-compiler-unix]
  fortran-name-scheme = underscore-bug
  fortran-cmplx-fns = return-void
  fortran-libraries = -lm

