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