2 # Run this to generate all the initial makefiles, etc.
8 # Make sure we have common
9 if test ! -f common/gst-autogen.sh;
11 echo "+ Setting up common submodule"
16 # source helper functions
17 if test ! -f common/gst-autogen.sh;
19 echo There is something wrong with your source tree.
20 echo You are missing common/gst-autogen.sh
23 . common/gst-autogen.sh
25 CONFIGURE_DEF_OPT='--enable-maintainer-mode --enable-failing-tests --enable-poisoning --enable-gtk-doc --enable-docbook'
29 echo -n "+ check for build tools"
30 if test ! -z "$NOCHECK"; then echo ": skipped version checks"; else echo; fi
31 version_check "autoconf" "$AUTOCONF autoconf autoconf259 autoconf257 autoconf-2.54 autoconf-2.53 autoconf253 autoconf-2.52 autoconf252" \
32 "ftp://ftp.gnu.org/pub/gnu/autoconf/" 2 52 || DIE=1
33 version_check "automake" "$AUTOMAKE automake automake-1.9 automake19 automake-1.8 automake18 automake-1.7 automake17 automake-1.6 automake16" \
34 "ftp://ftp.gnu.org/pub/gnu/automake/" 1 7 || DIE=1
35 version_check "autopoint" "autopoint" \
36 "ftp://ftp.gnu.org/pub/gnu/gettext/" 0 17 || DIE=1
37 version_check "libtoolize" "libtoolize libtoolize15 glibtoolize" \
38 "ftp://ftp.gnu.org/pub/gnu/libtool/" 1 5 0 || DIE=1
39 version_check "pkg-config" "" \
40 "http://www.freedesktop.org/software/pkgconfig" 0 8 0 || DIE=1
44 autoconf_2_52d_check || DIE=1
45 aclocal_check || DIE=1
46 autoheader_check || DIE=1
50 # if no arguments specified then this will be printed
52 echo "+ checking for autogen.sh options"
53 echo " This autogen script will automatically run ./configure as:"
54 echo " ./configure $CONFIGURE_DEF_OPT"
55 echo " To pass any additional options, please specify them on the $0"
59 toplevel_check $srcfile
62 # older autopoint (< 0.12) has a tendency to complain about mkinstalldirs
63 if test -x mkinstalldirs; then rm mkinstalldirs; fi
64 # first remove patch if necessary, then run autopoint, then reapply
65 if test -f po/Makefile.in.in;
67 patch -p0 -R --forward < common/gettext.patch
69 tool_run "$autopoint" "--force" "patch -p0 < common/gettext.patch"
70 patch -p0 < common/gettext.patch
73 if test -f acinclude.m4; then rm acinclude.m4; fi
74 tool_run "$aclocal" "-I common/m4 $ACLOCAL_FLAGS"
76 tool_run "$libtoolize" "--copy --force"
77 tool_run "$autoheader"
79 # touch the stamp-h.in build stamp so we don't re-run autoheader in maintainer mode -- wingo
80 echo timestamp > stamp-h.in 2> /dev/null
83 debug "automake: $automake"
84 tool_run "$automake" "--add-missing --copy -Wno-portability"
86 test -n "$NOCONFIGURE" && {
87 echo "skipping configure stage for package $package, as requested."
88 echo "autogen.sh done."
92 echo "+ running configure ... "
93 test ! -z "$CONFIGURE_DEF_OPT" && echo " ./configure default flags: $CONFIGURE_DEF_OPT"
94 test ! -z "$CONFIGURE_EXT_OPT" && echo " ./configure external flags: $CONFIGURE_EXT_OPT"
97 echo ./configure $CONFIGURE_DEF_OPT $CONFIGURE_EXT_OPT
98 ./configure $CONFIGURE_DEF_OPT $CONFIGURE_EXT_OPT || {
99 echo " configure failed"
103 echo "Now type 'make' to compile $package."