CVSROOT:        /cvsroot/lilypond
Module name:    lilypond
Branch:         
Changes by:     Jan Nieuwenhuizen <[EMAIL PROTECTED]>   05/04/17 09:38:04

Modified files:
        stepmake       : autogen.sh aclocal.m4 
        lily/include   : pango-font.hh all-font-metrics.hh 
        lily           : parser.yy font-config.cc 
        .              : configure.in autogen.sh SConstruct ChangeLog 

Log message:
        * stepmake/aclocal.m4 (STEPMAKE_PANGO_FT2): Define HAVE_PANGO16 too.
        
        * SConstruct (test_lib): New function.  Update pkg-config and some
        other requirements.
        
        * configure.in: Require pkg-config.  Enforce REQUIRE and version for
        freetype, pangof2t.

CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/lilypond/lilypond/stepmake/autogen.sh.diff?tr1=1.15&tr2=1.16&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/lilypond/lilypond/stepmake/aclocal.m4.diff?tr1=1.135&tr2=1.136&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/lilypond/lilypond/lily/include/pango-font.hh.diff?tr1=1.14&tr2=1.15&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/lilypond/lilypond/lily/include/all-font-metrics.hh.diff?tr1=1.19&tr2=1.20&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/lilypond/lilypond/lily/parser.yy.diff?tr1=1.464&tr2=1.465&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/lilypond/lilypond/lily/font-config.cc.diff?tr1=1.16&tr2=1.17&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/lilypond/lilypond/configure.in.diff?tr1=1.146&tr2=1.147&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/lilypond/lilypond/autogen.sh.diff?tr1=1.24&tr2=1.25&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/lilypond/lilypond/SConstruct.diff?tr1=1.68&tr2=1.69&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/lilypond/lilypond/ChangeLog.diff?tr1=1.3443&tr2=1.3444&r1=text&r2=text

Patches:
Index: lilypond/ChangeLog
diff -u lilypond/ChangeLog:1.3443 lilypond/ChangeLog:1.3444
--- lilypond/ChangeLog:1.3443   Sat Apr 16 14:55:31 2005
+++ lilypond/ChangeLog  Sun Apr 17 09:38:04 2005
@@ -1,3 +1,15 @@
+2005-04-17  Jan Nieuwenhuizen  <[EMAIL PROTECTED]>
+
+       * stepmake/aclocal.m4 (STEPMAKE_PANGO_FT2): Define HAVE_PANGO16 too.
+
+       * lily/*: s/ifdef HAVE_*/if have/.
+
+       * SConstruct (test_lib): New function.  Update pkg-config and some
+       other requirements.
+
+       * configure.in: Require pkg-config.  Enforce REQUIRE and version for
+       freetype, pangof2t.
+
 2005-04-16  Jan Nieuwenhuizen  <[EMAIL PROTECTED]>
 
        * po/lilypond.pot, ...: Update using bison-CVS.
Index: lilypond/SConstruct
diff -u lilypond/SConstruct:1.68 lilypond/SConstruct:1.69
--- lilypond/SConstruct:1.68    Mon Mar 28 21:44:14 2005
+++ lilypond/SConstruct Sun Apr 17 09:38:04 2005
@@ -237,12 +237,14 @@
 def configure (target, source, env):
        vre = re.compile ('^.*[^-.0-9]([0-9][0-9]*\.[0-9][.0-9]*).*$', 
re.DOTALL)
        def get_version (program):
-               command = '(%(program)s --version || %(program)s -V) 2>&1' % 
vars ()
+               command = '(pkg-config --modversion %(program)s || %(program)s 
--version || %(program)s -V) 2>&1' % vars ()
                pipe = os.popen (command)
                output = pipe.read ()
                if pipe.close ():
                        return None
                v = re.sub (vre, '\\1', output)
+               if v[-1] == '\n':
+                       v = v[:-1]
                return string.split (v, '.')
 
        def test_program (lst, program, minimal, description, package):
