#line 618 "/home/travis/build/felix-lang/felix/src/packages/flx.fdoc"
  class FlxControl
  {
  proc print_options(control:control_type) {
      println$ "NOOPTIMISE         = "+str control.NOOPTIMISE;
      println$ "STATIC             = "+str control.STATIC;
      println$ "ECHO               = "+str control.ECHO;
      println$ "NOSTDLIB           = "+str control.NOSTDLIB;
      println$ "DEBUG              = "+str control.DEBUG;
      println$ "DEBUG_COMPILER     = "+str control.DEBUG_COMPILER;
      println$ "STDIMPORT          = "+str control.STDIMPORT;
      println$ "STDGRAMMAR         = "+str control.STDGRAMMAR;
      println$ "IMPORTS            = "+str control.IMPORTS;
      println$ "RECOMPILE          = "+str control.RECOMPILE;
      println$ "FLXG_FORCE         = "+str control.FLXG_FORCE;
      println$ "cpps               = "+str control.cpps;
      println$ "cppos              = "+str control.cppos;
      println$ "TIME               = "+str control.TIME;
      println$ "COMPILER_TIME      = "+str control.COMPILER_TIME;
      println$ "BUNDLE_DIR         = "+str control.BUNDLE_DIR;
      println$ "RUNIT              = "+str control.RUNIT;
      println$ "CCOMPILEIT         = "+str control.CCOMPILEIT;
      println$ "LINKIT             = "+str control.LINKIT;
      println$ "RUNONLY            = "+str control.RUNONLY;
      println$ "CXXONLY            = "+str control.CXXONLY;
      println$ "FELIX              = "+str control.FELIX;
      println$ "LINKER_SWITCHES    = "+str control.LINKER_SWITCHES;
      println$ "LINKER_OUTPUT_FILENAME = "+str control.LINKER_OUTPUT_FILENAME;
      println$ "FLX_INTERFACE_FILENAME = "+str control.FLX_INTERFACE_FILENAME;
      println$ "CXX_INTERFACE_FILENAME = "+str control.CXX_INTERFACE_FILENAME;
      println$ "MACROS             = "+str control.MACROS;
      println$ "SHOWCODE           = "+str control.SHOWCODE;
      println$ "USAGE              = "+control.USAGE;
      println$ "DOREDUCE           = "+str control.DOREDUCE;
      println$ "OPTIMISE           = "+str control.OPTIMISE;
  }
  
  fun init_loopctl () => struct {
      // Argument parsing loop
      var argno=1;
      var grab=1;
      var path="";
      var ext="";
      var base="";
      var dir="";
      var progname = "";
  };
  typedef loopctl_type = typeof (#init_loopctl);
  
  fun dflt_control () =>
    struct {
  
      var FLX_INSTALL_DIR= ""; // now a temporary!
      var PRINT_HELP=0;
  
      var FLXG_FORCE=0;
      var RECOMPILE=0;
      var RUNIT=1;
      var CCOMPILEIT=1;
      var LINKIT=1;
      var LINKEXE=0; // default is to link a DLL
      var FELIX=1;
      var RUNONLY=0;
      var CXXONLY=0;
      var ECHO=0;
      var DEBUG_FLX=false;
      var VALIDATE_CACHE=1;
      var CHECK_DEPENDENCIES=1;
      var FLX_TOOLCHAIN="";
      var FLX_TARGET_SUBDIR="";
      // --------------------------------------------------
      // processing options
      // --------------------------------------------------
  
      var DIST_ROOT="";
      var DEBUG=0;
      var DEBUG_COMPILER=0;
      var COMPILER_PHASE="";
      var INLINE=25;
      var COMPILER_TIME=0;
      var TIME=0;
      var NOOPTIMISE=0;
      var DOREDUCE=1;
      var TIMECMD="time -p";
      var STATIC=0;
      var STATICLIB=0;
      var SHOWCODE=0;
      var CCFLAGS=Empty[string];
      var EXTRA_CCFLAGS=Empty[string];
      var EXTRA_PACKAGES=Empty[string];
      var LINKER_SWITCHES=Empty[string];
      var MACROS=Empty[string];
      var cpps=Empty[string];
      var cppos=Empty[string];
      var STANDARD_INCLUDE_FILES=Empty[string];
      var EXTRA_INCLUDE_DIRS=Empty[string];
      var EXTRA_INCLUDE_FILES=Empty[string];
      var FLX_STD_LIBS=Empty[string];
      var NOSTDLIB=0;
      var STDOUT="";
      var EXPECT="";
      var CHECK_EXPECT=0;
      var SET_STDIN=0;
      var STDIN="";
      var GRAMMAR_DIR="";
      var STDGRAMMAR="";
      var STDIMPORT="plat/flx.flxh";
      var AUTOMATON="";
      var IMPORTS=Empty[string];
      var USAGE = "production";
      var CLEAR_CACHE=0;
      var BUNDLE_DIR = match Env::getenv("FLX_BUNDLE_DIR") with | "" => None[string] | dir => Some dir endmatch;
  
      var DRIVER_EXE = ""; // dynamic linkage only
      var DRIVER_OBJS = Empty[string]; // static linkage only
      var LINK_STRINGS = Empty[string];
  
      var pkgs=Empty[string];
      var extra_pkgs = Empty[string];
      var FLXG = "";
      var FLXRUN = Empty[string];
      var LINKER_OUTPUT_FILENAME = "";
      var FLX_INTERFACE_FILENAME = "";
      var CXX_INTERFACE_FILENAME = "";
      var OUTPUT_FILENAME_SPECIFIED = 0;
      var OUTPUT_FILENAME_WITHOUT_EXTENSION_SPECIFIED = 0;
      var OUTPUT_DIRECTORY_SPECIFIED = 0;
      var USER_ARGS = Empty[string];
      var DLINK_STRINGS = Empty[string];
      var SLINK_STRINGS = Empty[string];
      var cache_time = 0.0;
      var INDIR = "";
      var INREGEX = "";
      var NONSTOP = 0;
      var OPTIMISE = list[string]$ "-O1";
      var FLXG_OPTIMISE= 0;
    }
  ;
  
  typedef control_type = typeof (#dflt_control);
  }