2 # Run this to generate all the initial makefiles, etc.
6 . build-aux/gst-autogen.sh
10 CONFIGURE_DEF_OPT='--enable-maintainer-mode'
14 echo -n "+ check for build tools"
15 if test ! -z "$NOCHECK"; then echo " skipped"; else echo; fi
16 version_check "autoconf" "$AUTOCONF autoconf autoconf-2.54 autoconf-2.53 autoconf-2.52" \
17 "ftp://ftp.gnu.org/pub/gnu/autoconf/" 2 52 || DIE=1
18 version_check "automake" "$AUTOMAKE automake automake-1.9 automake-1.7 automake-1.6 automake-1.5" \
19 "ftp://ftp.gnu.org/pub/gnu/automake/" 1 7 || DIE=1
20 version_check "libtoolize" "$LIBTOOLIZE libtoolize glibtoolize" \
21 "ftp://ftp.gnu.org/pub/gnu/libtool/" 1 5 0 || DIE=1
22 version_check "pkg-config" "" \
23 "http://www.freedesktop.org/software/pkgconfig" 0 8 0 || DIE=1
27 autoconf_2_52d_check || DIE=1
28 aclocal_check || DIE=1
29 autoheader_check || DIE=1
33 # if no arguments specified then this will be printed
35 echo "+ checking for autogen.sh options"
36 echo " This autogen script will automatically run ./configure as:"
37 echo " ./configure $CONFIGURE_DEF_OPT"
38 echo " To pass any additional options, please specify them on the $0"
42 toplevel_check $srcfile
44 tool_run "$aclocal" "-I m4 $ACLOCAL_FLAGS"
45 tool_run "$libtoolize" "--copy --force"
46 tool_run "$autoheader"
48 # touch the stamp-h.in build stamp so we don't re-run autoheader in maintainer mode -- wingo
49 echo timestamp > stamp-h.in 2> /dev/null
52 tool_run "$automake" "-a -c"
54 # if enable exists, add an -enable option for each of the lines in that file
55 if test -f enable; then
56 for a in `cat enable`; do
57 CONFIGURE_FILE_OPT="--enable-$a"
61 # if disable exists, add an -disable option for each of the lines in that file
62 if test -f disable; then
63 for a in `cat disable`; do
64 CONFIGURE_FILE_OPT="$CONFIGURE_FILE_OPT --disable-$a"
68 test -n "$NOCONFIGURE" && {
69 echo "+ skipping configure stage for package $package, as requested."
70 echo "+ autogen.sh done."
74 echo "+ running configure ... "
75 test ! -z "$CONFIGURE_DEF_OPT" && echo " ./configure default flags: $CONFIGURE_DEF_OPT"
76 test ! -z "$CONFIGURE_EXT_OPT" && echo " ./configure external flags: $CONFIGURE_EXT_OPT"
77 test ! -z "$CONFIGURE_FILE_OPT" && echo " ./configure enable/disable flags: $CONFIGURE_FILE_OPT"
80 ./configure $CONFIGURE_DEF_OPT $CONFIGURE_EXT_OPT $CONFIGURE_FILE_OPT || {
81 echo " configure failed"
85 echo "Now type 'make' to compile $package."