@@ -252,12 +254,28 @@
                        print 'not found'
                        lst.append ((description, package, minimal, program,
                                     'not installed'))
-                       return
+                       return 0
                sys.stdout.write (string.join (actual, '.'))
                sys.stdout.write ('\n')
                if actual < string.split (minimal, '.'):
                        lst.append ((description, package, minimal, program,
                                     string.join (actual, '.')))
+                       return 0
+               return 1
+
+       def test_lib (lst, program, minimal, description):
+               # FIXME: test for Debian or RPM (or -foo?) based dists
+               # to guess (or get correct!: apt-cache search?)
+               # package name.
+               #if os.system ('pkg-config --atleast-version=0 freetype2'):
+               # barf
+               if test_program (lst, program, minimal, description,
+                                'lib%(program)s-dev or %(program)s-devel'
+                                % vars ()):
+                       env.ParseConfig ('pkg-config --cflags --libs 
%(program)s'
+                                        % vars ())
+                       return 1
+               return 0
 
        for i in ['bash', 'perl', 'python', 'sh']:
                sys.stdout.write ('Checking for %s... ' % i)
@@ -283,12 +301,10 @@
                        'bison')
        test_program (required, 'flex', '0.0', 'Flex -- lexer generator', 
'flex')
 
-
        optional = []
        test_program (optional, 'makeinfo', '4.7', 'Makeinfo tool', 'texinfo')
