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