Fixed a typo
[platform/upstream/gstreamer.git] / autogen.sh
1 #!/bin/sh
2 # Run this to generate all the initial makefiles, etc.
3
4 DIE=0
5 package=GStreamer
6 srcfile=gst/gstobject.h
7
8 (autoconf --version) < /dev/null > /dev/null 2>&1 || {
9         echo
10         echo "You must have autoconf installed to compile $package."
11         echo "Download the appropriate package for your distribution,"
12         echo "or get the source tarball at ftp://ftp.gnu.org/pub/gnu/"
13         DIE=1
14 }
15
16 (automake --version) < /dev/null > /dev/null 2>&1 || {
17         echo
18         echo "You must have automake installed to compile $package."
19         echo "Get ftp://ftp.cygnus.com/pub/home/tromey/automake-1.2d.tar.gz"
20         echo "(or a newer version if it is available)"
21         DIE=1
22 }
23
24 (libtool --version) < /dev/null > /dev/null 2>&1 || {
25         echo
26         echo "You must have libtool installed to compile $package."
27         echo "Get ftp://alpha.gnu.org/gnu/libtool-1.3.5.tar.gz"
28         echo "(or a newer version if it is available)"
29         DIE=1
30 }
31
32 libtool_version=`libtool --version | sed 's/^.* \([0-9\.]*\) .*$/\1/'`
33 libtool_major=`echo $libtool_version | cut -d. -f1`
34 libtool_minor=`echo $libtool_version | cut -d. -f2`
35 libtool_micro=`echo $libtool_version | cut -d. -f3`
36 if [ $libtool_major -lt 1 -o $libtool_minor -lt 3 -o $libtool_micro -lt 5 ];then
37         echo
38         echo "You must have libtool 1.3.5 or greater to compile $package."
39         echo "Get ftp://alpha.gnu.org/gnu/libtool-1.3.5.tar.gz"
40         echo "(or a newer version if it is available)"
41         DIE=1
42 fi
43
44 if test "$DIE" -eq 1; then
45         exit 1
46 fi
47
48 test -f $srcfile || {
49         echo "You must run this script in the top-level $package directory"
50         exit 1
51 }
52
53 if test -z "$*"; then
54         echo "I am going to run ./configure with no arguments - if you wish "
55         echo "to pass any to it, please specify them on the $0 command line."
56 fi
57
58 libtoolize --copy --force
59 aclocal $ACLOCAL_FLAGS
60 autoheader
61 autoconf
62 automake --add-missing
63
64 if [ "x$1" = "x--autogen-recurse" ];then
65   exit  # the rest will happen later
66 fi
67
68 #for dir in `find * -name autogen.sh -print | grep -v '^autogen.sh$' | \
69 #            sed 's/autogen.sh$//'`;do
70 #  echo "Recursively running autogen.sh in $dir"
71 #  pushd $dir > /dev/null
72 #  ./autogen.sh --autogen-recurse "$@"
73 #  popd > /dev/null
74 #done
75
76 ./configure --enable-maintainer-mode --enable-plugin-srcdir --enable-debug-verbose "$@"
77
78 echo 
79 echo "Now type 'make' to compile $package."