-       test_program (optional, 'guile', '1.6', 'GUILE scheme',
-                       'libguile-dev or guile-devel')
-       test_program (optional, 'mftrace', '1.0.27', 'Metafont tracing Type1',
+       test_program (optional, 'guile', '1.6', 'GUILE scheme', 'guile')
+       test_program (optional, 'mftrace', '1.1.0', 'Metafont tracing Type1',
                        'mftrace')
        test_program (optional, 'perl', '4.0',
                        'Perl practical efficient readonly language', 'perl')
@@ -315,12 +331,10 @@
        defines = {
           'DIRSEP' : "'%s'" % os.sep,
           'PATHSEP' : "'%s'" % os.pathsep,
-          'TOPLEVEL_VERSION' : '"' + version + '"',
-          'PACKAGE': '"' + package.name + '"',
-          'DATADIR' : '"' + sharedir + '"',
-          'LILYPOND_DATADIR' : '"' + sharedir_package + '"',
-          'LOCAL_LILYPOND_DATADIR' : '"' + sharedir_package_version + '"',
-          'LOCALEDIR' : '"' + localedir + '"',
+          'PACKAGE': '"%s"' % package.name,
+          'DATADIR' : '"%s"' % sharedir,
+          'PACKAGE_DATADIR' : '"%s"' % sharedir_package,
+          'LOCALEDIR' : '"%s"' %localedir,
        }
        conf.env.Append (DEFINES = defines)
 
@@ -378,27 +392,32 @@
        #this could happen after flower...
        env.ParseConfig ('guile-config compile')
 
-       ## FIXME: pkg-test to required/optional
-       if os.system ('pkg-config --atleast-version=1.6.0 pango'):
-               barf
-       env.ParseConfig ('pkg-config --cflags --libs pango')
-       conf.env['DEFINES']['HAVE_PANGO16'] = '1'
-       
-       if os.system ('pkg-config --atleast-version=1.6.0 pangoft2'):
-               barf
-       env.ParseConfig ('pkg-config --cflags --libs pangoft2')
-       conf.env['DEFINES']['HAVE_PANGO_FT2'] = '1'
+       if test_lib (required, 'freetype2', '0.0',
+                    'Development files for FreeType 2 font engine'):
+               conf.env['DEFINES']['HAVE_FREETYPE2'] = '1'
+               
+       if test_lib (required, 'pangoft2', '1.6.0',
+                    'Development files for pango, with fontconfig2'):
+               conf.env['DEFINES']['HAVE_PANGO_FT2'] = '1'
+               conf.env['DEFINES']['HAVE_PANGO16'] = '1'
+
+       if test_lib (optional, 'fontconfig', '2.2.0',
+                    'Development files for fontconfig'):
+               conf.env['DEFINES']['HAVE_FONTCONFIG'] = '1'
        
        #this could happen only for compiling pango-*
        if env['gui']:
-               env.ParseConfig ('pkg-config --cflags --libs gtk+-2.0')
-               env.ParseConfig ('pkg-config --cflags --libs pango')
+               test_lib (required, 'gtk+-2.0', '2.4.0',
+                         'Development files for GTK+')
+               if test_lib (required, 'pango', '1.6.0',
+                         'Development files for pango'):
+                       conf.env['DEFINES']['HAVE_PANGO16'] = '1'
+                       
                if conf.CheckCHeader ('pango/pangofc-fontmap.h'):
                        conf.env['DEFINES']['HAVE_PANGO_PANGOFC_FONTMAP_H'] = 
'1'
-
                if conf.CheckLib ('pango-1.0',
                                  'pango_fc_font_map_add_decoder_find_func'):
-                       conf.env['DEFINES']['HAVE_PANGO_CVS'] = '1'
+                       conf.env['DEFINES']['HAVE_PANGO16'] = '1'
                        
conf.env['DEFINES']['HAVE_PANGO_FC_FONT_MAP_ADD_DECODER_FIND_FUNC'] = '1'
 
        if env['fast']:
Index: lilypond/autogen.sh
diff -u lilypond/autogen.sh:1.24 lilypond/autogen.sh:1.25
--- lilypond/autogen.sh:1.24    Thu Jun 17 00:17:57 2004
+++ lilypond/autogen.sh Sun Apr 17 09:38:04 2005
@@ -8,12 +8,12 @@
 esac
 
 if [ ! -f aclocal.m4 -o stepmake/aclocal.m4 -nt aclocal.m4 ]; then
-    echo "stepmake/aclocal.m4 is newer. Copying file." 
+    echo "stepmake/aclocal.m4 is newer.  Copying file." 
     cp -f stepmake/aclocal.m4 aclocal.m4
 fi
 
 if [ ! -f autogen.sh -o stepmake/autogen.sh -nt autogen.sh ]; then
-    echo "stepmake/autogen.sh is newer. Copying file." 
+    echo "stepmake/autogen.sh is newer.  Copying file." 
     cp -f stepmake/autogen.sh autogen.sh
     exec ./autogen.sh "$@"
 fi
Index: lilypond/configure.in
diff -u lilypond/configure.in:1.146 lilypond/configure.in:1.147
--- lilypond/configure.in:1.146 Sat Apr 16 12:52:28 2005
+++ lilypond/configure.in       Sun Apr 17 09:38:04 2005
@@ -54,7 +54,7 @@
 STEPMAKE_MAKEINFO(REQUIRED)
 STEPMAKE_PYTHON_DEVEL(REQUIRED)
 
-STEPMAKE_PATH_PROG(GHOSTSCRIPT, gs,  OPTIONAL, 8.15)  
+STEPMAKE_PATH_PROG(GHOSTSCRIPT, gs, OPTIONAL, 8.14)
 
 STEPMAKE_PROGS(MFTRACE, mftrace, REQUIRED, 1.1.1)
 STEPMAKE_PATH_PROG(FONTFORGE, fontforge, REQUIRED, 20041208)
@@ -69,14 +69,17 @@
 AC_CHECK_FUNCS([fopencookie funopen gettext isinf memmem snprintf vsnprintf])
 AC_CHECK_HEADERS([utf8/wchar.h], LIBS="$LIBS -lutf8")
 
-
+STEPMAKE_PROGS(PKG_CONFIG, pkg-config, REQUIRED, 0.9.0)
 if test "$gui_b" = "yes"; then
-    STEPMAKE_GTK2
+    STEPMAKE_GTK2(gtk+-2.0, REQUIRED, 2.4.0)
+else
+    STEPMAKE_GTK2(gtk+-2.0, OPTIONAL, 2.4.0)
 fi
 
-STEPMAKE_FREETYPE2
-STEPMAKE_PANGO_FT2
-STEPMAKE_FONTCONFIG
+STEPMAKE_FREETYPE2(freetype2, REQUIRED, 0)
+#STEPMAKE_PANGO(pango, REQUIRED, 1.6.0)
+STEPMAKE_PANGO_FT2(pangoft2, REQUIRED, 1.6.0)
+STEPMAKE_FONTCONFIG(fontconfig, OPTIONAL, 2.2.0)
 
 ## TTFTOOL stuff
 AC_C_BIGENDIAN(TTFTOOL_ENDIAN="-DBIGENDIAN",
@@ -90,8 +93,6 @@
 # perl for help2man.
 STEPMAKE_PERL(OPTIONAL)
 
-
-
 # New makeinfo for multi-page website docs Simply always require new
 # makeinfo should avoid bug reports; if people want to build lily
 # without the docs, they can find this comment and use an older
Index: lilypond/lily/font-config.cc
diff -u lilypond/lily/font-config.cc:1.16 lilypond/lily/font-config.cc:1.17
--- lilypond/lily/font-config.cc:1.16   Tue Apr 12 22:49:28 2005
+++ lilypond/lily/font-config.cc        Sun Apr 17 09:38:04 2005
@@ -8,7 +8,7 @@
 
 #include "config.hh"
 
-#ifdef HAVE_FONTCONFIG
+#if HAVE_FONTCONFIG
 
 #include <fontconfig/fontconfig.h>
 #include <sys/stat.h>
Index: lilypond/lily/include/all-font-metrics.hh
diff -u lilypond/lily/include/all-font-metrics.hh:1.19 
lilypond/lily/include/all-font-metrics.hh:1.20
--- lilypond/lily/include/all-font-metrics.hh:1.19      Thu Mar 10 14:36:12 2005
+++ lilypond/lily/include/all-font-metrics.hh   Sun Apr 17 09:38:04 2005
@@ -13,7 +13,7 @@
 #include "font-metric.hh"
 #include "config.hh"
 
-#ifdef HAVE_PANGO16
+#if HAVE_PANGO16
 #include <pango/pango.h>
 #include <pango/pangoft2.h>
 #endif
@@ -28,7 +28,7 @@
   Scheme_hash_table *otf_dict_;
   File_path search_path_;
 
-#ifdef HAVE_PANGO_FT2
+#if HAVE_PANGO_FT2
   PangoFT2FontMap *pango_ft2_fontmap_;
   Scheme_hash_table *pango_dict_;
   int pango_dpi_;
@@ -39,7 +39,7 @@
   All_font_metrics (String search_path);
   ~All_font_metrics ();
 
-#ifdef HAVE_PANGO_FT2
+#if HAVE_PANGO_FT2
   Pango_font *find_pango_font (PangoFontDescription *description,
                               Real magnification,
                               Real scale);
Index: lilypond/lily/include/pango-font.hh
diff -u lilypond/lily/include/pango-font.hh:1.14 
lilypond/lily/include/pango-font.hh:1.15
--- lilypond/lily/include/pango-font.hh:1.14    Thu Mar 10 14:36:12 2005
+++ lilypond/lily/include/pango-font.hh Sun Apr 17 09:38:04 2005
@@ -11,7 +11,7 @@
 
 #include "config.hh"
 
-#ifdef HAVE_PANGO16
+#if HAVE_PANGO16
 
 #include <pango/pango.h>
 #include <pango/pangoft2.h>
Index: lilypond/lily/parser.yy
diff -u lilypond/lily/parser.yy:1.464 lilypond/lily/parser.yy:1.465
--- lilypond/lily/parser.yy:1.464       Sat Apr 16 08:07:57 2005
+++ lilypond/lily/parser.yy     Sun Apr 17 09:38:04 2005
@@ -257,13 +257,11 @@
 %pure_parser
 %locations
 
-/* FIXME: The third option is an alias that will be used to display
-   the syntax error.  There's a bug (reported with patch) in bison CVS
-   that prints double backslashes
-
-   bison.ly:1:5: error: syntax error, unexpected \\book", expecting '{'
-   \book
-       \book %expect \book error here
+/* The third option is an alias that will be used to display the
+   syntax error.  Bison CVS now correctly handles backslash escapes.
+
+   FIXME: Bison needs to translate some of these, eg, STRING.
+
 */     
    
 /* Keyword tokens with plain escaped name.  */
Index: lilypond/stepmake/aclocal.m4
diff -u lilypond/stepmake/aclocal.m4:1.135 lilypond/stepmake/aclocal.m4:1.136
--- lilypond/stepmake/aclocal.m4:1.135  Tue Mar 29 23:05:46 2005
+++ lilypond/stepmake/aclocal.m4        Sun Apr 17 09:38:04 2005
@@ -1095,9 +1095,6 @@
 
         AC_SUBST($1_CFLAGS)
         AC_SUBST($1_LIBS)
-     else
-        echo "*** Your version of pkg-config is too old. You need version 
$PKG_CONFIG_MIN_VERSION or newer."
-        echo "*** See http://www.freedesktop.org/software/pkgconfig";
      fi
   fi
 
@@ -1108,28 +1105,35 @@
   fi
 ])
 
