- added a line for busy application developers, it's shorter this time
[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 the latest version from ftp://alpha.gnu.org/gnu/libtool/"
28         DIE=1
29 }
30
31 libtool_version=`libtool --version | sed 's/^.* \([0-9\.]*\) .*$/\1/'`
32 libtool_major=`echo $libtool_version | cut -d. -f1`
33 libtool_minor=`echo $libtool_version | cut -d. -f2`
34 libtool_micro=`echo $libtool_version | cut -d. -f3`
35 if [ x$libtool_micro = x ]; then
36         libtool_micro=0
37 fi
38 if [ $libtool_major -le 1 ]; then
39         if [ $libtool_major -lt 1 ]; then
40                 echo
41                 echo "You must have libtool 1.3.5 or greater to compile $package."
42                 echo "Get the latest version from ftp://alpha.gnu.org/gnu/libtool/"
43                 DIE=1
44         elif [ $libtool_minor -le 3 ]; then
45                 if [ $libtool_minor -lt 3 ]; then
46                         echo
47                         echo "You must have libtool 1.3.5 or greater to compile $package."
48                         echo "Get the latest version from ftp://alpha.gnu.org/gnu/libtool/"
49                         DIE=1
50                 elif [ $libtool_micro -lt 5 ]; then
51                         echo
52                         echo "You must have libtool 1.3.5 or greater to compile $package."
53                         echo "Get the latest version from ftp://alpha.gnu.org/gnu/libtool/"
54                         DIE=1
55                 fi
56         fi
57 fi
58
59 if test "$DIE" -eq 1; then
60         exit 1
61 fi
62
63 test -f $srcfile || {
64         echo "You must run this script in the top-level $package directory"
65         exit 1
66 }
67
68 if test -z "$*"; then
69         echo "I am going to run ./configure with no arguments - if you wish "
70         echo "to pass any to it, please specify them on the $0 command line."
71 fi
72
73 libtoolize --copy --force
74 aclocal $ACLOCAL_FLAGS || {
75         echo "aclocal failed - check that all needed development files are present on system"
76         exit 1
77 }
78 autoheader
79 autoconf
80 automake --add-missing
81
82 # now remove the cache, because it can be considered dangerous in this case
83 rm -f config.cache
84
85 # The new configure options for busy application developers (Hadess)
86 #./configure --enable-maintainer-mode --enable-debug --enable-debug-verbose 
87
88 ./configure --enable-maintainer-mode --enable-plugin-srcdir --enable-debug --enable-debug-verbose "$@"
89
90 echo 
91 echo "Now type 'make' to compile $package."