From 5d3dba3ab8297a2a786b3f0e721ecd18b2c312cf Mon Sep 17 00:00:00 2001 From: jan Date: Thu, 20 Jun 2002 11:08:52 +0000 Subject: [PATCH] * aclocal.m4: Regenerate. * stepmake/aclocal.m4: Also set GUILE_PATCH_LEVEL. * config.hh.in: Only set GUILE_MAJOR_VERSION if necessary. * lily/include/lily-guile.hh: Only include config.h if necessary. --- ChangeLog | 7 +++++++ aclocal.m4 | 2 ++ config.hh.in | 16 +++++++++++++++- lily/include/lily-guile.hh | 18 +++++++++++++++++- stepmake/aclocal.m4 | 2 ++ 5 files changed, 43 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index d4a6d75251..1a26461b27 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,12 @@ 2002-06-20 Jan Nieuwenhuizen + * aclocal.m4: Regenerate. + + * stepmake/aclocal.m4: Also set GUILE_PATCH_LEVEL. + + * config.hh.in: Only set GUILE_MAJOR_VERSION if necessary. + * lily/include/lily-guile.hh: Only include config.h if necessary. + * Changlog: cvs changes ml archive test #8. * lily/slur-engraver.cc: Layout fix. diff --git a/aclocal.m4 b/aclocal.m4 index 13de08358c..4a7e7f0925 100644 --- a/aclocal.m4 +++ b/aclocal.m4 @@ -405,10 +405,12 @@ AC_DEFUN(STEPMAKE_GUILE_DEVEL, [ changequote(<<, >>)dnl GUILE_MAJOR_VERSION=`expr $guile_version : '\([0-9]*\)'` GUILE_MINOR_VERSION=`expr $guile_version : '[0-9]*\.\([0-9]*\)'` + GUILE_PATCH_LEVEL=`expr $guile_version : '[0-9]*\.[0-9]*\.\([0-9]*\)'` changequote([, ])dnl STEPMAKE_GUILE_FLAGS AC_DEFINE_UNQUOTED(GUILE_MAJOR_VERSION, $GUILE_MAJOR_VERSION) AC_DEFINE_UNQUOTED(GUILE_MINOR_VERSION, $GUILE_MINOR_VERSION) + AC_DEFINE_UNQUOTED(GUILE_PATCH_LEVEL, $GUILE_PATCH_LEVEL) ]) diff --git a/config.hh.in b/config.hh.in index b5e4575dc4..6c58034b22 100644 --- a/config.hh.in +++ b/config.hh.in @@ -73,8 +73,22 @@ /* define if you have sys/stat.h */ #define STAT_MACROS_BROKEN 0 + +/* GUILE only includes version in headers (libguile/version.h) as of + 1.5.x. For some strange reason, they call it SCM.*VERSION. */ +#include + +#ifndef GUILE_MAJOR_VERSION +#ifdef SCM_MAJOR_VERSION +#define GUILE_MAJOR_VERSION SCM_MAJOR_VERSION +#define GUILE_MINOR_VERSION SCM_MINOR_VERSION +#define GUILE_PATCH_LEVEL SCM_MICRO_VERSION +#else /* define GUILE major version */ #define GUILE_MAJOR_VERSION 0 - /* define GUILE minor version */ #define GUILE_MINOR_VERSION 0 +/* define GUILE patch level */ +#define GUILE_PATCH_LEVEL 0 +#endif +#endif diff --git a/lily/include/lily-guile.hh b/lily/include/lily-guile.hh index deda57935f..c9b0ee0e62 100644 --- a/lily/include/lily-guile.hh +++ b/lily/include/lily-guile.hh @@ -11,7 +11,6 @@ #define SCM_VOIDP_TEST -#include /* TODO: the GH interface is deprecated as of GUILE 1.6 @@ -20,7 +19,24 @@ */ #include + +/* GUILE only includes version in headers (libguile/version.h) as of + 1.5.x. For some strange reason, they call it SCM.*VERSION. + + Not including config.h here, saves a lot of unnecessary + recompiles. */ +#include + +#ifndef GUILE_MAJOR_VERSION +#ifdef SCM_MAJOR_VERSION +#define GUILE_MAJOR_VERSION SCM_MAJOR_VERSION +#define GUILE_MINOR_VERSION SCM_MINOR_VERSION +#define GUILE_PATCH_LEVEL SCM_MICRO_VERSION +#else #include "config.h" +#endif +#endif + #include "drul-array.hh" diff --git a/stepmake/aclocal.m4 b/stepmake/aclocal.m4 index b63198794a..d076ebc03a 100644 --- a/stepmake/aclocal.m4 +++ b/stepmake/aclocal.m4 @@ -402,10 +402,12 @@ AC_DEFUN(STEPMAKE_GUILE_DEVEL, [ changequote(<<, >>)dnl GUILE_MAJOR_VERSION=`expr $guile_version : '\([0-9]*\)'` GUILE_MINOR_VERSION=`expr $guile_version : '[0-9]*\.\([0-9]*\)'` + GUILE_PATCH_LEVEL=`expr $guile_version : '[0-9]*\.[0-9]*\.\([0-9]*\)'` changequote([, ])dnl STEPMAKE_GUILE_FLAGS AC_DEFINE_UNQUOTED(GUILE_MAJOR_VERSION, $GUILE_MAJOR_VERSION) AC_DEFINE_UNQUOTED(GUILE_MINOR_VERSION, $GUILE_MINOR_VERSION) + AC_DEFINE_UNQUOTED(GUILE_PATCH_LEVEL, $GUILE_PATCH_LEVEL) ]) -- 2.39.5