-
 AC_DEFUN(STEPMAKE_FREETYPE2, [
-    PKG_CHECK_MODULES(FREETYPE2, freetype2 >= 0, have_freetype2=true, true)
-    if $have_freetype2 ; then
+    PKG_CHECK_MODULES(FREETYPE2, $1 >= $3, have_freetype2=yes, true)
+    if test "$have_freetype2" = yes; then
        AC_DEFINE(HAVE_FREETYPE2)
        AC_SUBST(FREETYPE2_CFLAGS)
        AC_SUBST(FREETYPE2_LIBS)
+    else
+       r="lib$1-dev or $1-devel"
+       ver="$(pkg-config --modversion $1)"
+       STEPMAKE_ADD_ENTRY($2, ["$r >= $3 (installed: $ver)"])
     fi
 ])
 
 AC_DEFUN(STEPMAKE_GTK2, [
-    PKG_CHECK_MODULES(GTK2, gtk+-2.0 >= 2.4.0, have_gtk2=true, true)
-    if $have_gtk2 ; then
+    PKG_CHECK_MODULES(GTK2, $1 >= $3, have_gtk2=yes, true)
+    if test "$have_gtk2" = yes ; then
        AC_DEFINE(HAVE_GTK2)
        AC_SUBST(GTK2_CFLAGS)
        AC_SUBST(GTK2_LIBS)
+    else
+       r="lib$1-dev or $1-devel"
+       ver="$(pkg-config --modversion $1)"
+       STEPMAKE_ADD_ENTRY($2, ["$r >= $3 (installed: $ver)"])
     fi
 ])
 
 AC_DEFUN(STEPMAKE_PANGO, [
-    PKG_CHECK_MODULES(PANGO, pango >= 1.6.0, have_pango16=true, true)
-    if $have_pango16 ; then
+    PKG_CHECK_MODULES(PANGO, $1 >= $3, have_pango16=yes, true)
+    if test "$have_pango16" = yes ; then
        AC_DEFINE(HAVE_PANGO16)
        PANGO_CFLAGS="$PANGO_CFLAGS $GTK2_CFLAGS"
        PANGO_LIBS="$PANGO_LIBS $GTK2_LIBS"
@@ -1142,13 +1146,17 @@
        AC_SUBST(PANGO_LIBS)
        CPPFLAGS="$save_CPPFLAGS"
        LIBS="$save_LIBS"
-fi
+    else
+       r="lib$1-dev or $1-devel"
+       ver="$(pkg-config --modversion $1)"
+       STEPMAKE_ADD_ENTRY($2, ["$r >= $3 (installed: $ver)"])
+    fi
 ])
 
