From 38655bc28e73a0b218ba1582bdb84bab0fdfec4b Mon Sep 17 00:00:00 2001 From: Jan Nieuwenhuizen Date: Tue, 18 Jun 2002 15:46:03 +0000 Subject: [PATCH] * Documentation/windows/zlily-profile.sh: * Documentation/windows/post-lilypond.sh: Assume normal prefix=/usr for lilypond. * lily/musical-request.cc (length_mom): Display origin with error. * lily/lily-guile.cc (ly_pair_p): [PARANOID]: Check for freed cells. * lily/part-combine-music-iterator.cc (get_state): Bugfix: use ly_symbol2scm to get a scm symbol (rather than ly_str02scm). * aclocal.m4: * autogen.sh: Regenerate. * Documentation/topdocs/INSTALL.texi: * configure.in: * stepmake/configure.in: * stepmake/aclocal.m4: Revert autoconf upgrade. Autoconf 2.53 has a serious bug wrt AC_CONFIG_AUX_DIR (reported). Creating ./configure once again requires autoconf == 2.13. * stepmake/autogen.sh: Check for autoconf == 2.13. --- ChangeLog | 28 ++++++++++++++++++++++++++ Documentation/topdocs/INSTALL.texi | 2 +- Documentation/windows/post-lilypond.sh | 7 ++++--- Documentation/windows/zlily-profile.sh | 5 +++-- VERSION | 2 +- aclocal.m4 | 15 +++++++------- autogen.sh | 12 +++++------ configure.in | 7 +++---- lily/include/lily-guile.hh | 7 ++++++- lily/lily-guile.cc | 22 ++++++++++++++++++++ lily/musical-request.cc | 4 ++-- lily/part-combine-music-iterator.cc | 19 +++++++++++------ make/lilypond-vars.make | 2 +- stepmake/aclocal.m4 | 15 +++++++------- stepmake/autogen.sh | 12 +++++------ stepmake/configure.in | 5 ++--- 16 files changed, 112 insertions(+), 52 deletions(-) diff --git a/ChangeLog b/ChangeLog index dce7808ecb..a1987a81cd 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,31 @@ +2002-06-18 Jan Nieuwenhuizen + + * Documentation/windows/zlily-profile.sh: + * Documentation/windows/post-lilypond.sh: Assume normal + prefix=/usr for lilypond. + + * lily/musical-request.cc (length_mom): Display origin with error. + + * input/test/duration-check.ly: New file. + + * lily/lily-guile.cc (ly_pair_p): [PARANOID]: Check for freed + cells. + + * lily/part-combine-music-iterator.cc (get_state): Bugfix: use + ly_symbol2scm to get a scm symbol (rather than ly_str02scm). + + * aclocal.m4: + * autogen.sh: Regenerate. + + * Documentation/topdocs/INSTALL.texi: + * configure.in: + * stepmake/configure.in: + * stepmake/aclocal.m4: Revert autoconf upgrade. Autoconf 2.53 has + a serious bug wrt AC_CONFIG_AUX_DIR (reported). Creating + ./configure once again requires autoconf == 2.13. + + * stepmake/autogen.sh: Check for autoconf == 2.13. + 2002-06-18 Han-Wen Nienhuys * lily/parser.yy (open_request_parens): add input locations to diff --git a/Documentation/topdocs/INSTALL.texi b/Documentation/topdocs/INSTALL.texi index df2bc044d0..be3b0ca6d3 100644 --- a/Documentation/topdocs/INSTALL.texi +++ b/Documentation/topdocs/INSTALL.texi @@ -377,7 +377,7 @@ You can also compile a RPM for SUSE yourself. A spec file is in the Red Hat RPM. You must have the following packages: guile tcsh tetex te_latex te_kpath -te_mpost libpng python gpp libgpp gettext autoconf253 netpbm libnetpb +te_mpost libpng python gpp libgpp gettext autoconf netpbm libnetpb gs_serv gs_lib gs_fonts guile @subsection Slackware diff --git a/Documentation/windows/post-lilypond.sh b/Documentation/windows/post-lilypond.sh index a94028275c..113a176476 100644 --- a/Documentation/windows/post-lilypond.sh +++ b/Documentation/windows/post-lilypond.sh @@ -5,8 +5,9 @@ rm `find /var/lib/texmf -name 'feta*pk' -or -name 'feta*tfm' -or -name 'parmesan*pk' -or -name 'parmesan*tfm' -print'` # rm /tmp/.lilypond-install -rm -f /usr/lilypond -lily=@prefix@ -ln -s $lily /usr/lilypond +# needed for prefix=lilypond-x.y.z +#rm -f /usr/lilypond +#lily=@prefix@ +#ln -s $lily /usr/lilypond diff --git a/Documentation/windows/zlily-profile.sh b/Documentation/windows/zlily-profile.sh index 36e5b189a3..1fa9d011cf 100644 --- a/Documentation/windows/zlily-profile.sh +++ b/Documentation/windows/zlily-profile.sh @@ -25,8 +25,9 @@ export WINDOWS_TEXINPUTS WINDOWS_TFMFONTS WINDOWS_MFINPUTS GS_FONTPATH="$WINDOWS_GS_FONTPATH" GS_LIB="$WINDOWS_GS_LIB" -PATH="/usr/lilypond/bin:$PATH" -PATH="@prefix@/bin:$PATH" +# needed for prefix=lilypond-x.y.z +# PATH="/usr/lilypond/bin:$PATH" +# PATH="@prefix@/bin:$PATH" cat <= 2.50 +# Be paranoid: check for autoconf == 2.13 # Some setups have both autoconf 2.13 and 2.50 available through # a wrapper script: /usr/bin/autoconf. -# This wrapper may correctly autoselect autoconf 2.50, but it +# This wrapper may incorrectly autoselect autoconf 2.50, but it # advertises itself as autoconf 2.13. # If you have such a setup, invoke this script as: -# autoconf=autoconf ./autogen.sh -for i in in autoconf autoconf2.50 false; do +# autoconf=autoconf2.13 ./autogen.sh +for i in autoconf autoconf2.13 false; do version=`$i --version 2>/dev/null | head -1 | awk '{print $NF}' | awk -F. '{print $1 * 100 + $2}'` - if test "0$version" -ge 250; then + if test "0$version" -eq 213; then autoconf=$i break fi done if test -z "$autoconf"; then - echo "ERROR: Please install autoconf 2.50 or newer" + echo "ERROR: Please install autoconf 2.13" exit 1 fi diff --git a/configure.in b/configure.in index c995b8e803..6f70a28f43 100644 --- a/configure.in +++ b/configure.in @@ -2,8 +2,7 @@ dnl configure.in -*-shell-script-*- dnl Process this file with autoconf to produce a configure script. # Bootstrap the init proces. List a file identifies your package. -AC_INIT -AC_CONFIG_SRCDIR([make/lilypond.lsm.in]) +AC_INIT(make/lilypond.lsm.in) AC_CONFIG_HEADER($CONFIGFILE.h:config.hh.in) # Bootstrap StepMake configure @@ -36,8 +35,8 @@ STEPMAKE_MAKEINFO(REQUIRED) STEPMAKE_PYTHON_DEVEL(REQUIRED) -# AC_CHECK_HEADERS([limits.h malloc.h string.h unistd.h values.h]) -AC_CHECK_HEADERS([assert.h sys/stat.h]) +# AC_HAVE_HEADERS(limits.h malloc.h string.h unistd.h values.h) +AC_HAVE_HEADERS(assert.h sys/stat.h) AC_HEADER_STAT AC_FUNC_MEMCMP diff --git a/lily/include/lily-guile.hh b/lily/include/lily-guile.hh index 7fb9c8025b..6b13fc9eb8 100644 --- a/lily/include/lily-guile.hh +++ b/lily/include/lily-guile.hh @@ -23,6 +23,7 @@ #include "config.h" #include "drul-array.hh" + /* Guile 1.3.4 compatibility */ #if GUILE_MINOR_VERSION < 4 @@ -69,7 +70,6 @@ #endif - #include "direction.hh" #include "flower-proto.hh" @@ -168,7 +168,12 @@ inline SCM ly_assoc_front_x(SCM alist, SCM key, SCM val) { return scm_acons(key, val, scm_assoc_remove_x (alist, key)); } +#ifdef PARANOID +#define gh_pair_p ly_pair_p +bool ly_pair_p (SCM x); +#else inline bool ly_pair_p (SCM x) { return SCM_NFALSEP (scm_pair_p (x)); } +#endif inline bool ly_symbol_p (SCM x) { return SCM_SYMBOLP (x); } inline bool ly_number_p (SCM x) { return SCM_NUMBERP (x); } inline bool ly_procedure_p (SCM x) { return SCM_NFALSEP (scm_procedure_p(x)); } diff --git a/lily/lily-guile.cc b/lily/lily-guile.cc index d490e50f60..dbd2a90a56 100644 --- a/lily/lily-guile.cc +++ b/lily/lily-guile.cc @@ -25,6 +25,28 @@ #include "pitch.hh" #include "dimensions.hh" +#ifdef PARANOID +#include +#undef gh_pair_p +bool +ly_pair_p (SCM x) +{ +#if 0 + assert (!SCM_CONSP (x) || (*(scm_t_bits*) SCM2PTR (SCM_CAR (x))) != scm_tc_free_cell); + assert (!SCM_CONSP (x) || (*(scm_t_bits*) SCM2PTR (SCM_CDR (x))) != scm_tc_free_cell); +#elif GUILE_MINOR_VERSION < 5 + assert (!SCM_CONSP (x) || !SCM_FREEP (SCM_CAR (x))); + assert (!SCM_CONSP (x) || !SCM_FREEP (SCM_CDR (x))); +#else + assert (!SCM_CONSP (x) || !SCM_FREE_CELL_P (SCM_CAR (x))); + assert (!SCM_CONSP (x) || !SCM_FREE_CELL_P (SCM_CDR (x))); +#endif + //return SCM_NFALSEP (scm_pair_p (x)); + return gh_pair_p (x); +} +#define gh_pair_p ly_pair_p +#endif + SCM ly_last (SCM list) { diff --git a/lily/musical-request.cc b/lily/musical-request.cc index 28aee7f944..6138a8daf9 100644 --- a/lily/musical-request.cc +++ b/lily/musical-request.cc @@ -38,10 +38,10 @@ Rhythmic_req::length_mom () const if (!d) { Moment m ; - programming_error("Rhythmic_req has no duration"); + //programming_error("Rhythmic_req has no duration"); + origin ()->warning ("programming error: Rhythmic_req has no duration"); return m; } - return d->length_mom (); } diff --git a/lily/part-combine-music-iterator.cc b/lily/part-combine-music-iterator.cc index 7c6b0d6c70..3e0fccef6e 100644 --- a/lily/part-combine-music-iterator.cc +++ b/lily/part-combine-music-iterator.cc @@ -132,7 +132,14 @@ get_music_info (Moment m, Music_iterator* iter, SCM *pitches, SCM *durations) if (Melodic_req *r = dynamic_cast (m)) *pitches = gh_cons (r->get_mus_property ("pitch"), *pitches); if (Rhythmic_req *r = dynamic_cast (m)) - *durations = gh_cons (r->get_mus_property ("duration"), *durations); + { + SCM d = r->get_mus_property ("duration"); + if (d == SCM_EOL) + r->origin ()->warning ("Rhythmic_req has no duration\n"); + else + // *durations = gh_cons (r->get_mus_property ("duration"), *durations); + *durations = gh_cons (d, *durations); + } } } } @@ -202,25 +209,25 @@ Part_combine_music_iterator::get_state (Moment) if (first_pitches != SCM_EOL && second_pitches != SCM_EOL) { scm_sort_list_x (first_pitches, - scm_primitive_eval (ly_str02scm ("Pitch::less_p"))); + scm_primitive_eval (ly_symbol2scm ("Pitch::less_p"))); scm_sort_list_x (second_pitches, - scm_primitive_eval (ly_str02scm ("Pitch::less_p"))); + scm_primitive_eval (ly_symbol2scm ("Pitch::less_p"))); interval = gh_int2scm (unsmob_pitch (ly_car (first_pitches))->steps () - unsmob_pitch (ly_car (scm_last_pair (second_pitches)))->steps ()); } - + if (first_durations != SCM_EOL) { scm_sort_list_x (first_durations, - scm_primitive_eval (ly_str02scm ("Duration::less_p"))); + scm_primitive_eval (ly_symbol2scm ("Duration::less_p"))); first_mom += unsmob_duration (ly_car (first_durations))->length_mom (); } if (second_durations != SCM_EOL) { scm_sort_list_x (second_durations, - scm_primitive_eval (ly_str02scm ("Duration::less_p"))); + scm_primitive_eval (ly_symbol2scm ("Duration::less_p"))); second_mom += unsmob_duration (ly_car (second_durations))->length_mom (); } diff --git a/make/lilypond-vars.make b/make/lilypond-vars.make index 631b5dbd9a..42dc6bc303 100644 --- a/make/lilypond-vars.make +++ b/make/lilypond-vars.make @@ -20,7 +20,7 @@ export TFMFONTS:= export extra_mem_top=1000000 export extra_mem_bottom=1000000 -export pool_size=250000 +export pool_size=500000 ifdef DEB_BUILD diff --git a/stepmake/aclocal.m4 b/stepmake/aclocal.m4 index d0910b11b3..b63198794a 100644 --- a/stepmake/aclocal.m4 +++ b/stepmake/aclocal.m4 @@ -193,7 +193,7 @@ AC_DEFUN(STEPMAKE_COMPILE, [ ]) AC_DEFUN(STEPMAKE_CXX, [ - AC_LANG([C++]) + AC_LANG_CPLUSPLUS AC_PROG_CXX STEPMAKE_OPTIONAL_REQUIRED(CXX, c++, $1) @@ -248,8 +248,7 @@ AC_DEFUN(STEPMAKE_END, [ AC_SUBST(OPTIONAL) AC_SUBST(REQUIRED) - AC_CONFIG_FILES([$CONFIGFILE.make:config.make.in]) -AC_OUTPUT + AC_OUTPUT($CONFIGFILE.make:config.make.in) if test -n "$OPTIONAL"; then @@ -292,7 +291,7 @@ AC_DEFUN(STEPMAKE_FLEX, [ # AC_PROG_LEX # urg: automake 1.3: hope this doesn't break 1.2 ac_cv_pro_lex_root hack... - # AC_PROG_LEX() + # AC_DECL_YYTEXT # ugh, ugh ac_cv_prog_lex_root=lex.yy STEPMAKE_PROGS(FLEX, flex, $1) @@ -300,7 +299,7 @@ AC_DEFUN(STEPMAKE_FLEX, [ AC_DEFUN(STEPMAKE_FLEXLEXER, [ - AC_CHECK_HEADERS([FlexLexer.h],[true],[false]) + AC_HAVE_HEADERS(FlexLexer.h, true, false) if test $? -ne 0; then warn='FlexLexer.h (flex package)' STEPMAKE_ADD_ENTRY($1, $warn) @@ -619,9 +618,9 @@ AC_DEFUN(STEPMAKE_KPATHSEA, [ [kpathsea_b=$with_kpathsea]) if test "$kpathsea_b" != "no"; then - AC_CHECK_HEADERS([kpathsea/kpathsea.h]) + AC_HAVE_HEADERS(kpathsea/kpathsea.h) AC_CHECK_LIB(kpathsea, kpse_find_file) - AC_CHECK_FUNCS(kpse_find_file,, AC_MSG_ERROR([Cannot find kpathsea functions. You should install kpathsea; see INSTALL.txt. Rerun ./configure --without-kpathsea only if kpathsea is not available for your platform.])) + AC_CHECK_FUNCS(kpse_find_file,, AC_ERROR(Cannot find kpathsea functions. You should install kpathsea; see INSTALL.txt. Rerun ./configure --without-kpathsea only if kpathsea is not available for your platform.)) fi AC_MSG_CHECKING(whether to use kpathsea) if test "$kpathsea_b" != no; then @@ -771,7 +770,7 @@ AC_DEFUN(STEPMAKE_PERL, [ AC_DEFUN(STEPMAKE_PYTHON_DEVEL, [ - AC_CHECK_HEADERS([python2.2/Python.h python2.1/Python.h python2.0/Python.h python2/Python.h python/Python.h python1.5/Python.h Python.h],[PYTHON_HEADER=yes]) + AC_HAVE_HEADERS(python2.2/Python.h python2.1/Python.h python2.0/Python.h python2/Python.h python/Python.h python1.5/Python.h Python.h, PYTHON_HEADER=yes) if test -z "$PYTHON_HEADER"; then warn='python.h (python-devel, python-dev or libpython-dev package)' STEPMAKE_ADD_ENTRY($1, $warn) diff --git a/stepmake/autogen.sh b/stepmake/autogen.sh index 52245ef464..ad9781b51c 100755 --- a/stepmake/autogen.sh +++ b/stepmake/autogen.sh @@ -3,23 +3,23 @@ srcdir=`dirname $0` -# Be paranoid: check for autoconf >= 2.50 +# Be paranoid: check for autoconf == 2.13 # Some setups have both autoconf 2.13 and 2.50 available through # a wrapper script: /usr/bin/autoconf. -# This wrapper may correctly autoselect autoconf 2.50, but it +# This wrapper may incorrectly autoselect autoconf 2.50, but it # advertises itself as autoconf 2.13. # If you have such a setup, invoke this script as: -# autoconf=autoconf ./autogen.sh -for i in in autoconf autoconf2.50 false; do +# autoconf=autoconf2.13 ./autogen.sh +for i in autoconf autoconf2.13 false; do version=`$i --version 2>/dev/null | head -1 | awk '{print $NF}' | awk -F. '{print $1 * 100 + $2}'` - if test "0$version" -ge 250; then + if test "0$version" -eq 213; then autoconf=$i break fi done if test -z "$autoconf"; then - echo "ERROR: Please install autoconf 2.50 or newer" + echo "ERROR: Please install autoconf 2.13" exit 1 fi diff --git a/stepmake/configure.in b/stepmake/configure.in index 4bf5091dfe..1d1c3c8865 100644 --- a/stepmake/configure.in +++ b/stepmake/configure.in @@ -2,8 +2,7 @@ dnl configure.in -*-shell-script-*- dnl Process this file with autoconf to produce a configure script. # Bootstrap the init proces. List a file identifies your package. -AC_INIT -AC_CONFIG_SRCDIR([make/stepmake.lsm.in]) +AC_INIT(make/stepmake.lsm.in) AC_CONFIG_HEADER($CONFIGFILE.h:config.hh.in) # Bootstrap StepMake configure @@ -14,7 +13,7 @@ STEPMAKE_INIT # Uncomment the configuration options your package needs. # STEPMAKE_COMPILE -# AC_CHECK_HEADERS([limits.h malloc.h string.h unistd.h values.h]) +# AC_HAVE_HEADERS(limits.h malloc.h string.h unistd.h values.h) # STEPMAKE_CXX # STEPMAKE_GXX # STEPMAKE_CXXTEMPLATE -- 2.39.2