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