]> git.donarmstrong.com Git - lilypond.git/blob - configure
release: 0.0.37
[lilypond.git] / configure
1 #!/bin/sh
2
3 # script to setup library and auto generated files.
4
5 function setversion() {
6     eval `sed -n 's/^\([A-Z]*\)=\([p0-9].*\)$/\1=\2/p' Variables.make`
7     NEWVER=$MAJVER.$MINVER.$PATCHLEVEL
8     echo
9     echo "Current  version ("`pwd`") is $NEWVER"
10     echo
11 }
12
13 MAKE=${MAKE:-make}
14 PREFIX=${PREFIX:-.}
15 NEEDFLOWERVER=1.1.4
16
17 echo using PREFIX=$PREFIX
18 echo I need Flower version $NEEDFLOWERVER
19
20 flowertar=flower-$NEEDFLOWERVER
21 here=`pwd`
22 cd ..
23
24 if [ -x flower ]
25 then
26     echo Found flowerdir
27 else
28
29     if [ ! -d $flowertar ]
30     then
31         echo "can't find $flowertar"
32         exit 1;
33     fi
34     rm flower
35     ln -s $flowertar flower
36 fi
37
38 echo Compiling Library
39 {
40     cd flower;
41     setversion
42     if [ $NEWVER != $NEEDFLOWERVER ]; then
43         echo "You seem to be having an incorrect version of the Flower library"
44     else
45         echo "You got the correct Flower version."
46     fi
47     $MAKE
48 }
49
50 cd $here
51
52 echo '#define LIBDIR "'$PREFIX'/"'> hdr/config.hh
53 touch Site.make
54 $MAKE -f Initial.make
55
56 echo "The sources are ready for compiling. "
57 echo "To make sure that you don't have any stale dependencies: do"
58 echo "          make clean"