-
 AC_DEFUN(STEPMAKE_PANGO_FT2, [
-    PKG_CHECK_MODULES(PANGO_FT2, pangoft2 >= 1.6.0, have_pangoft2=true, true)
-    if $have_pangoft2 ; then
+    PKG_CHECK_MODULES(PANGO_FT2, $1 >= $3, have_pangoft2=yes, true)
+    if test "$have_pangoft2" = yes ; then
+       AC_DEFINE(HAVE_PANGO16)
        AC_DEFINE(HAVE_PANGO_FT2)
        PANGO_FT2_CFLAGS="$PANGO_FT2_CFLAGS $GTK2_CFLAGS"
        PANGO_FT2_LIBS="$PANGO_FT2_LIBS $GTK2_LIBS"
@@ -1163,12 +1171,16 @@
        AC_SUBST(PANGO_FT2_LIBS)
        CPPFLAGS="$save_CPPFLAGS"
        LIBS="$save_LIBS"
-fi
+    else
+       r="lib$1-dev or $1-devel"
+       ver="$(pkg-config --modversion $1)"
+       STEPMAKE_ADD_ENTRY($2, ["$r >= $3 (installed: $ver)"])
+    fi
 ])
 
 AC_DEFUN(STEPMAKE_FONTCONFIG, [
-    PKG_CHECK_MODULES(FONTCONFIG, fontconfig >= 2.2.0, have_fontconfig=true, 
true)
-    if $have_fontconfig ; then
+    PKG_CHECK_MODULES(FONTCONFIG, $1 >= $3, have_fontconfig=yes, true)
+    if test "$have_fontconfig" = yes ; then
        AC_DEFINE(HAVE_FONTCONFIG)
        FONTCONFIG_CFLAGS="$FONTCONFIG_CFLAGS"
        FONTCONFIG_LIBS="$FONTCONFIG_LIBS"
@@ -1181,5 +1193,9 @@
        AC_SUBST(FONTCONFIG_LIBS)
        CPPFLAGS="$save_CPPFLAGS"
        LIBS="$save_LIBS"
-fi
+    else
+       r="lib$1-dev or $1-devel"
+       ver="$(pkg-config --modversion $1)"
+       STEPMAKE_ADD_ENTRY($2, ["$r >= $3 (installed: $ver)"])
+    fi
 ])
