]> git.donarmstrong.com Git - lilypond.git/commitdiff
*** empty log message ***
authorhanwen <hanwen>
Fri, 8 Oct 2004 09:59:28 +0000 (09:59 +0000)
committerhanwen <hanwen>
Fri, 8 Oct 2004 09:59:28 +0000 (09:59 +0000)
SConstruct
lily/include/guile-compatibility.hh [new file with mode: 0644]

index 6d67479f467ad8d5e05e5a7be16de4003cbc5bba..6c6a032964879f6580d425d7dd04477bce70c8de 100644 (file)
@@ -385,12 +385,13 @@ def configure (target, source, env):
        if env['fast']:
                # Using CCFLAGS = -I<system-dir> rather than CPPPATH = [
                # <system-dir>] speeds up SCons
+               print 'cpp', env['CPPPATH']
                env['CCFLAGS'] += map (lambda x: '-I' + x,
                                       env['CPPPATH'][len (cpppath):])
                env['CPPPATH'] = cpppath
 
        if required:
-               print
+F              print
                print '********************************'
                print 'Please install required packages'
                for i in required:
diff --git a/lily/include/guile-compatibility.hh b/lily/include/guile-compatibility.hh
new file mode 100644 (file)
index 0000000..13a1607
--- /dev/null
@@ -0,0 +1,68 @@
+/* 
+  guile-compatibility.hh -- declare compat functions for GUILE 1.6
+  
+  source file of the GNU LilyPond music typesetter
+  
+  (c) 2004 Han-Wen Nienhuys <hanwen@xs4all.nl>
+  
+*/
+
+#ifndef GUILE_COMPATIBILITY_HH
+#define GUILE_COMPATIBILITY_HH
+
+
+
+#if SCM_MINOR_VERSION < 7
+/* guile-1.6.x compatibility */
+
+inline SCM scm_cdr (SCM x)
+{
+  if (SCM_NCONSP(x))
+    abort();
+  return SCM_CDR (x);
+}
+inline SCM scm_car (SCM x)
+{
+  if (SCM_NCONSP(x))
+    abort();    
+  return SCM_CAR (x);
+}
+inline SCM scm_caar (SCM x) { return SCM_CAAR (x); }
+inline SCM scm_cdar (SCM x) { return SCM_CDAR (x); }
+inline SCM scm_cadr (SCM x) { return SCM_CADR (x); }
+inline SCM scm_cddr (SCM x) { return SCM_CDDR (x); }
+inline SCM scm_caddr (SCM x) { return SCM_CADDR (x); }
+inline SCM scm_cdadr (SCM x) { return SCM_CDADR (x); }
+inline SCM scm_caadr (SCM x) { return SCM_CAADR (x); }
+inline SCM scm_cadar (SCM x) { return SCM_CADAR (x); }
+#define scm_gc_unregister_collectable_memory(a, b, c) scm_done_free (b)
+#define scm_gc_register_collectable_memory(a, b, c) scm_done_malloc (b)
+#define SCM_VECTOR_REF(v,i) (SCM_VELTS ((v))[(i)])
+#define scm_from_int(x) SCM_MAKINUM (x)
+#define scm_is_integer(x) SCM_INUMP (x)
+#define scm_is_string(x) SCM_STRINGP(x)
+#define scm_hash_table_p scm_vector_p
+#define scm_i_string_chars(x) SCM_STRING_CHARS(x)
+#define scm_i_string_length(x) SCM_STRING_LENGTH(x)
+inline bool ly_c_number_p (SCM x) { return SCM_NUMBERP (x); }
+#define scm_is_number(x) (scm_number_p(x)==SCM_BOOL_T)
+inline int ly_scm2int (SCM x) { return scm_num2int (x, 0, "ly_scm2int"); }
+#define scm_to_int(x) (ly_scm2int(x))
+inline bool ly_c_symbol_p (SCM x) { return SCM_SYMBOLP (x); }
+#define scm_is_symbol(x) ly_c_symbol_p(x)
+inline bool ly_c_boolean_p (SCM x) { return SCM_BOOLP (x); }
+#define scm_is_bool(x) ly_c_boolean_p(x)
+inline bool ly_c_eq_p (SCM x, SCM y) { return SCM_EQ_P (x, y); }
+#define scm_is_eq(x,y)  (SCM_EQ_P((x), (y)))
+
+#define scm_is_pair(x) (SCM_CONSP(x))
+
+
+inline double ly_scm2double (SCM x) { return scm_num2dbl (x, "ly_scm2double"); }
+#define scm_to_double(x) (ly_scm2double(x))
+#define scm_from_double(x) (scm_make_real(x))
+
+
+
+#endif /* SCM_MINOR_VERSION < 7 */
+#endif /* GUILE_COMPATIBILITY_HH */