2 # Run this to generate all the initial makefiles, etc.
8 # a quick cvs co to ease the transition
9 if test ! -d common; then
10 if test -f CVS/Tag; then
11 # get everything from CVS/Tag from second character on
12 TAG="-r `tail -c +2 CVS/Tag`"
14 echo "+ getting common from cvs"; cvs co $TAG common
17 # source helper functions
18 if test ! -f common/gst-autogen.sh;
20 echo There is something wrong with your source tree.
21 echo You are missing common/gst-autogen.sh
24 . common/gst-autogen.sh
26 CONFIGURE_DEF_OPT='--enable-maintainer-mode --enable-plugin-builddir --enable-failing-tests --enable-poisoning'
30 echo -n "+ check for build tools"
31 if test ! -z "$NOCHECK"; then echo ": skipped version checks"; else echo; fi
32 version_check "autoconf" "$AUTOCONF autoconf autoconf-2.54 autoconf-2.53 autoconf-2.52" \
33 "ftp://ftp.gnu.org/pub/gnu/autoconf/" 2 52 || DIE=1
34 version_check "automake" "$AUTOMAKE automake automake-1.7 automake17 automake-1.6" \
35 "ftp://ftp.gnu.org/pub/gnu/automake/" 1 6 || DIE=1
36 version_check "autopoint" "autopoint" \
37 "ftp://ftp.gnu.org/pub/gnu/gettext/" 0 11 5 || DIE=1
38 version_check "libtoolize" "libtoolize" \
39 "ftp://ftp.gnu.org/pub/gnu/libtool/" 1 5 0 || DIE=1
40 version_check "pkg-config" "" \
41 "http://www.freedesktop.org/software/pkgconfig" 0 8 0 || DIE=1
45 autoconf_2_52d_check || DIE=1
46 aclocal_check || DIE=1
47 autoheader_check || DIE=1
51 # if no arguments specified then this will be printed
53 echo "+ checking for autogen.sh options"
54 echo " This autogen script will automatically run ./configure as:"
55 echo " ./configure $CONFIGURE_DEF_OPT"
56 echo " To pass any additional options, please specify them on the $0"
60 toplevel_check $srcfile
63 # older autopoint (< 0.12) has a tendency to complain about mkinstalldirs
64 if test -x mkinstalldirs; then rm mkinstalldirs; fi
65 # first remove patch if necessary, then run autopoint, then reapply
66 if test -f po/Makefile.in.in;
68 patch -p0 -R < common/gettext.patch
70 tool_run "$autopoint --force"
71 patch -p0 < common/gettext.patch
74 if test -f acinclude.m4; then rm acinclude.m4; fi
75 tool_run "$aclocal" "-I common/m4 $ACLOCAL_FLAGS"
77 tool_run "$libtoolize" "--copy --force"
78 tool_run "$autoheader"
80 # touch the stamp-h.in build stamp so we don't re-run autoheader in maintainer mode -- wingo
81 echo timestamp > stamp-h.in 2> /dev/null
84 debug "automake: $automake"
85 tool_run "$automake" "--add-missing --copy"
87 test -n "$NOCONFIGURE" && {
88 echo "skipping configure stage for package $package, as requested."
89 echo "autogen.sh done."
93 echo "+ running configure ... "
94 test ! -z "$CONFIGURE_DEF_OPT" && echo " ./configure default flags: $CONFIGURE_DEF_OPT"
95 test ! -z "$CONFIGURE_EXT_OPT" && echo " ./configure external flags: $CONFIGURE_EXT_OPT"
98 echo ./configure $CONFIGURE_DEF_OPT $CONFIGURE_EXT_OPT
99 ./configure $CONFIGURE_DEF_OPT $CONFIGURE_EXT_OPT || {
100 echo " configure failed"
104 echo "Now type 'make' to compile $package."