]> Gitweb @ Texas Instruments - Open Source Git Repositories - git.TI.com/gitweb - glsdk/gst-plugins-ugly0-10.git/blob - autogen.sh
various additions
[glsdk/gst-plugins-ugly0-10.git] / autogen.sh
1 #!/bin/bash
2 # Run this to generate all the initial makefiles, etc.
4 DIE=0
5 package=gstreamer-plugins
6 srcfile=gst/law/alaw.c
8 # source helper functions
9 if test ! -e common/gst-autogen.sh;
10 then
11   echo There is something wrong with your source tree.
12   echo You are missing common/gst-autogen.sh
13   exit 1
14 fi
15 . common/gst-autogen.sh
17 autogen_options $@
19 echo -n "+ check for build tools"
20 if test ! -z $NOCHECK; then echo " skipped"; else  echo; fi
21 version_check "autoconf" "ftp://ftp.gnu.org/pub/gnu/autoconf/" 2 52 || DIE=1
22 version_check "automake" "ftp://ftp.gnu.org/pub/gnu/automake/" 1 5 || DIE=1
23 version_check "libtool" "ftp://ftp.gnu.org/pub/gnu/libtool/" 1 4 0 || DIE=1
24 version_check "pkg-config" "http://www.freedesktop.org/software/pkgconfig" 0 8 0 || DIE=1
26 autoconf_2.52d_check || DIE=1
28 CONFIGURE_OPT='--enable-maintainer-mode --enable-plugin-builddir --enable-debug --enable-DEBUG'
29 # if no arguments specified then this will be printed
31 if test -z "$*"; then
32         echo "+ Checking for autogen.sh options"
33         echo "  This autogen script will automatically run ./configure as:"
34         echo "  ./configure $CONFIGURE_DEF_OPT"
35         echo "  To pass any additional options, please specify them on the $0"
36         echo "  command line."
37 fi
39 toplevel_check $srcfile
41 tool_run "aclocal" "-I m4 -I common/m4 $ACLOCAL_FLAGS"
43 # FIXME : why does libtoolize keep complaining about aclocal ?
45 echo "+ not running libtoolize until libtool fix has flown downstream"
46 # tool_run "libtoolize" "--copy --force"
47 tool_run "autoheader"
49 # touch the stamp-h.in build stamp so we don't re-run autoheader in maintainer mode -- wingo
50 echo timestamp > stamp-h.in 2> /dev/null
52 tool_run "autoconf"
53 tool_run "automake" "-a -c"
55 # if enable exists, add an -enable option for each of the lines in that file
56 if test -f enable; then
57   for a in `cat enable`; do
58     CONFIGURE_OPT="$CONFIGURE_OPT --enable-$a"
59   done
60 fi
62 # if disable exists, add an -disable option for each of the lines in that file
63 if test -f disable; then
64   for a in `cat disable`; do
65     CONFIGURE_OPT="$CONFIGURE_OPT --disable-$a"
66   done
67 fi
69 # a quick cvs co if necessary to alleviate the pain - may remove this
70 # when developers get a clue ;)
71 if test ! -d common; then cvs co common; fi
73 test -n "$NOCONFIGURE" && {
74     echo "+ skipping configure stage for package $package, as requested."
75     echo "+ autogen.sh done."
76     exit 0
77 }
79 echo "+ running configure ... "
80 test ! -z "$CONFIGURE_DEF_OPT" && echo "  ./configure default flags: $CONFIGURE_DEF_OPT"
81 test ! -z "$CONFIGURE_EXT_OPT" && echo "  ./configure external flags: $CONFIGURE_EXT_OPT"
82 echo
84 ./configure $CONFIGURE_OPT $CONFIGURE_EXT_OPT || {
85         echo "  configure failed"
86         exit 1
87 }
89 echo "Now type 'make' to compile $package."