1 test -n "$srcdir" || srcdir=`dirname "$0"`
2 test -n "$srcdir" || srcdir=.
11 # Make sure we have common
12 if test ! -f common/gst-autogen.sh;
14 echo "+ Setting up common submodule"
19 # source helper functions
20 if test ! -f common/gst-autogen.sh;
22 echo There is something wrong with your source tree.
23 echo You are missing common/gst-autogen.sh
26 . common/gst-autogen.sh
28 # install pre-commit hook for doing clean commits
29 if test ! \( -x .git/hooks/pre-commit -a -L .git/hooks/pre-commit \);
31 rm -f .git/hooks/pre-commit
32 ln -s ../../common/hooks/pre-commit.hook .git/hooks/pre-commit
35 # GNU gettext automake support doesn't get along with git.
36 # https://bugzilla.gnome.org/show_bug.cgi?id=661128
38 touch -t 200001010000 po/@PACKAGE@-@API_VERSION@.pot
41 CONFIGURE_DEF_OPT='--enable-maintainer-mode --enable-gtk-doc'
43 if test "x$package" = "xgstreamer"; then
44 CONFIGURE_DEF_OPT="$CONFIGURE_DEF_OPT --enable-docbook --enable-failing-tests --enable-poisoning"
49 printf "+ check for build tools"
50 if test ! -z "$NOCHECK"; then echo ": skipped version checks"; else echo; fi
51 version_check "autoconf" "$AUTOCONF autoconf autoconf270 autoconf269 autoconf268 " \
52 "ftp://ftp.gnu.org/pub/gnu/autoconf/" 2 68 || DIE=1
53 version_check "automake" "$AUTOMAKE automake automake-1.11" \
54 "ftp://ftp.gnu.org/pub/gnu/automake/" 1 11 || DIE=1
55 version_check "autopoint" "autopoint" \
56 "ftp://ftp.gnu.org/pub/gnu/gettext/" 0 17 || DIE=1
57 version_check "libtoolize" "$LIBTOOLIZE libtoolize glibtoolize" \
58 "ftp://ftp.gnu.org/pub/gnu/libtool/" 2 2 6 || DIE=1
59 version_check "pkg-config" "" \
60 "http://www.freedesktop.org/software/pkgconfig" 0 8 0 || DIE=1
64 aclocal_check || DIE=1
65 autoheader_check || DIE=1
69 # if no arguments specified then this will be printed
70 if test -z "$*" && test -z "$NOCONFIGURE"; then
71 echo "+ checking for autogen.sh options"
72 echo " This autogen script will automatically run ./configure as:"
73 echo " ./configure $CONFIGURE_DEF_OPT"
74 echo " To pass any additional options, please specify them on the $0"
78 toplevel_check $srcfile
81 # first remove patch if necessary, then run autopoint, then reapply
82 if test -f po/Makefile.in.in;
84 patch -p0 -R --forward < common/gettext.patch
86 tool_run "$autopoint" "--force" "patch -p0 < common/gettext.patch"
87 patch -p0 < common/gettext.patch
90 if test -f acinclude.m4; then rm acinclude.m4; fi
92 tool_run "$libtoolize" "--copy --force"
93 tool_run "$aclocal" "-I m4 -I common/m4 $ACLOCAL_FLAGS"
94 tool_run "$autoheader"
96 # touch the stamp-h.in build stamp so we don't re-run autoheader in maintainer mode
97 echo timestamp > stamp-h.in 2> /dev/null
100 debug "automake: $automake"
101 tool_run "$automake" "--add-missing --copy"
103 test -n "$NOCONFIGURE" && {
104 echo "+ skipping configure stage for package $package, as requested."
105 echo "+ autogen.sh done."
111 echo "+ running configure ... "
112 test ! -z "$CONFIGURE_DEF_OPT" && echo " default flags: $CONFIGURE_DEF_OPT"
113 test ! -z "$CONFIGURE_EXT_OPT" && echo " external flags: $CONFIGURE_EXT_OPT"
116 echo "$srcdir/configure" $CONFIGURE_DEF_OPT $CONFIGURE_EXT_OPT
117 "$srcdir/configure" $CONFIGURE_DEF_OPT $CONFIGURE_EXT_OPT || {
118 echo " configure failed"
122 echo "Now type 'make' to compile $package."