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