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