root/trunk/autogen.sh

Revision 292, 0.9 kB (checked in by jordi, 8 months ago)

Changed the function declaration a-la-bach to the POSIX function construct.

  • Property svn:executable set to *
Line 
1 #!/bin/sh
2 # Script to generate all required files for `configure' when
3 # starting from a fresh repository checkout.
4
5 ACLOCAL="aclocal -I m4"
6 AUTOCONF="autoconf"
7 AUTOHEADER="autoheader"
8 LIBTOOLIZE="libtoolize --automake"
9 AUTOMAKE="automake -a -c --foreign"
10
11 build () {
12     echo -n "Building '$1'... "
13     eval $`echo $2`
14     if [ ! $? -eq 0 ]
15     then
16         echo "Failed!"
17         exit 1
18     fi
19     echo "Done!"
20 }
21
22 # Clean up old files which could hurt otherwise.
23 rm -f config.cache config.log config.status
24
25 # Generate `aclocal.m4'.
26 rm -f aclocal.m4
27 build "aclocal.m4" "ACLOCAL"
28
29 # Generate `config.h.in'.
30 build "config.h.in" "AUTOHEADER"
31
32 # Generate `configure' from `configure.ac'.
33 build "configure" "AUTOCONF"
34
35 # Generate `ltmain.sh'.
36 #build "ltmain.sh" "LIBTOOLIZE"
37
38 # Generate `stamp-h1' and all `Makefile.in' files.
39 rm -f stamp-h1
40 build "Makefile templates" "AUTOMAKE"
41
42 echo
43 echo "Run './configure ; make'"
44 echo
Note: See TracBrowser for help on using the browser.