]> git.donarmstrong.com Git - lilypond.git/blob - autogen.sh
Merge branch 'cvs-head' of http://lilypond.org/vc/lilypond into master-hanwen
[lilypond.git] / autogen.sh
1 #!/bin/sh
2 # WARNING WARNING WARNING
3 # do not edit! this is autogen.sh, generated from /home/lilydev/src/lilypond/stepmake/autogen.sh
4 #!/bin/sh
5 # Run this to generate configure and initial GNUmakefiles
6
7 srcdir=`dirname $0`
8
9 case $1 in
10     --noconf*) NOCONFIGURE=true;;
11 esac
12
13 if [ ! -f aclocal.m4 -o stepmake/aclocal.m4 -nt aclocal.m4 ]; then
14     echo "stepmake/aclocal.m4 is newer.  Copying file." 
15     cp -f stepmake/aclocal.m4 aclocal.m4
16 fi
17
18 if [ ! -f autogen.sh -o stepmake/autogen.sh -nt autogen.sh ]; then
19     echo "stepmake/autogen.sh is newer.  Copying file." 
20     cp -f stepmake/autogen.sh autogen.sh
21     exec ./autogen.sh "$@"
22 fi
23
24 # Be paranoid: check for autoconf >= 2.50
25 # Some setups have both autoconf 2.13 and 2.5x available through
26 # a wrapper script: /usr/bin/autoconf.
27 # This wrapper may incorrectly autoselect autoconf 2.50, but it
28 # advertises itself as autoconf 2.13.
29 # If you have such a setup, invoke this script as:
30 #   autoconf=autoconf2.50 ./autogen.sh
31 for i in autoconf2.50 autoconf-2.50 autoconf  false; do
32   version=`$i --version 2>/dev/null | head -n 1 | awk '{print $NF}' | awk -F. '{print $1 * 100 + $2}'`
33   if test "0$version" -ge 250; then
34     autoconf=$i
35     break
36   fi
37 done
38
39 if test -z "$autoconf"; then
40     echo "ERROR: Please install autoconf 2.50 or newer"
41     exit 1
42 fi
43
44 for i in $srcdir/configure.in #`find $srcdir -name configure.in -print`
45 do 
46   dir=`dirname $i`
47   echo processing $dir
48   (
49       cd $dir
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 -n "$NOCONFIGURE"; then
57     echo Skipping configure process.
58     exit 0
59 fi
60
61 if test -z "$*"; then
62     cat <<EOF
63     Warning: about to run \`configure' without arguments.
64     arguments on the \`$0' command line
65     will be passed to \`configure'.
66
67     Invoke with --noconfigure to skip configure step.
68 EOF
69 fi
70
71 echo Running $srcdir/configure $conf_flags "$@" ...
72 $srcdir/configure $conf_flags "$@"