From: Han-Wen Nienhuys Date: Tue, 4 Jun 2002 15:49:15 +0000 (+0200) Subject: release: 1.4.14 X-Git-Tag: release/1.4.14 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=27b3790dfb4e328718932bafd9f1180bdf2bce50;p=lilypond.git release: 1.4.14 ========== * Backport feta font symbol documentation in the manual. * Backport Python 2.2 compatibility in lilypond-book. * Backport new font installation strategy and its documentation. * Include lilypond-indent.el in Redhat, SUSE and Debian distr. * Include input/, mutopia/ for Redhat RPM. 1.4.13. --- diff --git a/.cvsignore b/.cvsignore index 773081c5e1..65a4c9003b 100644 --- a/.cvsignore +++ b/.cvsignore @@ -1,11 +1,11 @@ GNUmakefile TAGS +configure config.cache config.h config.log config.make config.status -configure .dstreamrc .gdbinit *~ diff --git a/CHANGES b/CHANGES index e8261e6be5..ab9118a6b6 100644 --- a/CHANGES +++ b/CHANGES @@ -1,5 +1,65 @@ -lilypond_1_4 -============ +* backport stepmake/aclocal.m4: Fix for ash as /bin/sh. + +* backport stepmake/aclocal.m4: Append $FULL_VERSION to datadir. + +* backport lilypond-mode.el (LilyPond-xdvi-command): Default to plain xdvi. + +1.4.13.mb2 +========== + +* Backport feta font symbol documentation in the manual. + +* Backport Python 2.2 compatibility in lilypond-book. + +* Backport new font installation strategy and its documentation. + +* Include lilypond-indent.el in Redhat, SUSE and Debian distr. + +* Include input/, mutopia/ for Redhat RPM. + + +1.4.13.jcn +========== + +* Backport: stepmake/autogen.sh: Check for autoconf2.13, and abort if not + found. + +* Backport: stepmake/aclocal.m4: Bugfix: complain if program not found. + +* Backport: Documentation/topdocs/INSTALL.texi: Update GCC, Flex and + GUILE info. Add info about CVS. + +* autogen.sh: Generate. + +* stepmake/configure: +* configure: Regenerate. + +* Backport: stepmake/stepmake/automatically-generated.sub.make: Keep + original first line. + +* Backport: stepmake/stepmake/toplevel-targets.make (autogen.sh): Add rule. + +* Backport: stepmake/stepmake/generic-targets.make (configure): Generate + using autogen.sh. + +* Backport: GNUmakefile.in (SCRIPTS): +* Backport: stepmake/GNUmakefile.in (SCRIPTS): Add autogen.sh + +* Backport: stepmake/autogen.sh: New file. + +* Backport: configure: Check for g++ >= 2.95. + +* Backport: stepmake/aclocal.m4: Fixes for FlexLexer.h, Python headers. GNU + c/c++ version checking. + +* Backport: Documentation/windows/GNUmakefile: Avoid collapsed directory + constructs '//'. + +* Backport: stepmake/bin/install-dot-exe.sh: Filter collapsed directory + constructs '//' from arguments. + +1.4.13 +====== * Backport feta-nummer and feta-din. diff --git a/Documentation/misc/GNUmakefile b/Documentation/misc/GNUmakefile index 183762facc..a15216cd98 100644 --- a/Documentation/misc/GNUmakefile +++ b/Documentation/misc/GNUmakefile @@ -4,7 +4,7 @@ NAME = documentation STEPMAKE_TEMPLATES=documentation texinfo -TEXTS =AIMS $(wildcard CHANGES-*[0-9]) $(wildcard ANNOUNCE-*[0-9]) $(wildcard NEWS-*[0-9]) interview +TEXTS =AIMS $(wildcard CHANGES-*[0-9]) $(wildcard ANNOUNCE-*[0-9]) $(wildcard NEWS-*[0-9]) interview fontinstallation EXTRA_DIST_FILES = $(TEXTS) include $(depth)/make/stepmake.make diff --git a/Documentation/misc/fontinstallation b/Documentation/misc/fontinstallation new file mode 100644 index 0000000000..82320c9fe5 --- /dev/null +++ b/Documentation/misc/fontinstallation @@ -0,0 +1,89 @@ +The font installation in LilyPond. + +Background + +This is a short overview of the installation of the Feta fonts +in LilyPond. This structure is used by default from version +1.5.37. + +Let $DATADIR denote the Lilypond data installation directory, +typically /usr/local/share/lilypond/ or /usr/share/lilypond/. +A non-default path can be specified using 'configure --prefix' +or 'configure --datadir'. + +The trick used is to let $DATADIR be the root of an additional +texmf tree, where the TeX tools can search just as it searches +the default texmf tree of the teTeX distribution. We follow +the official TeX Directory Structure (see `texdoc tds`). + +The main advantage of putting the font files in a teTeX +system tree is that generated font files (such as .*pk files) +will automatically be stored in "the right place", i.e. you +should never end up in your current working directory - something +that was a common problem in previous Lilypond installations. +What is then considered "the right place" in teTeX? If the user +has write permissions in $DATADIR (for example if the installation +is done locally in a home directory), then the generated files +will also appear in subdirectories of $DATADIR. This means that +you can keep several LilyPond versions installed in parallel +as long as $DATADIR is set separately for each version and you +have write permissions in (at least all but one) of the installation +directories. For ordinary installations in /usr/share/ or +/usr/local/share/, where the user does not have write permission, +the generated font files will instead appear in the directory +specified by `kpsexpand \$VARTEXFONTS`, often /var/tmp/texfonts/ +or /var/spool/texmf/ depending on your teTeX distribution. + +Details + +The files are installed in the following subdirectories: + +$DATADIR/fonts/source/: all *.mf files +$DATADIR/fonts/afm/: all *.afm files +$DATADIR/fonts/tfm/: all *.tfm files +$DATADIR/fonts/type1/: all *.pfa and/or *.pfb files +$DATADIR/tex/: all *.tex files +$DATADIR/dvips/: the lilypond.map file + +To make teTeX aware of the files, the directory is added +to the list of texmf trees by setting the single variable +$TEXMF. + +In Bourne shell/bash: +TEXMF="{$DATADIR,"`kpsexpand \\$TEXMF`"}" +export TEXMF + +In csh/tcsh: +set noglob +setenv TEXMF "{$DATADIR,"`kpsexpand \$TEXMF`"}" +unset noglob + +If $TEXMF was set previously, kpsexpand will use that value, +otherwise it is read from texmf.cnf (`kpsewhich texmf.cnf` +tells you where to find the file). + + +Creating nice-looking PDF files + +If you have generated and installed the so-called Type1 versions +of the fonts, and have Ghostscript version 6.0 or later, you can +make PDF versions of your scores that look nice both on screen +and on paper. You just have to tell dvips to use the Type1 +version of the fonts: + +dvips -ulilypond.map -Ppdf myscore.dvi +ps2pdf myscore.ps + +If you want top quality printouts, it is recommended to stick +to the bitmap fonts, i.e. to call dvips directly without +any extra flags. The resulting PDF files will then unfortunately +look fuzzy on screen. + +This will work well with ly2dvi output, however if you +use lilypond-book or write a LaTeX wrapper file yourself, +do NOT include the line \usepackage[T1]{fontenc} since +the Type1 text fonts included in the free TeX distributions +only include TC encoded fonts, not T1 encoded. However, +add \usepackage[latin1]{inputenc} if you use any non- +anglosaxian characters. + diff --git a/Documentation/topdocs/INSTALL.texi b/Documentation/topdocs/INSTALL.texi index a4fbda11e3..f7e31d1ef3 100644 --- a/Documentation/topdocs/INSTALL.texi +++ b/Documentation/topdocs/INSTALL.texi @@ -22,11 +22,11 @@ information on this topic can be found at the @section Downloading -Even numbered versions are `stable'. The webpages for the stable version -(1.2) reside @uref{http://www.gnu.org/software/lilypond, on the GNU -servers}. Big enhancements go into the latest odd numbered version -(1.3), whose webpages are on @uref{http://www.lilypond.org/,the lilypond -site}. +Even numbered versions are `stable'. The webpages for the stable +version (1.4) reside @uref{http://www.lilypond.org/stable,the lilypond +users site}. Big enhancements go into the latest odd numbered +version (1.5), whose webpages are on +@uref{http://www.lilypond.org/development, the lilypond development site}. @subsection source code @@ -44,6 +44,21 @@ If you want to compile LilyPond from source, download here: @uref{http://www.lilypond.org/ftp/} by HTTP. @end itemize + +@subsubsection Anonymous CVS access + +Short version: + +@quotation +@example +cvs -d :pserver:anoncvs@@lilypond.org:/home/lilypond login +cvs -d :pserver:anoncvs@@lilypond.org:/home/lilypond co -P \ + -rlilypond_1_4 -d lilypond-1.4 lilypond +@end example +@end quotation + +See @uref{http://lilypond.org/wiki/?CVS} for more information. + @html @end html @@ -96,15 +111,19 @@ on the FTP site. You need the following packages to compile Lilypond. @itemize -@item A reasonably new C++ compiler: EGCS 1.1, GCC 2.95.2 or -newer. Check out @uref{ftp://ftp.gnu.org/gnu/gcc/, the gcc site}. +@item The GNU c++ compiler (version 2.95.2 or newer). +EGCS 1.1 may work, but is no longer supported. +Check out @uref{ftp://ftp.gnu.org/gnu/gcc/, the gcc site}. + +WARNING: if you choose to upgrade to GCC 3.x, enquire if your +distribution supports g++ 3.x and flex. @item Python 1.5 or 2.1 Check out @uref{http://www.python.org/, the python website}. -@item GUILE 1.3.4 or newer, check out +@item GUILE 1.4 or newer +GUILE-1.3.4 may work but is no longer supported. Check out @uref{http://www.gnu.org/software/guile/guile.html,the GUILE webpage}. -Version 1.4 is recommended for better performance. @item GNU Make. Check out @@ -114,6 +133,11 @@ make FTP directory}. @item Flex (version 2.5.4a or newer). Check out @uref{http://www.gnu.org/software/flex/,the Flex webpage}. +WARNING: plain Flex 2.5.4(a) generates invalid C++ code. GCC 3.x +chokes on this. If you wish to use GCC 3.x, make sure that your +distribution supports g++ 3.x and flex. For a workaround, see +lexer-gcc-3.0 below. + @item Bison (version 1.25 or newer). Check out @uref{http://www.gnu.org/software/bison/,the bison webpage} @@ -135,14 +159,6 @@ It is available at FTP directory for @code{geometry}}. This package is normally included with the @TeX{} distribution. -@item MetaPost, needed for generating PostScript fonts. Please -note that tetex-0.4pl8 (included with Red Hat 5.x) does not include -@file{mfplain.mp}, which is needed for producing the scalable font -files. - -If you don't have MetaPost and don't want to use PostScript output, then -edit @file{mf/GNUmakefile}, removing the line saying @code{PFA_FILES=}. - @item kpathsea, a library for searching (@TeX{}) files. @code{kpathsea} is usually included with your installation of @TeX{}. You may need to install a tetex-devel or tetex-dev package too. @@ -153,9 +169,11 @@ UNIX), you can compile LilyPond without kpathsea support. In that case, you'll probably have to indicate where @TeX{}'s tfm files live. Invoke configure something like: +@quotation @example ./configure --without-kpathsea --enable-tfm-path=/usr/share/texmf/fonts/tfm/public/cm/:/usr/share/texmf/fonts/tfm/ams/symbols @end example +@end quotation @end itemize @@ -167,7 +185,7 @@ following software @itemize @bullet @item @TeX{}. @item Xdvi and Ghostscript -@item GUILE 1.3.4, or newer. Check out +@item GUILE 1.4, or newer. Check out @uref{http://www.gnu.org/software/guile.html,the GUILE webpage} @end itemize @@ -262,7 +280,9 @@ If you want to build multiple versions of LilyPond with different configuration settings, you can use the @code{--enable-config=CONF} option of configure. You should use @samp{make conf=CONF} to generate the output in @file{out-CONF}. Example: suppose I want to build with -and without profiling. Then I'd use the following for the normal build, +and without profiling. Then I'd use the following for the normal +build, +@c prefix=~ ? @example ./configure --prefix=~ --enable-checking @@ -306,7 +326,7 @@ automatically loaded, so you need not modify your @code{~/.emacs} file. @subsection Red Hat Linux -Red Hat 7.0 i386 RPMS are available from +Red Hat 7.x i386 RPMS are available from @uref{ftp://ftp.cs.uu.nl/pub/GNU/LilyPond/binaries/}. You can also compile them yourself. A spec file is in diff --git a/Documentation/user/appendices.itely b/Documentation/user/appendices.itely index 17ab55f4c0..f09c9738e1 100644 --- a/Documentation/user/appendices.itely +++ b/Documentation/user/appendices.itely @@ -6,6 +6,7 @@ * American Chords :: * Jazz chords:: * MIDI instruments:: +* The Feta font:: @end menu @node Lyrics mode definition @@ -200,3 +201,12 @@ scheme = \chords { "viola" "lead 5 (charang)" "gunshot" "cello" "lead 6 (voice)" @end example + +@node The Feta font +@section The Feta font +The following symbols are available in the Feta font and may be +accessed directly using text markup such as +@code{g^#'(music "scripts-segno")}, see @ref{Text markup}. + +@lilypondfile{feta16list.ly} + diff --git a/Documentation/windows/GNUmakefile b/Documentation/windows/GNUmakefile index 965599a12c..0416dff9a9 100644 --- a/Documentation/windows/GNUmakefile +++ b/Documentation/windows/GNUmakefile @@ -40,10 +40,12 @@ INSTALLATION_OUT_SUFFIXES=1 2 # LilyPond on windows is configured with --prefix=/usr/lilypond-x.y.x # The cygwin profile.d dir, however, is in /etc -INSTALLATION_DIR=$(shell dirname $(shell dirname $(prefix)))/etc/postinstall +# avoid collapsed directory constructs '//' +etc=$(dir $(patsubst %/, %, $(dir $(prefix))))etc +INSTALLATION_DIR=$(etc)/postinstall INSTALLATION_FILES=$(OUT_POST_INSTALLS) -INSTALLATION_OUT_DIR1=$(shell dirname $(shell dirname $(prefix)))/etc/profile.d +INSTALLATION_OUT_DIR1=$(etc)/profile.d INSTALLATION_OUT_FILES1=$(OUT_PROFILES) INSTALLATION_OUT_DIR2=$(datadir)/tex diff --git a/Documentation/windows/installing.texi b/Documentation/windows/installing.texi index 2d507514b2..5d563e4ed7 100644 --- a/Documentation/windows/installing.texi +++ b/Documentation/windows/installing.texi @@ -76,9 +76,7 @@ Enter the following into the file @end example @end quotation -Close the file and save it. Run the following command a few times (at -least three times) until it says @code{PS output to `foo.ps', DVI output -to `foo.dvi'}. +Close the file and save it. Run the following command @quotation @example @@ -86,6 +84,7 @@ ly2dvi -P foo @end example @end quotation +It should say @code{PS output to `foo.ps', DVI output to `foo.dvi'}. You can now view the file using the following command @quotation @example diff --git a/GNUmakefile.in b/GNUmakefile.in index 1c8931dd27..cbb6555307 100644 --- a/GNUmakefile.in +++ b/GNUmakefile.in @@ -16,11 +16,11 @@ SUBDIRS = buildscripts scripts flower lily \ mutopia ports # -SCRIPTS = configure aclocal.m4 +SCRIPTS = configure aclocal.m4 autogen.sh README_FILES = DEDICATION COPYING NEWS CHANGES ROADMAP README_TXT_FILES = AUTHORS.txt README.txt INSTALL.txt FAQ.txt IN_FILES := $(wildcard *.in) -EXTRA_DIST_FILES = lilypond-font-lock.el lilypond-mode.el lilypond-init.el vimrc VERSION $(README_FILES) $(SCRIPTS) $(IN_FILES) emacsclient.patch mktexnam.patch lexer-gcc-3.0.patch darwin.patch .cvsignore +EXTRA_DIST_FILES = lilypond-font-lock.el lilypond-mode.el lilypond-indent.el lilypond-init.el vimrc VERSION $(README_FILES) $(SCRIPTS) $(IN_FILES) emacsclient.patch mktexnam.patch lexer-gcc-3.0.patch darwin.patch .cvsignore NON_ESSENTIAL_DIST_FILES = $(README_TXT_FILES) INSTALLATION_DIR=$(datadir) INSTALLATION_FILES=$(configuration) VERSION diff --git a/INSTALL.txt b/INSTALL.txt index 751393665d..4cad78f925 100644 --- a/INSTALL.txt +++ b/INSTALL.txt @@ -9,6 +9,7 @@ Table of Contents INSTALL - compiling and installing GNU LilyPond Downloading source code + Anonymous CVS access Binaries Upgrading Requirements @@ -46,10 +47,10 @@ Downloading =========== Even numbered versions are `stable'. The webpages for the stable -version (1.2) reside on the GNU servers -(http://www.gnu.org/software/lilypond). Big enhancements go into the -latest odd numbered version (1.3), whose webpages are on the lilypond -site (http://www.lilypond.org/). +version (1.4) reside the lilypond users site +(http://www.lilypond.org/stable). Big enhancements go into the latest +odd numbered version (1.5), whose webpages are on the lilypond +development site (http://www.lilypond.org/development). source code ----------- @@ -64,6 +65,17 @@ source code * at `lilypond.org' `ftp://ftp.lilypond.org/pub/LilyPond/' by FTP and `http://www.lilypond.org/ftp/' by HTTP. +Anonymous CVS access +.................... + + Short version: + + cvs -d :pserver:anoncvs@lilypond.org:/home/lilypond login + cvs -d :pserver:anoncvs@lilypond.org:/home/lilypond co -P \ + -rlilypond_1_4 -d lilypond-1.4 lilypond + + See `http://lilypond.org/wiki/?CVS' for more information. + Binaries -------- @@ -108,15 +120,19 @@ Compilation You need the following packages to compile Lilypond. - * A reasonably new C++ compiler: EGCS 1.1, GCC 2.95.2 or newer. - Check out the gcc site (ftp://ftp.gnu.org/gnu/gcc/). + * The GNU c++ compiler (version 2.95.2 or newer). EGCS 1.1 may + work, but is no longer supported. Check out the gcc site + (ftp://ftp.gnu.org/gnu/gcc/). + + WARNING: if you choose to upgrade to GCC 3.x, enquire if your + distribution supports g++ 3.x and flex. * Python 1.5 or 2.1 Check out the python website (http://www.python.org/). - * GUILE 1.3.4 or newer, check out the GUILE webpage - (http://www.gnu.org/software/guile/guile.html). Version 1.4 is - recommended for better performance. + * GUILE 1.4 or newer GUILE-1.3.4 may work but is no longer + supported. Check out the GUILE webpage + (http://www.gnu.org/software/guile/guile.html). * GNU Make. Check out the GNU make FTP directory (ftp://ftp.gnu.org/gnu/make/). @@ -124,6 +140,11 @@ Compilation * Flex (version 2.5.4a or newer). Check out the Flex webpage (http://www.gnu.org/software/flex/). + WARNING: plain Flex 2.5.4(a) generates invalid C++ code. GCC 3.x + chokes on this. If you wish to use GCC 3.x, make sure that your + distribution supports g++ 3.x and flex. For a workaround, see + lexer-gcc-3.0 below. + * Bison (version 1.25 or newer). Check out the bison webpage (http://www.gnu.org/software/bison/) @@ -145,15 +166,6 @@ Compilation (ftp://ftp.ctan.org/tex-archive/macros/latex/contrib/supported/geometry). This package is normally included with the TeX distribution. - * MetaPost, needed for generating PostScript fonts. Please note that - tetex-0.4pl8 (included with Red Hat 5.x) does not include - `mfplain.mp', which is needed for producing the scalable font - files. - - If you don't have MetaPost and don't want to use PostScript - output, then edit `mf/GNUmakefile', removing the line saying - `PFA_FILES='. - * kpathsea, a library for searching (TeX) files. `kpathsea' is usually included with your installation of TeX. You may need to install a tetex-devel or tetex-dev package too. @@ -164,7 +176,7 @@ Compilation case, you'll probably have to indicate where TeX's tfm files live. Invoke configure something like: - ./configure --without-kpathsea --enable-tfm-path=/usr/share/texmf/fonts/tfm/public/cm/:/usr/share/texmf/fonts/tfm/ams/symbols + ./configure --without-kpathsea --enable-tfm-path=/usr/share/texmf/fonts/tfm/public/cm/:/usr/share/texmf/fonts/tfm/ams/symbols Running requirements @@ -177,7 +189,7 @@ following software * Xdvi and Ghostscript - * GUILE 1.3.4, or newer. Check out the GUILE webpage + * GUILE 1.4, or newer. Check out the GUILE webpage (http://www.gnu.org/software/guile.html) For running LilyPond successfully you have to help TeX and MetaFont @@ -292,7 +304,7 @@ Compiling for distributions Red Hat Linux ------------- - Red Hat 7.0 i386 RPMS are available from + Red Hat 7.x i386 RPMS are available from `ftp://ftp.cs.uu.nl/pub/GNU/LilyPond/binaries/'. You can also compile them yourself. A spec file is in diff --git a/VERSION b/VERSION index b32adc53a5..d36d614099 100644 --- a/VERSION +++ b/VERSION @@ -1,7 +1,7 @@ PACKAGE_NAME=LilyPond MAJOR_VERSION=1 MINOR_VERSION=4 -PATCH_LEVEL=13 +PATCH_LEVEL=14 MY_PATCH_LEVEL= # use the above to send patches: MY_PATCH_LEVEL is always empty for a diff --git a/aclocal.m4 b/aclocal.m4 index 082312d741..13de08358c 100644 --- a/aclocal.m4 +++ b/aclocal.m4 @@ -1,10 +1,99 @@ -dnl WARNING WARNING WARNING WARNING +dnl aclocal.m4 -*-shell-script-*- +dnl WARNING WARNING WARNING dnl do not edit! this is aclocal.m4, generated from stepmake/aclocal.m4 dnl aclocal.m4 -*-shell-script-*- dnl StepMake subroutines for configure.in -AC_DEFUN(AC_STEPMAKE_BIBTEX2HTML, [ - AC_CHECK_PROGS(BIBTEX2HTML, bibtex2html bib2html, error) + +### mostly interal macros + +# Get full path of executable ($1) +AC_DEFUN(STEPMAKE_GET_EXECUTABLE, [ + ## which doesn't work in ash, if /usr/bin/which isn't installed + ## type -p doesn't work in ash + ## command -v doesn't work in zsh + ## command -v "$1" 2>&1 + ## this test should work in ash, bash, pdksh (ksh), zsh + type -p "$1" 2>/dev/null | tail -1 | awk '{print $NF}' +]) + + +# Get version string from executable ($1) +AC_DEFUN(STEPMAKE_GET_VERSION, [ + "$1" --version 2>&1 | grep -v '^$' | head -1 | awk '{print $NF}' +]) + +# Calculate numeric version from version string ($1) +AC_DEFUN(STEPMAKE_NUMERIC_VERSION, [ + echo "$1" | awk -F. ' + { + if ([$]3) {last = [$]3} + else {last =0} + } + {printf "%s%s%s\n",[$]1*100, [$]2*10,last}' +]) + + +# Add item ($2) to list ($1, one of 'OPTIONAL', 'REQUIRED') +AC_DEFUN(STEPMAKE_ADD_ENTRY, [ + eval "$1"=\"`eval echo \"'$'$1\" \"$2\"`\" +]) + +# Check if tested program ($2) was found ($1). +# If not, add entry to missing-list ($3, one of 'OPTIONAL', 'REQUIRED'). +# We could abort here if a 'REQUIRED' program is not found +AC_DEFUN(STEPMAKE_OPTIONAL_REQUIRED, [ + STEPMAKE_CHECK_SEARCH_RESULT($1) + if test $? -ne 0; then + STEPMAKE_ADD_ENTRY($3, $2) + if test "$3" = "REQUIRED"; then + command="echo ERROR: $2 not found" + # abort configure process here? + else + command="- echo $2 not found" + fi + eval "$1"='$command' + false + else + true + fi +]) + + +# Return if tested proram ($1) was found (true) or not (false). +AC_DEFUN(STEPMAKE_CHECK_SEARCH_RESULT, [ + r="`eval echo '$'"$1"`" + if test -n "$r" -a "$r" != "error" -a "$r" != "no" && expr '`eval echo '$'"$1"`' : '.*\(echo\)' > /dev/null; then + true + else + ##STEPMAKE_WARN(cannot find $2. $3) + false + fi +]) + + +# Check version of program ($1) +# If version is smaller than requested ($3), +# add entry to missing-list ($2, one of 'OPTIONAL', 'REQUIRED'). +AC_DEFUN(STEPMAKE_CHECK_VERSION, [ + r="`eval echo '$'"$1"`" + AC_MSG_CHECKING("$r version") + #exe=`STEPMAKE_GET_EXECUTABLE($r)` + exe=`STEPMAKE_GET_EXECUTABLE($r)` + ver=`STEPMAKE_GET_VERSION($exe)` + num=`STEPMAKE_NUMERIC_VERSION($ver)` + req=`STEPMAKE_NUMERIC_VERSION($3)` + AC_MSG_RESULT("$ver") + if test "$num" -lt "$req"; then + STEPMAKE_ADD_ENTRY($2, "$r $3 (installed: $ver)") + fi +]) + +### Macros to build configure.in + + +AC_DEFUN(STEPMAKE_BIBTEX2HTML, [ + STEPMAKE_PROGS(BIBTEX2HTML, bibtex2html bib2html, $1) if test "$BIBTEX2HTML" = "bib2html"; then BIBTEX2HTML_FLAGS='$< $(@)' else @@ -15,11 +104,24 @@ AC_DEFUN(AC_STEPMAKE_BIBTEX2HTML, [ ]) -AC_DEFUN(AC_STEPMAKE_COMPILE, [ +AC_DEFUN(STEPMAKE_BISON, [ + # ugh, automake: we want (and check for) bison + AC_PROG_YACC + + STEPMAKE_PROGS(BISON, bison, $1) + + # urg. should test functionality rather than version. + if test "$BISON" = "bison" -a -n "$2"; then + STEPMAKE_CHECK_VERSION(BISON, $1, $2) + fi +]) + + +AC_DEFUN(STEPMAKE_COMPILE, [ # -O is necessary to get inlining - CFLAGS=${CFLAGS:-""} - CXXFLAGS=${CXXFLAGS:-$CFLAGS} - LDFLAGS=${LDFLAGS:-""} + CFLAGS=${CFLAGS-""} + CXXFLAGS=${CXXFLAGS-$CFLAGS} + LDFLAGS=${LDFLAGS-""} checking_b=yes optimise_b=yes profile_b=no @@ -64,11 +166,12 @@ AC_DEFUN(AC_STEPMAKE_COMPILE, [ AC_PROG_CC + STEPMAKE_OPTIONAL_REQUIRED(CC, cc, $1) LD='$(CC)' AC_SUBST(LD) CFLAGS="$CFLAGS $OPTIMIZE" - CPPFLAGS=${CPPFLAGS:-""} + CPPFLAGS=${CPPFLAGS-""} AC_MSG_CHECKING([for IEEE-conformance compiler flags]) save_cflags="$CFLAGS" @@ -92,12 +195,10 @@ AC_DEFUN(AC_STEPMAKE_COMPILE, [ AC_SUBST(EXTRA_LIBES) ]) -AC_DEFUN(AC_STEPMAKE_CXX, [ +AC_DEFUN(STEPMAKE_CXX, [ AC_LANG_CPLUSPLUS AC_PROG_CXX - - AC_CHECK_HEADER(FlexLexer.h, true, - AC_STEPMAKE_WARN(can"\'"t find flex header. Please install Flex headers correctly)) + STEPMAKE_OPTIONAL_REQUIRED(CXX, c++, $1) CPPFLAGS="$CPPFLAGS $DEFINES" CXXFLAGS="$CXXFLAGS $OPTIMIZE" @@ -109,7 +210,8 @@ AC_DEFUN(AC_STEPMAKE_CXX, [ AC_SUBST(LD) ]) -AC_DEFUN(AC_STEPMAKE_CXXTEMPLATE, [ + +AC_DEFUN(STEPMAKE_CXXTEMPLATE, [ AC_CACHE_CHECK([whether explicit instantiation is needed], lily_cv_need_explicit_instantiation, AC_TRY_LINK([ @@ -123,9 +225,10 @@ AC_DEFUN(AC_STEPMAKE_CXXTEMPLATE, [ fi ]) -AC_DEFUN(AC_STEPMAKE_DATADIR, [ + +AC_DEFUN(STEPMAKE_DATADIR, [ if test "$datadir" = "\${prefix}/share"; then - datadir='${prefix}/share/'$package + datadir='${prefix}/share/'$package/$FULL_VERSION fi DIR_DATADIR=${datadir} presome=${prefix} @@ -136,19 +239,42 @@ AC_DEFUN(AC_STEPMAKE_DATADIR, [ AC_SUBST(datadir) AC_SUBST(DIR_DATADIR) - - dnl yeah, so fuck me gently with a cactus: this doesnt belong here - dnl Please take the person responsible for inventing shell-scripts out - dnl and shoot him. On behalf of the sane world, thank you. - dnl DIR_SHAREDSTATEDIR="foobar" - dnl AC_SUBST(DIR_SHAREDSTATEDIR) + + # we used to set DIR_SHAREDSTATEDIR here, + # but apparently that broke something AC_DEFINE_UNQUOTED(DIR_DATADIR, "${DIR_DATADIR}") ]) -AC_DEFUN(AC_STEPMAKE_END, [ + +AC_DEFUN(STEPMAKE_END, [ + AC_SUBST(OPTIONAL) + AC_SUBST(REQUIRED) + AC_OUTPUT($CONFIGFILE.make:config.make.in) + + if test -n "$OPTIONAL"; then + echo + echo "WARNING: Please consider installing optional programs: $OPTIONAL" + fi + + if test -n "$REQUIRED"; then + echo + echo "ERROR: Please install required programs: $REQUIRED" + fi + + if test -n "$OPTIONAL$REQUIRED"; then + echo + echo "See INSTALL.txt for more information on how to build $PACKAGE_NAME" + echo "Remove config.cache before rerunning ./configure" + fi + + if test -n "$REQUIRED"; then + rm -f $srcdir/GNUmakefile + exit 1 + fi + # regular in-place build # test for srcdir_build = yes ? if test "$builddir" = "."; then @@ -162,24 +288,93 @@ AC_DEFUN(AC_STEPMAKE_END, [ fi ]) -AC_DEFUN(AC_STEPMAKE_GXX, [ - AC_MSG_CHECKING("g++ version") - cxx_version=`$CXX --version` - AC_MSG_RESULT("$cxx_version") - changequote(<<, >>)dnl - # urg, egcs: how to check for egcs >= 1.1? - if expr "$cxx_version" : '.*2\.[89]' > /dev/null || - expr "$cxx_version" : '.*egcs' > /dev/null || - expr "$cxx_version" : '3\.0' > /dev/null - changequote([, ])dnl - then - true + +AC_DEFUN(STEPMAKE_FLEX, [ + # ugh, automake: we want (and check for) flex + # AC_PROG_LEX + # urg: automake 1.3: hope this doesn't break 1.2 ac_cv_pro_lex_root hack... + + # AC_DECL_YYTEXT + # ugh, ugh + ac_cv_prog_lex_root=lex.yy + STEPMAKE_PROGS(FLEX, flex, $1) +]) + + +AC_DEFUN(STEPMAKE_FLEXLEXER, [ + AC_HAVE_HEADERS(FlexLexer.h, true, false) + if test $? -ne 0; then + warn='FlexLexer.h (flex package)' + STEPMAKE_ADD_ENTRY($1, $warn) + fi +]) + + +AC_DEFUN(STEPMAKE_GCC, [ + if test "$GCC" = "yes"; then + STEPMAKE_CHECK_VERSION(CC, $1, $2) else - AC_STEPMAKE_WARN(can\'t find g++ 2.8, 2.9, 3.0 or egcs 1.1) + warn="$CC (Please install *GNU* cc)" + STEPMAKE_ADD_ENTRY($1, $warn) fi ]) -AC_DEFUN(AC_STEPMAKE_GUILE, [ + +AC_DEFUN(STEPMAKE_GETTEXT, [ + DIR_LOCALEDIR=${localedir} + presome=${prefix} + if test "$prefix" = "NONE"; then + presome=${ac_default_prefix} + fi + DIR_LOCALEDIR=`echo ${DIR_LOCALEDIR} | sed "s!\\\${prefix}!$presome!"` + AC_SUBST(localedir) + AC_SUBST(DIR_LOCALEDIR) + AC_DEFINE_UNQUOTED(DIR_LOCALEDIR, "${DIR_LOCALEDIR}") + + AC_CHECK_LIB(intl, gettext) + AC_CHECK_FUNCS(gettext) +]) + + +AC_DEFUN(STEPMAKE_GUILE, [ + STEPMAKE_PATH_PROG(GUILE, guile, $1) +]) + + +# STEPMAKE_GUILE_FLAGS --- set flags for compiling and linking with Guile +# +# This macro runs the guile-config script, installed with Guile, +# to find out where Guile's header files and libraries are +# installed. It sets two variables, marked for substitution, as +# by AC_SUBST. +# +# GUILE_CFLAGS --- flags to pass to a C or C++ compiler to build +# code that uses Guile header files. This is almost +# always just a -I flag. +# +# GUILE_LDFLAGS --- flags to pass to the linker to link a +# program against Guile. This includes -lguile for +# the Guile library itself, any libraries that Guile +# itself requires (like -lqthreads), and so on. It may +# also include a -L flag to tell the compiler where to +# find the libraries. + +AC_DEFUN([STEPMAKE_GUILE_FLAGS], [ + exe=`STEPMAKE_GET_EXECUTABLE($guile_config)` + if test -x $exe; then + AC_MSG_CHECKING("guile compile flags") + GUILE_CFLAGS="`$guile_config compile`" + AC_MSG_RESULT($GUILE_CFLAGS) + AC_MSG_CHECKING("guile link flags") + GUILE_LDFLAGS="`$guile_config link`" + AC_MSG_RESULT($GUILE_LDFLAGS) + fi + AC_SUBST(GUILE_CFLAGS) + AC_SUBST(GUILE_LDFLAGS) +]) + + +AC_DEFUN(STEPMAKE_GUILE_DEVEL, [ ## First, let's just see if we can find Guile at all. AC_MSG_CHECKING("for guile-config") for guile_config in guile-config $target-guile-config $build-guile-config; do @@ -187,40 +382,47 @@ AC_DEFUN(AC_STEPMAKE_GUILE, [ if ! $guile_config --version > /dev/null 2>&1 ; then AC_MSG_WARN("cannot execute $guile_config") AC_MSG_CHECKING("if we are cross compiling") - guile_config=error + GUILE_CONFIG='echo no guile-config' else + GUILE_CONFIG=$guile_config break fi done - if test "$guile_config" = "error"; then - AC_MSG_ERROR("cannot find guile-config; is Guile installed?") - exit 1 - fi - AC_MSG_CHECKING("Guile version") - need_guile_version="1.3.4" - need_guile_version_numeric=100304 - guile_version=`$guile_config --version 2>&1 | awk '{print $NF}'` - guile_version_numeric=`echo $guile_version | awk -F. ' -{if ([$]3) {last = [$]3} -else {last =0}} -{printf "%s%s%s\n",[$]1*100, [$]2*10,last}'` - AC_MSG_RESULT("$guile_version") - if test $guile_version_numeric -lt $need_guile_version_numeric - then - AC_STEPMAKE_WARN("Guile version "$need_guile_version" or newer is needed") + STEPMAKE_OPTIONAL_REQUIRED(GUILE_CONFIG, $guile_config, $1) + if test $? -ne 0; then + STEPMAKE_ADD_ENTRY($1, 'guile-config (guile-devel, guile-dev or libguile-dev package)') + fi + + STEPMAKE_CHECK_SEARCH_RESULT(GUILE_CONFIG) + # urg. should test functionality rather than version. + if test $? -eq 0 -a -n "$2"; then + STEPMAKE_CHECK_VERSION(GUILE_CONFIG, $1, $2) fi + + AC_SUBST(GUILE_CONFIG) + + guile_version="$ver" changequote(<<, >>)dnl GUILE_MAJOR_VERSION=`expr $guile_version : '\([0-9]*\)'` GUILE_MINOR_VERSION=`expr $guile_version : '[0-9]*\.\([0-9]*\)'` changequote([, ])dnl - GUILE_FLAGS - AC_PATH_PROG(GUILE, guile, error) - AC_SUBST(GUILE) + STEPMAKE_GUILE_FLAGS AC_DEFINE_UNQUOTED(GUILE_MAJOR_VERSION, $GUILE_MAJOR_VERSION) AC_DEFINE_UNQUOTED(GUILE_MINOR_VERSION, $GUILE_MINOR_VERSION) ]) -AC_DEFUN(AC_STEPMAKE_INIT, [ + +AC_DEFUN(STEPMAKE_GXX, [ + if test "$GXX" = "yes"; then + STEPMAKE_CHECK_VERSION(CXX, $1, $2) + else + warn="$CXX (Please install *GNU* c++)" + STEPMAKE_ADD_ENTRY($1, $warn) + fi +]) + + +AC_DEFUN(STEPMAKE_INIT, [ . $srcdir/VERSION FULL_VERSION=$MAJOR_VERSION.$MINOR_VERSION.$PATCH_LEVEL @@ -267,7 +469,6 @@ AC_DEFUN(AC_STEPMAKE_INIT, [ AC_MSG_RESULT($builddir) (cd stepmake 2>/dev/null || mkdir stepmake) - (cd stepmake; rm -f stepmake; ln -s ../$srcdir/stepmake .) (cd stepmake; rm -f bin; ln -s ../$srcdir/bin .) AC_CONFIG_AUX_DIR(bin) stepmake=stepmake @@ -287,7 +488,7 @@ AC_DEFUN(AC_STEPMAKE_INIT, [ AC_MSG_RESULT($builddir) if expr "$srcdir" : '/' > /dev/null 2>&1; then absolute_srcdir=yes - AC_STEPMAKE_WARN(Absolute --srcdir specified: $srcdir) + STEPMAKE_WARN(Absolute --srcdir specified: $srcdir) fi AC_MSG_CHECKING(for stepmake) @@ -342,25 +543,21 @@ AC_DEFUN(AC_STEPMAKE_INIT, [ do \`make conf=CONF' to get output in ./out-CONF], [CONFIGURATION=$enableval]) + ##' + test -n "$CONFIGURATION" && CONFIGSUFFIX="-$CONFIGURATION" CONFIGFILE=config$CONFIGSUFFIX AC_SUBST(CONFIGSUFFIX) AC_CANONICAL_HOST - AC_CHECK_PROGS(MAKE, gmake make, error) - AC_CHECK_PROGS(FIND, find, error) + STEPMAKE_PROGS(MAKE, gmake make, REQUIRED) + STEPMAKE_PROGS(FIND, find, REQUIRED) -dnl system supplied INSTALL is unsafe; use our own install. -dnl AC_PROG_INSTALL -dnl if test "$INSTALL" = "bin/install-sh"; then -dnl export INSTALL="\$\(depth\)/bin/install-sh" -dnl fi - - AC_CHECK_PROGS(TAR, tar, error) + STEPMAKE_PROGS(TAR, tar, REQUIRED) if test "x`uname`" = "xHP-UX"; then AC_PATH_PROG(BASH, bash, /bin/sh) - AC_STEPMAKE_WARN(avoiding buggy /bin/sh) + STEPMAKE_WARN(avoiding buggy /bin/sh) AC_PATH_PROG(SHELL, bash, /bin/ksh) else AC_PATH_PROG(BASH, bash, /bin/sh) @@ -368,49 +565,22 @@ dnl fi AC_SUBST(SHELL) fi + STEPMAKE_PATH_PROG(PYTHON, python, REQUIRED) - AC_PATH_PROG(PYTHON, ${PYTHON:-python}, -echo no python) - AC_SUBST(PYTHON) - - if test $MAKE != "error" ; then - $MAKE -v 2> /dev/null | grep GNU > /dev/null - if test "$?" = 1 - then - AC_STEPMAKE_WARN(Please install *GNU* make) - fi + if expr "$MAKE" : '.*\(echo\)' >/dev/null; then + $MAKE -v 2> /dev/null | grep GNU > /dev/null + if test "$?" = 1; then + warn='make (Please install *GNU* make)' + # STEPMAKE_WARN($warn) + STEPMAKE_ADD_ENTRY(REQUIRED, $warn) + fi fi - AC_CHECK_SEARCH_RESULT($PYTHON, python, You should install Python) - - if test "x$OSTYPE" = "xcygwin32" || test "x$OSTYPE" = "xWindows_NT"; then + if test "$OSTYPE" = "cygwin" -o "$OSTYPE" = "cygwin32" -o "$OSTYPE" = "Windows_NT"; then LN=cp # hard link does not work under cygnus-nt LN_S='cp -r' # symbolic link does not work for native nt ZIP="zip -r -9" # program_suffix=.exe - # urg - # ROOTSEP=':' - # DIRSEP='\\' - # PATHSEP=';' - # - # cygwin fixes all these things. - # it seems these were used because of dos-style TEXINPUTS and - # MFINPUTS needed for miktex. - # but this breaks parsing of all other cygwin/unix style paths. - # - # if your (mik)tex breaks, make a: - # /usr/local/bin/tex: - # #!/bin/sh - # TEXINPUTS=`cygpath -pw $TEXINPUTS` /texmf/miktex/bin/tex $* - # - # and - # - # /usr/local/bin/mf: - # #!/bin/sh - # MFINPUTS=`cygpath -pw $MFINPUTS` /texmf/miktex/bin/mf $* - # - # this way, you may have buildscripts/out/lilypond-profile - # 'automatically' sourced from /usr/etc/profile.d/ too. - # ROOTSEP=':' DIRSEP='/' PATHSEP=':' @@ -432,13 +602,15 @@ dnl fi AC_SUBST(INSTALL) AC_DEFINE_UNQUOTED(DIRSEP, '${DIRSEP}') AC_DEFINE_UNQUOTED(PATHSEP, '${PATHSEP}') - AC_SUBST(PATHSEP) AC_SUBST(DIRSEP) + AC_SUBST(PATHSEP) + AC_SUBST(ROOTSEP) - AC_STEPMAKE_DATADIR + STEPMAKE_DATADIR ]) -AC_DEFUN(AC_STEPMAKE_KPATHSEA, [ + +AC_DEFUN(STEPMAKE_KPATHSEA, [ kpathsea_b=yes #FIXME --with-xxx is meant for specifying a PATH too, @@ -466,42 +638,15 @@ AC_DEFUN(AC_STEPMAKE_KPATHSEA, [ AC_DEFINE_UNQUOTED(KPATHSEA, $KPATHSEA) ]) -AC_DEFUN(AC_STEPMAKE_LEXYACC, [ - # ugh, automake: we want (and check for) bison - AC_PROG_YACC - # ugh, automake: we want (and check for) flex - # AC_PROG_LEX - # urg: automake 1.3: hope this doesn't break 1.2 ac_cv_pro_lex_root hack... - # AC_DECL_YYTEXT - # ugh, ugh - ac_cv_prog_lex_root=lex.yy - - AC_CHECK_PROGS(BISON, bison, error) - AC_CHECK_PROGS(FLEX, flex, error) - AC_CHECK_SEARCH_RESULT($BISON, bison, Please install Bison, 1.25 or newer) - AC_CHECK_SEARCH_RESULT($FLEX, flex, Please install Flex, 2.5 or newer) - - if test $BISON != "error"; then - bison_version=`$BISON --version | sed 's/^.*version 1.//g'` - if test `echo $bison_version | sed 's/\..*$//g'` -lt 25; then - AC_STEPMAKE_WARN(Your bison is a bit old (1.$bison_version). You might have to install 1.25) - fi - fi - - AC_SUBST(BISON) - AC_SUBST(FLEX) -]) - -AC_DEFUN(AC_STEPMAKE_LIB, [ - AC_CHECK_PROGS(AR, ar, error) +AC_DEFUN(STEPMAKE_LIB, [ + STEPMAKE_PROGS(AR, ar, $1) AC_PROG_RANLIB - - AC_SUBST(AR) - AC_SUBST(RANLIB) + STEPMAKE_OPTIONAL_REQUIRED(RANLIB, ranlib, $1) ]) -AC_DEFUN(AC_STEPMAKE_LIBTOOL, [ + +AC_DEFUN(STEPMAKE_LIBTOOL, [ # libtool.info ... # **Never** try to set library version numbers so that they correspond # to the release number of your package. This is an abuse that only @@ -517,7 +662,8 @@ AC_DEFUN(AC_STEPMAKE_LIBTOOL, [ AC_SUBST(AGE) ]) -AC_DEFUN(AC_STEPMAKE_LOCALE, [ + +AC_DEFUN(STEPMAKE_LOCALE, [ lang=English ALL_LINGUAS="en nl" @@ -547,29 +693,15 @@ AC_DEFUN(AC_STEPMAKE_LOCALE, [ AC_MSG_RESULT($lang) if test "$lang" = "unknown" ; then - AC_STEPMAKE_WARN($language not supported; available are: $ALL_LINGUAS) + STEPMAKE_WARN($language not supported; available are: $ALL_LINGUAS) fi ]) -AC_DEFUN(AC_STEPMAKE_GETTEXT, [ - DIR_LOCALEDIR=${localedir} - presome=${prefix} - if test "$prefix" = "NONE"; then - presome=${ac_default_prefix} - fi - DIR_LOCALEDIR=`echo ${DIR_LOCALEDIR} | sed "s!\\\${prefix}!$presome!"` - AC_SUBST(localedir) - AC_SUBST(DIR_LOCALEDIR) - AC_DEFINE_UNQUOTED(DIR_LOCALEDIR, "${DIR_LOCALEDIR}") - - AC_CHECK_LIB(intl, gettext) - AC_CHECK_FUNCS(gettext) -]) -AC_DEFUN(AC_STEPMAKE_MAKEINFO, [ - AC_CHECK_PROGS(MAKEINFO, makeinfo, error) - if test "$MAKEINFO" != "error"; then +AC_DEFUN(STEPMAKE_MAKEINFO, [ + STEPMAKE_PROGS(MAKEINFO, makeinfo, $1) + if test "$MAKEINFO" = "makeinfo"; then AC_MSG_CHECKING(whether makeinfo can split html by @node) mkdir -p out makeinfo --html --output=out/split < /dev/null ; then - AC_MSG_RESULT("cannot execute $guile_config") - AC_MSG_ERROR("cannot find guile-config; is Guile installed?") - exit 1 - fi - GUILE_CFLAGS="`$guile_config compile`" - GUILE_LDFLAGS="`$guile_config link`" - AC_SUBST(GUILE_CFLAGS) - AC_SUBST(GUILE_LDFLAGS) - AC_MSG_RESULT(yes) -]) - - -# Configure paths for GTK+ -# Owen Taylor 97-11-3 - -dnl AM_PATH_GTK([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]]) -dnl Test for GTK, and define GTK_CFLAGS and GTK_LIBS -dnl -AC_DEFUN(AM_PATH_GTK, -[dnl -dnl Get the cflags and libraries from the gtk-config script -dnl - AC_PATH_PROG(GTK_CONFIG, gtk-config, no) - min_gtk_version=ifelse([$1], ,1.1.1,$1) - AC_MSG_CHECKING(for GTK - version >= $min_gtk_version) - no_gtk="" - if test "$GTK_CONFIG" != "no" ; then - GTK_CFLAGS=`$GTK_CONFIG --cflags` - GTK_LIBS=`$GTK_CONFIG --libs` - ac_save_CFLAGS="$CFLAGS" - ac_save_LIBS="$LIBS" - ac_save_CXXFLAGS="$CXXFLAGS" - CFLAGS="$CFLAGS $GTK_CFLAGS" - CXXFLAGS="$CXXFLAGS $GTK_CFLAGS" - LIBS="$LIBS $GTK_LIBS" -dnl -dnl Now check if the installed GTK is sufficiently new. (Also sanity -dnl checks the results of gtk-config to some extent) -dnl - AC_TRY_RUN([ -#include -#include - -int -main () -{ - int major, minor, micro; - - if (sscanf("$min_gtk_version", "%d.%d.%d", &major, &minor, µ) != 3) { - printf("%s, bad version string\n", "$min_gtk_version"); - exit(1); - } - - return !((gtk_major_version > major) || - ((gtk_major_version == major) && (gtk_minor_version > minor)) || - ((gtk_major_version == major) && (gtk_minor_version == minor) && (gtk_micro_version >= micro))); -} -],, no_gtk=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"]) - CFLAGS="$ac_save_CFLAGS" - CXXFLAGS="$ac_save_CXXFLAGS" - LIBS="$ac_save_LIBS" - else - no_gtk=yes - fi - if test "x$no_gtk" = x ; then - AC_MSG_RESULT(yes) - ifelse([$2], , :, [$2]) - else - AC_MSG_RESULT(no) - GTK_CFLAGS="" - GTK_LIBS="" - ifelse([$3], , :, [$3]) - fi - CXXFLAGS="$CXXFLAGS $GTK_CFLAGS" - AC_SUBST(CXXFLAGS) - AC_SUBST(GTK_CFLAGS) - AC_SUBST(GTK_LIBS) -]) - - -# Configure paths for GTK-- -# Erik Andersen 30 May 1998 -# Modified by Tero Pulkkinen (added the compiler checks... I hope they work..) - -dnl Test for GTK__, and define GTK___CFLAGS and GTK___LIBS -dnl to be used as follows: -dnl AM_PATH_GTKMM([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]]) -dnl - -dnl Get the cflags and libraries from the gtkmm-config script -dnl -AC_ARG_WITH(gtkmm-prefix,[ --with-gtkmm-prefix=PREFIX - Prefix where GTK-- is installed (optional)], - gtkmm_config_prefix="$withval", gtkmm_config_prefix="") -AC_ARG_WITH(gtkmm-exec-prefix,[ --with-gtkmm-exec-prefix=PREFIX - Exec prefix where GTK-- is installed (optional)], - gtkmm_config_exec_prefix="$withval", gtkmm_config_exec_prefix="") -AC_ARG_ENABLE(gtkmmtest, [ --disable-gtkmmtest Do not try to compile and run a test GTK-- program], - , enable_gtkmmtest=yes) - - if test x$gtkmm_config_exec_prefix != x ; then - gtkmm_config_args="$gtkmm_config_args --exec-prefix=$gtkmm_config_exec_prefix" - if test x${GTKMM_CONFIG+set} != xset ; then - GTKMM_CONFIG=$gtkmm_config_exec_prefix/bin/gtkmm-config - fi - fi - if test x$gtkmm_config_prefix != x ; then - gtkmm_config_args="$gtkmm_config_args --prefix=$gtkmm_config_prefix" - if test x${GTKMM_CONFIG+set} != xset ; then - GTKMM_CONFIG=$gtkmm_config_prefix/bin/gtkmm-config - fi - fi - - -AC_DEFUN(AM_PATH_GTKMM, -[dnl - -dnl -dnl Check if the installed GTK-- is sufficiently new. -dnl - AC_PATH_PROG(GTKMM_CONFIG, gtkmm-config, no) - min_gtkmm_version=ifelse([$1], ,0.9.14,$1) - - AC_MSG_CHECKING(for GTK-- - version >= $min_gtkmm_version) - no_gtkmm="" - if test "$GTKMM_CONFIG" = "no" ; then - no_gtkmm=yes - else - AC_LANG_SAVE - AC_LANG_CPLUSPLUS - - GTK___CFLAGS=`$GTKMM_CONFIG $gtkmm_config_args --cflags` - GTK___LIBS=`$GTKMM_CONFIG $gtkmm_config_args --libs` - gtkmm_config_major_version=`$GTKMM_CONFIG $gtkmm_config_args --version | \ - sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'` - gtkmm_config_minor_version=`$GTKMM_CONFIG $gtkmm_config_args --version | \ - sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'` - gtkmm_config_micro_version=`$GTKMM_CONFIG $gtkmm_config_args --version | \ - sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'` - if test "x$enable_gtkmmtest" = "xyes" ; then - ac_save_CXXFLAGS="$CXXFLAGS" - ac_save_LIBS="$LIBS" - CXXFLAGS="$CXXFLAGS $GTK___CFLAGS" - LIBS="$LIBS $GTK___LIBS" -dnl -dnl Now check if the installed GTK-- is sufficiently new. (Also sanity -dnl checks the results of gtkmm-config to some extent -dnl - rm -f conf.gtkmmtest - AC_TRY_RUN([ -#include -#include -#include - -int -main () -{ - int major, minor, micro; - char *tmp_version; - - system ("touch conf.gtkmmtest"); - - /* HP/UX 0 (%@#!) writes to sscanf strings */ - tmp_version = g_strdup("$min_gtkmm_version"); - if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, µ) != 3) { - printf("%s, bad version string\n", "$min_gtkmm_version"); - exit(1); - } - - if ((gtkmm_major_version != $gtkmm_config_major_version) || - (gtkmm_minor_version != $gtkmm_config_minor_version) || - (gtkmm_micro_version != $gtkmm_config_micro_version)) - { - printf("\n*** 'gtkmm-config --version' returned %d.%d.%d, but GTK-- (%d.%d.%d)\n", - $gtkmm_config_major_version, $gtkmm_config_minor_version, $gtkmm_config_micro_version, - gtkmm_major_version, gtkmm_minor_version, gtkmm_micro_version); - printf ("*** was found! If gtkmm-config was correct, then it is best\n"); - printf ("*** to remove the old version of GTK--. You may also be able to fix the error\n"); - printf("*** by modifying your LD_LIBRARY_PATH enviroment variable, or by editing\n"); - printf("*** /etc/ld.so.conf. Make sure you have run ldconfig if that is\n"); - printf("*** required on your system.\n"); - printf("*** If gtkmm-config was wrong, set the environment variable GTKMM_CONFIG\n"); - printf("*** to point to the correct copy of gtkmm-config, and remove the file config.cache\n"); - printf("*** before re-running configure\n"); - } -/* GTK-- does not have the GTKMM_*_VERSION constants */ -/* - else if ((gtkmm_major_version != GTKMM_MAJOR_VERSION) || - (gtkmm_minor_version != GTKMM_MINOR_VERSION) || - (gtkmm_micro_version != GTKMM_MICRO_VERSION)) - { - printf("*** GTK-- header files (version %d.%d.%d) do not match\n", - GTKMM_MAJOR_VERSION, GTKMM_MINOR_VERSION, GTKMM_MICRO_VERSION); - printf("*** library (version %d.%d.%d)\n", - gtkmm_major_version, gtkmm_minor_version, gtkmm_micro_version); - } -*/ - else - { - if ((gtkmm_major_version > major) || - ((gtkmm_major_version == major) && (gtkmm_minor_version > minor)) || - ((gtkmm_major_version == major) && (gtkmm_minor_version == minor) && (gtkmm_micro_version >= micro))) - { - return 0; - } - else - { - printf("\n*** An old version of GTK-- (%d.%d.%d) was found.\n", - gtkmm_major_version, gtkmm_minor_version, gtkmm_micro_version); - printf("*** You need a version of GTK-- newer than %d.%d.%d. The latest version of\n", - major, minor, micro); - printf("*** GTK-- is always available from ftp://ftp.gtk.org.\n"); - printf("***\n"); - printf("*** If you have already installed a sufficiently new version, this error\n"); - printf("*** probably means that the wrong copy of the gtkmm-config shell script is\n"); - printf("*** being found. The easiest way to fix this is to remove the old version\n"); - printf("*** of GTK--, but you can also set the GTKMM_CONFIG environment to point to the\n"); - printf("*** correct copy of gtkmm-config. (In this case, you will have to\n"); - printf("*** modify your LD_LIBRARY_PATH enviroment variable, or edit /etc/ld.so.conf\n"); - printf("*** so that the correct libraries are found at run-time))\n"); - } - } - return 1; -} -],, no_gtkmm=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"]) - CXXFLAGS="$ac_save_CXXFLAGS" - LIBS="$ac_save_LIBS" - fi - fi - if test "x$no_gtkmm" = x ; then - AC_MSG_RESULT(yes) - ifelse([$2], , :, [$2]) - else - AC_MSG_RESULT(no) - if test "$GTKMM_CONFIG" = "no" ; then - echo "*** The gtkmm-config script installed by GTK-- could not be found" - echo "*** If GTK-- was installed in PREFIX, make sure PREFIX/bin is in" - echo "*** your path, or set the GTK_CONFIG environment variable to the" - echo "*** full path to gtk-config." - echo "*** The gtkmm-config script was not available in GTK-- versions" - echo "*** prior to 0.9.12. Perhaps you need to update your installed" - echo "*** version to 0.9.12 or newer" - else - if test -f conf.gtkmmtest ; then - : - else - echo "*** Could not run GTK-- test program, checking why..." - CXXFLAGS="$CFLAGS $GTKMM_CXXFLAGS" - LIBS="$LIBS $GTK___LIBS" - AC_TRY_LINK([ -#include -#include -], [ return ((gtkmm_major_version) || (gtkmm_minor_version) || (gtkmm_micro_version)); ], - [ echo "*** The test program compiled, but did not run. This usually means" - echo "*** that the run-time linker is not finding GTK-- or finding the wrong" - echo "*** version of GTK--. If it is not finding GTK--, you'll need to set your" - echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point" - echo "*** to the installed location Also, make sure you have run ldconfig if that" - echo "*** is required on your system" - echo "***" - echo "*** If you have an old version installed, it is best to remove it, although" - echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH" ], - [ echo "*** The test program failed to compile or link. See the file config.log for the" - echo "*** exact error that occured. This usually means GTK-- was incorrectly installed" - echo "*** or that you have moved GTK-- since it was installed. In the latter case, you" - echo "*** may want to edit the gtkmm-config script: $GTKMM_CONFIG" ]) - CXXFLAGS="$ac_save_CXXFLAGS" - LIBS="$ac_save_LIBS" - fi - fi - GTK___CFLAGS="" - GTK__LIBS="" - ifelse([$3], , :, [$3]) - AC_LANG_RESTORE - fi - AC_SUBST(GTK___CFLAGS) - AC_SUBST(GTK___LIBS) - rm -f conf.gtkmmtest -]) - -# Configure paths for GTK--DRAW -# Derek Quinn Wyatt 98-08-21 (adapted from Jan Nieuwenhuizen's code) - -dnl AM_PATH_GTK__DRAW([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]]) -dnl Test for GTK--DRAW, and define GTK___CFLAGS and GTK___LIBS -dnl -AC_DEFUN(AM_PATH_GTK__DRAW, -[dnl -dnl Get the cflags and libraries from the gtk__-config script -dnl - AC_PATH_PROG(GTKMM_CONFIG, gtkmm-config, no) - min_gtk___version=ifelse([$1], ,0.0.5,$1) - AC_MSG_CHECKING(for GTK--DRAW - version >= $min_gtk___version) - no_gtk__="" - if test "$GTKMM_CONFIG" != "no" ; then - GTK___CFLAGS=`$GTKMM_CONFIG --cflags` - GTK___LIBS=`$GTKMM_CONFIG --libs` - GTK___DLIBS="$GTK___LIBS -lgtkmmdraw" - GTK___LIBS="$GTK___DLIBS" - ac_save_CFLAGS="$CFLAGS" - ac_save_LIBS="$LIBS" - ac_save_CXXFLAGS="$CXXFLAGS" - CFLAGS="$CFLAGS $GTK___CFLAGS" - CXXFLAGS="$CXXFLAGS $GTK___CFLAGS" - LIBS="$LIBS $GTK___LIBS" -dnl -dnl Now check if the installed GTK__ is sufficiently new. (Also sanity -dnl checks the results of gtk__-config to some extent) -dnl - AC_TRY_RUN([ -#include -#include - -int -main () -{ - // urg - return 0; -} -],, no_gtk__=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"]) - CFLAGS="$ac_save_CFLAGS" - CXXFLAGS="$ac_save_CXXFLAGS" - LIBS="$ac_save_LIBS" - else - no_gtk__=yes - fi - if test "x$no_gtk__" = x ; then - AC_MSG_RESULT(yes) - ifelse([$2], , :, [$2]) - else - AC_MSG_RESULT(no) - GTK___CFLAGS="" - GTK___LIBS="" - ifelse([$3], , :, [$3]) - fi - CXXFLAGS="$CXXFLAGS $GTK___CFLAGS" - AC_SUBST(CXXFLAGS) - AC_SUBST(GTK___CFLAGS) - AC_SUBST(GTK___LIBS) -]) diff --git a/autogen.sh b/autogen.sh new file mode 100755 index 0000000000..0b9241673a --- /dev/null +++ b/autogen.sh @@ -0,0 +1,42 @@ +#!/bin/sh +# WARNING WARNING WARNING +# do not edit! this is autogen.sh, generated from stepmake/autogen.sh +#!/bin/sh +# Run this to generate configure and initial GNUmakefiles + +srcdir=`dirname $0` +DIE=0 + +# autoconf > 2.50 is not very common yet, +# and disappointingly incompatible with the widely available 2.13 +version=`autoconf --version 2>/dev/null | awk '{print $3}'` +if test "$version" != "2.13"; then + echo "ERROR: Please install autoconf 2.13" + exit 1 +fi + +if test -z "$*"; then + echo "WARNING: I am going to run \`configure' with no arguments." + echo "If you wish to pass any to it, please specify them on the" + echo \`$0\'" command line." + echo +fi + +for coin in `find $srcdir -name configure.in -print` +do + dr=`dirname $coin` + echo processing $dr + ( + cd $dr + echo "Running autoconf ..." + autoconf + ) +done + +#conf_flags="--enable-maintainer-mode --enable-compile-warnings" #--enable-iso-c +if test -z "$NOCONFIGURE"; then + echo Running $srcdir/configure $conf_flags "$@" ... + $srcdir/configure $conf_flags "$@" +else + echo Skipping configure process. +fi diff --git a/buildscripts/lilypond-login.sh b/buildscripts/lilypond-login.sh index ded4d57a6d..9e7278f681 100644 --- a/buildscripts/lilypond-login.sh +++ b/buildscripts/lilypond-login.sh @@ -4,39 +4,38 @@ # # Red Hat-like systems should install this in /etc/profile.d/ +# If run by hand or from you .login, run as follows +# source lilypond-profile + + + # strange shell, this C set datadir="@datadir@" -setenv GS_FONTPATH "$datadir/afm:@datadir@/pfa:$GS_FONTPATH" -setenv GS_LIB "$datadir/ps:$GS_LIB" + if ( $?GS_LIB ) then + setenv GS_LIB "$datadir/ps:$GS_LIB" + else + setenv GS_LIB "$datadir/ps" + endif + + # setenv LILYPONDPREFIX "$datadir" # bit silly. for ly2dvi, overrules compiled-in datadir... # setenv LILYPONDPREFIX "@datadir@" -# include an empty path component for the system wide includes. -if ($?MFINPUTS) then - setenv MFINPUTS "$datadir/mf:${MFINPUTS}::" -else - setenv MFINPUTS "$datadir/mf::" -endif -if ($?TEXINPUTS) then - setenv TEXINPUTS "$datadir/tex:${TEXINPUTS}::" -else - setenv TEXINPUTS "$datadir/tex::" -endif -if ($?TFMFONTS) then - setenv TFMFONTS "$datadir/tfm:$TFMFONTS" -else - setenv TFMFONTS "$datadir/tfm::" -endif - -if ($?DVIPSHEADERS) then - setenv DVIPSHEADERS "$datadir/pfa:$DVIPSHEADERS" -else - setenv DVIPSHEADERS "$datadir/pfa::" -endif +# Add the installation directory to the teTeX system tree, +# see Documentation/misc/fontinstallation +set noglob +setenv TEXMF "{$datadir,"`kpsexpand \$TEXMF`"}" +unset noglob +# Add all available TeX Type1 fonts (including Feta) to Ghostscript: +if ( $?GS_FONTPATH ) then + setenv GS_FONTPATH `kpsewhich -expand-path=\$T1FONTS`:$GS_FONTPATH" + else + setenv GS_FONTPATH `kpsewhich -expand-path=\$T1FONTS` + endif diff --git a/buildscripts/lilypond-profile.sh b/buildscripts/lilypond-profile.sh index c243d0f66a..ab1482f48f 100644 --- a/buildscripts/lilypond-profile.sh +++ b/buildscripts/lilypond-profile.sh @@ -4,35 +4,31 @@ # Red Hat-like systems should install this in /etc/profile.d/ -# This is a bit of a kludge. Ideally, lilypond's tex, afm, pfa, ps -# directories should be installed into their location in the texmf/gs -# trees, rather than messing around with environment variables (eg, -# see Debian or SuSE package). +# If run by hand or from you .profile, run as follows +# . lilypond-profile -datadir="@datadir@" +datadir=`echo "@datadir@" | sed 's!//!/!g'` -# For direct ps output fonts -GS_FONTPATH="$datadir/afm:$datadir/pfa" # For direct ps output: ps/lilyponddefs.ps GS_LIB="$datadir/ps:"${GS_LIB:=""} +export GS_LIB # bit silly. for ly2dvi, overrules compiled-in datadir... # Better comment this out. Compiled-in datadir serves exactly the # same purpose, but is more likely to be correct (think multiple # versions of lilypond). -# LILYPONDPREFIX="$datadir" - -# include an empty path component for the system wide includes. -MFINPUTS="$datadir/mf:"${MFINPUTS:=":"} -TEXINPUTS="$datadir/tex:$datadir/ps:"${TEXINPUTS:=":"} -TFMFONTS="$datadir/tfm:"${TFMFONTS:=":"} -DVIPSHEADERS="$datadir/pfa:"${DVIPSHEADERS:=":"} - # LILYPONDPREFIX="$datadir" # export LILYPONDPREFIX -export DVIPSHEADERS MFINPUTS TEXINPUTS TFMFONTS GS_LIB GS_FONTPATH +# Add the installation directory to the teTeX system tree, +# see Documentation/misc/fontinstallation +TEXMF="{$datadir,"`kpsexpand \\$TEXMF`"}" +export TEXMF + +# For direct ps output fonts. Add all available TeX Type1 fonts +GS_FONTPATH=`kpsewhich -expand-path=\\$T1FONTS`:${GS_FONTPATH:=""} +export GS_FONTPATH diff --git a/buildscripts/make-font-dir.py b/buildscripts/make-font-dir.py new file mode 100644 index 0000000000..f81fe87baf --- /dev/null +++ b/buildscripts/make-font-dir.py @@ -0,0 +1,18 @@ +#!@PYTHON + + +## make a fonts.scale file. + +import re +import sys +import string +ls = sys.stdin.readline () +ls = string.split (ls) +print len(ls) +for fn in ls: + name = re.sub ('\.pf[ab]', '',fn) + name = re.sub ('-', ' ',name) + + print '%s -misc-%s-regular-r-normal--0-0-0-0-p-0-adobe-fontspecific' % (fn, name) + + diff --git a/buildscripts/mf-to-table.py b/buildscripts/mf-to-table.py index bb9c05919b..c4b31fd498 100644 --- a/buildscripts/mf-to-table.py +++ b/buildscripts/mf-to-table.py @@ -119,6 +119,35 @@ def write_tex_defs (file, global_info, charmetrics): for m in charmetrics: file.write (r'''\def\%s%s{\char%d}%s''' % (nm, m['tex'], m['code'],'\n')) +def write_fontlist (file, global_info, charmetrics): + nm = global_info['FontFamily'] + file.write (r""" +% Lilypond file to list all font symbols and the corresponding names +% Automatically generated by mf-to-table.py +\score{\notes{\fatText +""") + for m in charmetrics: + escapedname=re.sub('_','\\\\\\\\_', m['name']) + file.write ('s^#\'(lines (music \"%s\") \"%s\")\n' % (m['name'], escapedname)) + file.write (r""" +} + \paper{ + \translator{ + \ScoreContext + \remove "Bar_number_engraver" + TextScript \override #'extra-extent-X = #'(-1 . 1) + } + \translator{ + \StaffContext + \remove "Clef_engraver" + \remove "Key_engraver" + \remove "Time_signature_engraver" + \remove "Staff_symbol_engraver" + } + } +} +""") + def write_deps (file, deps, targets): for t in targets: @@ -146,12 +175,13 @@ Options: (options, files) = getopt.getopt( sys.argv[1:], 'a:d:hl:o:p:t:', - ['afm=', 'outdir=', 'dep=', 'tex=', 'debug', 'help', 'package=']) + ['afm=', 'outdir=', 'dep=', 'tex=', 'ly=', 'debug', 'help', 'package=']) texfile_nm = ''; depfile_nm = '' afmfile_nm = '' +lyfile_nm = '' outdir_prefix = '.' for opt in options: @@ -163,6 +193,8 @@ for opt in options: outdir_prefix = a elif o == '--tex' or o == '-t': texfile_nm = a + elif o == '--ly' or o == '-': + lyfile_nm = a elif o== '--help' or o == '-h': help() elif o=='--afm' or o == '-a': @@ -185,5 +217,7 @@ for filenm in files: write_afm_metric (afm, g,m) write_tex_defs (open (texfile_nm, 'w'), g, m) write_deps (open (depfile_nm, 'wb'), deps, [texfile_nm, afmfile_nm]) + if lyfile_nm != '': + write_fontlist(open (lyfile_nm, 'w'), g, m) diff --git a/config.make.in b/config.make.in index 0cf0c6e36a..891e913eeb 100644 --- a/config.make.in +++ b/config.make.in @@ -1,51 +1,53 @@ # -*-Makefile-*- +MISSING_OPTIONAL = @OPTIONAL@ +MISSING_REQUIRED = @REQUIRED@ + # @configure_input@ package-depth = @package_depth@ -USER_CFLAGS = @CFLAGS@ +USER_CFLAGS = @CFLAGS@ @CPPFLAGS@ @GUILE_CFLAGS@ USER_CXXFLAGS = @CXXFLAGS@ @CPPFLAGS@ @GUILE_CFLAGS@ USER_LDFLAGS = @LDFLAGS@ @GUILE_LDFLAGS@ +EXTRA_LIBES = @EXTRA_LIBES@ @LIBS@ -CC = @CC@ -CROSS = @cross_compiling@ -CXX = @CXX@ -GCC = @GCC@ -LD = @LD@ PACKAGE = @PACKAGE@ package = @package@ PACKAGE_NAME = @PACKAGE_NAME@ -stepmake = @stepmake@ -CONFIGSUFFIX = @CONFIGSUFFIX@ -MAKEINFO = @MAKEINFO@ -SPLITTING_MAKEINFO = @SPLITTING_MAKEINFO@ -ICFLAGS = @ICFLAGS@ -ILDFLAGS = @ILDFLAGS@ -builddir = @builddir@ -libdir = @libdir@ + prefix = @prefix@ -srcdir = @srcdir@ -TEXPREFIX = @TEXPREFIX@ -TEXDIR = @TEXDIR@ -KPATHSEA = @KPATHSEA@ -MFDIR = @MFDIR@ -mandir = @mandir@ -infodir = @infodir@ exec_prefix = @exec_prefix@ + +builddir = @builddir@ bindir = @bindir@ -includedir = @includedir@ datadir = @datadir@ +includedir = @includedir@ +infodir = @infodir@ +libdir = @libdir@ localedir = @localedir@ -sharedstatedir = @sharedstatedir@ +mandir = @mandir@ program_prefix = @program_prefix@ program_suffix = @program_suffix@ -EXTRA_LIBES = @EXTRA_LIBES@ @LIBS@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +stepmake = @stepmake@ + +CC = @CC@ +GCC = @GCC@ +CROSS = @cross_compiling@ +CXX = @CXX@ +GXX = @GXX@ +LD = @LD@ +CONFIGSUFFIX = @CONFIGSUFFIX@ +MAKEINFO = @MAKEINFO@ +SPLITTING_MAKEINFO = @SPLITTING_MAKEINFO@ +ICFLAGS = @ICFLAGS@ +ILDFLAGS = @ILDFLAGS@ TFM_PATH = @TFM_PATH@ RANLIB = @RANLIB@ DEFS = @DEFS@ DEFINES = @DEFS@ @DEFINES@ -COMPILEINFO = @COMPILEINFO@ DOTEXE = @DOTEXE@ INSTALL = @INSTALL@ BASH = @BASH@ @@ -55,24 +57,22 @@ BISON = @BISON@ FIND = @FIND@ FLEX = @FLEX@ GUILE = @GUILE@ +GUILE_CONFIG = @GUILE_CONFIG@ +GUILE_CFLAGS = @GUILE_CFLAGS@ +GUILE_LDFLAGS = @GUILE_LDFLAGS@ INIMETAFONT = @INIMETAFONT@ -INIMETAPOST = @INIMETAPOST@ -INIMETAPOST_FLAGS = @INIMETAPOST_FLAGS@ LN = @LN@ LN_S = @LN_S@ METAFONT = @METAFONT@ MFMODE = @MFMODE@ -METAPOST = @METAPOST@ -MFPLAIN_MP = @MFPLAIN_MP@ MSGFMT = @MSGFMT@ ROOTSEP = @ROOTSEP@ PATHSEP = @PATHSEP@ PERL = @PERL@ +PKTRACE = @PKTRACE@ PYTHON = @PYTHON@ SHELL = @SHELL@ -STRIPROFF = @STRIPROFF@ TAR= @TAR@ TBL = @TBL@ TROFF = @TROFF@ ZIP = @ZIP@ - diff --git a/configure b/configure index c3c59f65fd..0045abd2d4 100755 --- a/configure +++ b/configure @@ -1,58 +1,5 @@ #! /bin/sh -ac_help="$ac_help - --with-gtkmm-prefix=PREFIX - Prefix where GTK-- is installed (optional)" -# Check whether --with-gtkmm-prefix or --without-gtkmm-prefix was given. -if test "${with_gtkmm_prefix+set}" = set; then - withval="$with_gtkmm_prefix" - gtkmm_config_prefix="$withval" -else - gtkmm_config_prefix="" -fi - -ac_help="$ac_help - --with-gtkmm-exec-prefix=PREFIX - Exec prefix where GTK-- is installed (optional)" -# Check whether --with-gtkmm-exec-prefix or --without-gtkmm-exec-prefix was given. -if test "${with_gtkmm_exec_prefix+set}" = set; then - withval="$with_gtkmm_exec_prefix" - gtkmm_config_exec_prefix="$withval" -else - gtkmm_config_exec_prefix="" -fi - -ac_help="$ac_help - --disable-gtkmmtest Do not try to compile and run a test GTK-- program" -# Check whether --enable-gtkmmtest or --disable-gtkmmtest was given. -if test "${enable_gtkmmtest+set}" = set; then - enableval="$enable_gtkmmtest" - : -else - enable_gtkmmtest=yes -fi - - - if test x$gtkmm_config_exec_prefix != x ; then - gtkmm_config_args="$gtkmm_config_args --exec-prefix=$gtkmm_config_exec_prefix" - if test x${GTKMM_CONFIG+set} != xset ; then - GTKMM_CONFIG=$gtkmm_config_exec_prefix/bin/gtkmm-config - fi - fi - if test x$gtkmm_config_prefix != x ; then - gtkmm_config_args="$gtkmm_config_args --prefix=$gtkmm_config_prefix" - if test x${GTKMM_CONFIG+set} != xset ; then - GTKMM_CONFIG=$gtkmm_config_prefix/bin/gtkmm-config - fi - fi - - - - -# Configure paths for GTK--DRAW -# Derek Quinn Wyatt 98-08-21 (adapted from Jan Nieuwenhuizen's code) - - # Guess values for system-dependent variables and create Makefiles. # Generated automatically using autoconf version 2.13 # Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc. @@ -628,12 +575,12 @@ fi fi echo $ac_n "checking Package""... $ac_c" 1>&6 -echo "configure:632: checking Package" >&5 +echo "configure:579: checking Package" >&5 if test "x$PACKAGE" = "xSTEPMAKE"; then echo "$ac_t""Stepmake package!" 1>&6 echo $ac_n "checking builddir""... $ac_c" 1>&6 -echo "configure:637: checking builddir" >&5 +echo "configure:584: checking builddir" >&5 if test "$srcdir" = "."; then builddir=. else @@ -645,7 +592,6 @@ echo "configure:637: checking builddir" >&5 echo "$ac_t""$builddir" 1>&6 (cd stepmake 2>/dev/null || mkdir stepmake) - (cd stepmake; rm -f stepmake; ln -s ../$srcdir/stepmake .) (cd stepmake; rm -f bin; ln -s ../$srcdir/bin .) ac_aux_dir= for ac_dir in bin $srcdir/bin; do @@ -671,7 +617,7 @@ ac_configure=$ac_aux_dir/configure # This should be Cygnus configure. echo "$ac_t""$PACKAGE" 1>&6 echo $ac_n "checking builddir""... $ac_c" 1>&6 -echo "configure:675: checking builddir" >&5 +echo "configure:621: checking builddir" >&5 if test "$srcdir" = "."; then builddir=. srcdir_build=no @@ -691,7 +637,7 @@ echo "configure:675: checking builddir" >&5 fi echo $ac_n "checking for stepmake""... $ac_c" 1>&6 -echo "configure:695: checking for stepmake" >&5 +echo "configure:641: checking for stepmake" >&5 # Check for installed stepmake if test -d $stepmake; then echo "$ac_t""$stepmake" 1>&6 @@ -802,6 +748,8 @@ if test "${enable_config+set}" = set; then fi + ##' + test -n "$CONFIGURATION" && CONFIGSUFFIX="-$CONFIGURATION" CONFIGFILE=config$CONFIGSUFFIX @@ -813,7 +761,7 @@ else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; } fi echo $ac_n "checking host system type""... $ac_c" 1>&6 -echo "configure:817: checking host system type" >&5 +echo "configure:765: checking host system type" >&5 host_alias=$host case "$host_alias" in @@ -833,12 +781,13 @@ host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` echo "$ac_t""$host" 1>&6 + for ac_prog in gmake make do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:842: checking for $ac_word" >&5 +echo "configure:791: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_MAKE'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -866,14 +815,83 @@ fi test -n "$MAKE" && break done -test -n "$MAKE" || MAKE="error" +test -n "$MAKE" || MAKE="no" + + + + r="`eval echo '$'"MAKE"`" + if test -n "$r" -a "$r" != "error" -a "$r" != "no" && expr '`eval echo '$'"MAKE"`' : '.*\(echo\)' > /dev/null; then + true + else + ##STEPMAKE_WARN(cannot find . ) + false + fi + + if test $? -ne 0; then + + eval "REQUIRED"=\"`eval echo \"'$'REQUIRED\" \"gmake make\"`\" + + if test "REQUIRED" = "REQUIRED"; then + command="echo ERROR: gmake make not found" + # abort configure process here? + else + command="- echo gmake make not found" + fi + eval "MAKE"='$command' + false + else + true + fi + + if test $? -eq 0 -a -n ""; then + + r="`eval echo '$'"MAKE"`" + echo $ac_n "checking "$r version"""... $ac_c" 1>&6 +echo "configure:851: checking "$r version"" >&5 + #exe=`STEPMAKE_GET_EXECUTABLE($r)` + exe=` + ## which doesn't work in ash, if /usr/bin/which isn't installed + ## type -p doesn't work in ash + ## command -v doesn't work in zsh + ## command -v "$r" 2>&1 + ## this test should work in ash, bash, pdksh (ksh), zsh + type -p "$r" 2>/dev/null | tail -1 | awk '{print $NF}' +` + ver=` + "$exe" --version 2>&1 | grep -v '^$' | head -1 | awk '{print $NF}' +` + num=` + echo "$ver" | awk -F. ' + { + if ($3) {last = $3} + else {last =0} + } + {printf "%s%s%s\n",$1*100, $2*10,last}' +` + req=` + echo "" | awk -F. ' + { + if ($3) {last = $3} + else {last =0} + } + {printf "%s%s%s\n",$1*100, $2*10,last}' +` + echo "$ac_t"""$ver"" 1>&6 + if test "$num" -lt "$req"; then + + eval "REQUIRED"=\"`eval echo \"'$'REQUIRED\" \""$r (installed: $ver)"\"`\" + + fi + + fi + for ac_prog in find do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:877: checking for $ac_word" >&5 +echo "configure:895: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_FIND'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -901,16 +919,84 @@ fi test -n "$FIND" && break done -test -n "$FIND" || FIND="error" +test -n "$FIND" || FIND="no" + + + + r="`eval echo '$'"FIND"`" + if test -n "$r" -a "$r" != "error" -a "$r" != "no" && expr '`eval echo '$'"FIND"`' : '.*\(echo\)' > /dev/null; then + true + else + ##STEPMAKE_WARN(cannot find . ) + false + fi + + if test $? -ne 0; then + + eval "REQUIRED"=\"`eval echo \"'$'REQUIRED\" \"find\"`\" + + if test "REQUIRED" = "REQUIRED"; then + command="echo ERROR: find not found" + # abort configure process here? + else + command="- echo find not found" + fi + eval "FIND"='$command' + false + else + true + fi + if test $? -eq 0 -a -n ""; then + + r="`eval echo '$'"FIND"`" + echo $ac_n "checking "$r version"""... $ac_c" 1>&6 +echo "configure:955: checking "$r version"" >&5 + #exe=`STEPMAKE_GET_EXECUTABLE($r)` + exe=` + ## which doesn't work in ash, if /usr/bin/which isn't installed + ## type -p doesn't work in ash + ## command -v doesn't work in zsh + ## command -v "$r" 2>&1 + ## this test should work in ash, bash, pdksh (ksh), zsh + type -p "$r" 2>/dev/null | tail -1 | awk '{print $NF}' +` + ver=` + "$exe" --version 2>&1 | grep -v '^$' | head -1 | awk '{print $NF}' +` + num=` + echo "$ver" | awk -F. ' + { + if ($3) {last = $3} + else {last =0} + } + {printf "%s%s%s\n",$1*100, $2*10,last}' +` + req=` + echo "" | awk -F. ' + { + if ($3) {last = $3} + else {last =0} + } + {printf "%s%s%s\n",$1*100, $2*10,last}' +` + echo "$ac_t"""$ver"" 1>&6 + if test "$num" -lt "$req"; then + + eval "REQUIRED"=\"`eval echo \"'$'REQUIRED\" \""$r (installed: $ver)"\"`\" + + fi + + fi + for ac_prog in tar do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:914: checking for $ac_word" >&5 +echo "configure:1000: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_TAR'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -938,14 +1024,82 @@ fi test -n "$TAR" && break done -test -n "$TAR" || TAR="error" +test -n "$TAR" || TAR="no" + + + + r="`eval echo '$'"TAR"`" + if test -n "$r" -a "$r" != "error" -a "$r" != "no" && expr '`eval echo '$'"TAR"`' : '.*\(echo\)' > /dev/null; then + true + else + ##STEPMAKE_WARN(cannot find . ) + false + fi + + if test $? -ne 0; then + + eval "REQUIRED"=\"`eval echo \"'$'REQUIRED\" \"tar\"`\" + + if test "REQUIRED" = "REQUIRED"; then + command="echo ERROR: tar not found" + # abort configure process here? + else + command="- echo tar not found" + fi + eval "TAR"='$command' + false + else + true + fi + + if test $? -eq 0 -a -n ""; then + + r="`eval echo '$'"TAR"`" + echo $ac_n "checking "$r version"""... $ac_c" 1>&6 +echo "configure:1060: checking "$r version"" >&5 + #exe=`STEPMAKE_GET_EXECUTABLE($r)` + exe=` + ## which doesn't work in ash, if /usr/bin/which isn't installed + ## type -p doesn't work in ash + ## command -v doesn't work in zsh + ## command -v "$r" 2>&1 + ## this test should work in ash, bash, pdksh (ksh), zsh + type -p "$r" 2>/dev/null | tail -1 | awk '{print $NF}' +` + ver=` + "$exe" --version 2>&1 | grep -v '^$' | head -1 | awk '{print $NF}' +` + num=` + echo "$ver" | awk -F. ' + { + if ($3) {last = $3} + else {last =0} + } + {printf "%s%s%s\n",$1*100, $2*10,last}' +` + req=` + echo "" | awk -F. ' + { + if ($3) {last = $3} + else {last =0} + } + {printf "%s%s%s\n",$1*100, $2*10,last}' +` + echo "$ac_t"""$ver"" 1>&6 + if test "$num" -lt "$req"; then + + eval "REQUIRED"=\"`eval echo \"'$'REQUIRED\" \""$r (installed: $ver)"\"`\" + + fi + + fi if test "x`uname`" = "xHP-UX"; then # Extract the first word of "bash", so it can be a program name with args. set dummy bash; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:949: checking for $ac_word" >&5 +echo "configure:1103: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_BASH'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -985,7 +1139,7 @@ fi # Extract the first word of "bash", so it can be a program name with args. set dummy bash; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:989: checking for $ac_word" >&5 +echo "configure:1143: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_SHELL'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1022,7 +1176,7 @@ fi # Extract the first word of "bash", so it can be a program name with args. set dummy bash; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1026: checking for $ac_word" >&5 +echo "configure:1180: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_BASH'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1059,11 +1213,73 @@ fi fi + + for ac_prog in python +do +# Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +echo "configure:1223: checking for $ac_word" >&5 +if eval "test \"`echo '$''{'ac_cv_prog_PYTHON'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + if test -n "$PYTHON"; then + ac_cv_prog_PYTHON="$PYTHON" # Let the user override the test. +else + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" + ac_dummy="$PATH" + for ac_dir in $ac_dummy; do + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/$ac_word; then + ac_cv_prog_PYTHON="$ac_prog" + break + fi + done + IFS="$ac_save_ifs" +fi +fi +PYTHON="$ac_cv_prog_PYTHON" +if test -n "$PYTHON"; then + echo "$ac_t""$PYTHON" 1>&6 +else + echo "$ac_t""no" 1>&6 +fi + +test -n "$PYTHON" && break +done +test -n "$PYTHON" || PYTHON="no" + + + + r="`eval echo '$'"PYTHON"`" + if test -n "$r" -a "$r" != "error" -a "$r" != "no" && expr '`eval echo '$'"PYTHON"`' : '.*\(echo\)' > /dev/null; then + true + else + ##STEPMAKE_WARN(cannot find . ) + false + fi + + if test $? -ne 0; then + + eval "REQUIRED"=\"`eval echo \"'$'REQUIRED\" \"python\"`\" + + if test "REQUIRED" = "REQUIRED"; then + command="echo ERROR: python not found" + # abort configure process here? + else + command="- echo python not found" + fi + eval "PYTHON"='$command' + false + else + true + fi - # Extract the first word of "${PYTHON:-python}", so it can be a program name with args. -set dummy ${PYTHON:-python}; ac_word=$2 + if test $? -eq 0; then + # Extract the first word of "python", so it can be a program name with args. +set dummy python; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1067: checking for $ac_word" >&5 +echo "configure:1283: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_PYTHON'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1085,7 +1301,6 @@ else fi done IFS="$ac_save_ifs" - test -z "$ac_cv_path_PYTHON" && ac_cv_path_PYTHON="-echo no python" ;; esac fi @@ -1096,58 +1311,66 @@ else echo "$ac_t""no" 1>&6 fi - + if test -n ""; then + + r="`eval echo '$'"PYTHON"`" + echo $ac_n "checking "$r version"""... $ac_c" 1>&6 +echo "configure:1319: checking "$r version"" >&5 + #exe=`STEPMAKE_GET_EXECUTABLE($r)` + exe=` + ## which doesn't work in ash, if /usr/bin/which isn't installed + ## type -p doesn't work in ash + ## command -v doesn't work in zsh + ## command -v "$r" 2>&1 + ## this test should work in ash, bash, pdksh (ksh), zsh + type -p "$r" 2>/dev/null | tail -1 | awk '{print $NF}' +` + ver=` + "$exe" --version 2>&1 | grep -v '^$' | head -1 | awk '{print $NF}' +` + num=` + echo "$ver" | awk -F. ' + { + if ($3) {last = $3} + else {last =0} + } + {printf "%s%s%s\n",$1*100, $2*10,last}' +` + req=` + echo "" | awk -F. ' + { + if ($3) {last = $3} + else {last =0} + } + {printf "%s%s%s\n",$1*100, $2*10,last}' +` + echo "$ac_t"""$ver"" 1>&6 + if test "$num" -lt "$req"; then + + eval "REQUIRED"=\"`eval echo \"'$'REQUIRED\" \""$r (installed: $ver)"\"`\" + + fi - if test $MAKE != "error" ; then - $MAKE -v 2> /dev/null | grep GNU > /dev/null - if test "$?" = 1 - then - - echo "configure: warning: Please install *GNU* make" 1>&2 - warn_b=yes - fi - fi + fi - - result="`echo \"$PYTHON\" | grep echo`" - if test "x$PYTHON" = "xerror" -o "x$result" != "x"; then - - echo "configure: warning: can\'t find python. You should install Python" 1>&2 - warn_b=yes - fi + if expr "$MAKE" : '.*\(echo\)' >/dev/null; then + $MAKE -v 2> /dev/null | grep GNU > /dev/null + if test "$?" = 1; then + warn='make (Please install *GNU* make)' + # STEPMAKE_WARN($warn) + + eval "REQUIRED"=\"`eval echo \"'$'REQUIRED\" \"$warn\"`\" + fi + fi - if test "x$OSTYPE" = "xcygwin32" || test "x$OSTYPE" = "xWindows_NT"; then + if test "$OSTYPE" = "cygwin" -o "$OSTYPE" = "cygwin32" -o "$OSTYPE" = "Windows_NT"; then LN=cp # hard link does not work under cygnus-nt LN_S='cp -r' # symbolic link does not work for native nt ZIP="zip -r -9" # program_suffix=.exe - # urg - # ROOTSEP=':' - # DIRSEP='\\' - # PATHSEP=';' - # - # cygwin fixes all these things. - # it seems these were used because of dos-style TEXINPUTS and - # MFINPUTS needed for miktex. - # but this breaks parsing of all other cygwin/unix style paths. - # - # if your (mik)tex breaks, make a: - # /usr/local/bin/tex: - # #!/bin/sh - # TEXINPUTS=`cygpath -pw $TEXINPUTS` /texmf/miktex/bin/tex - # - # and - # - # /usr/local/bin/mf: - # #!/bin/sh - # MFINPUTS=`cygpath -pw $MFINPUTS` /texmf/miktex/bin/mf - # - # this way, you may have buildscripts/out/lilypond-profile - # 'automatically' sourced from /usr/etc/profile.d/ too. - # ROOTSEP=':' DIRSEP='/' PATHSEP=':' @@ -1177,10 +1400,11 @@ EOF + if test "$datadir" = "\${prefix}/share"; then - datadir='${prefix}/share/'$package + datadir='${prefix}/share/'$package/$FULL_VERSION fi DIR_DATADIR=${datadir} presome=${prefix} @@ -1191,8 +1415,10 @@ EOF + + # we used to set DIR_SHAREDSTATEDIR here, + # but apparently that broke something - cat >> confdefs.h <&6 -echo "configure:1275: checking for $ac_word" >&5 +echo "configure:1503: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1301,7 +1529,7 @@ if test -z "$CC"; then # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1305: checking for $ac_word" >&5 +echo "configure:1533: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1352,7 +1580,7 @@ fi # Extract the first word of "cl", so it can be a program name with args. set dummy cl; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1356: checking for $ac_word" >&5 +echo "configure:1584: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1384,7 +1612,7 @@ fi fi echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6 -echo "configure:1388: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 +echo "configure:1616: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 ac_ext=c # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. @@ -1395,12 +1623,12 @@ cross_compiling=$ac_cv_prog_cc_cross cat > conftest.$ac_ext << EOF -#line 1399 "configure" +#line 1627 "configure" #include "confdefs.h" main(){return(0);} EOF -if { (eval echo configure:1404: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:1632: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ac_cv_prog_cc_works=yes # If we can't run a trivial program, we are probably using a cross compiler. if (./conftest; exit) 2>/dev/null; then @@ -1426,12 +1654,12 @@ if test $ac_cv_prog_cc_works = no; then { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; } fi echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 -echo "configure:1430: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 +echo "configure:1658: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6 cross_compiling=$ac_cv_prog_cc_cross echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6 -echo "configure:1435: checking whether we are using GNU C" >&5 +echo "configure:1663: checking whether we are using GNU C" >&5 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1440,7 +1668,7 @@ else yes; #endif EOF -if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1444: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then +if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1672: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then ac_cv_prog_gcc=yes else ac_cv_prog_gcc=no @@ -1459,7 +1687,7 @@ ac_test_CFLAGS="${CFLAGS+set}" ac_save_CFLAGS="$CFLAGS" CFLAGS= echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6 -echo "configure:1463: checking whether ${CC-cc} accepts -g" >&5 +echo "configure:1691: checking whether ${CC-cc} accepts -g" >&5 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1490,14 +1718,40 @@ else fi fi + + + r="`eval echo '$'"CC"`" + if test -n "$r" -a "$r" != "error" -a "$r" != "no" && expr '`eval echo '$'"CC"`' : '.*\(echo\)' > /dev/null; then + true + else + ##STEPMAKE_WARN(cannot find . ) + false + fi + + if test $? -ne 0; then + + eval ""=\"`eval echo \"'$'\" \"cc\"`\" + + if test "" = "REQUIRED"; then + command="echo ERROR: cc not found" + # abort configure process here? + else + command="- echo cc not found" + fi + eval "CC"='$command' + false + else + true + fi + LD='$(CC)' CFLAGS="$CFLAGS $OPTIMIZE" - CPPFLAGS=${CPPFLAGS:-""} + CPPFLAGS=${CPPFLAGS-""} echo $ac_n "checking for IEEE-conformance compiler flags""... $ac_c" 1>&6 -echo "configure:1501: checking for IEEE-conformance compiler flags" >&5 +echo "configure:1755: checking for IEEE-conformance compiler flags" >&5 save_cflags="$CFLAGS" case "$host" in alpha*-*-*) @@ -1517,306 +1771,128 @@ echo "configure:1501: checking for IEEE-conformance compiler flags" >&5 -# AC_HAVE_HEADERS(limits.h malloc.h string.h unistd.h values.h) -echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6 -echo "configure:1523: checking how to run the C preprocessor" >&5 -# On Suns, sometimes $CPP names a directory. -if test -n "$CPP" && test -d "$CPP"; then - CPP= -fi -if test -z "$CPP"; then -if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then + + + if test "$GCC" = "yes"; then + + r="`eval echo '$'"CC"`" + echo $ac_n "checking "$r version"""... $ac_c" 1>&6 +echo "configure:1781: checking "$r version"" >&5 + #exe=`STEPMAKE_GET_EXECUTABLE($r)` + exe=` + ## which doesn't work in ash, if /usr/bin/which isn't installed + ## type -p doesn't work in ash + ## command -v doesn't work in zsh + ## command -v "$r" 2>&1 + ## this test should work in ash, bash, pdksh (ksh), zsh + type -p "$r" 2>/dev/null | tail -1 | awk '{print $NF}' +` + ver=` + "$exe" --version 2>&1 | grep -v '^$' | head -1 | awk '{print $NF}' +` + num=` + echo "$ver" | awk -F. ' + { + if ($3) {last = $3} + else {last =0} + } + {printf "%s%s%s\n",$1*100, $2*10,last}' +` + req=` + echo "2.8" | awk -F. ' + { + if ($3) {last = $3} + else {last =0} + } + {printf "%s%s%s\n",$1*100, $2*10,last}' +` + echo "$ac_t"""$ver"" 1>&6 + if test "$num" -lt "$req"; then + + eval "REQUIRED"=\"`eval echo \"'$'REQUIRED\" \""$r 2.8 (installed: $ver)"\"`\" + + fi + + else + warn="$CC (Please install *GNU* cc)" + + eval "REQUIRED"=\"`eval echo \"'$'REQUIRED\" \"$warn\"`\" + + fi + + + ac_ext=C +# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. +ac_cpp='$CXXCPP $CPPFLAGS' +ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' +ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' +cross_compiling=$ac_cv_prog_cxx_cross + + for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl +do +# Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +echo "configure:1837: checking for $ac_word" >&5 +if eval "test \"`echo '$''{'ac_cv_prog_CXX'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else - # This must be in double quotes, not single quotes, because CPP may get - # substituted into the Makefile and "${CC-cc}" will confuse make. - CPP="${CC-cc} -E" - # On the NeXT, cc -E runs the code through the compiler's parser, - # not just through cpp. - cat > conftest.$ac_ext < -Syntax Error -EOF -ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1544: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` -if test -z "$ac_err"; then - : + if test -n "$CXX"; then + ac_cv_prog_CXX="$CXX" # Let the user override the test. else - echo "$ac_err" >&5 - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - CPP="${CC-cc} -E -traditional-cpp" - cat > conftest.$ac_ext < -Syntax Error -EOF -ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1561: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` -if test -z "$ac_err"; then - : + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" + ac_dummy="$PATH" + for ac_dir in $ac_dummy; do + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/$ac_word; then + ac_cv_prog_CXX="$ac_prog" + break + fi + done + IFS="$ac_save_ifs" +fi +fi +CXX="$ac_cv_prog_CXX" +if test -n "$CXX"; then + echo "$ac_t""$CXX" 1>&6 else - echo "$ac_err" >&5 - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - CPP="${CC-cc} -nologo -E" - cat > conftest.$ac_ext <&6 +fi + +test -n "$CXX" && break +done +test -n "$CXX" || CXX="gcc" + + +echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works""... $ac_c" 1>&6 +echo "configure:1869: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works" >&5 + +ac_ext=C +# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. +ac_cpp='$CXXCPP $CPPFLAGS' +ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' +ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' +cross_compiling=$ac_cv_prog_cxx_cross + +cat > conftest.$ac_ext << EOF + +#line 1880 "configure" #include "confdefs.h" -#include -Syntax Error + +int main(){return(0);} EOF -ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1578: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` -if test -z "$ac_err"; then - : +if { (eval echo configure:1885: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + ac_cv_prog_cxx_works=yes + # If we can't run a trivial program, we are probably using a cross compiler. + if (./conftest; exit) 2>/dev/null; then + ac_cv_prog_cxx_cross=no + else + ac_cv_prog_cxx_cross=yes + fi else - echo "$ac_err" >&5 echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 - rm -rf conftest* - CPP=/lib/cpp -fi -rm -f conftest* -fi -rm -f conftest* -fi -rm -f conftest* - ac_cv_prog_CPP="$CPP" -fi - CPP="$ac_cv_prog_CPP" -else - ac_cv_prog_CPP="$CPP" -fi -echo "$ac_t""$CPP" 1>&6 - -for ac_hdr in assert.h sys/stat.h -do -ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` -echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:1606: checking for $ac_hdr" >&5 -if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext < -EOF -ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1616: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` -if test -z "$ac_err"; then - rm -rf conftest* - eval "ac_cv_header_$ac_safe=yes" -else - echo "$ac_err" >&5 - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_header_$ac_safe=no" -fi -rm -f conftest* -fi -if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` - cat >> confdefs.h <&6 -fi -done - -echo $ac_n "checking whether stat file-mode macros are broken""... $ac_c" 1>&6 -echo "configure:1643: checking whether stat file-mode macros are broken" >&5 -if eval "test \"`echo '$''{'ac_cv_header_stat_broken'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext < -#include - -#if defined(S_ISBLK) && defined(S_IFDIR) -# if S_ISBLK (S_IFDIR) -You lose. -# endif -#endif - -#if defined(S_ISBLK) && defined(S_IFCHR) -# if S_ISBLK (S_IFCHR) -You lose. -# endif -#endif - -#if defined(S_ISLNK) && defined(S_IFREG) -# if S_ISLNK (S_IFREG) -You lose. -# endif -#endif - -#if defined(S_ISSOCK) && defined(S_IFREG) -# if S_ISSOCK (S_IFREG) -You lose. -# endif -#endif - -EOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - egrep "You lose" >/dev/null 2>&1; then - rm -rf conftest* - ac_cv_header_stat_broken=yes -else - rm -rf conftest* - ac_cv_header_stat_broken=no -fi -rm -f conftest* - -fi - -echo "$ac_t""$ac_cv_header_stat_broken" 1>&6 -if test $ac_cv_header_stat_broken = yes; then - cat >> confdefs.h <<\EOF -#define STAT_MACROS_BROKEN 1 -EOF - -fi - - -DEFINES="$DEFINES -DSTRING_UTILS_INLINED" -cat >> confdefs.h <<\EOF -#define STRINGS_UTILS_INLINED 1 -EOF - - -echo $ac_n "checking how to run the C++ preprocessor""... $ac_c" 1>&6 -echo "configure:1706: checking how to run the C++ preprocessor" >&5 -if test -z "$CXXCPP"; then -if eval "test \"`echo '$''{'ac_cv_prog_CXXCPP'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - ac_ext=C -# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. -ac_cpp='$CXXCPP $CPPFLAGS' -ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' -ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' -cross_compiling=$ac_cv_prog_cxx_cross - CXXCPP="${CXX-g++} -E" - cat > conftest.$ac_ext < -EOF -ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1724: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` -if test -z "$ac_err"; then - : -else - echo "$ac_err" >&5 - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - CXXCPP=/lib/cpp -fi -rm -f conftest* - ac_cv_prog_CXXCPP="$CXXCPP" -ac_ext=C -# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. -ac_cpp='$CXXCPP $CPPFLAGS' -ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' -ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' -cross_compiling=$ac_cv_prog_cxx_cross -fi -fi -CXXCPP="$ac_cv_prog_CXXCPP" -echo "$ac_t""$CXXCPP" 1>&6 - - - ac_ext=C -# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. -ac_cpp='$CXXCPP $CPPFLAGS' -ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' -ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' -cross_compiling=$ac_cv_prog_cxx_cross - - for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl -do -# Extract the first word of "$ac_prog", so it can be a program name with args. -set dummy $ac_prog; ac_word=$2 -echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1761: checking for $ac_word" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_CXX'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - if test -n "$CXX"; then - ac_cv_prog_CXX="$CXX" # Let the user override the test. -else - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" - ac_dummy="$PATH" - for ac_dir in $ac_dummy; do - test -z "$ac_dir" && ac_dir=. - if test -f $ac_dir/$ac_word; then - ac_cv_prog_CXX="$ac_prog" - break - fi - done - IFS="$ac_save_ifs" -fi -fi -CXX="$ac_cv_prog_CXX" -if test -n "$CXX"; then - echo "$ac_t""$CXX" 1>&6 -else - echo "$ac_t""no" 1>&6 -fi - -test -n "$CXX" && break -done -test -n "$CXX" || CXX="gcc" - - -echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works""... $ac_c" 1>&6 -echo "configure:1793: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works" >&5 - -ac_ext=C -# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. -ac_cpp='$CXXCPP $CPPFLAGS' -ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' -ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' -cross_compiling=$ac_cv_prog_cxx_cross - -cat > conftest.$ac_ext << EOF - -#line 1804 "configure" -#include "confdefs.h" - -int main(){return(0);} -EOF -if { (eval echo configure:1809: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - ac_cv_prog_cxx_works=yes - # If we can't run a trivial program, we are probably using a cross compiler. - if (./conftest; exit) 2>/dev/null; then - ac_cv_prog_cxx_cross=no - else - ac_cv_prog_cxx_cross=yes - fi -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - ac_cv_prog_cxx_works=no + ac_cv_prog_cxx_works=no fi rm -fr conftest* ac_ext=C @@ -1831,12 +1907,12 @@ if test $ac_cv_prog_cxx_works = no; then { echo "configure: error: installation or configuration problem: C++ compiler cannot create executables." 1>&2; exit 1; } fi echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 -echo "configure:1835: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler" >&5 +echo "configure:1911: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler" >&5 echo "$ac_t""$ac_cv_prog_cxx_cross" 1>&6 cross_compiling=$ac_cv_prog_cxx_cross echo $ac_n "checking whether we are using GNU C++""... $ac_c" 1>&6 -echo "configure:1840: checking whether we are using GNU C++" >&5 +echo "configure:1916: checking whether we are using GNU C++" >&5 if eval "test \"`echo '$''{'ac_cv_prog_gxx'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1845,7 +1921,7 @@ else yes; #endif EOF -if { ac_try='${CXX-g++} -E conftest.C'; { (eval echo configure:1849: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then +if { ac_try='${CXX-g++} -E conftest.C'; { (eval echo configure:1925: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then ac_cv_prog_gxx=yes else ac_cv_prog_gxx=no @@ -1864,7 +1940,7 @@ ac_test_CXXFLAGS="${CXXFLAGS+set}" ac_save_CXXFLAGS="$CXXFLAGS" CXXFLAGS= echo $ac_n "checking whether ${CXX-g++} accepts -g""... $ac_c" 1>&6 -echo "configure:1868: checking whether ${CXX-g++} accepts -g" >&5 +echo "configure:1944: checking whether ${CXX-g++} accepts -g" >&5 if eval "test \"`echo '$''{'ac_cv_prog_cxx_g'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1895,43 +1971,82 @@ else fi fi - - ac_safe=`echo "FlexLexer.h" | sed 'y%./+-%__p_%'` -echo $ac_n "checking for FlexLexer.h""... $ac_c" 1>&6 -echo "configure:1902: checking for FlexLexer.h" >&5 -if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +for ac_declaration in \ + ''\ + '#include ' \ + 'extern "C" void std::exit (int) throw (); using std::exit;' \ + 'extern "C" void std::exit (int); using std::exit;' \ + 'extern "C" void exit (int) throw ();' \ + 'extern "C" void exit (int);' \ + 'void exit (int);' +do + cat > conftest.$ac_ext < +$ac_declaration +int main() { +exit (42); +; return 0; } +EOF +if { (eval echo configure:1993: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + : else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + continue +fi +rm -f conftest* cat > conftest.$ac_ext < +$ac_declaration +int main() { +exit (42); +; return 0; } EOF -ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1912: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` -if test -z "$ac_err"; then +if { (eval echo configure:2010: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* - eval "ac_cv_header_$ac_safe=yes" + break else - echo "$ac_err" >&5 echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_header_$ac_safe=no" fi rm -f conftest* +done +if test -n "$ac_declaration"; then + echo '#ifdef __cplusplus' >>confdefs.h + echo $ac_declaration >>confdefs.h + echo '#endif' >>confdefs.h fi -if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then - echo "$ac_t""yes" 1>&6 - true -else - echo "$ac_t""no" 1>&6 - echo "configure: warning: can"\'"t find flex header. Please install Flex headers correctly" 1>&2 - warn_b=yes -fi + + + r="`eval echo '$'"CXX"`" + if test -n "$r" -a "$r" != "error" -a "$r" != "no" && expr '`eval echo '$'"CXX"`' : '.*\(echo\)' > /dev/null; then + true + else + ##STEPMAKE_WARN(cannot find . ) + false + fi + + if test $? -ne 0; then + + eval "REQUIRED"=\"`eval echo \"'$'REQUIRED\" \"c++\"`\" + + if test "REQUIRED" = "REQUIRED"; then + command="echo ERROR: c++ not found" + # abort configure process here? + else + command="- echo c++ not found" + fi + eval "CXX"='$command' + false + else + true + fi CPPFLAGS="$CPPFLAGS $DEFINES" @@ -1944,31 +2059,61 @@ fi - echo $ac_n "checking "g++ version"""... $ac_c" 1>&6 -echo "configure:1949: checking "g++ version"" >&5 - cxx_version=`$CXX --version` - echo "$ac_t"""$cxx_version"" 1>&6 - # urg, egcs: how to check for egcs >= 1.1? - if expr "$cxx_version" : '.*2\.[89]' > /dev/null || - expr "$cxx_version" : '.*egcs' > /dev/null || - expr "$cxx_version" : '3\.0' > /dev/null - then - true + if test "$GXX" = "yes"; then + + r="`eval echo '$'"CXX"`" + echo $ac_n "checking "$r version"""... $ac_c" 1>&6 +echo "configure:2067: checking "$r version"" >&5 + #exe=`STEPMAKE_GET_EXECUTABLE($r)` + exe=` + ## which doesn't work in ash, if /usr/bin/which isn't installed + ## type -p doesn't work in ash + ## command -v doesn't work in zsh + ## command -v "$r" 2>&1 + ## this test should work in ash, bash, pdksh (ksh), zsh + type -p "$r" 2>/dev/null | tail -1 | awk '{print $NF}' +` + ver=` + "$exe" --version 2>&1 | grep -v '^$' | head -1 | awk '{print $NF}' +` + num=` + echo "$ver" | awk -F. ' + { + if ($3) {last = $3} + else {last =0} + } + {printf "%s%s%s\n",$1*100, $2*10,last}' +` + req=` + echo "2.95" | awk -F. ' + { + if ($3) {last = $3} + else {last =0} + } + {printf "%s%s%s\n",$1*100, $2*10,last}' +` + echo "$ac_t"""$ver"" 1>&6 + if test "$num" -lt "$req"; then + + eval "REQUIRED"=\"`eval echo \"'$'REQUIRED\" \""$r 2.95 (installed: $ver)"\"`\" + + fi + else - - echo "configure: warning: can\'t find g++ 2.8" 1>&2 - warn_b=yes + warn="$CXX (Please install *GNU* c++)" + + eval "REQUIRED"=\"`eval echo \"'$'REQUIRED\" \"$warn\"`\" fi echo $ac_n "checking whether explicit instantiation is needed""... $ac_c" 1>&6 -echo "configure:1967: checking whether explicit instantiation is needed" >&5 +echo "configure:2112: checking whether explicit instantiation is needed" >&5 if eval "test \"`echo '$''{'lily_cv_need_explicit_instantiation'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < struct foo { static int baz; }; @@ -1978,7 +2123,7 @@ int main() { return foo::baz; ; return 0; } EOF -if { (eval echo configure:1982: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2127: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* lily_cv_need_explicit_instantiation=no else @@ -1999,13 +2144,175 @@ EOF fi + + for ac_prog in ar +do +# Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +echo "configure:2154: checking for $ac_word" >&5 +if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + if test -n "$AR"; then + ac_cv_prog_AR="$AR" # Let the user override the test. +else + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" + ac_dummy="$PATH" + for ac_dir in $ac_dummy; do + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/$ac_word; then + ac_cv_prog_AR="$ac_prog" + break + fi + done + IFS="$ac_save_ifs" +fi +fi +AR="$ac_cv_prog_AR" +if test -n "$AR"; then + echo "$ac_t""$AR" 1>&6 +else + echo "$ac_t""no" 1>&6 +fi + +test -n "$AR" && break +done +test -n "$AR" || AR="no" + + + + r="`eval echo '$'"AR"`" + if test -n "$r" -a "$r" != "error" -a "$r" != "no" && expr '`eval echo '$'"AR"`' : '.*\(echo\)' > /dev/null; then + true + else + ##STEPMAKE_WARN(cannot find . ) + false + fi + + if test $? -ne 0; then + + eval "REQUIRED"=\"`eval echo \"'$'REQUIRED\" \"ar\"`\" + + if test "REQUIRED" = "REQUIRED"; then + command="echo ERROR: ar not found" + # abort configure process here? + else + command="- echo ar not found" + fi + eval "AR"='$command' + false + else + true + fi + + if test $? -eq 0 -a -n ""; then + + r="`eval echo '$'"AR"`" + echo $ac_n "checking "$r version"""... $ac_c" 1>&6 +echo "configure:2214: checking "$r version"" >&5 + #exe=`STEPMAKE_GET_EXECUTABLE($r)` + exe=` + ## which doesn't work in ash, if /usr/bin/which isn't installed + ## type -p doesn't work in ash + ## command -v doesn't work in zsh + ## command -v "$r" 2>&1 + ## this test should work in ash, bash, pdksh (ksh), zsh + type -p "$r" 2>/dev/null | tail -1 | awk '{print $NF}' +` + ver=` + "$exe" --version 2>&1 | grep -v '^$' | head -1 | awk '{print $NF}' +` + num=` + echo "$ver" | awk -F. ' + { + if ($3) {last = $3} + else {last =0} + } + {printf "%s%s%s\n",$1*100, $2*10,last}' +` + req=` + echo "" | awk -F. ' + { + if ($3) {last = $3} + else {last =0} + } + {printf "%s%s%s\n",$1*100, $2*10,last}' +` + echo "$ac_t"""$ver"" 1>&6 + if test "$num" -lt "$req"; then + + eval "REQUIRED"=\"`eval echo \"'$'REQUIRED\" \""$r (installed: $ver)"\"`\" + + fi + + fi + + # Extract the first word of "ranlib", so it can be a program name with args. +set dummy ranlib; ac_word=$2 +echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +echo "configure:2255: checking for $ac_word" >&5 +if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + if test -n "$RANLIB"; then + ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. +else + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" + ac_dummy="$PATH" + for ac_dir in $ac_dummy; do + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/$ac_word; then + ac_cv_prog_RANLIB="ranlib" + break + fi + done + IFS="$ac_save_ifs" + test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":" +fi +fi +RANLIB="$ac_cv_prog_RANLIB" +if test -n "$RANLIB"; then + echo "$ac_t""$RANLIB" 1>&6 +else + echo "$ac_t""no" 1>&6 +fi + + + + r="`eval echo '$'"RANLIB"`" + if test -n "$r" -a "$r" != "error" -a "$r" != "no" && expr '`eval echo '$'"RANLIB"`' : '.*\(echo\)' > /dev/null; then + true + else + ##STEPMAKE_WARN(cannot find . ) + false + fi + + if test $? -ne 0; then + + eval "REQUIRED"=\"`eval echo \"'$'REQUIRED\" \"ranlib\"`\" + + if test "REQUIRED" = "REQUIRED"; then + command="echo ERROR: ranlib not found" + # abort configure process here? + else + command="- echo ranlib not found" + fi + eval "RANLIB"='$command' + false + else + true + fi + + + # ugh, automake: we want (and check for) bison for ac_prog in 'bison -y' byacc do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:2009: checking for $ac_word" >&5 +echo "configure:2316: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_YACC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2035,20 +2342,14 @@ test -n "$YACC" && break done test -n "$YACC" || YACC="yacc" - # ugh, automake: we want (and check for) flex - # AC_PROG_LEX - # urg: automake 1.3: hope this doesn't break 1.2 ac_cv_pro_lex_root hack... - - # AC_DECL_YYTEXT - # ugh, ugh - ac_cv_prog_lex_root=lex.yy - + + for ac_prog in bison do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:2052: checking for $ac_word" >&5 +echo "configure:2353: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_BISON'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2076,14 +2377,135 @@ fi test -n "$BISON" && break done -test -n "$BISON" || BISON="error" +test -n "$BISON" || BISON="no" + + + + r="`eval echo '$'"BISON"`" + if test -n "$r" -a "$r" != "error" -a "$r" != "no" && expr '`eval echo '$'"BISON"`' : '.*\(echo\)' > /dev/null; then + true + else + ##STEPMAKE_WARN(cannot find . ) + false + fi + + if test $? -ne 0; then + + eval "REQUIRED"=\"`eval echo \"'$'REQUIRED\" \"bison\"`\" + + if test "REQUIRED" = "REQUIRED"; then + command="echo ERROR: bison not found" + # abort configure process here? + else + command="- echo bison not found" + fi + eval "BISON"='$command' + false + else + true + fi + + if test $? -eq 0 -a -n ""; then + + r="`eval echo '$'"BISON"`" + echo $ac_n "checking "$r version"""... $ac_c" 1>&6 +echo "configure:2413: checking "$r version"" >&5 + #exe=`STEPMAKE_GET_EXECUTABLE($r)` + exe=` + ## which doesn't work in ash, if /usr/bin/which isn't installed + ## type -p doesn't work in ash + ## command -v doesn't work in zsh + ## command -v "$r" 2>&1 + ## this test should work in ash, bash, pdksh (ksh), zsh + type -p "$r" 2>/dev/null | tail -1 | awk '{print $NF}' +` + ver=` + "$exe" --version 2>&1 | grep -v '^$' | head -1 | awk '{print $NF}' +` + num=` + echo "$ver" | awk -F. ' + { + if ($3) {last = $3} + else {last =0} + } + {printf "%s%s%s\n",$1*100, $2*10,last}' +` + req=` + echo "" | awk -F. ' + { + if ($3) {last = $3} + else {last =0} + } + {printf "%s%s%s\n",$1*100, $2*10,last}' +` + echo "$ac_t"""$ver"" 1>&6 + if test "$num" -lt "$req"; then + + eval "REQUIRED"=\"`eval echo \"'$'REQUIRED\" \""$r (installed: $ver)"\"`\" + + fi + + fi + + + # urg. should test functionality rather than version. + if test "$BISON" = "bison" -a -n "1.25"; then + + r="`eval echo '$'"BISON"`" + echo $ac_n "checking "$r version"""... $ac_c" 1>&6 +echo "configure:2457: checking "$r version"" >&5 + #exe=`STEPMAKE_GET_EXECUTABLE($r)` + exe=` + ## which doesn't work in ash, if /usr/bin/which isn't installed + ## type -p doesn't work in ash + ## command -v doesn't work in zsh + ## command -v "$r" 2>&1 + ## this test should work in ash, bash, pdksh (ksh), zsh + type -p "$r" 2>/dev/null | tail -1 | awk '{print $NF}' +` + ver=` + "$exe" --version 2>&1 | grep -v '^$' | head -1 | awk '{print $NF}' +` + num=` + echo "$ver" | awk -F. ' + { + if ($3) {last = $3} + else {last =0} + } + {printf "%s%s%s\n",$1*100, $2*10,last}' +` + req=` + echo "1.25" | awk -F. ' + { + if ($3) {last = $3} + else {last =0} + } + {printf "%s%s%s\n",$1*100, $2*10,last}' +` + echo "$ac_t"""$ver"" 1>&6 + if test "$num" -lt "$req"; then + + eval "REQUIRED"=\"`eval echo \"'$'REQUIRED\" \""$r 1.25 (installed: $ver)"\"`\" + + fi + + fi + + + # ugh, automake: we want (and check for) flex + # AC_PROG_LEX + # urg: automake 1.3: hope this doesn't break 1.2 ac_cv_pro_lex_root hack... + # AC_DECL_YYTEXT + # ugh, ugh + ac_cv_prog_lex_root=lex.yy + for ac_prog in flex do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:2087: checking for $ac_word" >&5 +echo "configure:2509: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_FLEX'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2111,109 +2533,168 @@ fi test -n "$FLEX" && break done -test -n "$FLEX" || FLEX="error" +test -n "$FLEX" || FLEX="no" - result="`echo \"$BISON\" | grep echo`" - if test "x$BISON" = "xerror" -o "x$result" != "x"; then - - echo "configure: warning: can\'t find bison. Please install Bison" 1>&2 - warn_b=yes - - fi - - result="`echo \"$FLEX\" | grep echo`" - if test "x$FLEX" = "xerror" -o "x$result" != "x"; then - - echo "configure: warning: can\'t find flex. Please install Flex" 1>&2 - warn_b=yes + r="`eval echo '$'"FLEX"`" + if test -n "$r" -a "$r" != "error" -a "$r" != "no" && expr '`eval echo '$'"FLEX"`' : '.*\(echo\)' > /dev/null; then + true + else + ##STEPMAKE_WARN(cannot find . ) + false + fi - fi + if test $? -ne 0; then + + eval "REQUIRED"=\"`eval echo \"'$'REQUIRED\" \"flex\"`\" + if test "REQUIRED" = "REQUIRED"; then + command="echo ERROR: flex not found" + # abort configure process here? + else + command="- echo flex not found" + fi + eval "FLEX"='$command' + false + else + true + fi - if test $BISON != "error"; then - bison_version=`$BISON --version | sed 's/^.*version 1.//g'` - if test `echo $bison_version | sed 's/\..*$//g'` -lt 25; then - - echo "configure: warning: Your bison is a bit old (1.$bison_version). You might have to install 1.25" 1>&2 - warn_b=yes + if test $? -eq 0 -a -n ""; then + + r="`eval echo '$'"FLEX"`" + echo $ac_n "checking "$r version"""... $ac_c" 1>&6 +echo "configure:2569: checking "$r version"" >&5 + #exe=`STEPMAKE_GET_EXECUTABLE($r)` + exe=` + ## which doesn't work in ash, if /usr/bin/which isn't installed + ## type -p doesn't work in ash + ## command -v doesn't work in zsh + ## command -v "$r" 2>&1 + ## this test should work in ash, bash, pdksh (ksh), zsh + type -p "$r" 2>/dev/null | tail -1 | awk '{print $NF}' +` + ver=` + "$exe" --version 2>&1 | grep -v '^$' | head -1 | awk '{print $NF}' +` + num=` + echo "$ver" | awk -F. ' + { + if ($3) {last = $3} + else {last =0} + } + {printf "%s%s%s\n",$1*100, $2*10,last}' +` + req=` + echo "" | awk -F. ' + { + if ($3) {last = $3} + else {last =0} + } + {printf "%s%s%s\n",$1*100, $2*10,last}' +` + echo "$ac_t"""$ver"" 1>&6 + if test "$num" -lt "$req"; then + + eval "REQUIRED"=\"`eval echo \"'$'REQUIRED\" \""$r (installed: $ver)"\"`\" - fi fi - - + fi - for ac_prog in ar -do -# Extract the first word of "$ac_prog", so it can be a program name with args. -set dummy $ac_prog; ac_word=$2 -echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:2155: checking for $ac_word" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then +echo $ac_n "checking how to run the C++ preprocessor""... $ac_c" 1>&6 +echo "configure:2609: checking how to run the C++ preprocessor" >&5 +if test -z "$CXXCPP"; then +if eval "test \"`echo '$''{'ac_cv_prog_CXXCPP'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else - if test -n "$AR"; then - ac_cv_prog_AR="$AR" # Let the user override the test. -else - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" - ac_dummy="$PATH" - for ac_dir in $ac_dummy; do - test -z "$ac_dir" && ac_dir=. - if test -f $ac_dir/$ac_word; then - ac_cv_prog_AR="$ac_prog" - break - fi - done - IFS="$ac_save_ifs" + ac_ext=C +# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. +ac_cpp='$CXXCPP $CPPFLAGS' +ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' +ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' +cross_compiling=$ac_cv_prog_cxx_cross + CXXCPP="${CXX-g++} -E" + cat > conftest.$ac_ext < +EOF +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +{ (eval echo configure:2627: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` +if test -z "$ac_err"; then + : +else + echo "$ac_err" >&5 + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + CXXCPP=/lib/cpp fi +rm -f conftest* + ac_cv_prog_CXXCPP="$CXXCPP" +ac_ext=C +# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. +ac_cpp='$CXXCPP $CPPFLAGS' +ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' +ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' +cross_compiling=$ac_cv_prog_cxx_cross fi -AR="$ac_cv_prog_AR" -if test -n "$AR"; then - echo "$ac_t""$AR" 1>&6 -else - echo "$ac_t""no" 1>&6 fi +CXXCPP="$ac_cv_prog_CXXCPP" +echo "$ac_t""$CXXCPP" 1>&6 -test -n "$AR" && break -done -test -n "$AR" || AR="error" - # Extract the first word of "ranlib", so it can be a program name with args. -set dummy ranlib; ac_word=$2 -echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:2188: checking for $ac_word" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then + for ac_hdr in FlexLexer.h +do +ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` +echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 +echo "configure:2656: checking for $ac_hdr" >&5 +if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else - if test -n "$RANLIB"; then - ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. + cat > conftest.$ac_ext < +EOF +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +{ (eval echo configure:2666: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` +if test -z "$ac_err"; then + rm -rf conftest* + eval "ac_cv_header_$ac_safe=yes" else - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" - ac_dummy="$PATH" - for ac_dir in $ac_dummy; do - test -z "$ac_dir" && ac_dir=. - if test -f $ac_dir/$ac_word; then - ac_cv_prog_RANLIB="ranlib" - break - fi - done - IFS="$ac_save_ifs" - test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":" + echo "$ac_err" >&5 + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_header_$ac_safe=no" fi +rm -f conftest* fi -RANLIB="$ac_cv_prog_RANLIB" -if test -n "$RANLIB"; then - echo "$ac_t""$RANLIB" 1>&6 +if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then + echo "$ac_t""yes" 1>&6 + ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` + cat >> confdefs.h <&6 +false fi +done + if test $? -ne 0; then + warn='FlexLexer.h (flex package)' + + eval "REQUIRED"=\"`eval echo \"'$'REQUIRED\" \"$warn\"`\" - - + fi lang=English @@ -2239,7 +2720,7 @@ fi echo $ac_n "checking language""... $ac_c" 1>&6 -echo "configure:2243: checking language" >&5 +echo "configure:2724: checking language" >&5 case "$language" in En* | en* | Am* | am* | US* | us*) lang=English;; @@ -2275,7 +2756,7 @@ EOF echo $ac_n "checking for gettext in -lintl""... $ac_c" 1>&6 -echo "configure:2279: checking for gettext in -lintl" >&5 +echo "configure:2760: checking for gettext in -lintl" >&5 ac_lib_var=`echo intl'_'gettext | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -2283,7 +2764,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lintl $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2782: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -2327,12 +2808,12 @@ fi for ac_func in gettext do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:2331: checking for $ac_func" >&5 +echo "configure:2812: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2843: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -2384,13 +2865,13 @@ done - # AC_CHECK_PROGS(MSGFMT, msgfmt, -echo no msgfmt) + for ac_prog in msgfmt do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:2394: checking for $ac_word" >&5 +echo "configure:2875: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_MSGFMT'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2418,38 +2899,87 @@ fi test -n "$MSGFMT" && break done -test -n "$MSGFMT" || MSGFMT="\$(SHELL) \$(step-bindir)/fake-msgfmt.sh " +test -n "$MSGFMT" || MSGFMT="no" - echo $ac_n "checking whether msgfmt accepts -o""... $ac_c" 1>&6 -echo "configure:2425: checking whether msgfmt accepts -o" >&5 - msgfmt_output="`msgfmt -o bla 2>&1 | grep usage`" - if test "$msgfmt_output" = ""; then - echo "$ac_t""yes" 1>&6 + + + r="`eval echo '$'"MSGFMT"`" + if test -n "$r" -a "$r" != "error" -a "$r" != "no" && expr '`eval echo '$'"MSGFMT"`' : '.*\(echo\)' > /dev/null; then + true else - # urg - MSGFMT="\$(SHELL) \$(step-bindir)/fake-msgfmt.sh" - echo "$ac_t""no" 1>&6 + ##STEPMAKE_WARN(cannot find . ) + false + fi + + if test $? -ne 0; then - echo "configure: warning: please install msgfmt from GNU gettext" 1>&2 - warn_b=yes + eval "REQUIRED"=\"`eval echo \"'$'REQUIRED\" \"msgfmt\"`\" + if test "REQUIRED" = "REQUIRED"; then + command="echo ERROR: msgfmt not found" + # abort configure process here? + else + command="- echo msgfmt not found" + fi + eval "MSGFMT"='$command' + false + else + true fi - if test ! -n "$MSGFMT"; then + + if test $? -eq 0 -a -n ""; then - echo "configure: warning: please install msgfmt from GNU gettext" 1>&2 - warn_b=yes + r="`eval echo '$'"MSGFMT"`" + echo $ac_n "checking "$r version"""... $ac_c" 1>&6 +echo "configure:2935: checking "$r version"" >&5 + #exe=`STEPMAKE_GET_EXECUTABLE($r)` + exe=` + ## which doesn't work in ash, if /usr/bin/which isn't installed + ## type -p doesn't work in ash + ## command -v doesn't work in zsh + ## command -v "$r" 2>&1 + ## this test should work in ash, bash, pdksh (ksh), zsh + type -p "$r" 2>/dev/null | tail -1 | awk '{print $NF}' +` + ver=` + "$exe" --version 2>&1 | grep -v '^$' | head -1 | awk '{print $NF}' +` + num=` + echo "$ver" | awk -F. ' + { + if ($3) {last = $3} + else {last =0} + } + {printf "%s%s%s\n",$1*100, $2*10,last}' +` + req=` + echo "" | awk -F. ' + { + if ($3) {last = $3} + else {last =0} + } + {printf "%s%s%s\n",$1*100, $2*10,last}' +` + echo "$ac_t"""$ver"" 1>&6 + if test "$num" -lt "$req"; then + + eval "REQUIRED"=\"`eval echo \"'$'REQUIRED\" \""$r (installed: $ver)"\"`\" + + fi fi + # urg, never know what names these teTeX guys will think up - for ac_prog in mf + + for ac_prog in mf mfont do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:2453: checking for $ac_word" >&5 +echo "configure:2983: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_METAFONT'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2479,270 +3009,181 @@ test -n "$METAFONT" && break done test -n "$METAFONT" || METAFONT="no" - if test "x$METAFONT" = "xno"; then - for ac_prog in mfont -do -# Extract the first word of "$ac_prog", so it can be a program name with args. -set dummy $ac_prog; ac_word=$2 -echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:2489: checking for $ac_word" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_MFONT'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - if test -n "$MFONT"; then - ac_cv_prog_MFONT="$MFONT" # Let the user override the test. -else - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" - ac_dummy="$PATH" - for ac_dir in $ac_dummy; do - test -z "$ac_dir" && ac_dir=. - if test -f $ac_dir/$ac_word; then - ac_cv_prog_MFONT="$ac_prog" - break - fi - done - IFS="$ac_save_ifs" -fi -fi -MFONT="$ac_cv_prog_MFONT" -if test -n "$MFONT"; then - echo "$ac_t""$MFONT" 1>&6 -else - echo "$ac_t""no" 1>&6 -fi - -test -n "$MFONT" && break -done -test -n "$MFONT" || MFONT="-echo no mf or mfont" - - METAFONT=$MFONT - fi - - for ac_prog in mp -do -# Extract the first word of "$ac_prog", so it can be a program name with args. -set dummy $ac_prog; ac_word=$2 -echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:2527: checking for $ac_word" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_METAPOST'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - if test -n "$METAPOST"; then - ac_cv_prog_METAPOST="$METAPOST" # Let the user override the test. -else - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" - ac_dummy="$PATH" - for ac_dir in $ac_dummy; do - test -z "$ac_dir" && ac_dir=. - if test -f $ac_dir/$ac_word; then - ac_cv_prog_METAPOST="$ac_prog" - break - fi - done - IFS="$ac_save_ifs" -fi -fi -METAPOST="$ac_cv_prog_METAPOST" -if test -n "$METAPOST"; then - echo "$ac_t""$METAPOST" 1>&6 -else - echo "$ac_t""no" 1>&6 -fi - -test -n "$METAPOST" && break -done -test -n "$METAPOST" || METAPOST="no" - - if test "x$METAPOST" = "xno"; then - for ac_prog in mpost -do -# Extract the first word of "$ac_prog", so it can be a program name with args. -set dummy $ac_prog; ac_word=$2 -echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:2563: checking for $ac_word" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_MPOST'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - if test -n "$MPOST"; then - ac_cv_prog_MPOST="$MPOST" # Let the user override the test. -else - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" - ac_dummy="$PATH" - for ac_dir in $ac_dummy; do - test -z "$ac_dir" && ac_dir=. - if test -f $ac_dir/$ac_word; then - ac_cv_prog_MPOST="$ac_prog" - break - fi - done - IFS="$ac_save_ifs" -fi -fi -MPOST="$ac_cv_prog_MPOST" -if test -n "$MPOST"; then - echo "$ac_t""$MPOST" 1>&6 -else - echo "$ac_t""no" 1>&6 -fi - -test -n "$MPOST" && break -done -test -n "$MPOST" || MPOST="-echo no mp or mpost" - - - METAPOST=$MPOST - fi - - for ac_prog in inimf -do -# Extract the first word of "$ac_prog", so it can be a program name with args. -set dummy $ac_prog; ac_word=$2 -echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:2602: checking for $ac_word" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_INIMETAFONT'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - if test -n "$INIMETAFONT"; then - ac_cv_prog_INIMETAFONT="$INIMETAFONT" # Let the user override the test. -else - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" - ac_dummy="$PATH" - for ac_dir in $ac_dummy; do - test -z "$ac_dir" && ac_dir=. - if test -f $ac_dir/$ac_word; then - ac_cv_prog_INIMETAFONT="$ac_prog" - break - fi - done - IFS="$ac_save_ifs" -fi -fi -INIMETAFONT="$ac_cv_prog_INIMETAFONT" -if test -n "$INIMETAFONT"; then - echo "$ac_t""$INIMETAFONT" 1>&6 -else - echo "$ac_t""no" 1>&6 -fi - -test -n "$INIMETAFONT" && break -done -test -n "$INIMETAFONT" || INIMETAFONT="no" - - if test "x$INIMETAFONT" = "xno"; then - for ac_prog in inimfont -do -# Extract the first word of "$ac_prog", so it can be a program name with args. -set dummy $ac_prog; ac_word=$2 -echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:2638: checking for $ac_word" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_INIMFONT'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - if test -n "$INIMFONT"; then - ac_cv_prog_INIMFONT="$INIMFONT" # Let the user override the test. -else - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" - ac_dummy="$PATH" - for ac_dir in $ac_dummy; do - test -z "$ac_dir" && ac_dir=. - if test -f $ac_dir/$ac_word; then - ac_cv_prog_INIMFONT="$ac_prog" - break + + + r="`eval echo '$'"METAFONT"`" + if test -n "$r" -a "$r" != "error" -a "$r" != "no" && expr '`eval echo '$'"METAFONT"`' : '.*\(echo\)' > /dev/null; then + true + else + ##STEPMAKE_WARN(cannot find . ) + false fi - done - IFS="$ac_save_ifs" -fi -fi -INIMFONT="$ac_cv_prog_INIMFONT" -if test -n "$INIMFONT"; then - echo "$ac_t""$INIMFONT" 1>&6 -else - echo "$ac_t""no" 1>&6 -fi -test -n "$INIMFONT" && break -done -test -n "$INIMFONT" || INIMFONT="-echo no inimf or inimfont" - - INIMETAFONT=$INIMFONT - fi + if test $? -ne 0; then + + eval ""=\"`eval echo \"'$'\" \"mf mfont\"`\" - for ac_prog in inimp -do -# Extract the first word of "$ac_prog", so it can be a program name with args. -set dummy $ac_prog; ac_word=$2 -echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:2676: checking for $ac_word" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_INIMETAPOST'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - if test -n "$INIMETAPOST"; then - ac_cv_prog_INIMETAPOST="$INIMETAPOST" # Let the user override the test. -else - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" - ac_dummy="$PATH" - for ac_dir in $ac_dummy; do - test -z "$ac_dir" && ac_dir=. - if test -f $ac_dir/$ac_word; then - ac_cv_prog_INIMETAPOST="$ac_prog" - break - fi - done - IFS="$ac_save_ifs" -fi -fi -INIMETAPOST="$ac_cv_prog_INIMETAPOST" -if test -n "$INIMETAPOST"; then - echo "$ac_t""$INIMETAPOST" 1>&6 -else - echo "$ac_t""no" 1>&6 -fi + if test "" = "REQUIRED"; then + command="echo ERROR: mf mfont not found" + # abort configure process here? + else + command="- echo mf mfont not found" + fi + eval "METAFONT"='$command' + false + else + true + fi -test -n "$INIMETAPOST" && break -done -test -n "$INIMETAPOST" || INIMETAPOST="no" + if test $? -eq 0 -a -n ""; then + + r="`eval echo '$'"METAFONT"`" + echo $ac_n "checking "$r version"""... $ac_c" 1>&6 +echo "configure:3043: checking "$r version"" >&5 + #exe=`STEPMAKE_GET_EXECUTABLE($r)` + exe=` + ## which doesn't work in ash, if /usr/bin/which isn't installed + ## type -p doesn't work in ash + ## command -v doesn't work in zsh + ## command -v "$r" 2>&1 + ## this test should work in ash, bash, pdksh (ksh), zsh + type -p "$r" 2>/dev/null | tail -1 | awk '{print $NF}' +` + ver=` + "$exe" --version 2>&1 | grep -v '^$' | head -1 | awk '{print $NF}' +` + num=` + echo "$ver" | awk -F. ' + { + if ($3) {last = $3} + else {last =0} + } + {printf "%s%s%s\n",$1*100, $2*10,last}' +` + req=` + echo "" | awk -F. ' + { + if ($3) {last = $3} + else {last =0} + } + {printf "%s%s%s\n",$1*100, $2*10,last}' +` + echo "$ac_t"""$ver"" 1>&6 + if test "$num" -lt "$req"; then + + eval ""=\"`eval echo \"'$'\" \""$r (installed: $ver)"\"`\" + + fi + + fi - if test "x$INIMETAPOST" = "xno"; then - for ac_prog in inimpost + + for ac_prog in inimf inimfont do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:2712: checking for $ac_word" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_INIMPOST'+set}'`\" = set"; then +echo "configure:3087: checking for $ac_word" >&5 +if eval "test \"`echo '$''{'ac_cv_prog_INIMETAFONT'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else - if test -n "$INIMPOST"; then - ac_cv_prog_INIMPOST="$INIMPOST" # Let the user override the test. + if test -n "$INIMETAFONT"; then + ac_cv_prog_INIMETAFONT="$INIMETAFONT" # Let the user override the test. else IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" ac_dummy="$PATH" for ac_dir in $ac_dummy; do test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/$ac_word; then - ac_cv_prog_INIMPOST="$ac_prog" + ac_cv_prog_INIMETAFONT="$ac_prog" break fi done IFS="$ac_save_ifs" fi fi -INIMPOST="$ac_cv_prog_INIMPOST" -if test -n "$INIMPOST"; then - echo "$ac_t""$INIMPOST" 1>&6 +INIMETAFONT="$ac_cv_prog_INIMETAFONT" +if test -n "$INIMETAFONT"; then + echo "$ac_t""$INIMETAFONT" 1>&6 else echo "$ac_t""no" 1>&6 fi -test -n "$INIMPOST" && break +test -n "$INIMETAFONT" && break done -test -n "$INIMPOST" || INIMPOST="-echo no inimp or inimpost" +test -n "$INIMETAFONT" || INIMETAFONT="no" + + + + r="`eval echo '$'"INIMETAFONT"`" + if test -n "$r" -a "$r" != "error" -a "$r" != "no" && expr '`eval echo '$'"INIMETAFONT"`' : '.*\(echo\)' > /dev/null; then + true + else + ##STEPMAKE_WARN(cannot find . ) + false + fi + + if test $? -ne 0; then + + eval ""=\"`eval echo \"'$'\" \"inimf inimfont\"`\" + + if test "" = "REQUIRED"; then + command="echo ERROR: inimf inimfont not found" + # abort configure process here? + else + command="- echo inimf inimfont not found" + fi + eval "INIMETAFONT"='$command' + false + else + true + fi + + if test $? -eq 0 -a -n ""; then + + r="`eval echo '$'"INIMETAFONT"`" + echo $ac_n "checking "$r version"""... $ac_c" 1>&6 +echo "configure:3147: checking "$r version"" >&5 + #exe=`STEPMAKE_GET_EXECUTABLE($r)` + exe=` + ## which doesn't work in ash, if /usr/bin/which isn't installed + ## type -p doesn't work in ash + ## command -v doesn't work in zsh + ## command -v "$r" 2>&1 + ## this test should work in ash, bash, pdksh (ksh), zsh + type -p "$r" 2>/dev/null | tail -1 | awk '{print $NF}' +` + ver=` + "$exe" --version 2>&1 | grep -v '^$' | head -1 | awk '{print $NF}' +` + num=` + echo "$ver" | awk -F. ' + { + if ($3) {last = $3} + else {last =0} + } + {printf "%s%s%s\n",$1*100, $2*10,last}' +` + req=` + echo "" | awk -F. ' + { + if ($3) {last = $3} + else {last =0} + } + {printf "%s%s%s\n",$1*100, $2*10,last}' +` + echo "$ac_t"""$ver"" 1>&6 + if test "$num" -lt "$req"; then + + eval ""=\"`eval echo \"'$'\" \""$r (installed: $ver)"\"`\" + + fi - INIMETAPOST=$INIMPOST fi + echo $ac_n "checking for working metafont mode""... $ac_c" 1>&6 -echo "configure:2746: checking for working metafont mode" >&5 +echo "configure:3187: checking for working metafont mode" >&5 modelist='ljfour lj4 lj3 lj2 ljet laserjet' for MFMODE in $modelist; do $METAFONT "\mode:=$MFMODE; mode_setup; end." > /dev/null 2>&1 @@ -2752,32 +3193,9 @@ echo "configure:2746: checking for working metafont mode" >&5 done echo "$ac_t""$MFMODE" 1>&6 - echo $ac_n "checking for mfplain.mp""... $ac_c" 1>&6 -echo "configure:2757: checking for mfplain.mp" >&5 - # - # For now let people define these in their environments - # - : ${MFPLAIN_MP=`kpsewhich --format mp mfplain.mp`} - echo "$ac_t""$MFPLAIN_MP" 1>&6 - - echo $ac_n "checking for inimetapost flags""... $ac_c" 1>&6 -echo "configure:2765: checking for inimetapost flags" >&5 - if test ${INIMETAPOST} = "inimp" ; then - : ${INIMETAPOST_FLAGS=''} - else - : ${INIMETAPOST_FLAGS='-interaction=nonstopmode'} - fi - echo "$ac_t""$INIMETAPOST_FLAGS" 1>&6 - rm -f mfput.* - - - - - - # Check whether --enable-tfm-path or --disable-tfm-path was given. @@ -2789,12 +3207,14 @@ else fi + # ugh + for ac_prog in kpsewhich do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:2798: checking for $ac_word" >&5 +echo "configure:3218: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_KPSEWHICH'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2824,8 +3244,76 @@ test -n "$KPSEWHICH" && break done test -n "$KPSEWHICH" || KPSEWHICH="no" + + + r="`eval echo '$'"KPSEWHICH"`" + if test -n "$r" -a "$r" != "error" -a "$r" != "no" && expr '`eval echo '$'"KPSEWHICH"`' : '.*\(echo\)' > /dev/null; then + true + else + ##STEPMAKE_WARN(cannot find . ) + false + fi + + if test $? -ne 0; then + + eval "OPTIONAL"=\"`eval echo \"'$'OPTIONAL\" \"kpsewhich\"`\" + + if test "OPTIONAL" = "REQUIRED"; then + command="echo ERROR: kpsewhich not found" + # abort configure process here? + else + command="- echo kpsewhich not found" + fi + eval "KPSEWHICH"='$command' + false + else + true + fi + + if test $? -eq 0 -a -n ""; then + + r="`eval echo '$'"KPSEWHICH"`" + echo $ac_n "checking "$r version"""... $ac_c" 1>&6 +echo "configure:3278: checking "$r version"" >&5 + #exe=`STEPMAKE_GET_EXECUTABLE($r)` + exe=` + ## which doesn't work in ash, if /usr/bin/which isn't installed + ## type -p doesn't work in ash + ## command -v doesn't work in zsh + ## command -v "$r" 2>&1 + ## this test should work in ash, bash, pdksh (ksh), zsh + type -p "$r" 2>/dev/null | tail -1 | awk '{print $NF}' +` + ver=` + "$exe" --version 2>&1 | grep -v '^$' | head -1 | awk '{print $NF}' +` + num=` + echo "$ver" | awk -F. ' + { + if ($3) {last = $3} + else {last =0} + } + {printf "%s%s%s\n",$1*100, $2*10,last}' +` + req=` + echo "" | awk -F. ' + { + if ($3) {last = $3} + else {last =0} + } + {printf "%s%s%s\n",$1*100, $2*10,last}' +` + echo "$ac_t"""$ver"" 1>&6 + if test "$num" -lt "$req"; then + + eval "OPTIONAL"=\"`eval echo \"'$'OPTIONAL\" \""$r (installed: $ver)"\"`\" + + fi + + fi + echo $ac_n "checking for tfm path""... $ac_c" 1>&6 -echo "configure:2829: checking for tfm path" >&5 +echo "configure:3317: checking for tfm path" >&5 TFM_FONTS="cmr msam" @@ -2853,93 +3341,130 @@ echo "configure:2829: checking for tfm path" >&5 ## First, let's just see if we can find Guile at all. echo $ac_n "checking "for guile-config"""... $ac_c" 1>&6 -echo "configure:2857: checking "for guile-config"" >&5 +echo "configure:3345: checking "for guile-config"" >&5 for guile_config in guile-config $target-guile-config $build-guile-config; do echo "$ac_t"""$guile_config"" 1>&6 if ! $guile_config --version > /dev/null 2>&1 ; then echo "configure: warning: "cannot execute $guile_config"" 1>&2 echo $ac_n "checking "if we are cross compiling"""... $ac_c" 1>&6 -echo "configure:2863: checking "if we are cross compiling"" >&5 - guile_config=error +echo "configure:3351: checking "if we are cross compiling"" >&5 + GUILE_CONFIG='echo no guile-config' else + GUILE_CONFIG=$guile_config break fi done - if test "$guile_config" = "error"; then - { echo "configure: error: "cannot find guile-config; is Guile installed?"" 1>&2; exit 1; } - exit 1 - fi - echo $ac_n "checking "Guile version"""... $ac_c" 1>&6 -echo "configure:2874: checking "Guile version"" >&5 - need_guile_version="1.3.4" - need_guile_version_numeric=100304 - guile_version=`$guile_config --version 2>&1 | awk '{print $NF}'` - guile_version_numeric=`echo $guile_version | awk -F. ' -{if ($3) {last = $3} -else {last =0}} -{printf "%s%s%s\n",$1*100, $2*10,last}'` - echo "$ac_t"""$guile_version"" 1>&6 - if test $guile_version_numeric -lt $need_guile_version_numeric - then + + + r="`eval echo '$'"GUILE_CONFIG"`" + if test -n "$r" -a "$r" != "error" -a "$r" != "no" && expr '`eval echo '$'"GUILE_CONFIG"`' : '.*\(echo\)' > /dev/null; then + true + else + ##STEPMAKE_WARN(cannot find . ) + false + fi + + if test $? -ne 0; then + + eval "REQUIRED"=\"`eval echo \"'$'REQUIRED\" \"$guile_config\"`\" + + if test "REQUIRED" = "REQUIRED"; then + command="echo ERROR: $guile_config not found" + # abort configure process here? + else + command="- echo $guile_config not found" + fi + eval "GUILE_CONFIG"='$command' + false + else + true + fi + + if test $? -ne 0; then - echo "configure: warning: "Guile version "$need_guile_version" or newer is needed"" 1>&2 - warn_b=yes + eval "REQUIRED"=\"`eval echo \"'$'REQUIRED\" \"'guile-config (guile-devel, guile-dev or libguile-dev package)'\"`\" + + fi + + + r="`eval echo '$'"GUILE_CONFIG"`" + if test -n "$r" -a "$r" != "error" -a "$r" != "no" && expr '`eval echo '$'"GUILE_CONFIG"`' : '.*\(echo\)' > /dev/null; then + true + else + ##STEPMAKE_WARN(cannot find . ) + false + fi + + # urg. should test functionality rather than version. + if test $? -eq 0 -a -n "1.3.4"; then + + r="`eval echo '$'"GUILE_CONFIG"`" + echo $ac_n "checking "$r version"""... $ac_c" 1>&6 +echo "configure:3404: checking "$r version"" >&5 + #exe=`STEPMAKE_GET_EXECUTABLE($r)` + exe=` + ## which doesn't work in ash, if /usr/bin/which isn't installed + ## type -p doesn't work in ash + ## command -v doesn't work in zsh + ## command -v "$r" 2>&1 + ## this test should work in ash, bash, pdksh (ksh), zsh + type -p "$r" 2>/dev/null | tail -1 | awk '{print $NF}' +` + ver=` + "$exe" --version 2>&1 | grep -v '^$' | head -1 | awk '{print $NF}' +` + num=` + echo "$ver" | awk -F. ' + { + if ($3) {last = $3} + else {last =0} + } + {printf "%s%s%s\n",$1*100, $2*10,last}' +` + req=` + echo "1.3.4" | awk -F. ' + { + if ($3) {last = $3} + else {last =0} + } + {printf "%s%s%s\n",$1*100, $2*10,last}' +` + echo "$ac_t"""$ver"" 1>&6 + if test "$num" -lt "$req"; then + + eval "REQUIRED"=\"`eval echo \"'$'REQUIRED\" \""$r 1.3.4 (installed: $ver)"\"`\" + + fi fi + + + + guile_version="$ver" GUILE_MAJOR_VERSION=`expr $guile_version : '\([0-9]*\)'` GUILE_MINOR_VERSION=`expr $guile_version : '[0-9]*\.\([0-9]*\)'` -## The GUILE_FLAGS macro. - echo $ac_n "checking for Guile""... $ac_c" 1>&6 -echo "configure:2895: checking for Guile" >&5 - if ! $guile_config link > /dev/null ; then - echo "$ac_t"""cannot execute $guile_config"" 1>&6 - { echo "configure: error: "cannot find guile-config; is Guile installed?"" 1>&2; exit 1; } - exit 1 - fi - GUILE_CFLAGS="`$guile_config compile`" - GUILE_LDFLAGS="`$guile_config link`" - - - echo "$ac_t""yes" 1>&6 - - # Extract the first word of "guile", so it can be a program name with args. -set dummy guile; ac_word=$2 -echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:2910: checking for $ac_word" >&5 -if eval "test \"`echo '$''{'ac_cv_path_GUILE'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - case "$GUILE" in - /*) - ac_cv_path_GUILE="$GUILE" # Let the user override the test with a path. - ;; - ?:/*) - ac_cv_path_GUILE="$GUILE" # Let the user override the test with a dos path. - ;; - *) - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" - ac_dummy="$PATH" - for ac_dir in $ac_dummy; do - test -z "$ac_dir" && ac_dir=. - if test -f $ac_dir/$ac_word; then - ac_cv_path_GUILE="$ac_dir/$ac_word" - break + exe=` + ## which doesn't work in ash, if /usr/bin/which isn't installed + ## type -p doesn't work in ash + ## command -v doesn't work in zsh + ## command -v "$guile_config" 2>&1 + ## this test should work in ash, bash, pdksh (ksh), zsh + type -p "$guile_config" 2>/dev/null | tail -1 | awk '{print $NF}' +` + if test -x $exe; then + echo $ac_n "checking "guile compile flags"""... $ac_c" 1>&6 +echo "configure:3458: checking "guile compile flags"" >&5 + GUILE_CFLAGS="`$guile_config compile`" + echo "$ac_t""$GUILE_CFLAGS" 1>&6 + echo $ac_n "checking "guile link flags"""... $ac_c" 1>&6 +echo "configure:3462: checking "guile link flags"" >&5 + GUILE_LDFLAGS="`$guile_config link`" + echo "$ac_t""$GUILE_LDFLAGS" 1>&6 fi - done - IFS="$ac_save_ifs" - test -z "$ac_cv_path_GUILE" && ac_cv_path_GUILE="error" - ;; -esac -fi -GUILE="$ac_cv_path_GUILE" -if test -n "$GUILE"; then - echo "$ac_t""$GUILE" 1>&6 -else - echo "$ac_t""no" 1>&6 -fi - + + cat >> confdefs.h <&6 -echo "configure:2971: checking for $ac_hdr" >&5 +echo "configure:3496: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2981: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:3506: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -3004,7 +3529,7 @@ fi done echo $ac_n "checking for kpse_find_file in -lkpathsea""... $ac_c" 1>&6 -echo "configure:3008: checking for kpse_find_file in -lkpathsea" >&5 +echo "configure:3533: checking for kpse_find_file in -lkpathsea" >&5 ac_lib_var=`echo kpathsea'_'kpse_find_file | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -3012,7 +3537,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lkpathsea $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3555: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -3056,12 +3581,12 @@ fi for ac_func in kpse_find_file do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:3060: checking for $ac_func" >&5 +echo "configure:3585: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3616: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -3114,7 +3639,7 @@ done fi echo $ac_n "checking whether to use kpathsea""... $ac_c" 1>&6 -echo "configure:3118: checking whether to use kpathsea" >&5 +echo "configure:3643: checking whether to use kpathsea" >&5 if test "$kpathsea_b" != no; then echo "$ac_t""yes" 1>&6 KPATHSEA=1 @@ -3130,53 +3655,239 @@ EOF - for ac_prog in bibtex2html bib2html + + for ac_prog in makeinfo do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:3139: checking for $ac_word" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_BIBTEX2HTML'+set}'`\" = set"; then +echo "configure:3665: checking for $ac_word" >&5 +if eval "test \"`echo '$''{'ac_cv_prog_MAKEINFO'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else - if test -n "$BIBTEX2HTML"; then - ac_cv_prog_BIBTEX2HTML="$BIBTEX2HTML" # Let the user override the test. + if test -n "$MAKEINFO"; then + ac_cv_prog_MAKEINFO="$MAKEINFO" # Let the user override the test. else IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" ac_dummy="$PATH" for ac_dir in $ac_dummy; do test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/$ac_word; then - ac_cv_prog_BIBTEX2HTML="$ac_prog" + ac_cv_prog_MAKEINFO="$ac_prog" break fi done IFS="$ac_save_ifs" fi fi -BIBTEX2HTML="$ac_cv_prog_BIBTEX2HTML" -if test -n "$BIBTEX2HTML"; then - echo "$ac_t""$BIBTEX2HTML" 1>&6 +MAKEINFO="$ac_cv_prog_MAKEINFO" +if test -n "$MAKEINFO"; then + echo "$ac_t""$MAKEINFO" 1>&6 +else + echo "$ac_t""no" 1>&6 +fi + +test -n "$MAKEINFO" && break +done +test -n "$MAKEINFO" || MAKEINFO="no" + + + + r="`eval echo '$'"MAKEINFO"`" + if test -n "$r" -a "$r" != "error" -a "$r" != "no" && expr '`eval echo '$'"MAKEINFO"`' : '.*\(echo\)' > /dev/null; then + true + else + ##STEPMAKE_WARN(cannot find . ) + false + fi + + if test $? -ne 0; then + + eval "REQUIRED"=\"`eval echo \"'$'REQUIRED\" \"makeinfo\"`\" + + if test "REQUIRED" = "REQUIRED"; then + command="echo ERROR: makeinfo not found" + # abort configure process here? + else + command="- echo makeinfo not found" + fi + eval "MAKEINFO"='$command' + false + else + true + fi + + if test $? -eq 0 -a -n ""; then + + r="`eval echo '$'"MAKEINFO"`" + echo $ac_n "checking "$r version"""... $ac_c" 1>&6 +echo "configure:3725: checking "$r version"" >&5 + #exe=`STEPMAKE_GET_EXECUTABLE($r)` + exe=` + ## which doesn't work in ash, if /usr/bin/which isn't installed + ## type -p doesn't work in ash + ## command -v doesn't work in zsh + ## command -v "$r" 2>&1 + ## this test should work in ash, bash, pdksh (ksh), zsh + type -p "$r" 2>/dev/null | tail -1 | awk '{print $NF}' +` + ver=` + "$exe" --version 2>&1 | grep -v '^$' | head -1 | awk '{print $NF}' +` + num=` + echo "$ver" | awk -F. ' + { + if ($3) {last = $3} + else {last =0} + } + {printf "%s%s%s\n",$1*100, $2*10,last}' +` + req=` + echo "" | awk -F. ' + { + if ($3) {last = $3} + else {last =0} + } + {printf "%s%s%s\n",$1*100, $2*10,last}' +` + echo "$ac_t"""$ver"" 1>&6 + if test "$num" -lt "$req"; then + + eval "REQUIRED"=\"`eval echo \"'$'REQUIRED\" \""$r (installed: $ver)"\"`\" + + fi + + fi + + if test "$MAKEINFO" = "makeinfo"; then + echo $ac_n "checking whether makeinfo can split html by @node""... $ac_c" 1>&6 +echo "configure:3765: checking whether makeinfo can split html by @node" >&5 + mkdir -p out + makeinfo --html --output=out/split <&6 + rm -rf out/split + else + echo "$ac_t""no" 1>&6 + + echo "configure: warning: your html documentation will be one large file" 1>&2 + warn_b=yes + + rm -rf out/split + fi + fi + + +## STEPMAKE_PYTHON_DEVEL(REQUIRED) + + +# AC_HAVE_HEADERS(limits.h malloc.h string.h unistd.h values.h) +for ac_hdr in assert.h sys/stat.h +do +ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` +echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 +echo "configure:3797: checking for $ac_hdr" >&5 +if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +EOF +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +{ (eval echo configure:3807: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` +if test -z "$ac_err"; then + rm -rf conftest* + eval "ac_cv_header_$ac_safe=yes" +else + echo "$ac_err" >&5 + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_header_$ac_safe=no" +fi +rm -f conftest* +fi +if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then + echo "$ac_t""yes" 1>&6 + ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` + cat >> confdefs.h <&6 +fi +done + +echo $ac_n "checking whether stat file-mode macros are broken""... $ac_c" 1>&6 +echo "configure:3834: checking whether stat file-mode macros are broken" >&5 +if eval "test \"`echo '$''{'ac_cv_header_stat_broken'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +#include + +#if defined(S_ISBLK) && defined(S_IFDIR) +# if S_ISBLK (S_IFDIR) +You lose. +# endif +#endif + +#if defined(S_ISBLK) && defined(S_IFCHR) +# if S_ISBLK (S_IFCHR) +You lose. +# endif +#endif + +#if defined(S_ISLNK) && defined(S_IFREG) +# if S_ISLNK (S_IFREG) +You lose. +# endif +#endif + +#if defined(S_ISSOCK) && defined(S_IFREG) +# if S_ISSOCK (S_IFREG) +You lose. +# endif +#endif + +EOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + egrep "You lose" >/dev/null 2>&1; then + rm -rf conftest* + ac_cv_header_stat_broken=yes else - echo "$ac_t""no" 1>&6 + rm -rf conftest* + ac_cv_header_stat_broken=no fi +rm -f conftest* -test -n "$BIBTEX2HTML" && break -done -test -n "$BIBTEX2HTML" || BIBTEX2HTML="error" +fi - if test "$BIBTEX2HTML" = "bib2html"; then - BIBTEX2HTML_FLAGS='$< $(@)' - else - BIBTEX2HTML_FLAGS='-o $(@D)/$(*F) $<' - fi - - +echo "$ac_t""$ac_cv_header_stat_broken" 1>&6 +if test $ac_cv_header_stat_broken = yes; then + cat >> confdefs.h <<\EOF +#define STAT_MACROS_BROKEN 1 +EOF +fi echo $ac_n "checking for 8-bit clean memcmp""... $ac_c" 1>&6 -echo "configure:3180: checking for 8-bit clean memcmp" >&5 +echo "configure:3891: checking for 8-bit clean memcmp" >&5 if eval "test \"`echo '$''{'ac_cv_func_memcmp_clean'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3184,11 +3895,8 @@ else ac_cv_func_memcmp_clean=no else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:3909: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ac_cv_func_memcmp_clean=yes else @@ -3215,12 +3923,12 @@ echo "$ac_t""$ac_cv_func_memcmp_clean" 1>&6 test $ac_cv_func_memcmp_clean = no && LIBOBJS="$LIBOBJS memcmp.${ac_objext}" echo $ac_n "checking for vprintf""... $ac_c" 1>&6 -echo "configure:3219: checking for vprintf" >&5 +echo "configure:3927: checking for vprintf" >&5 if eval "test \"`echo '$''{'ac_cv_func_vprintf'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3958: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_vprintf=yes" else @@ -3270,12 +3978,12 @@ fi if test "$ac_cv_func_vprintf" != yes; then echo $ac_n "checking for _doprnt""... $ac_c" 1>&6 -echo "configure:3274: checking for _doprnt" >&5 +echo "configure:3982: checking for _doprnt" >&5 if eval "test \"`echo '$''{'ac_cv_func__doprnt'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4013: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func__doprnt=yes" else @@ -3328,12 +4036,12 @@ fi for ac_func in memmem snprintf vsnprintf gettext isinf do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:3332: checking for $ac_func" >&5 +echo "configure:4040: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4071: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -3384,82 +4092,222 @@ fi done -cat >> confdefs.h <> confdefs.h <&6 -echo "configure:3403: checking for $ac_word" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_MAKEINFO'+set}'`\" = set"; then +echo "configure:4107: checking for $ac_word" >&5 +if eval "test \"`echo '$''{'ac_cv_prog_GUILE'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else - if test -n "$MAKEINFO"; then - ac_cv_prog_MAKEINFO="$MAKEINFO" # Let the user override the test. + if test -n "$GUILE"; then + ac_cv_prog_GUILE="$GUILE" # Let the user override the test. else IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" ac_dummy="$PATH" for ac_dir in $ac_dummy; do test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/$ac_word; then - ac_cv_prog_MAKEINFO="$ac_prog" + ac_cv_prog_GUILE="$ac_prog" break fi done IFS="$ac_save_ifs" fi fi -MAKEINFO="$ac_cv_prog_MAKEINFO" -if test -n "$MAKEINFO"; then - echo "$ac_t""$MAKEINFO" 1>&6 +GUILE="$ac_cv_prog_GUILE" +if test -n "$GUILE"; then + echo "$ac_t""$GUILE" 1>&6 else echo "$ac_t""no" 1>&6 fi -test -n "$MAKEINFO" && break +test -n "$GUILE" && break done -test -n "$MAKEINFO" || MAKEINFO="error" +test -n "$GUILE" || GUILE="no" - if test "$MAKEINFO" != "error"; then - echo $ac_n "checking whether makeinfo can split html by @node""... $ac_c" 1>&6 -echo "configure:3435: checking whether makeinfo can split html by @node" >&5 - mkdir -p out - makeinfo --html --output=out/split <&6 - rm -rf out/split + + + r="`eval echo '$'"GUILE"`" + if test -n "$r" -a "$r" != "error" -a "$r" != "no" && expr '`eval echo '$'"GUILE"`' : '.*\(echo\)' > /dev/null; then + true + else + ##STEPMAKE_WARN(cannot find . ) + false + fi + + if test $? -ne 0; then + + eval "OPTIONAL"=\"`eval echo \"'$'OPTIONAL\" \"guile\"`\" + + if test "OPTIONAL" = "REQUIRED"; then + command="echo ERROR: guile not found" + # abort configure process here? else - echo "$ac_t""no" 1>&6 + command="- echo guile not found" + fi + eval "GUILE"='$command' + false + else + true + fi + + if test $? -eq 0; then + # Extract the first word of "guile", so it can be a program name with args. +set dummy guile; ac_word=$2 +echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +echo "configure:4167: checking for $ac_word" >&5 +if eval "test \"`echo '$''{'ac_cv_path_GUILE'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + case "$GUILE" in + /*) + ac_cv_path_GUILE="$GUILE" # Let the user override the test with a path. + ;; + ?:/*) + ac_cv_path_GUILE="$GUILE" # Let the user override the test with a dos path. + ;; + *) + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" + ac_dummy="$PATH" + for ac_dir in $ac_dummy; do + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/$ac_word; then + ac_cv_path_GUILE="$ac_dir/$ac_word" + break + fi + done + IFS="$ac_save_ifs" + ;; +esac +fi +GUILE="$ac_cv_path_GUILE" +if test -n "$GUILE"; then + echo "$ac_t""$GUILE" 1>&6 +else + echo "$ac_t""no" 1>&6 +fi + + if test -n ""; then - echo "configure: warning: your html documentation will be one large file" 1>&2 - warn_b=yes + r="`eval echo '$'"GUILE"`" + echo $ac_n "checking "$r version"""... $ac_c" 1>&6 +echo "configure:4203: checking "$r version"" >&5 + #exe=`STEPMAKE_GET_EXECUTABLE($r)` + exe=` + ## which doesn't work in ash, if /usr/bin/which isn't installed + ## type -p doesn't work in ash + ## command -v doesn't work in zsh + ## command -v "$r" 2>&1 + ## this test should work in ash, bash, pdksh (ksh), zsh + type -p "$r" 2>/dev/null | tail -1 | awk '{print $NF}' +` + ver=` + "$exe" --version 2>&1 | grep -v '^$' | head -1 | awk '{print $NF}' +` + num=` + echo "$ver" | awk -F. ' + { + if ($3) {last = $3} + else {last =0} + } + {printf "%s%s%s\n",$1*100, $2*10,last}' +` + req=` + echo "" | awk -F. ' + { + if ($3) {last = $3} + else {last =0} + } + {printf "%s%s%s\n",$1*100, $2*10,last}' +` + echo "$ac_t"""$ver"" 1>&6 + if test "$num" -lt "$req"; then + + eval "OPTIONAL"=\"`eval echo \"'$'OPTIONAL\" \""$r (installed: $ver)"\"`\" + + fi - rm -rf out/split fi fi + + +# perl for help2man. + + + for ac_prog in perl +do +# Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +echo "configure:4251: checking for $ac_word" >&5 +if eval "test \"`echo '$''{'ac_cv_prog_PERL'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + if test -n "$PERL"; then + ac_cv_prog_PERL="$PERL" # Let the user override the test. +else + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" + ac_dummy="$PATH" + for ac_dir in $ac_dummy; do + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/$ac_word; then + ac_cv_prog_PERL="$ac_prog" + break + fi + done + IFS="$ac_save_ifs" +fi +fi +PERL="$ac_cv_prog_PERL" +if test -n "$PERL"; then + echo "$ac_t""$PERL" 1>&6 +else + echo "$ac_t""no" 1>&6 +fi + +test -n "$PERL" && break +done +test -n "$PERL" || PERL="no" + + + r="`eval echo '$'"PERL"`" + if test -n "$r" -a "$r" != "error" -a "$r" != "no" && expr '`eval echo '$'"PERL"`' : '.*\(echo\)' > /dev/null; then + true + else + ##STEPMAKE_WARN(cannot find . ) + false + fi + + if test $? -ne 0; then + + eval "OPTIONAL"=\"`eval echo \"'$'OPTIONAL\" \"perl\"`\" + if test "OPTIONAL" = "REQUIRED"; then + command="echo ERROR: perl not found" + # abort configure process here? + else + command="- echo perl not found" + fi + eval "PERL"='$command' + false + else + true + fi -# Extract the first word of "perl", so it can be a program name with args. + if test $? -eq 0; then + # Extract the first word of "perl", so it can be a program name with args. set dummy perl; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:3463: checking for $ac_word" >&5 +echo "configure:4311: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_PERL'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3481,7 +4329,6 @@ else fi done IFS="$ac_save_ifs" - test -z "$ac_cv_path_PERL" && ac_cv_path_PERL="error" ;; esac fi @@ -3492,8 +4339,182 @@ else echo "$ac_t""no" 1>&6 fi + if test -n ""; then + + r="`eval echo '$'"PERL"`" + echo $ac_n "checking "$r version"""... $ac_c" 1>&6 +echo "configure:4347: checking "$r version"" >&5 + #exe=`STEPMAKE_GET_EXECUTABLE($r)` + exe=` + ## which doesn't work in ash, if /usr/bin/which isn't installed + ## type -p doesn't work in ash + ## command -v doesn't work in zsh + ## command -v "$r" 2>&1 + ## this test should work in ash, bash, pdksh (ksh), zsh + type -p "$r" 2>/dev/null | tail -1 | awk '{print $NF}' +` + ver=` + "$exe" --version 2>&1 | grep -v '^$' | head -1 | awk '{print $NF}' +` + num=` + echo "$ver" | awk -F. ' + { + if ($3) {last = $3} + else {last =0} + } + {printf "%s%s%s\n",$1*100, $2*10,last}' +` + req=` + echo "" | awk -F. ' + { + if ($3) {last = $3} + else {last =0} + } + {printf "%s%s%s\n",$1*100, $2*10,last}' +` + echo "$ac_t"""$ver"" 1>&6 + if test "$num" -lt "$req"; then + + eval "OPTIONAL"=\"`eval echo \"'$'OPTIONAL\" \""$r (installed: $ver)"\"`\" + + fi + + fi + fi + + +### pktrace for generating pfa's, pfb's +## STEPMAKE_PROGS(PKTRACE, pktrace, OPTIONAL, 1.0.3) +# new makeinfo for multi-page website docs + + for ac_prog in makeinfo +do +# Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +echo "configure:4396: checking for $ac_word" >&5 +if eval "test \"`echo '$''{'ac_cv_prog_MAKEINFO'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + if test -n "$MAKEINFO"; then + ac_cv_prog_MAKEINFO="$MAKEINFO" # Let the user override the test. +else + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" + ac_dummy="$PATH" + for ac_dir in $ac_dummy; do + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/$ac_word; then + ac_cv_prog_MAKEINFO="$ac_prog" + break + fi + done + IFS="$ac_save_ifs" +fi +fi +MAKEINFO="$ac_cv_prog_MAKEINFO" +if test -n "$MAKEINFO"; then + echo "$ac_t""$MAKEINFO" 1>&6 +else + echo "$ac_t""no" 1>&6 +fi + +test -n "$MAKEINFO" && break +done +test -n "$MAKEINFO" || MAKEINFO="no" + + + + r="`eval echo '$'"MAKEINFO"`" + if test -n "$r" -a "$r" != "error" -a "$r" != "no" && expr '`eval echo '$'"MAKEINFO"`' : '.*\(echo\)' > /dev/null; then + true + else + ##STEPMAKE_WARN(cannot find . ) + false + fi + + if test $? -ne 0; then + + eval "OPTIONAL"=\"`eval echo \"'$'OPTIONAL\" \"makeinfo\"`\" + + if test "OPTIONAL" = "REQUIRED"; then + command="echo ERROR: makeinfo not found" + # abort configure process here? + else + command="- echo makeinfo not found" + fi + eval "MAKEINFO"='$command' + false + else + true + fi + + if test $? -eq 0 -a -n "4.1"; then + + r="`eval echo '$'"MAKEINFO"`" + echo $ac_n "checking "$r version"""... $ac_c" 1>&6 +echo "configure:4456: checking "$r version"" >&5 + #exe=`STEPMAKE_GET_EXECUTABLE($r)` + exe=` + ## which doesn't work in ash, if /usr/bin/which isn't installed + ## type -p doesn't work in ash + ## command -v doesn't work in zsh + ## command -v "$r" 2>&1 + ## this test should work in ash, bash, pdksh (ksh), zsh + type -p "$r" 2>/dev/null | tail -1 | awk '{print $NF}' +` + ver=` + "$exe" --version 2>&1 | grep -v '^$' | head -1 | awk '{print $NF}' +` + num=` + echo "$ver" | awk -F. ' + { + if ($3) {last = $3} + else {last =0} + } + {printf "%s%s%s\n",$1*100, $2*10,last}' +` + req=` + echo "4.1" | awk -F. ' + { + if ($3) {last = $3} + else {last =0} + } + {printf "%s%s%s\n",$1*100, $2*10,last}' +` + echo "$ac_t"""$ver"" 1>&6 + if test "$num" -lt "$req"; then + + eval "OPTIONAL"=\"`eval echo \"'$'OPTIONAL\" \""$r 4.1 (installed: $ver)"\"`\" + + fi + + fi + + + +if test "$optimise_b" = yes; then + DEFINES="$DEFINES -DSTRING_UTILS_INLINED" + cat >> confdefs.h <<\EOF +#define STRINGS_UTILS_INLINED 1 +EOF + +fi + + +cat >> confdefs.h <> confdefs.h < confcache <<\EOF # This file is a shell script that caches the results of configure @@ -3650,8 +4671,9 @@ s%@ZIP@%$ZIP%g s%@LN@%$LN%g s%@LN_S@%$LN_S%g s%@INSTALL@%$INSTALL%g -s%@PATHSEP@%$PATHSEP%g s%@DIRSEP@%$DIRSEP%g +s%@PATHSEP@%$PATHSEP%g +s%@ROOTSEP@%$ROOTSEP%g s%@DIR_DATADIR@%$DIR_DATADIR%g s%@subdirs@%$subdirs%g s%@CC@%$CC%g @@ -3661,40 +4683,32 @@ s%@ICFLAGS@%$ICFLAGS%g s%@ILDFLAGS@%$ILDFLAGS%g s%@DEFINES@%$DEFINES%g s%@EXTRA_LIBES@%$EXTRA_LIBES%g -s%@CPP@%$CPP%g s%@CXX@%$CXX%g -s%@CXXCPP@%$CXXCPP%g +s%@AR@%$AR%g +s%@RANLIB@%$RANLIB%g s%@YACC@%$YACC%g s%@BISON@%$BISON%g s%@FLEX@%$FLEX%g -s%@AR@%$AR%g -s%@RANLIB@%$RANLIB%g +s%@CXXCPP@%$CXXCPP%g s%@localedir@%$localedir%g s%@DIR_LOCALEDIR@%$DIR_LOCALEDIR%g s%@MSGFMT@%$MSGFMT%g s%@METAFONT@%$METAFONT%g -s%@MFONT@%$MFONT%g -s%@METAPOST@%$METAPOST%g -s%@MPOST@%$MPOST%g s%@INIMETAFONT@%$INIMETAFONT%g -s%@INIMFONT@%$INIMFONT%g -s%@INIMETAPOST@%$INIMETAPOST%g -s%@INIMPOST@%$INIMPOST%g s%@MFMODE@%$MFMODE%g -s%@MFPLAIN_MP@%$MFPLAIN_MP%g -s%@INIMETAPOST_FLAGS@%$INIMETAPOST_FLAGS%g s%@KPSEWHICH@%$KPSEWHICH%g s%@TFM_PATH@%$TFM_PATH%g +s%@GUILE_CONFIG@%$GUILE_CONFIG%g s%@GUILE_CFLAGS@%$GUILE_CFLAGS%g s%@GUILE_LDFLAGS@%$GUILE_LDFLAGS%g -s%@GUILE@%$GUILE%g s%@KPATHSEA@%$KPATHSEA%g -s%@BIBTEX2HTML@%$BIBTEX2HTML%g -s%@BIBTEX2HTML_FLAGS@%$BIBTEX2HTML_FLAGS%g -s%@LIBOBJS@%$LIBOBJS%g s%@MAKEINFO@%$MAKEINFO%g s%@SPLITTING_MAKEINFO@%$SPLITTING_MAKEINFO%g +s%@LIBOBJS@%$LIBOBJS%g +s%@GUILE@%$GUILE%g s%@PERL@%$PERL%g +s%@OPTIONAL@%$OPTIONAL%g +s%@REQUIRED@%$REQUIRED%g CEOF EOF @@ -4003,6 +5017,28 @@ if test "$no_recursion" != yes; then fi + + if test -n "$OPTIONAL"; then + echo + echo "WARNING: Please consider installing optional programs: $OPTIONAL" + fi + + if test -n "$REQUIRED"; then + echo + echo "ERROR: Please install required programs: $REQUIRED" + fi + + if test -n "$OPTIONAL$REQUIRED"; then + echo + echo "See INSTALL.txt for more information on how to build $PACKAGE_NAME" + echo "Remove config.cache before rerunning ./configure" + fi + + if test -n "$REQUIRED"; then + rm -f $srcdir/GNUmakefile + exit 1 + fi + # regular in-place build # test for srcdir_build = yes ? if test "$builddir" = "."; then @@ -4016,6 +5052,7 @@ fi fi + test -n "$CONFIGURATION" && mc=" conf=$CONFIGURATION" || mc="" cat < +;;; some code is taken from ESS (Emacs Speaks Statistics) S-mode by A.J.Rossini + +;;; Variables for customising indentation style + +(defcustom LilyPond-indent-level 4 + "*Indentation of lilypond statements with respect to containing block.") + +(defcustom LilyPond-brace-offset 0 + "*Extra indentation for open braces. +Compares with other text in same context.") + +(defcustom LilyPond-angle-offset 0 + "*Extra indentation for open angled brackets . +Compares with other text in same context.") + +(defcustom LilyPond-scheme-paren-offset 0 + "*Extra indentation for open scheme parens . +Compares with other text in same context.") + +(defcustom LilyPond-close-brace-offset 0 + "*Extra indentation for closing braces.") + +(defcustom LilyPond-close-angle-offset 0 + "*Extra indentation for closing angle brackets.") + +(defcustom LilyPond-close-scheme-paren-offset 0 + "*Extra indentation for closing scheme parens.") + +(defcustom LilyPond-fancy-comments t + "*Non-nil means distiguish between %, %%, and %%% for indentation.") + + +(defun LilyPond-calculate-indent () + "Return appropriate indentation for current line as lilypond code. +In usual case returns an integer: the column to indent to. +Returns nil if line starts inside a string" + (save-excursion + (beginning-of-line) + (let ((indent-point (point)) + (case-fold-search nil) + state) + (setq containing-sexp (save-excursion (LilyPond-beginning-of-containing-sexp))) + (beginning-of-defun) + (while (< (point) indent-point) + (setq state (parse-partial-sexp (point) indent-point 0))) + ;; (setq containing-sexp (car (cdr state))) is the traditional way for languages + ;; with simpler parenthesis delimiters + (cond ((nth 3 state) + ;; point is in the middle of a string + nil) + ((nth 4 state) + ;; point is in the middle of a block comment + (LilyPond-calculate-indent-within-blockcomment)) + ((null containing-sexp) + ;; Line is at top level - no indent + (beginning-of-line) + 0) + (t + ;; Find previous non-comment character. + (goto-char indent-point) + (LilyPond-backward-to-noncomment containing-sexp) + ;; Now we get the answer. + ;; Position following last unclosed open. + (goto-char containing-sexp) + (or + ;; Is line first statement after an open brace or bracket? + ;; If no, find that first statement and indent like it. + (save-excursion + (forward-char 1) + ;; Skip over comments following open brace. + (skip-chars-forward " \t\n") + (cond ((looking-at "%{") + (while (progn + (and (not (looking-at "%}")) + (< (point) (point-max)))) + (forward-line 1) + (skip-chars-forward " \t\n")) + (forward-line 1) + (skip-chars-forward " \t\n")) + ((looking-at "%") + (while (progn (skip-chars-forward " \t\n") + (looking-at "%")) + (forward-line 1)))) + ;; The first following code counts + ;; if it is before the line we want to indent. + (and (< (point) indent-point) + (current-column))) + ;; If no previous statement, + ;; indent it relative to line brace is on. + ;; For open brace in column zero, don't let statement + ;; start there too. If LilyPond-indent-level is zero, use + ;; LilyPond-brace-offset instead + (+ (if (and (bolp) (zerop LilyPond-indent-level)) + (cond ((= (following-char) ?{) + LilyPond-brace-offset) + ((= (following-char) ?<) + LilyPond-angle-offset) + ((= (following-char) ?\)) + LilyPond-scheme-paren-offset) + (t + 0)) + LilyPond-indent-level) + (progn + (skip-chars-backward " \t") + (current-indentation))))))))) + + + +(defun LilyPond-indent-line () + "Indent current line as lilypond code. +Return the amount the indentation changed by." + (let ((indent (LilyPond-calculate-indent)) + beg shift-amt + (case-fold-search nil) + (pos (- (point-max) (point)))) + (beginning-of-line) + (setq beg (point)) + (cond ((eq indent nil) + (setq indent (current-indentation))) + (t + (skip-chars-forward " \t") + (if (and LilyPond-fancy-comments (looking-at "%%%\\|%{\\|%}")) + (setq indent 0)) + (if (and LilyPond-fancy-comments + (looking-at "%") + (not (looking-at "%%\\|%{\\|%}"))) + (setq indent comment-column) + (if (eq indent t) (setq indent 0)) + (if (listp indent) (setq indent (car indent))) + (cond + ((= (following-char) ?}) + (setq indent (+ indent (- LilyPond-close-brace-offset LilyPond-indent-level)))) + ((= (following-char) ?>) + (setq indent (+ indent (- LilyPond-close-angle-offset LilyPond-indent-level)))) + ((and (= (following-char) ?\)) (LilyPond-inside-scheme-p)) + (setq indent (+ indent (- LilyPond-close-scheme-paren-offset LilyPond-indent-level)))) + ((= (following-char) ?{) + (setq indent (+ indent LilyPond-brace-offset))) + ((= (following-char) ?<) + (setq indent (+ indent LilyPond-angle-offset))) + ((and (= (following-char) ?\() (LilyPond-inside-scheme-p)) + (setq indent (+ indent LilyPond-scheme-paren-offset))) + )))) + (skip-chars-forward " \t") + (setq shift-amt (- indent (current-column))) + (if (zerop shift-amt) + (if (> (- (point-max) pos) (point)) + (goto-char (- (point-max) pos))) + (delete-region beg (point)) + (indent-to indent) + ;; If initial point was within line's indentation, + ;; position after the indentation. + ;; Else stay at same point in text. + (if (> (- (point-max) pos) (point)) + (goto-char (- (point-max) pos)))) + shift-amt)) + + +(defun LilyPond-inside-comment-p () + "Return non-nil if point is inside a line or block comment" + (setq this-point (point)) + (or (save-excursion (beginning-of-line) + (skip-chars-forward " \t") + (looking-at "%")) + (save-excursion + ;; point is in the middle of a block comment + (setq lastopen (save-excursion (re-search-backward "%{[ \\t]*" (point-min) t))) + (setq lastclose (save-excursion (re-search-backward "%}[ \\t]*" (point-min) t))) + (if (or (and (= (char-before) ?%) (= (char-after) ?{)) + (and (= (char-after) ?%) (= (char-after (1+ (point))) ?{))) + (setq lastopen (save-excursion (backward-char) (point)))) + (and + lastopen + (or (not lastclose) + (<= lastclose lastopen)))) + )) + + +(defun LilyPond-inside-string-or-comment-p () + "Test if point is inside a string or a comment" + (setq this-point (point)) + (or (save-excursion (beginning-of-line) + (skip-chars-forward " \t") + (looking-at "%")) + (save-excursion + (beginning-of-defun) + (while (< (point) this-point) + (setq state (parse-partial-sexp (point) this-point 0))) + (cond ((nth 3 state) + ;; point is in the middle of a string + t ) + ((nth 4 state) + ;; point is in the middle of a block comment + t ) + (t + nil))))) + + +(defun LilyPond-backward-over-blockcomments (lim) + "Move point back to closest non-whitespace character not part of a block comment" + (setq lastopen (save-excursion (re-search-backward "%{[ \\t]*" lim t))) + (setq lastclose (save-excursion (re-search-backward "%}[ \\t]*" lim t))) + (if lastopen + (if lastclose + (if (<= lastclose lastopen) + (goto-char lastopen)) + (goto-char lastopen))) + (skip-chars-backward " %\t\n\f")) + + +(defun LilyPond-backward-over-linecomments (lim) + "Move point back to the closest non-whitespace character not part of a line comment. +Argument LIM limit." + (let (opoint stop) + (while (not stop) + (skip-chars-backward " \t\n\f" lim) + (setq opoint (point)) + (beginning-of-line) + (search-forward "%" opoint 'move) + (skip-chars-backward " \t%") + (setq stop (or (/= (preceding-char) ?\n) (<= (point) lim))) + (if stop (point) + (beginning-of-line))))) + + +(defun LilyPond-backward-to-noncomment (lim) + "Move point back to closest non-whitespace character not part of a comment" + (LilyPond-backward-over-linecomments lim) + (LilyPond-backward-over-blockcomments lim)) + + +(defun LilyPond-calculate-indent-within-blockcomment () + "Return the indentation amount for line inside a block comment." + (let (end percent-start) + (save-excursion + (beginning-of-line) + (skip-chars-forward " \t") + (skip-chars-backward " \t\n") + (setq end (point)) + (beginning-of-line) + (skip-chars-forward " \t") + (and (re-search-forward "%{[ \t]*" end t) + (goto-char (1+ (match-beginning 0)))) + (if (and (looking-at "[ \t]*$") (= (preceding-char) ?\%)) + (1+ (current-column)) + (current-column))))) + + +(defconst LilyPond-parens-regexp-alist + `(("[^\\]<" . "[^ \\n\\t_^-]\\s-*>\\|[_^-]\\s-*[-^]\\s-*>") + ;; a b c->, a b c^> and a b c_> are not close-angle-brackets, they're accents + ;; but a b c^-> and a b c^^> are close brackets with tenuto/marcato before them + ;; also \> and \< are hairpins + ("{" . "}"))) + + +(defconst LilyPond-parens-combined-regexp + (concat (mapconcat 'car LilyPond-parens-regexp-alist "\\|") + "\\|" + (mapconcat 'cdr LilyPond-parens-regexp-alist "\\|"))) + + +(defun LilyPond-beginning-of-containing-sexp () + "Move point to the beginning of the deepest parenthesis pair enclosing point." + (interactive) + (let ((level 1)) + (if (LilyPond-inside-scheme-p) + (setq paren-regexp "(\\|)" inside-scheme t) + (setq paren-regexp LilyPond-parens-combined-regexp inside-scheme nil)) + (while (and (> level 0) + (re-search-backward paren-regexp nil t) + (setq match (char-before (match-end 0)))) + (if (not (save-excursion (goto-char (match-end 0)) + (LilyPond-inside-string-or-comment-p))) + (if (memq match '(?} ?> ?\))) + (progn (setq level (1+ level)) + (if (and (= match ?>) + (looking-at ".\\s-+>\\|\\({\\|}\\|<\\|>\\|(\\|)\\)>")) + (forward-char 1))) + (progn (setq level (1- level)) + (if (and (= match ?<) + (looking-at ".\\s-+<\\|\\({\\|}\\|<\\|>\\|(\\|)\\)<")) + (forward-char 1)))))) + (if (looking-at ".<\\|.>") (forward-char 1)) + (if (/= level 1) + (point) + nil))) + + +(defun LilyPond-inside-scheme-p () + "Tests if point is inside embedded Scheme code" + (interactive) + (let ( (test-point (point)) + (level 0) ) + (save-excursion + (if (or (and (= (char-after (point)) ?\() + (or (= (char-after (- (point) 1)) ?#) + (and (= (char-after (- (point) 2)) ?#) + (= (char-after (- (point) 1)) ?`)))) + (and (re-search-backward "#(\\|#`(" nil t) + (progn + (search-forward "(") + (setq level 1) + (while (and (> level 0) + (re-search-forward "(\\|)" test-point t) + (setq match (char-after (match-beginning 0))) + (<= (point) test-point)) + (if (= match ?\() + (setq level (1+ level)) + (setq level (1- level)))) + (> level 0)))) + t + nil)))) diff --git a/lilypond-mode.el b/lilypond-mode.el index 91d86d0a91..41e4d09da6 100644 --- a/lilypond-mode.el +++ b/lilypond-mode.el @@ -137,7 +137,7 @@ in LilyPond-include-path." ;; variable instead of quering the user. (defvar LilyPond-command-force nil) -(defcustom LilyPond-xdvi-command "xdvik" +(defcustom LilyPond-xdvi-command "xdvi" "Command used to display DVI files." :group 'LilyPond diff --git a/make/lilypond-vars.make b/make/lilypond-vars.make index 0744ffe3c8..484500a7b2 100644 --- a/make/lilypond-vars.make +++ b/make/lilypond-vars.make @@ -34,7 +34,7 @@ ABC2LY = $(script-dir)/abc2ly.py CONVERT_LY = $(script-dir)/convert-ly.py LILYPOND = $(depth)/$(builddir)/lily/$(outconfbase)/lilypond LILYPOND_BOOK = $(script-dir)/lilypond-book.py -LILYPOND_BOOK_INCLUDES = -I $(pwd) -I $(outdir) -I$(input-dir) -I $(input-dir)/tricks/ -I $(input-dir)/regression/ -I $(input-dir)/test/ -I $(input-dir)/tutorial/ +LILYPOND_BOOK_INCLUDES = -I $(pwd) -I $(outdir) -I$(input-dir) -I $(input-dir)/tricks/ -I $(input-dir)/regression/ -I $(input-dir)/test/ -I $(input-dir)/tutorial/ -I $(topdir)/mf/$(outdir)/ -I $(topdir)/mf/out/ LY2DVI = $(script-dir)/ly2dvi.py PS_TO_GIFS = $(buildscript-dir)/ps-to-gifs.sh PS_TO_PNGS = $(buildscript-dir)/ps-to-pngs.sh diff --git a/make/lilypond.redhat.spec.in b/make/lilypond.redhat.spec.in index d1d86da51c..805e1d57de 100644 --- a/make/lilypond.redhat.spec.in +++ b/make/lilypond.redhat.spec.in @@ -62,7 +62,7 @@ gzip -9fn $RPM_BUILD_ROOT%{_prefix}/info/* %endif mkdir -p $RPM_BUILD_ROOT/usr/share/emacs/site-lisp/site-start.d -install -m 644 lilypond-mode.el lilypond-font-lock.el $RPM_BUILD_ROOT/usr/share/emacs/site-lisp/ +install -m 644 lilypond-mode.el lilypond-font-lock.el lilypond-indent.el $RPM_BUILD_ROOT/usr/share/emacs/site-lisp/ install -m 644 lilypond-init.el $RPM_BUILD_ROOT/usr/share/emacs/site-lisp/site-start.d gzip -9fn $RPM_BUILD_ROOT%{_prefix}/man/man1/* @@ -86,6 +86,10 @@ rm `find /var/lib/texmf -name 'feta*pk -print' -or -name 'feta*tfm -print'` /tmp /sbin/install-info %{_prefix}/info/lilypond.info.gz %{_prefix}/info/dir %endif +/usr/X11R6/bin/mkfontdir /usr/share/lilypond/pfa/ +/usr/sbin/chkfontpath --add=/usr/share/lilypond/pfa/ + + echo 'Please logout first before using LilyPond.' @@ -96,6 +100,9 @@ if [ $1 = 0 ]; then /sbin/install-info --delete %{_prefix}/info/lilypond.info.gz %{_prefix}/info/dir fi %endif +rm -f /usr/share/lilypond/pfa/fonts.dir +/usr/sbin/chkfontpath --remove=/usr/share/lilypond/pfa/ + %files @@ -138,3 +145,5 @@ fi %files documentation %doc web/ +%doc input/ +%doc mutopia/ diff --git a/make/lilypond.suse.spec.in b/make/lilypond.suse.spec.in index fea102c2d8..8544bf3f2c 100644 --- a/make/lilypond.suse.spec.in +++ b/make/lilypond.suse.spec.in @@ -215,6 +215,7 @@ touch var/adm/SuSEconfig/run-texhash # hairy to hook it in (possibly non-existing) emacs %doc lilypond-mode.el %doc lilypond-font-lock.el +%doc lilypond-indent.el %config /etc/profile.d/* diff --git a/make/out/lilypond.lsm b/make/out/lilypond.lsm index faa8af758c..ca527bfc66 100644 --- a/make/out/lilypond.lsm +++ b/make/out/lilypond.lsm @@ -1,15 +1,15 @@ Begin3 Title: LilyPond -Version: 1.4.13 -Entered-date: 05MEI02 +Version: 1.4.14 +Entered-date: 10JUN02 Description: @BLURB@ Keywords: music notation typesetting midi fonts engraving Author: hanwen@cs.uu.nl (Han-Wen Nienhuys) janneke@gnu.org (Jan Nieuwenhuizen) Maintained-by: hanwen@stack.nl (Han-Wen Nienhuys) Primary-site: sunsite.unc.edu /pub/Linux/apps/sound/convert - 1000k lilypond-1.4.13.tar.gz + 1000k lilypond-1.4.14.tar.gz Original-site: ftp.cs.uu.nl /pub/GNU/LilyPond/development/ - 1000k lilypond-1.4.13.tar.gz + 1000k lilypond-1.4.14.tar.gz Copying-policy: GPL End diff --git a/make/out/lilypond.redhat.spec b/make/out/lilypond.redhat.spec index d1f85aae86..e5f34f5d1f 100644 --- a/make/out/lilypond.redhat.spec +++ b/make/out/lilypond.redhat.spec @@ -1,11 +1,11 @@ %define info yes Name: lilypond -Version: 1.4.13 +Version: 1.4.14 Release: 1 License: GPL Group: Applications/Publishing -Source0: ftp.cs.uu.nl:/pub/GNU/LilyPond/development/lilypond-1.4.13.tar.gz +Source0: ftp.cs.uu.nl:/pub/GNU/LilyPond/development/lilypond-1.4.14.tar.gz Summary: Create and print music notation URL: http://www.cs.uu.nl/~hanwen/lilypond BuildRoot: /tmp/lilypond-install @@ -62,7 +62,7 @@ gzip -9fn $RPM_BUILD_ROOT%{_prefix}/info/* %endif mkdir -p $RPM_BUILD_ROOT/usr/share/emacs/site-lisp/site-start.d -install -m 644 lilypond-mode.el lilypond-font-lock.el $RPM_BUILD_ROOT/usr/share/emacs/site-lisp/ +install -m 644 lilypond-mode.el lilypond-font-lock.el lilypond-indent.el $RPM_BUILD_ROOT/usr/share/emacs/site-lisp/ install -m 644 lilypond-init.el $RPM_BUILD_ROOT/usr/share/emacs/site-lisp/site-start.d gzip -9fn $RPM_BUILD_ROOT%{_prefix}/man/man1/* @@ -86,6 +86,10 @@ rm `find /var/lib/texmf -name 'feta*pk -print' -or -name 'feta*tfm -print'` /tmp /sbin/install-info %{_prefix}/info/lilypond.info.gz %{_prefix}/info/dir %endif +/usr/X11R6/bin/mkfontdir /usr/share/lilypond/pfa/ +/usr/sbin/chkfontpath --add=/usr/share/lilypond/pfa/ + + echo 'Please logout first before using LilyPond.' @@ -96,6 +100,9 @@ if [ $1 = 0 ]; then /sbin/install-info --delete %{_prefix}/info/lilypond.info.gz %{_prefix}/info/dir fi %endif +rm -f /usr/share/lilypond/pfa/fonts.dir +/usr/sbin/chkfontpath --remove=/usr/share/lilypond/pfa/ + %files @@ -138,3 +145,5 @@ fi %files documentation %doc web/ +%doc input/ +%doc mutopia/ diff --git a/make/out/lilypond.suse.spec b/make/out/lilypond.suse.spec index 5202f9212c..3f4462804a 100644 --- a/make/out/lilypond.suse.spec +++ b/make/out/lilypond.suse.spec @@ -14,11 +14,11 @@ Distribution: SuSE Linux 7.0 (i386) Name: lilypond -Version: 1.4.13 +Version: 1.4.14 Release: 2 Copyright: GPL Group: Applications/Publishing -Source0: ftp.cs.uu.nl:/pub/GNU/LilyPond/development/lilypond-1.4.13.tar.gz +Source0: ftp.cs.uu.nl:/pub/GNU/LilyPond/development/lilypond-1.4.14.tar.gz # music notation software for.. ? Summary: A program for printing sheet music. URL: http://www.lilypond.org/ @@ -215,6 +215,7 @@ touch var/adm/SuSEconfig/run-texhash # hairy to hook it in (possibly non-existing) emacs %doc lilypond-mode.el %doc lilypond-font-lock.el +%doc lilypond-indent.el %config /etc/profile.d/* diff --git a/mf/GNUmakefile b/mf/GNUmakefile index c745a00539..a9773516d1 100644 --- a/mf/GNUmakefile +++ b/mf/GNUmakefile @@ -32,7 +32,7 @@ TFM_FILES = $(addprefix $(outdir)/, $(FONT_FILES:.mf=.tfm)) ALL_GEN_FILES= $(TFM_FILES) $(TEXTABLES) $(AFM_FILES) $(TFM_FILES) $(LOG_FILES) #PRE_INSTALL=$(MAKE) "$(ALL_GEN_FILES)" -INSTALLATION_DIR=$(datadir)/mf/ +INSTALLATION_DIR=$(datadir)/fonts/source/ INSTALLATION_FILES=$(MF_FILES) $(AF_FILES) INSTALLATION_OUT_SUFFIXES=1 2 3 4 5 @@ -40,10 +40,10 @@ INSTALLATION_OUT_SUFFIXES=1 2 3 4 5 INSTALLATION_OUT_DIR1=$(datadir)/tex INSTALLATION_OUT_FILES1=$(TEXTABLES) -INSTALLATION_OUT_DIR2=$(datadir)/afm +INSTALLATION_OUT_DIR2=$(datadir)/fonts/afm INSTALLATION_OUT_FILES2=$(AFM_FILES) -INSTALLATION_OUT_DIR3=$(datadir)/tfm +INSTALLATION_OUT_DIR3=$(datadir)/fonts/tfm INSTALLATION_OUT_FILES3=$(TFM_FILES) # comment this out if you don't want pfa's to be generated @@ -57,14 +57,15 @@ PFA_FILES = $(addprefix $(outdir)/, $(FONT_FILES:.mf=.pfa)) ifdef MAKE_PFA_FILES -ALL_GEN_FILES += $(PFA_FILES) $(outdir)/lilypond.map -INSTALLATION_OUT_DIR4=$(datadir)/pfa -INSTALLATION_OUT_FILES4=$(PFA_FILES) +ALL_GEN_FILES += $(PFA_FILES) $(outdir)/lilypond.map $(outdir)/fonts.scale +INSTALLATION_OUT_DIR4=$(datadir)/fonts/type1 +INSTALLATION_OUT_FILES4=$(PFA_FILES) $(outdir)/fonts.scale INSTALLATION_OUT_DIR5=$(datadir)/dvips/ INSTALLATION_OUT_FILES5=$(outdir)/lilypond.map -pfa: $(PFA_FILES) +pfa: $(PFA_FILES) $(outdir)/fonts.scale + endif @@ -72,6 +73,9 @@ $(outdir)/lilypond.map: echo $(FONT_FILES:.mf=) | tr ' ' '\n' | \ sed 's/\(.*\)/\1 \1 <\1.pfa/' > $@ +$(outdir)/fonts.scale: + echo $(FONT_FILES:.mf=.pfa) | $(PYTHON) $(topdir)/buildscripts/make-font-dir.py > $@ + export MFINPUTS:=.:$(MFINPUTS) @@ -79,8 +83,10 @@ default: $(ALL_GEN_FILES) ## ## todo: this also depends on .tfm, FIXME. -$(outdir)/%.afm $(outdir)/%.tex $(outdir)/%.dep: $(outdir)/%.log - $(PYTHON) $(buildscript-dir)/mf-to-table.py --package=$(topdir) --outdir=$(outdir) --dep $(outdir)/$(, 2001. +# Copyright (C) 2001, 2002 Free Software Foundation, Inc. +# Martin Norbäck , 2001, 2002. # msgid "" msgstr "" -"Project-Id-Version: lilypond 1.4.8\n" +"Project-Id-Version: lilypond 1.4.12\n" "POT-Creation-Date: 2002-01-29 23:12+0100\n" -"PO-Revision-Date: 2001-09-29 11:20+0200\n" +"PO-Revision-Date: 2002-06-04 09:26+0200\n" "Last-Translator: Martin Norbäck \n" "Language-Team: Swedish \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=iso-8859-1\n" "Content-Transfer-Encoding: 8bit\n" -#: data-file.cc:118 input.cc:85 ly2dvi.py:112 midi-parser.cc:100 mup2ly.py:93 -#: update-lily.py:118 warn.cc:23 +#: data-file.cc:118 input.cc:85 ly2dvi.py:112 midi-parser.cc:100 mup2ly.py:93 update-lily.py:118 warn.cc:23 msgid "warning: " msgstr "varning: " -#: input.cc:90 ly2dvi.py:115 ly2dvi.py:131 ly2dvi.py:682 ly2dvi.py:700 -#: mup2ly.py:98 mup2ly.py:188 update-lily.py:123 update-lily.py:211 warn.cc:9 -#: warn.cc:17 +#: input.cc:90 ly2dvi.py:115 ly2dvi.py:131 ly2dvi.py:682 ly2dvi.py:700 mup2ly.py:98 mup2ly.py:188 update-lily.py:123 update-lily.py:211 warn.cc:9 warn.cc:17 msgid "error: " msgstr "fel: " @@ -172,9 +169,9 @@ msgid "getopt says: `%s'" msgstr "getopt säger: \"%s\"" #: ly2dvi.py:811 -#, fuzzy, c-format +#, c-format msgid "filename should not contain spaces: `%s'" -msgstr "InnehÃ¥ller redan: \"%s\"" +msgstr "filnamnet fÃ¥r inte innehÃ¥lla mellanslag: \"%s\"" # här är det frÃ¥ga om skrivning till en fil #: ly2dvi.py:876 scores.cc:44 @@ -189,8 +186,7 @@ msgstr "beroenden skrivna till \"%s\"..." msgid "%s output to `%s'..." msgstr "%s skrivet till \"%s\"..." -#: includable-lexer.cc:49 lily-guile.cc:139 ly2dvi.py:889 -#: midi-score-parser.cc:24 scores.cc:136 scores.cc:142 +#: includable-lexer.cc:49 lily-guile.cc:139 ly2dvi.py:889 midi-score-parser.cc:24 scores.cc:136 scores.cc:142 #, c-format msgid "can't find file: `%s'" msgstr "kan inte hitta fil: \"%s\"" @@ -359,8 +355,7 @@ msgstr "ok msgid "can't map file" msgstr "kan inte göra \"mmap\" pÃ¥ filen" -#: lilypond-stream.cc:112 mapped-file-storage.cc:87 paper-stream.cc:45 -#: scores.cc:48 simple-file-storage.cc:44 text-stream.cc:23 +#: lilypond-stream.cc:112 mapped-file-storage.cc:87 paper-stream.cc:45 scores.cc:48 simple-file-storage.cc:44 text-stream.cc:23 #, c-format msgid "can't open file: `%s'" msgstr "kan inte öppna fil: \"%s\"" @@ -408,12 +403,8 @@ msgid "does not match: `%s'" msgstr "matchar inte: \"%s\"" #: all-font-metrics.cc:102 -msgid "" -" Rebuild all .afm files, and remove all .pk and .tfm files. Rerun with -V " -"to show font paths." -msgstr "" -" Bygg om alla .afm-filer, och ta bort alla .pk- och .tfm-filer. Kör igen med " -"-V för att visa typsnittssökvägar." +msgid " Rebuild all .afm files, and remove all .pk and .tfm files. Rerun with -V to show font paths." +msgstr " Bygg om alla .afm-filer, och ta bort alla .pk- och .tfm-filer. Kör igen med -V för att visa typsnittssökvägar." #: all-font-metrics.cc:167 #, c-format @@ -438,8 +429,7 @@ msgstr "(s msgid "Giving up" msgstr "Ger upp" -#: auto-change-iterator.cc:43 change-iterator.cc:59 -#: part-combine-music-iterator.cc:97 +#: auto-change-iterator.cc:43 change-iterator.cc:59 part-combine-music-iterator.cc:97 msgid "Can't switch translators, I'm there already" msgstr "Kan inte byta översättare, jag är redan där" @@ -553,9 +543,7 @@ msgstr "oavslutad ut #: extender-engraver.cc:109 msgid "Nothing to connect extender to on the left. Ignoring extender request." -msgstr "" -"Det finns inget att koppla utökaren mot till vänster. Ignorerar " -"utökarförfrÃ¥gan" +msgstr "Det finns inget att koppla utökaren mot till vänster. Ignorerar utökarförfrÃ¥gan" #: folded-repeat-iterator.cc:78 msgid "no one to print a repeat brace" @@ -591,9 +579,7 @@ msgstr "oavslutat bindestreck" #: hyphen-engraver.cc:102 msgid "Nothing to connect hyphen to on the left. Ignoring hyphen request." -msgstr "" -"Det finns inget att koppla bindestrecket mot till vänster. Ignorerar " -"bindestrecksförfrÃ¥gan." +msgstr "Det finns inget att koppla bindestrecket mot till vänster. Ignorerar bindestrecksförfrÃ¥gan." #: key-engraver.cc:99 msgid "Conflicting key signatures found." @@ -900,8 +886,7 @@ msgstr "oavslutad fraseringsb msgid "can't find start of phrasing slur" msgstr "kan inte hitta start pÃ¥ fraseringsbÃ¥ge" -#: piano-pedal-engraver.cc:142 piano-pedal-engraver.cc:154 -#: piano-pedal-performer.cc:86 +#: piano-pedal-engraver.cc:142 piano-pedal-engraver.cc:154 piano-pedal-performer.cc:86 #, c-format msgid "can't find start of piano pedal: `%s'" msgstr "kan inte hitta start pÃ¥ pianopedal: \"%s\"" @@ -1086,18 +1071,13 @@ msgstr "kan inte hitta eller skapa: \"%s\"" #: translator-group.cc:414 #, c-format -msgid "" -"Can't find property type-check for `%s'. Perhaps you made a typing error? " -"Doing assignment anyway." -msgstr "" -"Kan inte hitta egenskapstypkontroll för \"%s\". Kanske har du gjort ett " -"typfel? Gör tilldelning i alla fall." +msgid "Can't find property type-check for `%s'. Perhaps you made a typing error? Doing assignment anyway." +msgstr "Kan inte hitta egenskapstypkontroll för \"%s\". Kanske har du gjort ett typfel? Gör tilldelning i alla fall." #: translator-group.cc:428 #, c-format msgid "Type check for `%s' failed; value `%s' must be of type `%s'" -msgstr "" -"Typkontroll för \"%s\" misslyckades. Värde \"%s\" mÃ¥ste ha typen \"%s\"" +msgstr "Typkontroll för \"%s\" misslyckades. Värde \"%s\" mÃ¥ste ha typen \"%s\"" #. programming_error? #: translator-group.cc:447 diff --git a/scripts/lilypond-book.py b/scripts/lilypond-book.py index 3aa25bbcfe..90d0eb1b2e 100644 --- a/scripts/lilypond-book.py +++ b/scripts/lilypond-book.py @@ -50,15 +50,28 @@ import operator # Handle bug in Python 1.6-2.1 # # there are recursion limits for some patterns in Python 1.6 til 2.1. -# fix this by importing pre instead. Fix by Mats. +# fix this by importing the 1.5.2 implementation pre instead. Fix by Mats. + +if float (sys.version[0:3]) < 2.2: + try: + import pre + re = pre + del pre + except ImportError: + import re +else: + import re -# todo: should check Python version first. +# Attempt to fix problems with limited stack size set by Python! +# Sets unlimited stack size. Note that the resource module only +# is available on UNIX. try: - import pre - re = pre - del pre -except ImportError: - import re + import resource + resource.setrlimit (resource.RLIMIT_STACK, (-1, -1)) +except: + pass + + program_version = '@TOPLEVEL_VERSION@' if program_version == '@' + 'TOPLEVEL_VERSION' + '@': @@ -1070,7 +1083,7 @@ def make_pixmap (name): x = (2* margin + bbox[2] - bbox[0]) * res / 72. y = (2* margin + bbox[3] - bbox[1]) * res / 72. - cmd = r"""gs -g%dx%d -sDEVICE=pgm -dTextAlphaBits=4 -dGraphicsAlphaBits=4 -q -sOutputFile=- -r%d -dNOPAUSE %s %s -c quit | pnmtopng > %s""" + cmd = r"""gs -g%dx%d -sDEVICE=pnggray -dTextAlphaBits=4 -dGraphicsAlphaBits=4 -q -sOutputFile=- -r%d -dNOPAUSE %s %s -c quit > %s""" cmd = cmd % (x, y, res, name + '.trans.eps', name + '.eps',name + '.png') try: diff --git a/scripts/ly2dvi.py b/scripts/ly2dvi.py index a883199cf1..ea25130f13 100644 --- a/scripts/ly2dvi.py +++ b/scripts/ly2dvi.py @@ -9,12 +9,6 @@ # -# -# TODO: should allow to set a central pk cache directory from the command line. -# TODO: should allow to switch off pk cache. -# - - # Note: gettext work best if we use ' for docstrings and " # for gettextable strings. # --> DO NOT USE """ for docstrings. @@ -357,9 +351,6 @@ fields = layout_fields + extra_fields include_path = ['.'] lily_p = 1 paper_p = 1 -cache_pks_p = 1 - -PK_PATTERN='feta.*\.[0-9]+pk' output_name = '' targets = { @@ -373,29 +364,41 @@ track_dependencies_p = 0 dependency_files = [] -# -# Try to cater for bad installations of LilyPond, that have -# broken TeX setup. Just hope this doesn't hurt good TeX -# setups. Maybe we should check if kpsewhich can find -# feta16.{afm,mf,tex,tfm}, and only set env upon failure. -# + +kpse = os.popen ('kpsexpand \$TEXMF').read() +kpse = re.sub('[ \t\n]+$','', kpse) +type1_paths = os.popen ('kpsewhich -expand-path=\$T1FONTS').read () + environment = { - 'MFINPUTS' : datadir + '/mf' + ':', - 'TEXINPUTS': datadir + '/tex:' + datadir + '/ps:' + '.:' - + os.getcwd() + ':', - 'TFMFONTS' : datadir + '/tfm' + ':', - 'GS_FONTPATH' : datadir + '/afm:' + datadir + '/pfa', + ## todo: prevent multiple addition. + 'TEXMF' : "{%s,%s}" % (datadir, kpse) , + 'GS_FONTPATH' : type1_paths, 'GS_LIB' : datadir + '/ps', } +# tex needs lots of memory, more than it gets by default on Debian +non_path_environment = { + 'extra_mem_top' : '1000000', + 'extra_mem_bottom' : '1000000', + 'pool_size' : '250000', +} def setup_environment (): + # $TEXMF is special, previous value is already taken care of + if os.environ.has_key ('TEXMF'): + del os.environ['TEXMF'] + + for key in environment.keys (): val = environment[key] if os.environ.has_key (key): val = os.environ[key] + os.pathsep + val os.environ[key] = val + for key in non_path_environment.keys (): + val = non_path_environment[key] + os.environ[key] = val + #what a name. def set_setting (dict, key, val): try: @@ -834,9 +837,6 @@ if files and files[0] != '-': setup_environment () tmpdir = setup_temp () - if cache_pks_p : - os.chdir (outdir) - cp_to_dir (PK_PATTERN, tmpdir) # to be sure, add tmpdir *in front* of inclusion path. #os.environ['TEXINPUTS'] = tmpdir + ':' + os.environ['TEXINPUTS'] @@ -901,9 +901,6 @@ if files and files[0] != '-': elif verbose_p: warning (_ ("can't find file: `%s'") % outname) - if cache_pks_p: - cp_to_dir (PK_PATTERN, outdir) - os.chdir (original_dir) cleanup_temp () diff --git a/stepmake/GNUmakefile.in b/stepmake/GNUmakefile.in index 60ea150fa5..185c1bfc4d 100644 --- a/stepmake/GNUmakefile.in +++ b/stepmake/GNUmakefile.in @@ -17,7 +17,7 @@ endif # list of distribution files: # -SCRIPTS = configure aclocal.m4 +SCRIPTS = configure aclocal.m4 autogen.sh README_FILES = CHANGES README TODO README_TXT_FILES = EXTRA_DIST_FILES = $(IN_FILES) VERSION $(README_FILES) $(SCRIPTS) INSTALL.texi diff --git a/stepmake/aclocal.m4 b/stepmake/aclocal.m4 index 1cf59b1171..b63198794a 100644 --- a/stepmake/aclocal.m4 +++ b/stepmake/aclocal.m4 @@ -1,8 +1,96 @@ dnl aclocal.m4 -*-shell-script-*- dnl StepMake subroutines for configure.in -AC_DEFUN(AC_STEPMAKE_BIBTEX2HTML, [ - AC_CHECK_PROGS(BIBTEX2HTML, bibtex2html bib2html, error) + +### mostly interal macros + +# Get full path of executable ($1) +AC_DEFUN(STEPMAKE_GET_EXECUTABLE, [ + ## which doesn't work in ash, if /usr/bin/which isn't installed + ## type -p doesn't work in ash + ## command -v doesn't work in zsh + ## command -v "$1" 2>&1 + ## this test should work in ash, bash, pdksh (ksh), zsh + type -p "$1" 2>/dev/null | tail -1 | awk '{print $NF}' +]) + + +# Get version string from executable ($1) +AC_DEFUN(STEPMAKE_GET_VERSION, [ + "$1" --version 2>&1 | grep -v '^$' | head -1 | awk '{print $NF}' +]) + +# Calculate numeric version from version string ($1) +AC_DEFUN(STEPMAKE_NUMERIC_VERSION, [ + echo "$1" | awk -F. ' + { + if ([$]3) {last = [$]3} + else {last =0} + } + {printf "%s%s%s\n",[$]1*100, [$]2*10,last}' +]) + + +# Add item ($2) to list ($1, one of 'OPTIONAL', 'REQUIRED') +AC_DEFUN(STEPMAKE_ADD_ENTRY, [ + eval "$1"=\"`eval echo \"'$'$1\" \"$2\"`\" +]) + +# Check if tested program ($2) was found ($1). +# If not, add entry to missing-list ($3, one of 'OPTIONAL', 'REQUIRED'). +# We could abort here if a 'REQUIRED' program is not found +AC_DEFUN(STEPMAKE_OPTIONAL_REQUIRED, [ + STEPMAKE_CHECK_SEARCH_RESULT($1) + if test $? -ne 0; then + STEPMAKE_ADD_ENTRY($3, $2) + if test "$3" = "REQUIRED"; then + command="echo ERROR: $2 not found" + # abort configure process here? + else + command="- echo $2 not found" + fi + eval "$1"='$command' + false + else + true + fi +]) + + +# Return if tested proram ($1) was found (true) or not (false). +AC_DEFUN(STEPMAKE_CHECK_SEARCH_RESULT, [ + r="`eval echo '$'"$1"`" + if test -n "$r" -a "$r" != "error" -a "$r" != "no" && expr '`eval echo '$'"$1"`' : '.*\(echo\)' > /dev/null; then + true + else + ##STEPMAKE_WARN(cannot find $2. $3) + false + fi +]) + + +# Check version of program ($1) +# If version is smaller than requested ($3), +# add entry to missing-list ($2, one of 'OPTIONAL', 'REQUIRED'). +AC_DEFUN(STEPMAKE_CHECK_VERSION, [ + r="`eval echo '$'"$1"`" + AC_MSG_CHECKING("$r version") + #exe=`STEPMAKE_GET_EXECUTABLE($r)` + exe=`STEPMAKE_GET_EXECUTABLE($r)` + ver=`STEPMAKE_GET_VERSION($exe)` + num=`STEPMAKE_NUMERIC_VERSION($ver)` + req=`STEPMAKE_NUMERIC_VERSION($3)` + AC_MSG_RESULT("$ver") + if test "$num" -lt "$req"; then + STEPMAKE_ADD_ENTRY($2, "$r $3 (installed: $ver)") + fi +]) + +### Macros to build configure.in + + +AC_DEFUN(STEPMAKE_BIBTEX2HTML, [ + STEPMAKE_PROGS(BIBTEX2HTML, bibtex2html bib2html, $1) if test "$BIBTEX2HTML" = "bib2html"; then BIBTEX2HTML_FLAGS='$< $(@)' else @@ -13,11 +101,24 @@ AC_DEFUN(AC_STEPMAKE_BIBTEX2HTML, [ ]) -AC_DEFUN(AC_STEPMAKE_COMPILE, [ +AC_DEFUN(STEPMAKE_BISON, [ + # ugh, automake: we want (and check for) bison + AC_PROG_YACC + + STEPMAKE_PROGS(BISON, bison, $1) + + # urg. should test functionality rather than version. + if test "$BISON" = "bison" -a -n "$2"; then + STEPMAKE_CHECK_VERSION(BISON, $1, $2) + fi +]) + + +AC_DEFUN(STEPMAKE_COMPILE, [ # -O is necessary to get inlining - CFLAGS=${CFLAGS:-""} - CXXFLAGS=${CXXFLAGS:-$CFLAGS} - LDFLAGS=${LDFLAGS:-""} + CFLAGS=${CFLAGS-""} + CXXFLAGS=${CXXFLAGS-$CFLAGS} + LDFLAGS=${LDFLAGS-""} checking_b=yes optimise_b=yes profile_b=no @@ -31,6 +132,10 @@ AC_DEFUN(AC_STEPMAKE_COMPILE, [ [ --enable-debugging compile with debugging info. Default: on], [debug_b=$enableval]) + AC_ARG_ENABLE(optimising, + [ --enable-optimising compile with optimising. Default: on], + [optimise_b=$enableval]) + AC_ARG_ENABLE(profiling, [ --enable-profiling compile with gprof support. Default: off], [profile_b=$enableval]) @@ -58,11 +163,12 @@ AC_DEFUN(AC_STEPMAKE_COMPILE, [ AC_PROG_CC + STEPMAKE_OPTIONAL_REQUIRED(CC, cc, $1) LD='$(CC)' AC_SUBST(LD) CFLAGS="$CFLAGS $OPTIMIZE" - CPPFLAGS=${CPPFLAGS:-""} + CPPFLAGS=${CPPFLAGS-""} AC_MSG_CHECKING([for IEEE-conformance compiler flags]) save_cflags="$CFLAGS" @@ -86,12 +192,10 @@ AC_DEFUN(AC_STEPMAKE_COMPILE, [ AC_SUBST(EXTRA_LIBES) ]) -AC_DEFUN(AC_STEPMAKE_CXX, [ +AC_DEFUN(STEPMAKE_CXX, [ AC_LANG_CPLUSPLUS AC_PROG_CXX - - AC_CHECK_HEADER(FlexLexer.h, true, - AC_STEPMAKE_WARN(can"\'"t find flex header. Please install Flex headers correctly)) + STEPMAKE_OPTIONAL_REQUIRED(CXX, c++, $1) CPPFLAGS="$CPPFLAGS $DEFINES" CXXFLAGS="$CXXFLAGS $OPTIMIZE" @@ -103,7 +207,8 @@ AC_DEFUN(AC_STEPMAKE_CXX, [ AC_SUBST(LD) ]) -AC_DEFUN(AC_STEPMAKE_CXXTEMPLATE, [ + +AC_DEFUN(STEPMAKE_CXXTEMPLATE, [ AC_CACHE_CHECK([whether explicit instantiation is needed], lily_cv_need_explicit_instantiation, AC_TRY_LINK([ @@ -117,9 +222,10 @@ AC_DEFUN(AC_STEPMAKE_CXXTEMPLATE, [ fi ]) -AC_DEFUN(AC_STEPMAKE_DATADIR, [ + +AC_DEFUN(STEPMAKE_DATADIR, [ if test "$datadir" = "\${prefix}/share"; then - datadir='${prefix}/share/'$package + datadir='${prefix}/share/'$package/$FULL_VERSION fi DIR_DATADIR=${datadir} presome=${prefix} @@ -130,19 +236,42 @@ AC_DEFUN(AC_STEPMAKE_DATADIR, [ AC_SUBST(datadir) AC_SUBST(DIR_DATADIR) - - dnl yeah, so fuck me gently with a cactus: this doesnt belong here - dnl Please take the person responsible for inventing shell-scripts out - dnl and shoot him. On behalf of the sane world, thank you. - dnl DIR_SHAREDSTATEDIR="foobar" - dnl AC_SUBST(DIR_SHAREDSTATEDIR) + + # we used to set DIR_SHAREDSTATEDIR here, + # but apparently that broke something AC_DEFINE_UNQUOTED(DIR_DATADIR, "${DIR_DATADIR}") ]) -AC_DEFUN(AC_STEPMAKE_END, [ + +AC_DEFUN(STEPMAKE_END, [ + AC_SUBST(OPTIONAL) + AC_SUBST(REQUIRED) + AC_OUTPUT($CONFIGFILE.make:config.make.in) + + if test -n "$OPTIONAL"; then + echo + echo "WARNING: Please consider installing optional programs: $OPTIONAL" + fi + + if test -n "$REQUIRED"; then + echo + echo "ERROR: Please install required programs: $REQUIRED" + fi + + if test -n "$OPTIONAL$REQUIRED"; then + echo + echo "See INSTALL.txt for more information on how to build $PACKAGE_NAME" + echo "Remove config.cache before rerunning ./configure" + fi + + if test -n "$REQUIRED"; then + rm -f $srcdir/GNUmakefile + exit 1 + fi + # regular in-place build # test for srcdir_build = yes ? if test "$builddir" = "."; then @@ -156,24 +285,93 @@ AC_DEFUN(AC_STEPMAKE_END, [ fi ]) -AC_DEFUN(AC_STEPMAKE_GXX, [ - AC_MSG_CHECKING("g++ version") - cxx_version=`$CXX --version` - AC_MSG_RESULT("$cxx_version") - changequote(<<, >>)dnl - # urg, egcs: how to check for egcs >= 1.1? - if expr "$cxx_version" : '.*2\.[89]' > /dev/null || - expr "$cxx_version" : '.*egcs' > /dev/null || - expr "$cxx_version" : '3\.0' > /dev/null - changequote([, ])dnl - then - true + +AC_DEFUN(STEPMAKE_FLEX, [ + # ugh, automake: we want (and check for) flex + # AC_PROG_LEX + # urg: automake 1.3: hope this doesn't break 1.2 ac_cv_pro_lex_root hack... + + # AC_DECL_YYTEXT + # ugh, ugh + ac_cv_prog_lex_root=lex.yy + STEPMAKE_PROGS(FLEX, flex, $1) +]) + + +AC_DEFUN(STEPMAKE_FLEXLEXER, [ + AC_HAVE_HEADERS(FlexLexer.h, true, false) + if test $? -ne 0; then + warn='FlexLexer.h (flex package)' + STEPMAKE_ADD_ENTRY($1, $warn) + fi +]) + + +AC_DEFUN(STEPMAKE_GCC, [ + if test "$GCC" = "yes"; then + STEPMAKE_CHECK_VERSION(CC, $1, $2) else - AC_STEPMAKE_WARN(can\'t find g++ 2.8, 2.9, 3.0 or egcs 1.1) + warn="$CC (Please install *GNU* cc)" + STEPMAKE_ADD_ENTRY($1, $warn) fi ]) -AC_DEFUN(AC_STEPMAKE_GUILE, [ + +AC_DEFUN(STEPMAKE_GETTEXT, [ + DIR_LOCALEDIR=${localedir} + presome=${prefix} + if test "$prefix" = "NONE"; then + presome=${ac_default_prefix} + fi + DIR_LOCALEDIR=`echo ${DIR_LOCALEDIR} | sed "s!\\\${prefix}!$presome!"` + AC_SUBST(localedir) + AC_SUBST(DIR_LOCALEDIR) + AC_DEFINE_UNQUOTED(DIR_LOCALEDIR, "${DIR_LOCALEDIR}") + + AC_CHECK_LIB(intl, gettext) + AC_CHECK_FUNCS(gettext) +]) + + +AC_DEFUN(STEPMAKE_GUILE, [ + STEPMAKE_PATH_PROG(GUILE, guile, $1) +]) + + +# STEPMAKE_GUILE_FLAGS --- set flags for compiling and linking with Guile +# +# This macro runs the guile-config script, installed with Guile, +# to find out where Guile's header files and libraries are +# installed. It sets two variables, marked for substitution, as +# by AC_SUBST. +# +# GUILE_CFLAGS --- flags to pass to a C or C++ compiler to build +# code that uses Guile header files. This is almost +# always just a -I flag. +# +# GUILE_LDFLAGS --- flags to pass to the linker to link a +# program against Guile. This includes -lguile for +# the Guile library itself, any libraries that Guile +# itself requires (like -lqthreads), and so on. It may +# also include a -L flag to tell the compiler where to +# find the libraries. + +AC_DEFUN([STEPMAKE_GUILE_FLAGS], [ + exe=`STEPMAKE_GET_EXECUTABLE($guile_config)` + if test -x $exe; then + AC_MSG_CHECKING("guile compile flags") + GUILE_CFLAGS="`$guile_config compile`" + AC_MSG_RESULT($GUILE_CFLAGS) + AC_MSG_CHECKING("guile link flags") + GUILE_LDFLAGS="`$guile_config link`" + AC_MSG_RESULT($GUILE_LDFLAGS) + fi + AC_SUBST(GUILE_CFLAGS) + AC_SUBST(GUILE_LDFLAGS) +]) + + +AC_DEFUN(STEPMAKE_GUILE_DEVEL, [ ## First, let's just see if we can find Guile at all. AC_MSG_CHECKING("for guile-config") for guile_config in guile-config $target-guile-config $build-guile-config; do @@ -181,40 +379,47 @@ AC_DEFUN(AC_STEPMAKE_GUILE, [ if ! $guile_config --version > /dev/null 2>&1 ; then AC_MSG_WARN("cannot execute $guile_config") AC_MSG_CHECKING("if we are cross compiling") - guile_config=error + GUILE_CONFIG='echo no guile-config' else + GUILE_CONFIG=$guile_config break fi done - if test "$guile_config" = "error"; then - AC_MSG_ERROR("cannot find guile-config; is Guile installed?") - exit 1 - fi - AC_MSG_CHECKING("Guile version") - need_guile_version="1.3.4" - need_guile_version_numeric=100304 - guile_version=`$guile_config --version 2>&1 | awk '{print $NF}'` - guile_version_numeric=`echo $guile_version | awk -F. ' -{if ([$]3) {last = [$]3} -else {last =0}} -{printf "%s%s%s\n",[$]1*100, [$]2*10,last}'` - AC_MSG_RESULT("$guile_version") - if test $guile_version_numeric -lt $need_guile_version_numeric - then - AC_STEPMAKE_WARN("Guile version "$need_guile_version" or newer is needed") + STEPMAKE_OPTIONAL_REQUIRED(GUILE_CONFIG, $guile_config, $1) + if test $? -ne 0; then + STEPMAKE_ADD_ENTRY($1, 'guile-config (guile-devel, guile-dev or libguile-dev package)') + fi + + STEPMAKE_CHECK_SEARCH_RESULT(GUILE_CONFIG) + # urg. should test functionality rather than version. + if test $? -eq 0 -a -n "$2"; then + STEPMAKE_CHECK_VERSION(GUILE_CONFIG, $1, $2) fi + + AC_SUBST(GUILE_CONFIG) + + guile_version="$ver" changequote(<<, >>)dnl GUILE_MAJOR_VERSION=`expr $guile_version : '\([0-9]*\)'` GUILE_MINOR_VERSION=`expr $guile_version : '[0-9]*\.\([0-9]*\)'` changequote([, ])dnl - GUILE_FLAGS - AC_PATH_PROG(GUILE, guile, error) - AC_SUBST(GUILE) + STEPMAKE_GUILE_FLAGS AC_DEFINE_UNQUOTED(GUILE_MAJOR_VERSION, $GUILE_MAJOR_VERSION) AC_DEFINE_UNQUOTED(GUILE_MINOR_VERSION, $GUILE_MINOR_VERSION) ]) -AC_DEFUN(AC_STEPMAKE_INIT, [ + +AC_DEFUN(STEPMAKE_GXX, [ + if test "$GXX" = "yes"; then + STEPMAKE_CHECK_VERSION(CXX, $1, $2) + else + warn="$CXX (Please install *GNU* c++)" + STEPMAKE_ADD_ENTRY($1, $warn) + fi +]) + + +AC_DEFUN(STEPMAKE_INIT, [ . $srcdir/VERSION FULL_VERSION=$MAJOR_VERSION.$MINOR_VERSION.$PATCH_LEVEL @@ -261,7 +466,6 @@ AC_DEFUN(AC_STEPMAKE_INIT, [ AC_MSG_RESULT($builddir) (cd stepmake 2>/dev/null || mkdir stepmake) - (cd stepmake; rm -f stepmake; ln -s ../$srcdir/stepmake .) (cd stepmake; rm -f bin; ln -s ../$srcdir/bin .) AC_CONFIG_AUX_DIR(bin) stepmake=stepmake @@ -281,7 +485,7 @@ AC_DEFUN(AC_STEPMAKE_INIT, [ AC_MSG_RESULT($builddir) if expr "$srcdir" : '/' > /dev/null 2>&1; then absolute_srcdir=yes - AC_STEPMAKE_WARN(Absolute --srcdir specified: $srcdir) + STEPMAKE_WARN(Absolute --srcdir specified: $srcdir) fi AC_MSG_CHECKING(for stepmake) @@ -336,25 +540,21 @@ AC_DEFUN(AC_STEPMAKE_INIT, [ do \`make conf=CONF' to get output in ./out-CONF], [CONFIGURATION=$enableval]) + ##' + test -n "$CONFIGURATION" && CONFIGSUFFIX="-$CONFIGURATION" CONFIGFILE=config$CONFIGSUFFIX AC_SUBST(CONFIGSUFFIX) AC_CANONICAL_HOST - AC_CHECK_PROGS(MAKE, gmake make, error) - AC_CHECK_PROGS(FIND, find, error) + STEPMAKE_PROGS(MAKE, gmake make, REQUIRED) + STEPMAKE_PROGS(FIND, find, REQUIRED) -dnl system supplied INSTALL is unsafe; use our own install. -dnl AC_PROG_INSTALL -dnl if test "$INSTALL" = "bin/install-sh"; then -dnl export INSTALL="\$\(depth\)/bin/install-sh" -dnl fi - - AC_CHECK_PROGS(TAR, tar, error) + STEPMAKE_PROGS(TAR, tar, REQUIRED) if test "x`uname`" = "xHP-UX"; then AC_PATH_PROG(BASH, bash, /bin/sh) - AC_STEPMAKE_WARN(avoiding buggy /bin/sh) + STEPMAKE_WARN(avoiding buggy /bin/sh) AC_PATH_PROG(SHELL, bash, /bin/ksh) else AC_PATH_PROG(BASH, bash, /bin/sh) @@ -362,49 +562,22 @@ dnl fi AC_SUBST(SHELL) fi + STEPMAKE_PATH_PROG(PYTHON, python, REQUIRED) - AC_PATH_PROG(PYTHON, ${PYTHON:-python}, -echo no python) - AC_SUBST(PYTHON) - - if test $MAKE != "error" ; then - $MAKE -v 2> /dev/null | grep GNU > /dev/null - if test "$?" = 1 - then - AC_STEPMAKE_WARN(Please install *GNU* make) - fi + if expr "$MAKE" : '.*\(echo\)' >/dev/null; then + $MAKE -v 2> /dev/null | grep GNU > /dev/null + if test "$?" = 1; then + warn='make (Please install *GNU* make)' + # STEPMAKE_WARN($warn) + STEPMAKE_ADD_ENTRY(REQUIRED, $warn) + fi fi - AC_CHECK_SEARCH_RESULT($PYTHON, python, You should install Python) - - if test "x$OSTYPE" = "xcygwin32" || test "x$OSTYPE" = "xWindows_NT"; then + if test "$OSTYPE" = "cygwin" -o "$OSTYPE" = "cygwin32" -o "$OSTYPE" = "Windows_NT"; then LN=cp # hard link does not work under cygnus-nt LN_S='cp -r' # symbolic link does not work for native nt ZIP="zip -r -9" # program_suffix=.exe - # urg - # ROOTSEP=':' - # DIRSEP='\\' - # PATHSEP=';' - # - # cygwin fixes all these things. - # it seems these were used because of dos-style TEXINPUTS and - # MFINPUTS needed for miktex. - # but this breaks parsing of all other cygwin/unix style paths. - # - # if your (mik)tex breaks, make a: - # /usr/local/bin/tex: - # #!/bin/sh - # TEXINPUTS=`cygpath -pw $TEXINPUTS` /texmf/miktex/bin/tex $* - # - # and - # - # /usr/local/bin/mf: - # #!/bin/sh - # MFINPUTS=`cygpath -pw $MFINPUTS` /texmf/miktex/bin/mf $* - # - # this way, you may have buildscripts/out/lilypond-profile - # 'automatically' sourced from /usr/etc/profile.d/ too. - # ROOTSEP=':' DIRSEP='/' PATHSEP=':' @@ -426,13 +599,15 @@ dnl fi AC_SUBST(INSTALL) AC_DEFINE_UNQUOTED(DIRSEP, '${DIRSEP}') AC_DEFINE_UNQUOTED(PATHSEP, '${PATHSEP}') - AC_SUBST(PATHSEP) AC_SUBST(DIRSEP) + AC_SUBST(PATHSEP) + AC_SUBST(ROOTSEP) - AC_STEPMAKE_DATADIR + STEPMAKE_DATADIR ]) -AC_DEFUN(AC_STEPMAKE_KPATHSEA, [ + +AC_DEFUN(STEPMAKE_KPATHSEA, [ kpathsea_b=yes #FIXME --with-xxx is meant for specifying a PATH too, @@ -460,42 +635,15 @@ AC_DEFUN(AC_STEPMAKE_KPATHSEA, [ AC_DEFINE_UNQUOTED(KPATHSEA, $KPATHSEA) ]) -AC_DEFUN(AC_STEPMAKE_LEXYACC, [ - # ugh, automake: we want (and check for) bison - AC_PROG_YACC - # ugh, automake: we want (and check for) flex - # AC_PROG_LEX - # urg: automake 1.3: hope this doesn't break 1.2 ac_cv_pro_lex_root hack... - # AC_DECL_YYTEXT - # ugh, ugh - ac_cv_prog_lex_root=lex.yy - - AC_CHECK_PROGS(BISON, bison, error) - AC_CHECK_PROGS(FLEX, flex, error) - AC_CHECK_SEARCH_RESULT($BISON, bison, Please install Bison, 1.25 or newer) - AC_CHECK_SEARCH_RESULT($FLEX, flex, Please install Flex, 2.5 or newer) - - if test $BISON != "error"; then - bison_version=`$BISON --version | sed 's/^.*version 1.//g'` - if test `echo $bison_version | sed 's/\..*$//g'` -lt 25; then - AC_STEPMAKE_WARN(Your bison is a bit old (1.$bison_version). You might have to install 1.25) - fi - fi - - AC_SUBST(BISON) - AC_SUBST(FLEX) -]) - -AC_DEFUN(AC_STEPMAKE_LIB, [ - AC_CHECK_PROGS(AR, ar, error) +AC_DEFUN(STEPMAKE_LIB, [ + STEPMAKE_PROGS(AR, ar, $1) AC_PROG_RANLIB - - AC_SUBST(AR) - AC_SUBST(RANLIB) + STEPMAKE_OPTIONAL_REQUIRED(RANLIB, ranlib, $1) ]) -AC_DEFUN(AC_STEPMAKE_LIBTOOL, [ + +AC_DEFUN(STEPMAKE_LIBTOOL, [ # libtool.info ... # **Never** try to set library version numbers so that they correspond # to the release number of your package. This is an abuse that only @@ -511,7 +659,8 @@ AC_DEFUN(AC_STEPMAKE_LIBTOOL, [ AC_SUBST(AGE) ]) -AC_DEFUN(AC_STEPMAKE_LOCALE, [ + +AC_DEFUN(STEPMAKE_LOCALE, [ lang=English ALL_LINGUAS="en nl" @@ -541,29 +690,15 @@ AC_DEFUN(AC_STEPMAKE_LOCALE, [ AC_MSG_RESULT($lang) if test "$lang" = "unknown" ; then - AC_STEPMAKE_WARN($language not supported; available are: $ALL_LINGUAS) + STEPMAKE_WARN($language not supported; available are: $ALL_LINGUAS) fi ]) -AC_DEFUN(AC_STEPMAKE_GETTEXT, [ - DIR_LOCALEDIR=${localedir} - presome=${prefix} - if test "$prefix" = "NONE"; then - presome=${ac_default_prefix} - fi - DIR_LOCALEDIR=`echo ${DIR_LOCALEDIR} | sed "s!\\\${prefix}!$presome!"` - AC_SUBST(localedir) - AC_SUBST(DIR_LOCALEDIR) - AC_DEFINE_UNQUOTED(DIR_LOCALEDIR, "${DIR_LOCALEDIR}") - - AC_CHECK_LIB(intl, gettext) - AC_CHECK_FUNCS(gettext) -]) -AC_DEFUN(AC_STEPMAKE_MAKEINFO, [ - AC_CHECK_PROGS(MAKEINFO, makeinfo, error) - if test "$MAKEINFO" != "error"; then +AC_DEFUN(STEPMAKE_MAKEINFO, [ + STEPMAKE_PROGS(MAKEINFO, makeinfo, $1) + if test "$MAKEINFO" = "makeinfo"; then AC_MSG_CHECKING(whether makeinfo can split html by @node) mkdir -p out makeinfo --html --output=out/split < /dev/null ; then - AC_MSG_RESULT("cannot execute $guile_config") - AC_MSG_ERROR("cannot find guile-config; is Guile installed?") - exit 1 - fi - GUILE_CFLAGS="`$guile_config compile`" - GUILE_LDFLAGS="`$guile_config link`" - AC_SUBST(GUILE_CFLAGS) - AC_SUBST(GUILE_LDFLAGS) - AC_MSG_RESULT(yes) -]) - - -# Configure paths for GTK+ -# Owen Taylor 97-11-3 - -dnl AM_PATH_GTK([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]]) -dnl Test for GTK, and define GTK_CFLAGS and GTK_LIBS -dnl -AC_DEFUN(AM_PATH_GTK, -[dnl -dnl Get the cflags and libraries from the gtk-config script -dnl - AC_PATH_PROG(GTK_CONFIG, gtk-config, no) - min_gtk_version=ifelse([$1], ,1.1.1,$1) - AC_MSG_CHECKING(for GTK - version >= $min_gtk_version) - no_gtk="" - if test "$GTK_CONFIG" != "no" ; then - GTK_CFLAGS=`$GTK_CONFIG --cflags` - GTK_LIBS=`$GTK_CONFIG --libs` - ac_save_CFLAGS="$CFLAGS" - ac_save_LIBS="$LIBS" - ac_save_CXXFLAGS="$CXXFLAGS" - CFLAGS="$CFLAGS $GTK_CFLAGS" - CXXFLAGS="$CXXFLAGS $GTK_CFLAGS" - LIBS="$LIBS $GTK_LIBS" -dnl -dnl Now check if the installed GTK is sufficiently new. (Also sanity -dnl checks the results of gtk-config to some extent) -dnl - AC_TRY_RUN([ -#include -#include - -int -main () -{ - int major, minor, micro; - - if (sscanf("$min_gtk_version", "%d.%d.%d", &major, &minor, µ) != 3) { - printf("%s, bad version string\n", "$min_gtk_version"); - exit(1); - } - - return !((gtk_major_version > major) || - ((gtk_major_version == major) && (gtk_minor_version > minor)) || - ((gtk_major_version == major) && (gtk_minor_version == minor) && (gtk_micro_version >= micro))); -} -],, no_gtk=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"]) - CFLAGS="$ac_save_CFLAGS" - CXXFLAGS="$ac_save_CXXFLAGS" - LIBS="$ac_save_LIBS" - else - no_gtk=yes - fi - if test "x$no_gtk" = x ; then - AC_MSG_RESULT(yes) - ifelse([$2], , :, [$2]) - else - AC_MSG_RESULT(no) - GTK_CFLAGS="" - GTK_LIBS="" - ifelse([$3], , :, [$3]) - fi - CXXFLAGS="$CXXFLAGS $GTK_CFLAGS" - AC_SUBST(CXXFLAGS) - AC_SUBST(GTK_CFLAGS) - AC_SUBST(GTK_LIBS) -]) - - -# Configure paths for GTK-- -# Erik Andersen 30 May 1998 -# Modified by Tero Pulkkinen (added the compiler checks... I hope they work..) - -dnl Test for GTK__, and define GTK___CFLAGS and GTK___LIBS -dnl to be used as follows: -dnl AM_PATH_GTKMM([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]]) -dnl - -dnl Get the cflags and libraries from the gtkmm-config script -dnl -AC_ARG_WITH(gtkmm-prefix,[ --with-gtkmm-prefix=PREFIX - Prefix where GTK-- is installed (optional)], - gtkmm_config_prefix="$withval", gtkmm_config_prefix="") -AC_ARG_WITH(gtkmm-exec-prefix,[ --with-gtkmm-exec-prefix=PREFIX - Exec prefix where GTK-- is installed (optional)], - gtkmm_config_exec_prefix="$withval", gtkmm_config_exec_prefix="") -AC_ARG_ENABLE(gtkmmtest, [ --disable-gtkmmtest Do not try to compile and run a test GTK-- program], - , enable_gtkmmtest=yes) - - if test x$gtkmm_config_exec_prefix != x ; then - gtkmm_config_args="$gtkmm_config_args --exec-prefix=$gtkmm_config_exec_prefix" - if test x${GTKMM_CONFIG+set} != xset ; then - GTKMM_CONFIG=$gtkmm_config_exec_prefix/bin/gtkmm-config - fi - fi - if test x$gtkmm_config_prefix != x ; then - gtkmm_config_args="$gtkmm_config_args --prefix=$gtkmm_config_prefix" - if test x${GTKMM_CONFIG+set} != xset ; then - GTKMM_CONFIG=$gtkmm_config_prefix/bin/gtkmm-config - fi - fi - - -AC_DEFUN(AM_PATH_GTKMM, -[dnl - -dnl -dnl Check if the installed GTK-- is sufficiently new. -dnl - AC_PATH_PROG(GTKMM_CONFIG, gtkmm-config, no) - min_gtkmm_version=ifelse([$1], ,0.9.14,$1) - - AC_MSG_CHECKING(for GTK-- - version >= $min_gtkmm_version) - no_gtkmm="" - if test "$GTKMM_CONFIG" = "no" ; then - no_gtkmm=yes - else - AC_LANG_SAVE - AC_LANG_CPLUSPLUS - - GTK___CFLAGS=`$GTKMM_CONFIG $gtkmm_config_args --cflags` - GTK___LIBS=`$GTKMM_CONFIG $gtkmm_config_args --libs` - gtkmm_config_major_version=`$GTKMM_CONFIG $gtkmm_config_args --version | \ - sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'` - gtkmm_config_minor_version=`$GTKMM_CONFIG $gtkmm_config_args --version | \ - sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'` - gtkmm_config_micro_version=`$GTKMM_CONFIG $gtkmm_config_args --version | \ - sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'` - if test "x$enable_gtkmmtest" = "xyes" ; then - ac_save_CXXFLAGS="$CXXFLAGS" - ac_save_LIBS="$LIBS" - CXXFLAGS="$CXXFLAGS $GTK___CFLAGS" - LIBS="$LIBS $GTK___LIBS" -dnl -dnl Now check if the installed GTK-- is sufficiently new. (Also sanity -dnl checks the results of gtkmm-config to some extent -dnl - rm -f conf.gtkmmtest - AC_TRY_RUN([ -#include -#include -#include - -int -main () -{ - int major, minor, micro; - char *tmp_version; - - system ("touch conf.gtkmmtest"); - - /* HP/UX 0 (%@#!) writes to sscanf strings */ - tmp_version = g_strdup("$min_gtkmm_version"); - if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, µ) != 3) { - printf("%s, bad version string\n", "$min_gtkmm_version"); - exit(1); - } - - if ((gtkmm_major_version != $gtkmm_config_major_version) || - (gtkmm_minor_version != $gtkmm_config_minor_version) || - (gtkmm_micro_version != $gtkmm_config_micro_version)) - { - printf("\n*** 'gtkmm-config --version' returned %d.%d.%d, but GTK-- (%d.%d.%d)\n", - $gtkmm_config_major_version, $gtkmm_config_minor_version, $gtkmm_config_micro_version, - gtkmm_major_version, gtkmm_minor_version, gtkmm_micro_version); - printf ("*** was found! If gtkmm-config was correct, then it is best\n"); - printf ("*** to remove the old version of GTK--. You may also be able to fix the error\n"); - printf("*** by modifying your LD_LIBRARY_PATH enviroment variable, or by editing\n"); - printf("*** /etc/ld.so.conf. Make sure you have run ldconfig if that is\n"); - printf("*** required on your system.\n"); - printf("*** If gtkmm-config was wrong, set the environment variable GTKMM_CONFIG\n"); - printf("*** to point to the correct copy of gtkmm-config, and remove the file config.cache\n"); - printf("*** before re-running configure\n"); - } -/* GTK-- does not have the GTKMM_*_VERSION constants */ -/* - else if ((gtkmm_major_version != GTKMM_MAJOR_VERSION) || - (gtkmm_minor_version != GTKMM_MINOR_VERSION) || - (gtkmm_micro_version != GTKMM_MICRO_VERSION)) - { - printf("*** GTK-- header files (version %d.%d.%d) do not match\n", - GTKMM_MAJOR_VERSION, GTKMM_MINOR_VERSION, GTKMM_MICRO_VERSION); - printf("*** library (version %d.%d.%d)\n", - gtkmm_major_version, gtkmm_minor_version, gtkmm_micro_version); - } -*/ - else - { - if ((gtkmm_major_version > major) || - ((gtkmm_major_version == major) && (gtkmm_minor_version > minor)) || - ((gtkmm_major_version == major) && (gtkmm_minor_version == minor) && (gtkmm_micro_version >= micro))) - { - return 0; - } - else - { - printf("\n*** An old version of GTK-- (%d.%d.%d) was found.\n", - gtkmm_major_version, gtkmm_minor_version, gtkmm_micro_version); - printf("*** You need a version of GTK-- newer than %d.%d.%d. The latest version of\n", - major, minor, micro); - printf("*** GTK-- is always available from ftp://ftp.gtk.org.\n"); - printf("***\n"); - printf("*** If you have already installed a sufficiently new version, this error\n"); - printf("*** probably means that the wrong copy of the gtkmm-config shell script is\n"); - printf("*** being found. The easiest way to fix this is to remove the old version\n"); - printf("*** of GTK--, but you can also set the GTKMM_CONFIG environment to point to the\n"); - printf("*** correct copy of gtkmm-config. (In this case, you will have to\n"); - printf("*** modify your LD_LIBRARY_PATH enviroment variable, or edit /etc/ld.so.conf\n"); - printf("*** so that the correct libraries are found at run-time))\n"); - } - } - return 1; -} -],, no_gtkmm=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"]) - CXXFLAGS="$ac_save_CXXFLAGS" - LIBS="$ac_save_LIBS" - fi - fi - if test "x$no_gtkmm" = x ; then - AC_MSG_RESULT(yes) - ifelse([$2], , :, [$2]) - else - AC_MSG_RESULT(no) - if test "$GTKMM_CONFIG" = "no" ; then - echo "*** The gtkmm-config script installed by GTK-- could not be found" - echo "*** If GTK-- was installed in PREFIX, make sure PREFIX/bin is in" - echo "*** your path, or set the GTK_CONFIG environment variable to the" - echo "*** full path to gtk-config." - echo "*** The gtkmm-config script was not available in GTK-- versions" - echo "*** prior to 0.9.12. Perhaps you need to update your installed" - echo "*** version to 0.9.12 or newer" - else - if test -f conf.gtkmmtest ; then - : - else - echo "*** Could not run GTK-- test program, checking why..." - CXXFLAGS="$CFLAGS $GTKMM_CXXFLAGS" - LIBS="$LIBS $GTK___LIBS" - AC_TRY_LINK([ -#include -#include -], [ return ((gtkmm_major_version) || (gtkmm_minor_version) || (gtkmm_micro_version)); ], - [ echo "*** The test program compiled, but did not run. This usually means" - echo "*** that the run-time linker is not finding GTK-- or finding the wrong" - echo "*** version of GTK--. If it is not finding GTK--, you'll need to set your" - echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point" - echo "*** to the installed location Also, make sure you have run ldconfig if that" - echo "*** is required on your system" - echo "***" - echo "*** If you have an old version installed, it is best to remove it, although" - echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH" ], - [ echo "*** The test program failed to compile or link. See the file config.log for the" - echo "*** exact error that occured. This usually means GTK-- was incorrectly installed" - echo "*** or that you have moved GTK-- since it was installed. In the latter case, you" - echo "*** may want to edit the gtkmm-config script: $GTKMM_CONFIG" ]) - CXXFLAGS="$ac_save_CXXFLAGS" - LIBS="$ac_save_LIBS" - fi - fi - GTK___CFLAGS="" - GTK__LIBS="" - ifelse([$3], , :, [$3]) - AC_LANG_RESTORE - fi - AC_SUBST(GTK___CFLAGS) - AC_SUBST(GTK___LIBS) - rm -f conf.gtkmmtest -]) - -# Configure paths for GTK--DRAW -# Derek Quinn Wyatt 98-08-21 (adapted from Jan Nieuwenhuizen's code) - -dnl AM_PATH_GTK__DRAW([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]]) -dnl Test for GTK--DRAW, and define GTK___CFLAGS and GTK___LIBS -dnl -AC_DEFUN(AM_PATH_GTK__DRAW, -[dnl -dnl Get the cflags and libraries from the gtk__-config script -dnl - AC_PATH_PROG(GTKMM_CONFIG, gtkmm-config, no) - min_gtk___version=ifelse([$1], ,0.0.5,$1) - AC_MSG_CHECKING(for GTK--DRAW - version >= $min_gtk___version) - no_gtk__="" - if test "$GTKMM_CONFIG" != "no" ; then - GTK___CFLAGS=`$GTKMM_CONFIG --cflags` - GTK___LIBS=`$GTKMM_CONFIG --libs` - GTK___DLIBS="$GTK___LIBS -lgtkmmdraw" - GTK___LIBS="$GTK___DLIBS" - ac_save_CFLAGS="$CFLAGS" - ac_save_LIBS="$LIBS" - ac_save_CXXFLAGS="$CXXFLAGS" - CFLAGS="$CFLAGS $GTK___CFLAGS" - CXXFLAGS="$CXXFLAGS $GTK___CFLAGS" - LIBS="$LIBS $GTK___LIBS" -dnl -dnl Now check if the installed GTK__ is sufficiently new. (Also sanity -dnl checks the results of gtk__-config to some extent) -dnl - AC_TRY_RUN([ -#include -#include - -int -main () -{ - // urg - return 0; -} -],, no_gtk__=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"]) - CFLAGS="$ac_save_CFLAGS" - CXXFLAGS="$ac_save_CXXFLAGS" - LIBS="$ac_save_LIBS" - else - no_gtk__=yes - fi - if test "x$no_gtk__" = x ; then - AC_MSG_RESULT(yes) - ifelse([$2], , :, [$2]) - else - AC_MSG_RESULT(no) - GTK___CFLAGS="" - GTK___LIBS="" - ifelse([$3], , :, [$3]) - fi - CXXFLAGS="$CXXFLAGS $GTK___CFLAGS" - AC_SUBST(CXXFLAGS) - AC_SUBST(GTK___CFLAGS) - AC_SUBST(GTK___LIBS) -]) diff --git a/stepmake/autogen.sh b/stepmake/autogen.sh new file mode 100755 index 0000000000..5048ce8b21 --- /dev/null +++ b/stepmake/autogen.sh @@ -0,0 +1,39 @@ +#!/bin/sh +# Run this to generate configure and initial GNUmakefiles + +srcdir=`dirname $0` +DIE=0 + +# autoconf > 2.50 is not very common yet, +# and disappointingly incompatible with the widely available 2.13 +version=`autoconf --version 2>/dev/null | awk '{print $3}'` +if test "$version" != "2.13"; then + echo "ERROR: Please install autoconf 2.13" + exit 1 +fi + +if test -z "$*"; then + echo "WARNING: I am going to run \`configure' with no arguments." + echo "If you wish to pass any to it, please specify them on the" + echo \`$0\'" command line." + echo +fi + +for coin in `find $srcdir -name configure.in -print` +do + dr=`dirname $coin` + echo processing $dr + ( + cd $dr + echo "Running autoconf ..." + autoconf + ) +done + +#conf_flags="--enable-maintainer-mode --enable-compile-warnings" #--enable-iso-c +if test -z "$NOCONFIGURE"; then + echo Running $srcdir/configure $conf_flags "$@" ... + $srcdir/configure $conf_flags "$@" +else + echo Skipping configure process. +fi diff --git a/stepmake/bin/install-dot-exe.sh b/stepmake/bin/install-dot-exe.sh index c4128c5ed8..1881b2de8b 100755 --- a/stepmake/bin/install-dot-exe.sh +++ b/stepmake/bin/install-dot-exe.sh @@ -1,20 +1,21 @@ #!/bin/sh # install-dot-exe.sh -- add .exe for cygnus gnu-windows -# hack for doos install; cygnus should support rpm +# hack for doos install realinstall=install args='' while [ $# -ne 0 ] do + x=`echo $1 | sed 's@//@/@g'` case $1 in - -*) args="$args $1" + -*) args="$args $x" ;; *) if [ -f $1.exe ]; then - args="$args $1.exe" + args="$args $x.exe" else - args="$args $1" + args="$args $x" fi ;; esac diff --git a/stepmake/configure b/stepmake/configure index fd1da1eb3e..52fd15c284 100755 --- a/stepmake/configure +++ b/stepmake/configure @@ -1,58 +1,5 @@ #! /bin/sh -ac_help="$ac_help - --with-gtkmm-prefix=PREFIX - Prefix where GTK-- is installed (optional)" -# Check whether --with-gtkmm-prefix or --without-gtkmm-prefix was given. -if test "${with_gtkmm_prefix+set}" = set; then - withval="$with_gtkmm_prefix" - gtkmm_config_prefix="$withval" -else - gtkmm_config_prefix="" -fi - -ac_help="$ac_help - --with-gtkmm-exec-prefix=PREFIX - Exec prefix where GTK-- is installed (optional)" -# Check whether --with-gtkmm-exec-prefix or --without-gtkmm-exec-prefix was given. -if test "${with_gtkmm_exec_prefix+set}" = set; then - withval="$with_gtkmm_exec_prefix" - gtkmm_config_exec_prefix="$withval" -else - gtkmm_config_exec_prefix="" -fi - -ac_help="$ac_help - --disable-gtkmmtest Do not try to compile and run a test GTK-- program" -# Check whether --enable-gtkmmtest or --disable-gtkmmtest was given. -if test "${enable_gtkmmtest+set}" = set; then - enableval="$enable_gtkmmtest" - : -else - enable_gtkmmtest=yes -fi - - - if test x$gtkmm_config_exec_prefix != x ; then - gtkmm_config_args="$gtkmm_config_args --exec-prefix=$gtkmm_config_exec_prefix" - if test x${GTKMM_CONFIG+set} != xset ; then - GTKMM_CONFIG=$gtkmm_config_exec_prefix/bin/gtkmm-config - fi - fi - if test x$gtkmm_config_prefix != x ; then - gtkmm_config_args="$gtkmm_config_args --prefix=$gtkmm_config_prefix" - if test x${GTKMM_CONFIG+set} != xset ; then - GTKMM_CONFIG=$gtkmm_config_prefix/bin/gtkmm-config - fi - fi - - - - -# Configure paths for GTK--DRAW -# Derek Quinn Wyatt 98-08-21 (adapted from Jan Nieuwenhuizen's code) - - # Guess values for system-dependent variables and create Makefiles. # Generated automatically using autoconf version 2.13 # Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc. @@ -615,12 +562,12 @@ fi fi echo $ac_n "checking Package""... $ac_c" 1>&6 -echo "configure:619: checking Package" >&5 +echo "configure:566: checking Package" >&5 if test "x$PACKAGE" = "xSTEPMAKE"; then echo "$ac_t""Stepmake package!" 1>&6 echo $ac_n "checking builddir""... $ac_c" 1>&6 -echo "configure:624: checking builddir" >&5 +echo "configure:571: checking builddir" >&5 if test "$srcdir" = "."; then builddir=. else @@ -632,7 +579,6 @@ echo "configure:624: checking builddir" >&5 echo "$ac_t""$builddir" 1>&6 (cd stepmake 2>/dev/null || mkdir stepmake) - (cd stepmake; rm -f stepmake; ln -s ../$srcdir/stepmake .) (cd stepmake; rm -f bin; ln -s ../$srcdir/bin .) ac_aux_dir= for ac_dir in bin $srcdir/bin; do @@ -658,7 +604,7 @@ ac_configure=$ac_aux_dir/configure # This should be Cygnus configure. echo "$ac_t""$PACKAGE" 1>&6 echo $ac_n "checking builddir""... $ac_c" 1>&6 -echo "configure:662: checking builddir" >&5 +echo "configure:608: checking builddir" >&5 if test "$srcdir" = "."; then builddir=. srcdir_build=no @@ -678,7 +624,7 @@ echo "configure:662: checking builddir" >&5 fi echo $ac_n "checking for stepmake""... $ac_c" 1>&6 -echo "configure:682: checking for stepmake" >&5 +echo "configure:628: checking for stepmake" >&5 # Check for installed stepmake if test -d $stepmake; then echo "$ac_t""$stepmake" 1>&6 @@ -789,6 +735,8 @@ if test "${enable_config+set}" = set; then fi + ##' + test -n "$CONFIGURATION" && CONFIGSUFFIX="-$CONFIGURATION" CONFIGFILE=config$CONFIGSUFFIX @@ -800,7 +748,7 @@ else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; } fi echo $ac_n "checking host system type""... $ac_c" 1>&6 -echo "configure:804: checking host system type" >&5 +echo "configure:752: checking host system type" >&5 host_alias=$host case "$host_alias" in @@ -820,12 +768,13 @@ host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` echo "$ac_t""$host" 1>&6 + for ac_prog in gmake make do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:829: checking for $ac_word" >&5 +echo "configure:778: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_MAKE'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -853,14 +802,83 @@ fi test -n "$MAKE" && break done -test -n "$MAKE" || MAKE="error" +test -n "$MAKE" || MAKE="no" + + + + r="`eval echo '$'"MAKE"`" + if test -n "$r" -a "$r" != "error" -a "$r" != "no" && expr '`eval echo '$'"MAKE"`' : '.*\(echo\)' > /dev/null; then + true + else + ##STEPMAKE_WARN(cannot find . ) + false + fi + if test $? -ne 0; then + + eval "REQUIRED"=\"`eval echo \"'$'REQUIRED\" \"gmake make\"`\" + + if test "REQUIRED" = "REQUIRED"; then + command="echo ERROR: gmake make not found" + # abort configure process here? + else + command="- echo gmake make not found" + fi + eval "MAKE"='$command' + false + else + true + fi + + if test $? -eq 0 -a -n ""; then + + r="`eval echo '$'"MAKE"`" + echo $ac_n "checking "$r version"""... $ac_c" 1>&6 +echo "configure:838: checking "$r version"" >&5 + #exe=`STEPMAKE_GET_EXECUTABLE($r)` + exe=` + ## which doesn't work in ash, if /usr/bin/which isn't installed + ## type -p doesn't work in ash + ## command -v doesn't work in zsh + ## command -v "$r" 2>&1 + ## this test should work in ash, bash, pdksh (ksh), zsh + type -p "$r" 2>/dev/null | tail -1 | awk '{print $NF}' +` + ver=` + "$exe" --version 2>&1 | grep -v '^$' | head -1 | awk '{print $NF}' +` + num=` + echo "$ver" | awk -F. ' + { + if ($3) {last = $3} + else {last =0} + } + {printf "%s%s%s\n",$1*100, $2*10,last}' +` + req=` + echo "" | awk -F. ' + { + if ($3) {last = $3} + else {last =0} + } + {printf "%s%s%s\n",$1*100, $2*10,last}' +` + echo "$ac_t"""$ver"" 1>&6 + if test "$num" -lt "$req"; then + + eval "REQUIRED"=\"`eval echo \"'$'REQUIRED\" \""$r (installed: $ver)"\"`\" + + fi + + fi + + for ac_prog in find do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:864: checking for $ac_word" >&5 +echo "configure:882: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_FIND'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -888,16 +906,84 @@ fi test -n "$FIND" && break done -test -n "$FIND" || FIND="error" +test -n "$FIND" || FIND="no" + + + r="`eval echo '$'"FIND"`" + if test -n "$r" -a "$r" != "error" -a "$r" != "no" && expr '`eval echo '$'"FIND"`' : '.*\(echo\)' > /dev/null; then + true + else + ##STEPMAKE_WARN(cannot find . ) + false + fi + if test $? -ne 0; then + + eval "REQUIRED"=\"`eval echo \"'$'REQUIRED\" \"find\"`\" + + if test "REQUIRED" = "REQUIRED"; then + command="echo ERROR: find not found" + # abort configure process here? + else + command="- echo find not found" + fi + eval "FIND"='$command' + false + else + true + fi + + if test $? -eq 0 -a -n ""; then + + r="`eval echo '$'"FIND"`" + echo $ac_n "checking "$r version"""... $ac_c" 1>&6 +echo "configure:942: checking "$r version"" >&5 + #exe=`STEPMAKE_GET_EXECUTABLE($r)` + exe=` + ## which doesn't work in ash, if /usr/bin/which isn't installed + ## type -p doesn't work in ash + ## command -v doesn't work in zsh + ## command -v "$r" 2>&1 + ## this test should work in ash, bash, pdksh (ksh), zsh + type -p "$r" 2>/dev/null | tail -1 | awk '{print $NF}' +` + ver=` + "$exe" --version 2>&1 | grep -v '^$' | head -1 | awk '{print $NF}' +` + num=` + echo "$ver" | awk -F. ' + { + if ($3) {last = $3} + else {last =0} + } + {printf "%s%s%s\n",$1*100, $2*10,last}' +` + req=` + echo "" | awk -F. ' + { + if ($3) {last = $3} + else {last =0} + } + {printf "%s%s%s\n",$1*100, $2*10,last}' +` + echo "$ac_t"""$ver"" 1>&6 + if test "$num" -lt "$req"; then + + eval "REQUIRED"=\"`eval echo \"'$'REQUIRED\" \""$r (installed: $ver)"\"`\" + fi + + fi + + + for ac_prog in tar do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:901: checking for $ac_word" >&5 +echo "configure:987: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_TAR'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -925,14 +1011,82 @@ fi test -n "$TAR" && break done -test -n "$TAR" || TAR="error" +test -n "$TAR" || TAR="no" + + + + r="`eval echo '$'"TAR"`" + if test -n "$r" -a "$r" != "error" -a "$r" != "no" && expr '`eval echo '$'"TAR"`' : '.*\(echo\)' > /dev/null; then + true + else + ##STEPMAKE_WARN(cannot find . ) + false + fi + + if test $? -ne 0; then + + eval "REQUIRED"=\"`eval echo \"'$'REQUIRED\" \"tar\"`\" + + if test "REQUIRED" = "REQUIRED"; then + command="echo ERROR: tar not found" + # abort configure process here? + else + command="- echo tar not found" + fi + eval "TAR"='$command' + false + else + true + fi + + if test $? -eq 0 -a -n ""; then + + r="`eval echo '$'"TAR"`" + echo $ac_n "checking "$r version"""... $ac_c" 1>&6 +echo "configure:1047: checking "$r version"" >&5 + #exe=`STEPMAKE_GET_EXECUTABLE($r)` + exe=` + ## which doesn't work in ash, if /usr/bin/which isn't installed + ## type -p doesn't work in ash + ## command -v doesn't work in zsh + ## command -v "$r" 2>&1 + ## this test should work in ash, bash, pdksh (ksh), zsh + type -p "$r" 2>/dev/null | tail -1 | awk '{print $NF}' +` + ver=` + "$exe" --version 2>&1 | grep -v '^$' | head -1 | awk '{print $NF}' +` + num=` + echo "$ver" | awk -F. ' + { + if ($3) {last = $3} + else {last =0} + } + {printf "%s%s%s\n",$1*100, $2*10,last}' +` + req=` + echo "" | awk -F. ' + { + if ($3) {last = $3} + else {last =0} + } + {printf "%s%s%s\n",$1*100, $2*10,last}' +` + echo "$ac_t"""$ver"" 1>&6 + if test "$num" -lt "$req"; then + + eval "REQUIRED"=\"`eval echo \"'$'REQUIRED\" \""$r (installed: $ver)"\"`\" + + fi + + fi if test "x`uname`" = "xHP-UX"; then # Extract the first word of "bash", so it can be a program name with args. set dummy bash; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:936: checking for $ac_word" >&5 +echo "configure:1090: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_BASH'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -972,7 +1126,7 @@ fi # Extract the first word of "bash", so it can be a program name with args. set dummy bash; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:976: checking for $ac_word" >&5 +echo "configure:1130: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_SHELL'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1009,7 +1163,7 @@ fi # Extract the first word of "bash", so it can be a program name with args. set dummy bash; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1013: checking for $ac_word" >&5 +echo "configure:1167: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_BASH'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1046,11 +1200,73 @@ fi fi + + for ac_prog in python +do +# Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +echo "configure:1210: checking for $ac_word" >&5 +if eval "test \"`echo '$''{'ac_cv_prog_PYTHON'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + if test -n "$PYTHON"; then + ac_cv_prog_PYTHON="$PYTHON" # Let the user override the test. +else + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" + ac_dummy="$PATH" + for ac_dir in $ac_dummy; do + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/$ac_word; then + ac_cv_prog_PYTHON="$ac_prog" + break + fi + done + IFS="$ac_save_ifs" +fi +fi +PYTHON="$ac_cv_prog_PYTHON" +if test -n "$PYTHON"; then + echo "$ac_t""$PYTHON" 1>&6 +else + echo "$ac_t""no" 1>&6 +fi + +test -n "$PYTHON" && break +done +test -n "$PYTHON" || PYTHON="no" + + + + r="`eval echo '$'"PYTHON"`" + if test -n "$r" -a "$r" != "error" -a "$r" != "no" && expr '`eval echo '$'"PYTHON"`' : '.*\(echo\)' > /dev/null; then + true + else + ##STEPMAKE_WARN(cannot find . ) + false + fi - # Extract the first word of "${PYTHON:-python}", so it can be a program name with args. -set dummy ${PYTHON:-python}; ac_word=$2 + if test $? -ne 0; then + + eval "REQUIRED"=\"`eval echo \"'$'REQUIRED\" \"python\"`\" + + if test "REQUIRED" = "REQUIRED"; then + command="echo ERROR: python not found" + # abort configure process here? + else + command="- echo python not found" + fi + eval "PYTHON"='$command' + false + else + true + fi + + if test $? -eq 0; then + # Extract the first word of "python", so it can be a program name with args. +set dummy python; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1054: checking for $ac_word" >&5 +echo "configure:1270: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_PYTHON'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1072,7 +1288,6 @@ else fi done IFS="$ac_save_ifs" - test -z "$ac_cv_path_PYTHON" && ac_cv_path_PYTHON="-echo no python" ;; esac fi @@ -1083,58 +1298,66 @@ else echo "$ac_t""no" 1>&6 fi - + if test -n ""; then + + r="`eval echo '$'"PYTHON"`" + echo $ac_n "checking "$r version"""... $ac_c" 1>&6 +echo "configure:1306: checking "$r version"" >&5 + #exe=`STEPMAKE_GET_EXECUTABLE($r)` + exe=` + ## which doesn't work in ash, if /usr/bin/which isn't installed + ## type -p doesn't work in ash + ## command -v doesn't work in zsh + ## command -v "$r" 2>&1 + ## this test should work in ash, bash, pdksh (ksh), zsh + type -p "$r" 2>/dev/null | tail -1 | awk '{print $NF}' +` + ver=` + "$exe" --version 2>&1 | grep -v '^$' | head -1 | awk '{print $NF}' +` + num=` + echo "$ver" | awk -F. ' + { + if ($3) {last = $3} + else {last =0} + } + {printf "%s%s%s\n",$1*100, $2*10,last}' +` + req=` + echo "" | awk -F. ' + { + if ($3) {last = $3} + else {last =0} + } + {printf "%s%s%s\n",$1*100, $2*10,last}' +` + echo "$ac_t"""$ver"" 1>&6 + if test "$num" -lt "$req"; then + + eval "REQUIRED"=\"`eval echo \"'$'REQUIRED\" \""$r (installed: $ver)"\"`\" + + fi - if test $MAKE != "error" ; then - $MAKE -v 2> /dev/null | grep GNU > /dev/null - if test "$?" = 1 - then - - echo "configure: warning: Please install *GNU* make" 1>&2 - warn_b=yes - fi - fi + fi - - result="`echo \"$PYTHON\" | grep echo`" - if test "x$PYTHON" = "xerror" -o "x$result" != "x"; then - - echo "configure: warning: can\'t find python. You should install Python" 1>&2 - warn_b=yes - fi + if expr "$MAKE" : '.*\(echo\)' >/dev/null; then + $MAKE -v 2> /dev/null | grep GNU > /dev/null + if test "$?" = 1; then + warn='make (Please install *GNU* make)' + # STEPMAKE_WARN($warn) + + eval "REQUIRED"=\"`eval echo \"'$'REQUIRED\" \"$warn\"`\" + fi + fi - if test "x$OSTYPE" = "xcygwin32" || test "x$OSTYPE" = "xWindows_NT"; then + if test "$OSTYPE" = "cygwin" -o "$OSTYPE" = "cygwin32" -o "$OSTYPE" = "Windows_NT"; then LN=cp # hard link does not work under cygnus-nt LN_S='cp -r' # symbolic link does not work for native nt ZIP="zip -r -9" # program_suffix=.exe - # urg - # ROOTSEP=':' - # DIRSEP='\\' - # PATHSEP=';' - # - # cygwin fixes all these things. - # it seems these were used because of dos-style TEXINPUTS and - # MFINPUTS needed for miktex. - # but this breaks parsing of all other cygwin/unix style paths. - # - # if your (mik)tex breaks, make a: - # /usr/local/bin/tex: - # #!/bin/sh - # TEXINPUTS=`cygpath -pw $TEXINPUTS` /texmf/miktex/bin/tex - # - # and - # - # /usr/local/bin/mf: - # #!/bin/sh - # MFINPUTS=`cygpath -pw $MFINPUTS` /texmf/miktex/bin/mf - # - # this way, you may have buildscripts/out/lilypond-profile - # 'automatically' sourced from /usr/etc/profile.d/ too. - # ROOTSEP=':' DIRSEP='/' PATHSEP=':' @@ -1164,10 +1387,11 @@ EOF + if test "$datadir" = "\${prefix}/share"; then - datadir='${prefix}/share/'$package + datadir='${prefix}/share/'$package/$FULL_VERSION fi DIR_DATADIR=${datadir} presome=${prefix} @@ -1178,8 +1402,10 @@ EOF + + # we used to set DIR_SHAREDSTATEDIR here, + # but apparently that broke something - cat >> confdefs.h <&6 -echo "configure:1227: checking language" >&5 +echo "configure:1453: checking language" >&5 case "$language" in En* | en* | Am* | am* | US* | us*) lang=English;; @@ -1244,11 +1470,11 @@ echo "configure:1227: checking language" >&5 fi -# AC_STEPMAKE_GETTEXT -# AC_STEPMAKE_MAN -# AC_STEPMAKE_MSGFMT -# AC_STEPMAKE_TEXMF -# AC_STEPMAKE_TEXMF_DIRS +# STEPMAKE_GETTEXT +# STEPMAKE_MAN +# STEPMAKE_MSGFMT +# STEPMAKE_TEXMF +# STEPMAKE_TEXMF_DIRS # AM_PATH_GTK(1.0.0,,AC_MSG_ERROR([please install proper version of gtk])) # AM_PATH_GTK__(0.9.4,,AC_MSG_ERROR([please install proper version of gtk--])) @@ -1258,7 +1484,7 @@ do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1262: checking for $ac_word" >&5 +echo "configure:1488: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_MAKEINFO'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1290,6 +1516,9 @@ test -n "$MAKEINFO" || MAKEINFO="error" + + + trap '' 1 2 15 cat > confcache <<\EOF # This file is a shell script that caches the results of configure @@ -1446,10 +1675,13 @@ s%@ZIP@%$ZIP%g s%@LN@%$LN%g s%@LN_S@%$LN_S%g s%@INSTALL@%$INSTALL%g -s%@PATHSEP@%$PATHSEP%g s%@DIRSEP@%$DIRSEP%g +s%@PATHSEP@%$PATHSEP%g +s%@ROOTSEP@%$ROOTSEP%g s%@DIR_DATADIR@%$DIR_DATADIR%g s%@MAKEINFO@%$MAKEINFO%g +s%@OPTIONAL@%$OPTIONAL%g +s%@REQUIRED@%$REQUIRED%g CEOF EOF @@ -1665,6 +1897,28 @@ rm -fr confdefs* $ac_clean_files test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1 + + if test -n "$OPTIONAL"; then + echo + echo "WARNING: Please consider installing optional programs: $OPTIONAL" + fi + + if test -n "$REQUIRED"; then + echo + echo "ERROR: Please install required programs: $REQUIRED" + fi + + if test -n "$OPTIONAL$REQUIRED"; then + echo + echo "See INSTALL.txt for more information on how to build $PACKAGE_NAME" + echo "Remove config.cache before rerunning ./configure" + fi + + if test -n "$REQUIRED"; then + rm -f $srcdir/GNUmakefile + exit 1 + fi + # regular in-place build # test for srcdir_build = yes ? if test "$builddir" = "."; then diff --git a/stepmake/configure.in b/stepmake/configure.in index e4907b1a8c..1d1c3c8865 100644 --- a/stepmake/configure.in +++ b/stepmake/configure.in @@ -6,30 +6,30 @@ AC_INIT(make/stepmake.lsm.in) AC_CONFIG_HEADER($CONFIGFILE.h:config.hh.in) # Bootstrap StepMake configure -AC_STEPMAKE_INIT +STEPMAKE_INIT # For all packages except the StepMake package itself # AC_CONFIG_SUBDIRS(stepmake) # Uncomment the configuration options your package needs. -# AC_STEPMAKE_COMPILE +# STEPMAKE_COMPILE # AC_HAVE_HEADERS(limits.h malloc.h string.h unistd.h values.h) -# AC_STEPMAKE_CXX -# AC_STEPMAKE_GXX -# AC_STEPMAKE_CXXTEMPLATE -# AC_STEPMAKE_LEXYACC -# AC_STEPMAKE_LIB -# AC_STEPMAKE_LIBTOOL -AC_STEPMAKE_LOCALE -# AC_STEPMAKE_GETTEXT -# AC_STEPMAKE_MAN -# AC_STEPMAKE_MSGFMT -# AC_STEPMAKE_TEXMF -# AC_STEPMAKE_TEXMF_DIRS +# STEPMAKE_CXX +# STEPMAKE_GXX +# STEPMAKE_CXXTEMPLATE +# STEPMAKE_LEXYACC +# STEPMAKE_LIB +# STEPMAKE_LIBTOOL +STEPMAKE_LOCALE +# STEPMAKE_GETTEXT +# STEPMAKE_MAN +# STEPMAKE_MSGFMT +# STEPMAKE_TEXMF +# STEPMAKE_TEXMF_DIRS # AM_PATH_GTK(1.0.0,,AC_MSG_ERROR([please install proper version of gtk])) # AM_PATH_GTK__(0.9.4,,AC_MSG_ERROR([please install proper version of gtk--])) AC_CHECK_PROGS(MAKEINFO, makeinfo, error) -AC_STEPMAKE_END +STEPMAKE_END diff --git a/stepmake/make/out/stepmake.lsm b/stepmake/make/out/stepmake.lsm index 5672671732..1929b0e6f7 100644 --- a/stepmake/make/out/stepmake.lsm +++ b/stepmake/make/out/stepmake.lsm @@ -1,7 +1,7 @@ Begin3 Title: StepMake Version: 0.1.81 -Entered-date: 05MEI02 +Entered-date: 13MEI02 Description: Keywords: music notation typesetting midi fonts engraving Author: janneke@gnu.org (Jan Nieuwenhuizen) diff --git a/stepmake/stepmake/automatically-generated.sub.make b/stepmake/stepmake/automatically-generated.sub.make index 1bfa90c339..610aa14344 100644 --- a/stepmake/stepmake/automatically-generated.sub.make +++ b/stepmake/stepmake/automatically-generated.sub.make @@ -3,7 +3,8 @@ LINECOMMENT=\# default: -chmod +w $(OUTFILE) - echo "$(LINECOMMENT) WARNING WARNING WARNING WARNING" > $(OUTFILE) + head -1 $(INFILE) > $(OUTFILE) + echo "$(LINECOMMENT) WARNING WARNING WARNING" >> $(OUTFILE) echo "$(LINECOMMENT) do not edit! this is $(OUTFILE), generated from $(INFILE)" >> $(OUTFILE) cat $(INFILE) >> $(OUTFILE) chmod -w $(OUTFILE) diff --git a/stepmake/stepmake/generic-targets.make b/stepmake/stepmake/generic-targets.make index d70710f8a3..d9d939e6fd 100644 --- a/stepmake/stepmake/generic-targets.make +++ b/stepmake/stepmake/generic-targets.make @@ -103,9 +103,8 @@ $(outdir)/version.hh: $(outdir)/VERSION $(outdir)/config.h: $(config_h) cp -p $< $@ -# should this be in Rules? configure: configure.in aclocal.m4 - autoconf + NOCONFIGURE=yes $(srcdir)/autogen.sh chmod +x configure local-clean: diff --git a/stepmake/stepmake/toplevel-targets.make b/stepmake/stepmake/toplevel-targets.make index a8e4dea6eb..a6e16d33e4 100644 --- a/stepmake/stepmake/toplevel-targets.make +++ b/stepmake/stepmake/toplevel-targets.make @@ -20,6 +20,10 @@ GNUmakefile: GNUmakefile.in ifneq ($(PACKAGE),STEPMAKE) aclocal.m4: $(stepmake)/aclocal.m4 $(MAKE) INFILE=$< OUTFILE=$@ LINECOMMENT=dnl -f $(stepdir)/automatically-generated.sub.make + +autogen.sh: $(stepmake)/autogen.sh + $(MAKE) INFILE=$< OUTFILE=$@ LINECOMMENT=\# -f $(stepdir)/automatically-generated.sub.make + chmod +x autogen.sh endif