]> git.donarmstrong.com Git - lilypond.git/blob - autogen.sh
Merge branch 'master' into lilypond/translation
[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 for i in $srcdir/configure.in #`find $srcdir -name configure.in -print`
22 do 
23   dir=`dirname $i`
24   echo processing $dir
25   (
26       cd $dir
27       echo "Running autoconf ..."
28       autoconf || exit 1
29   )
30   # Autoconf automatically checks its own minimum required
31   # version, and it aborts when the check fails.
32   test "$?" -eq 1 && exit 1
33 done
34
35 #conf_flags="--enable-maintainer-mode --enable-compile-warnings" #--enable-iso-c
36 if test -n "$NOCONFIGURE"; then
37     echo Skipping configure process.
38     exit 0
39 fi
40
41 if test -z "$*"; then
42     cat <<EOF
43     Warning: about to run \`configure' without arguments.
44     arguments on the \`$0' command line
45     will be passed to \`configure'.
46
47     Invoke with --noconfigure to skip configure step.
48 EOF
49 fi
50
51 echo Running $srcdir/configure $conf_flags "$@" ...
52 $srcdir/configure $conf_flags "$@"