2 # Run this to generate all the initial makefiles, etc.
8 # FFMPEG specific properties
11 # make sure we have common
12 if test ! -f common/gst-autogen.sh;
14 echo "+ Setting up common submodule"
19 if test -x $have_svn && [ $have_svn ];
23 if test ! -f $FFMPEG_CO_DIR/configure; then
26 if ! svn info gst-libs/ext/ffmpeg | grep "URL: $FFMPEG_SVN" > /dev/null; then
27 echo "FFmpeg checkout is on the wrong branch. Re-fetching."
32 if [ "$co_ffmpeg" = "yes" ]; then
33 # checkout ffmpeg from its repository
35 echo "+ getting ffmpeg from svn"
36 svn -r $FFMPEG_REVISION co $FFMPEG_SVN $FFMPEG_CO_DIR
38 # update ffmpeg from its repository
39 echo "+ updating ffmpeg checkout"
40 svn -r $FFMPEG_REVISION up $FFMPEG_CO_DIR
42 if [ "x$FFMPEG_EXTERNALS_REVISION" != "x" ]; then
43 echo "+ updating externals"
44 svn update -r $FFMPEG_EXTERNALS_REVISION $FFMPEG_CO_DIR/libswscale
47 echo "Subversion needed for ffmpeg checkout, please install and/or add to \$PATH"
51 # source helper functions
52 if test ! -f common/gst-autogen.sh;
54 echo There is something wrong with your source tree.
55 echo You are missing common/gst-autogen.sh
58 . common/gst-autogen.sh
60 # install pre-commit hook for doing clean commits
61 if test ! \( -x .git/hooks/pre-commit -a -L .git/hooks/pre-commit \);
63 rm -f .git/hooks/pre-commit
64 ln -s ../../common/hooks/pre-commit.hook .git/hooks/pre-commit
69 printf "+ check for build tools"
70 if test ! -z "$NOCHECK"; then echo " skipped"; else echo; fi
71 version_check "autoconf" "$AUTOCONF autoconf autoconf270 autoconf269 autoconf268 autoconf267 autoconf266 autoconf265 autoconf264 autoconf263 autoconf262 autoconf261 autoconf260" \
72 "ftp://ftp.gnu.org/pub/gnu/autoconf/" 2 60 || DIE=1
73 version_check "automake" "$AUTOMAKE automake automake-1.11 automake-1.10" \
74 "ftp://ftp.gnu.org/pub/gnu/automake/" 1 10 || DIE=1
75 version_check "libtoolize" "$LIBTOOLIZE libtoolize glibtoolize" \
76 "ftp://ftp.gnu.org/pub/gnu/libtool/" 1 5 0 || DIE=1
77 version_check "pkg-config" "" \
78 "http://www.freedesktop.org/software/pkgconfig" 0 8 0 || DIE=1
82 aclocal_check || DIE=1
83 autoheader_check || DIE=1
87 # if no arguments specified then this will be printed
89 echo "+ checking for autogen.sh options"
90 echo " This autogen script will automatically run ./configure as:"
91 echo " ./configure $CONFIGURE_DEF_OPT"
92 echo " To pass any additional options, please specify them on the $0"
96 toplevel_check $srcfile
98 tool_run "$libtoolize" "--copy --force"
99 tool_run "$aclocal" "-I m4 -I common/m4 $ACLOCAL_FLAGS"
100 tool_run "$autoheader"
102 # touch the stamp-h.in build stamp so we don't re-run autoheader in maintainer mode -- wingo
103 echo timestamp > stamp-h.in 2> /dev/null
106 tool_run "$automake" "-a -c -Wno-portability"
108 # if enable exists, add an -enable option for each of the lines in that file
109 if test -f enable; then
110 for a in `cat enable`; do
111 CONFIGURE_FILE_OPT="--enable-$a"
115 # if disable exists, add an -disable option for each of the lines in that file
116 if test -f disable; then
117 for a in `cat disable`; do
118 CONFIGURE_FILE_OPT="$CONFIGURE_FILE_OPT --disable-$a"
122 test -n "$NOCONFIGURE" && {
123 echo "+ skipping configure stage for package $package, as requested."
124 echo "+ autogen.sh done."
128 echo "+ running configure ... "
129 test ! -z "$CONFIGURE_DEF_OPT" && echo " ./configure default flags: $CONFIGURE_DEF_OPT"
130 test ! -z "$CONFIGURE_EXT_OPT" && echo " ./configure external flags: $CONFIGURE_EXT_OPT"
131 test ! -z "$CONFIGURE_FILE_OPT" && echo " ./configure enable/disable flags: $CONFIGURE_FILE_OPT"
134 ./configure $CONFIGURE_DEF_OPT $CONFIGURE_EXT_OPT $CONFIGURE_FILE_OPT || {
135 echo " configure failed"
140 echo "Now type 'make' to compile $package."