Merging the postbeta2 branch onto the mainline.
[platform/upstream/libvorbis.git] / autogen.sh
1 #!/bin/sh
2 # Run this to generate all the initial makefiles, etc.
3 # (basically ripped directly from enlightenment's autogen.sh)
4
5 srcdir=`dirname $0`
6 test -z "$srcdir" && srcdir=.
7
8 cd "$srcdir"
9 DIE=0
10
11 (autoconf --version) < /dev/null > /dev/null 2>&1 || {
12         echo
13         echo "You must have autoconf installed to compile libvorbis."
14         echo "Download the appropriate package for your distribution,"
15         echo "or get the source tarball at ftp://ftp.gnu.org/pub/gnu/"
16         DIE=1
17 }
18
19 (automake --version) < /dev/null > /dev/null 2>&1 || {
20         echo
21         echo "You must have automake installed to compile libvorbis."
22         echo "Get ftp://ftp.gnu.org/pub/gnu/automake-1.3.tar.gz"
23         echo "(or a newer version if it is available)"
24         DIE=1
25 }
26
27 if test "$DIE" -eq 1; then
28         exit 1
29 fi
30
31 if test -z "$*"; then
32         echo "I am going to run ./configure with no arguments - if you wish "
33         echo "to pass any to it, please specify them on the $0 command line."
34 fi
35
36 echo "Generating configuration files for libvorbis, please wait...."
37
38 echo "  aclocal $ACLOCAL_FLAGS"
39 aclocal $ACLOCAL_FLAGS
40 echo "  autoheader"
41 autoheader
42 echo "  automake --add-missing"
43 automake --add-missing 
44 echo "  autoconf"
45 autoconf
46
47 $srcdir/configure "$@" && echo