- option_context.add_option(opt_output, opt_boost, opt_no_cc, opt_attr_sim, opt_global, opt_clibdir, opt_bindir, opt_compdir, opt_extension_prefix)
- end
-
- redef meth process_options
- do
- super
- output_file = opt_output.value
- boost = opt_boost.value
- no_cc = opt_no_cc.value
- ext_prefix = opt_extension_prefix.value
- if ext_prefix == null then ext_prefix = ""
- attr_sim = opt_attr_sim.value
- global = opt_global.value
- compdir = opt_compdir.value
- if compdir == null then
- var dir = once ("NIT_COMPDIR".to_symbol).environ
- if not dir.is_empty then
- compdir = dir
- end
- if compdir == null then
- compdir = ".nit_compile"
- end
- end
-
- clibdir = opt_clibdir.value
- if clibdir == null then
- var dir = once ("NIT_DIR".to_symbol).environ
- if dir.is_empty then
- var dir = "{sys.program_name.dirname}/../lib"
- if dir.file_exists then clibdir = dir
- else
- dir = "{dir}/lib"
- if dir.file_exists then clibdir = dir
- end
- if clibdir == null then
- error("Error: Cannot locate NIT C library directory. Uses --clibdir or envvar NIT_DIR.")
- exit(1)
- end
- end
- bindir = opt_bindir.value