-int
-main (int argc, char **argv)
-{
- Getopt_long oparser(argc, argv,theopts);
- cout << get_version_str() << endl;
- String init_str("symbol.ini");
-
- while (Long_option_init * opt = oparser()) {
- switch ( opt->shortname){
+void
+main_prog (int argc, char **argv)
+{
+ // facilitate binary distributions
+ char const *env_lily = getenv ("LILYPONDPREFIX");
+ String prefix_directory;
+ if (env_lily)
+ prefix_directory = env_lily;
+
+#if HAVE_GETTEXT
+ setlocale (LC_ALL, ""); /* enable locales */
+ setlocale (LC_NUMERIC, "C"); /* musn't have comma's in TeX output... */
+ String lily_locale_dir;
+ String name (PACKAGE);
+ name.to_lower ();
+ if (!prefix_directory.empty_b())
+ {
+ lily_locale_dir = prefix_directory + "/share/locale";
+ bindtextdomain (name.ch_C (), lily_locale_dir.ch_C());
+ }
+ else
+ bindtextdomain (name.ch_C (), DIR_LOCALEDIR);
+ textdomain (name.ch_C ());
+#endif
+
+ identify ();
+ call_constructors ();
+ debug_init (); // should be first
+
+ global_path.add ("");
+ // must override (come before) "/usr/local/share/lilypond"!
+ char const *env_sz = getenv ("LILYINCLUDE");
+ if (env_sz)
+ global_path.parse_path (env_sz);
+
+ if (!prefix_directory.empty_b())
+ {
+ global_path.add (prefix_directory + "/share/lilypond/init/");
+ global_path.add (prefix_directory + "/share/lilypond");
+ }
+
+ global_path.add (String (DIR_DATADIR) + "/ly/");
+ global_path.add (String (DIR_DATADIR) + "/afm/");
+
+ Getopt_long oparser (argc, argv,theopts);
+ String init_str;
+
+ String outname_str;
+ while (Long_option_init const * opt = oparser ())
+ {
+ switch (opt->shortname)
+ {
+ case 't':
+ experimental_features_global_b = true;
+ global_lookup_l = &ps_lookup;
+ *mlog << "*** enabling experimental features, you're on your own now ***\n";
+ break;