]> git.donarmstrong.com Git - lilypond.git/blob - autogen.sh
* python/GNUmakefile (INSTALLATION_DIR1): install Python module
[lilypond.git] / autogen.sh
1 #!/bin/sh
2 # Run this to generate configure and initial GNUmakefiles
3
4 srcdir=`dirname $0`
5
6 if [ stepmake/aclocal.m4 -nt aclocal.m4 ]; then
7     echo "stepmake/aclocal.m4 is newer. Copying file." 
8     cp -f stepmake/aclocal.m4 aclocal.m4
9 fi
10
11 if [ stepmake/autogen.sh -nt autogen.sh ]; then
12     echo "stepmake/autogen.sh is newer. Copying file." 
13     cp -f stepmake/autogen.sh autogen.sh
14     exec ./autogen.sh
15 fi
16
17 # Be paranoid: check for autoconf >= 2.50
18 # Some setups have both autoconf 2.13 and 2.5x available through
19 # a wrapper script: /usr/bin/autoconf.
20 # This wrapper may incorrectly autoselect autoconf 2.50, but it
21 # advertises itself as autoconf 2.13.
22 # If you have such a setup, invoke this script as:
23 #   autoconf=autoconf2.50 ./autogen.sh
24 for i in autoconf2.50 autoconf-2.50 autoconf  false; do
25   version=`$i --version 2>/dev/null | head -1 | awk '{print $NF}' | awk -F. '{print $1 * 100 + $2}'`
26   if test "0$version" -ge 250; then
27     autoconf=$i
28     break
29   fi
30 done
31
32 if test -z "$autoconf"; then
33     echo "ERROR: Please install autoconf 2.50 or newer"
34     exit 1
35 fi
36
37 if test -z "$*"; then
38   echo "WARNING: I am going to run \`configure' with no arguments."
39   echo "If you wish to pass any to it, please specify them on the"
40   echo \`$0\'" command line."
41   echo
42 fi
43
44 for coin in `find $srcdir -name configure.in -print`
45 do 
46   dr=`dirname $coin`
47   echo processing $dr
48   (
49       cd $dr
50       echo "Running autoconf ..."
51       $autoconf
52   )
53 done
54
55 #conf_flags="--enable-maintainer-mode --enable-compile-warnings" #--enable-iso-c
56 if test -z "$NOCONFIGURE"; then
57   echo Running $srcdir/configure $conf_flags "$@" ...
58   $srcdir/configure $conf_flags "$@"
59 else
60   echo Skipping configure process.
61 fi