Index: lilypond/stepmake/autogen.sh
diff -u lilypond/stepmake/autogen.sh:1.15 lilypond/stepmake/autogen.sh:1.16
--- lilypond/stepmake/autogen.sh:1.15   Thu Jun 17 00:17:57 2004
+++ lilypond/stepmake/autogen.sh        Sun Apr 17 09:38:04 2005
@@ -8,12 +8,12 @@
 esac
 
 if [ ! -f aclocal.m4 -o stepmake/aclocal.m4 -nt aclocal.m4 ]; then
-    echo "stepmake/aclocal.m4 is newer. Copying file." 
+    echo "stepmake/aclocal.m4 is newer.  Copying file." 
     cp -f stepmake/aclocal.m4 aclocal.m4
 fi
 
 if [ ! -f autogen.sh -o stepmake/autogen.sh -nt autogen.sh ]; then
-    echo "stepmake/autogen.sh is newer. Copying file." 
+    echo "stepmake/autogen.sh is newer.  Copying file." 
     cp -f stepmake/autogen.sh autogen.sh
     exec ./autogen.sh "$@"
 fi


_______________________________________________
Lilypond-cvs mailing list
[EMAIL PROTECTED]
http://lists.gnu.org/mailman/listinfo/lilypond-cvs

Reply via email to