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 # 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
33 CONFIGURE_DEF_OPT='--enable-maintainer-mode --enable-gtk-doc'
37 printf "+ check for build tools"
38 if test ! -z "$NOCHECK"; then echo " skipped"; else echo; fi
39 version_check "autoconf" "$AUTOCONF autoconf autoconf270 autoconf269 autoconf268 autoconf267 autoconf266 autoconf265 autoconf264 autoconf263 autoconf262 autoconf261 autoconf260" \
40 "ftp://ftp.gnu.org/pub/gnu/autoconf/" 2 60 || DIE=1
41 version_check "automake" "$AUTOMAKE automake automake-1.11 automake-1.10" \
42 "ftp://ftp.gnu.org/pub/gnu/automake/" 1 10 || DIE=1
43 version_check "libtoolize" "$LIBTOOLIZE libtoolize glibtoolize" \
44 "ftp://ftp.gnu.org/pub/gnu/libtool/" 1 5 0 || DIE=1
45 version_check "pkg-config" "" \
46 "http://www.freedesktop.org/software/pkgconfig" 0 8 0 || DIE=1
50 aclocal_check || DIE=1
51 autoheader_check || DIE=1
55 # if no arguments specified then this will be printed
57 echo "+ checking for autogen.sh options"
58 echo " This autogen script will automatically run ./configure as:"
59 echo " ./configure $CONFIGURE_DEF_OPT"
60 echo " To pass any additional options, please specify them on the $0"
64 toplevel_check $srcfile
66 tool_run "$libtoolize" "--copy --force"
67 tool_run "$aclocal" "-I m4 -I common/m4 $ACLOCAL_FLAGS"
68 tool_run "$autoheader"
70 # touch the stamp-h.in build stamp so we don't re-run autoheader in maintainer mode
71 echo timestamp > stamp-h.in 2> /dev/null
74 tool_run "$automake" "-a -c"
76 # if enable exists, add an -enable option for each of the lines in that file
77 if test -f enable; then
78 for a in `cat enable`; do
79 CONFIGURE_FILE_OPT="--enable-$a"
83 # if disable exists, add an -disable option for each of the lines in that file
84 if test -f disable; then
85 for a in `cat disable`; do
86 CONFIGURE_FILE_OPT="$CONFIGURE_FILE_OPT --disable-$a"
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"
99 test ! -z "$CONFIGURE_FILE_OPT" && echo " ./configure enable/disable flags: $CONFIGURE_FILE_OPT"
102 ./configure $CONFIGURE_DEF_OPT $CONFIGURE_EXT_OPT $CONFIGURE_FILE_OPT || {
103 echo " configure failed"
107 echo "Now type 'make' to compile $package."