2 # Run this to generate all the initial makefiles, etc.
6 srcfile=gst/gstobject.h
8 (autoconf --version) < /dev/null > /dev/null 2>&1 || {
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/autoconf/"
16 # thomasvs added an autoconf version check
19 AC_VERSION=$AC_MAJOR.$AC_MINOR
20 autoconfvermin=`(autoconf --version|head -n 1|sed 's/^.* //;s/\./ /g;';echo "$AC_MAJOR $AC_MINOR")|sort -n|head -n 1`
22 if test "x$autoconfvermin" != "x$AC_MAJOR $AC_MINOR"; then
23 # version is less than the minimum suitable version
25 echo "You must have autoconf version $AC_VERSION or greater installed."
26 echo "Download the appropriate package for your distribution,"
27 echo "or get the source tarball at ftp://ftp.gnu.org/pub/gnu/autoconf/"
31 (automake --version) < /dev/null > /dev/null 2>&1 || {
33 echo "You must have automake installed to compile $package."
34 echo "Download the appropriate package for your distribution,"
35 echo "or get the source tarball at ftp://ftp.gnu.org/pub/gnu/automake/"
38 automakevermin=`(automake --version|head -n 1|sed 's/^.* //;s/\./ /g;';echo "1 5")|sort -n|head -n 1`
39 if test "x$automakevermin" != "x1 5"; then
40 # version is less than 1.5, the minimum suitable version
42 echo "You must have automake version 1.5 or greater installed."
43 echo "Download the appropriate package for your distribution,"
44 echo "or get the source tarball at ftp://ftp.gnu.org/pub/gnu/automake/"
48 (pkg-config --version) < /dev/null > /dev/null 2>&1 || {
50 echo "You must have pkg-config installed to compile $package."
51 echo "Download the appropriate package for your distribution,"
52 echo "or get the source tarball at:"
53 echo "http://www.freedesktop.org/software/pkgconfig/"
60 LT_VERSION=$LT_MAJOR.$LT_MINOR.$LT_MICRO
61 (libtool --version) < /dev/null > /dev/null 2>&1 || {
63 echo "You must have libtool installed to compile $package."
64 echo "Get the latest version from ftp://alpha.gnu.org/gnu/libtool/"
68 libtool_version=`libtool --version | sed 's/^.* \([0-9a-z\.]*\) .*$/\1/'`
69 libtool_major=`echo $libtool_version | cut -d. -f1`
70 libtool_minor=`echo $libtool_version | cut -d. -f2`
71 libtool_micro=`echo $libtool_version | cut -d. -f3`
72 if [ x$libtool_micro = x ]; then
75 if [ $libtool_major -le $LT_MAJOR ]; then
76 if [ $libtool_major -lt $LT_MAJOR ]; then
78 echo "You must have libtool $LT_VERSION or greater to compile $package."
79 echo "Get the latest version from ftp://alpha.gnu.org/gnu/libtool/"
81 elif [ $libtool_minor -le $LT_MINOR ]; then
82 if [ $libtool_minor -lt $LT_MINOR ]; then
84 echo "You must have libtool $LT_VERSION or greater to compile $package."
85 echo "Get the latest version from ftp://alpha.gnu.org/gnu/libtool/"
87 elif [ $libtool_micro -lt $LT_MICRO ]; then
89 echo "You must have libtool $LT_VERSION or greater to compile $package."
90 echo "Get the latest version from ftp://alpha.gnu.org/gnu/libtool/"
96 if test "$DIE" -eq 1; then
100 test -f $srcfile || {
101 echo "You must run this script in the top-level $package directory"
105 if test -z "$*"; then
106 echo "I am going to run ./configure with no arguments - if you wish "
107 echo "to pass any to it, please specify them on the $0 command line."
111 libtoolize --copy --force
112 aclocal $ACLOCAL_FLAGS || {
114 echo "aclocal failed - check that all needed development files are present on system"
119 echo "autoheader failed"
124 echo "autoconf failed"
127 automake --add-missing || {
129 echo "automake failed"
133 # now remove the cache, because it can be considered dangerous in this case
136 CONFIGURE_OPT='--enable-maintainer-mode --enable-plugin-builddir --enable-debug --enable-DEBUG'
139 echo "./configure default flags: $CONFIGURE_OPT"
140 echo "using: $CONFIGURE_OPT $@"
143 ./configure $CONFIGURE_OPT "$@" || {
145 echo "configure failed"
150 echo "Now type 'make' to compile $package."