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