- output_file = opt_output.value
- boost = opt_boost.value
- no_cc = opt_no_cc.value
- var ext = opt_extension_prefix.value
- if ext != null then ext_prefix = ext else ext_prefix = ""
- 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
- compdir += ext_prefix
-
- clibdir = opt_clibdir.value
- if clibdir == null then
- var dir = once ("NIT_DIR".to_symbol).environ
- if dir.is_empty then
- 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
- fatal_error(null, "Error: Cannot locate NIT C library directory. Uses --clibdir or envvar NIT_DIR.")
- end
- end
- bindir = opt_bindir.value
-
- if bindir == null then
- var dir = once ("NIT_DIR".to_symbol).environ
- if dir.is_empty then
- dir = "{sys.program_name.dirname}/../bin"
- if dir.file_exists then bindir = dir
- else
- dir = "{dir}/bin"
- if dir.file_exists then bindir = dir
- end
- if bindir == null then
- fatal_error(null, "Error: Cannot locate NIT tools directory. Uses --bindir or envvar NIT_DIR.")
- end
- end
- end