]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/main.cc
release: 1.0.16
[lilypond.git] / lily / main.cc
index 767e106f235ae296e07c54947743dc4c238addcb..87af66cfe98a04db6f1ca30bc3cdc02ce891e352 100644 (file)
@@ -10,8 +10,6 @@
 #include <iostream.h>
 #include <assert.h>
 #include <locale.h>
-#include "lily-guile.hh"
-
 #include "proto.hh"
 #include "dimensions.hh"
 #include "plist.hh"
@@ -25,7 +23,7 @@
 #include "debug.hh"
 #include "ps-lookup.hh"
 #include "tex-lookup.hh"
-
+#include "lily-guile.hh"
 
 #if HAVE_GETTEXT
 #include <libintl.h>
@@ -188,19 +186,19 @@ identify ()
   *mlog << get_version_str () << endl;
 }
 
-#if 0
-void
+void 
 guile_init ()
 {
+#ifdef   HAVE_LIBGUILE
    gh_eval_str ("(define (add-column p) (display \"adding column (in guile): \") (display p) (newline))");
-}
 #endif
+}
 
-void
+int
 main_prog (int argc, char **argv)
 {
-  //guile_init ();
-
+  guile_init ();
+  
   // facilitate binary distributions
   char const *env_lily = getenv ("LILYPONDPREFIX");
   String prefix_directory;
@@ -239,9 +237,8 @@ main_prog (int argc, char **argv)
       global_path.add (prefix_directory + "/share/lilypond");
     }
 
-  global_path.add (String (DIR_DATADIR) + "/init/");
-
-  global_path.push (DIR_DATADIR);
+  global_path.add (String (DIR_DATADIR) + "/ly/");
+  global_path.add (String (DIR_DATADIR) + "/afm/");  
 
   Getopt_long oparser (argc, argv,theopts);
   String init_str;
@@ -340,13 +337,6 @@ main_prog (int argc, char **argv)
       do_one_file (i, default_outname_base_global);
     }
 
-//  return exit_status_i_;
-}
-
-int
-main (int argc, char **argv)
-{
-  gh_enter (argc, argv, (void(*)())main_prog);
   return exit_status_i_;
 }
 
@@ -387,3 +377,19 @@ distill_inname_str (String name_str, String& ext_r)
   return str;
 }
 
+
+#ifdef HAVE_LIBGUILE
+int
+main (int argc, char **argv)
+{
+  gh_enter (argc, argv, (void(*)())main_prog);
+  return exit_status_i_;
+}
+
+#else
+int main (int argc, char **argv)
+{
+  return main_prog (argc, argv);
+}
+
+#endif