+#include "file-path.hh"
+#include "input-file-results.hh"
+#include "warn.hh"
+#include "lily-guile.hh"
+#include "paper-def.hh"
+#include "midi-def.hh"
+#include "global-ctor.hh"
+#include "kpath.hh"
+
+static int sane_putenv (char const* key, char const* value, bool overwrite = false);
+
+/*
+ Global options that can be overridden through command line.
+*/
+
+/* Write dependencies file? */
+bool dependency_global_b = false;
+
+/* Prepend to dependencies */
+String dependency_prefix_global;
+
+/* Names of header fields to be dumped to a separate file. */
+Array<String> dump_header_fieldnames_global;
+
+/* Name of initialisation file. */
+String init_name_global;
+
+/* Do not calculate and write paper output? */
+bool no_paper_global_b = false;
+
+/* Selected output format.
+ One of tex, ps, scm, as. */
+String output_format_global = "tex";
+
+/* Current output name. */
+String output_name_global;
+
+/* Run in safe mode? -- FIXME: should be re-analised */
+bool safe_global_b = false;
+
+/* Verbose progress indication? */
+bool verbose_global_b = false;
+
+/* Scheme code to execute before parsing, after .scm init */
+String init_scheme_code_string = "(begin #t ";
+
+
+/*
+ Misc. global stuff.
+ */
+
+
+All_font_metrics *all_fonts_global;
+int exit_status_global;
+File_path global_path;
+
+/* Number of current score output block. If there's more than one
+ score block, this counter will be added to the output filename. */
+int score_count_global;
+
+
+
+/*
+ File globals.
+ */
+
+/* The option parser */
+static Getopt_long *oparser_p_static = 0;
+
+/*
+ Internationalisation kludge in two steps:
+ * use _i () to get entry in POT file
+ * call gettext () explicitely for actual "translation"
+
+ Note: these messages all start with lower case (ie, don't
+ follow regular localisation guidelines).
+ */
+static Long_option_init options_static[] = {
+ {_i ("EXPR"), "evaluate", 'e',
+ _i ("set options, use -e '(ly-option-usage)' for help")},
+ /* another bug in option parser: --output=foe is taken as an abbreviation
+ for --output-format */
+ {_i ("EXT"), "format", 'f', _i ("use output format EXT")},
+ {0, "help", 'h', _i ("print this help")},
+ {_i ("FIELD"), "header", 'H', _i ("write header field to BASENAME.FIELD")},
+ {_i ("DIR"), "include", 'I', _i ("add DIR to search path")},
+ {_i ("FILE"), "init", 'i', _i ("use FILE as init file")},
+ {0, "dependencies", 'M', _i ("write Makefile dependencies for every input file")},
+ {0, "no-paper", 'm', _i ("produce MIDI output only")},
+ {_i ("FILE"), "output", 'o', _i ("write output to FILE")},
+ {_i ("DIR"), "dep-prefix", 'P', _i ("prepend DIR to dependencies")},
+#if 0
+ /*
+ should audit again.
+ */
+ {0, "safe", 's', _i ("inhibit file output naming and exporting")},
+#endif
+ {0, "version", 'v', _i ("print version number")},
+ {0, "verbose", 'V', _i ("be verbose")},
+ {0, "warranty", 'w', _i ("show warranty and copyright")},
+ {0,0,0,0}