2 # Run this to generate all the initial makefiles, etc.
6 srcfile=gst/rtsp-server/rtsp-server.c
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 # install pre-commit hook for doing clean commits
26 if test ! \( -x .git/hooks/pre-commit -a -L .git/hooks/pre-commit \);
28 rm -f .git/hooks/pre-commit
29 ln -s ../../common/hooks/pre-commit.hook .git/hooks/pre-commit
32 CONFIGURE_DEF_OPT='--enable-maintainer-mode --enable-gtk-doc'
36 printf "+ check for build tools"
37 if test ! -z "$NOCHECK"; then echo ": skipped version checks"; else echo; fi
38 version_check "autoconf" "$AUTOCONF autoconf autoconf270 autoconf269 autoconf268 autoconf267 autoconf266 autoconf265 autoconf264 autoconf263 autoconf262 autoconf261 autoconf260" \
39 "ftp://ftp.gnu.org/pub/gnu/autoconf/" 2 60 || DIE=1
40 version_check "automake" "$AUTOMAKE automake automake-1.11 automake-1.10" \
41 "ftp://ftp.gnu.org/pub/gnu/automake/" 1 10 || DIE=1
42 version_check "autopoint" "autopoint" \
43 "ftp://ftp.gnu.org/pub/gnu/gettext/" 0 17 || DIE=1
44 version_check "libtoolize" "libtoolize libtoolize15 glibtoolize" \
45 "ftp://ftp.gnu.org/pub/gnu/libtool/" 1 5 0 || DIE=1
46 version_check "pkg-config" "" \
47 "http://www.freedesktop.org/software/pkgconfig" 0 8 0 || DIE=1
51 autoconf_2_52d_check || DIE=1
52 aclocal_check || DIE=1
53 autoheader_check || DIE=1
57 # if no arguments specified then this will be printed
59 echo "+ checking for autogen.sh options"
60 echo " This autogen script will automatically run ./configure as:"
61 echo " ./configure $CONFIGURE_DEF_OPT"
62 echo " To pass any additional options, please specify them on the $0"
66 toplevel_check $srcfile
69 # older autopoint (< 0.12) has a tendency to complain about mkinstalldirs
70 if test -x mkinstalldirs; then rm mkinstalldirs; fi
71 # first remove patch if necessary, then run autopoint, then reapply
72 if test -f po/Makefile.in.in;
74 patch -p0 -R --forward < common/gettext.patch
76 tool_run "$autopoint" "--force" "patch -p0 < common/gettext.patch"
77 patch -p0 < common/gettext.patch
80 # if test -f acinclude.m4; then rm acinclude.m4; fi
82 tool_run "$libtoolize" "--copy --force"
83 tool_run "$aclocal" "-I m4 -I common/m4 $ACLOCAL_FLAGS"
84 tool_run "$autoheader"
86 # touch the stamp-h.in build stamp so we don't re-run autoheader in maintainer mode
87 echo timestamp > stamp-h.in 2> /dev/null
90 debug "automake: $automake"
91 tool_run "$automake" "--add-missing --copy"
93 test -n "$NOCONFIGURE" && {
94 echo "skipping configure stage for package $package, as requested."
95 echo "autogen.sh done."
99 echo "+ running configure ... "
100 test ! -z "$CONFIGURE_DEF_OPT" && echo " ./configure default flags: $CONFIGURE_DEF_OPT"
101 test ! -z "$CONFIGURE_EXT_OPT" && echo " ./configure external flags: $CONFIGURE_EXT_OPT"
104 echo ./configure $CONFIGURE_DEF_OPT $CONFIGURE_EXT_OPT
105 ./configure $CONFIGURE_DEF_OPT $CONFIGURE_EXT_OPT || {
106 echo " configure failed"
110 echo "Now type 'make' to compile $package."