2 # you can either set the environment variables AUTOCONF and AUTOMAKE
3 # to the right versions, or leave them unset and get the RedHat 7.3 defaults
6 package=gst-mfld-videosrc
8 # autogen.sh helper functions (copied from GStreamer's common/ CVS module)
9 if test ! -f ./gst-autogen.sh;
11 echo There is something wrong with your source tree.
12 echo You are either missing ./gst-autogen.sh or not
13 echo running autogen.sh from the top-level source
19 CONFIGURE_DEF_OPT='--enable-maintainer-mode --enable-debug'
23 echo -n "+ check for build tools"
24 if test ! -z "$NOCHECK"; then echo " skipped"; else echo; fi
25 version_check "autoconf" "$AUTOCONF autoconf autoconf259 autoconf257 autoconf-2.54 autoconf-2.53 autoconf-2.52" \
26 "ftp://ftp.gnu.org/pub/gnu/autoconf/" 2 52 || DIE=1
27 version_check "automake" "$AUTOMAKE automake automake-1.9 automake19 automake-1.7 automake-1.6 automake-1.5" \
28 "ftp://ftp.gnu.org/pub/gnu/automake/" 1 7 || DIE=1
29 ###version_check "autopoint" "autopoint" \
30 ### "ftp://ftp.gnu.org/pub/gnu/gettext/" 0 11 5 || DIE=1
31 version_check "libtoolize" "$LIBTOOLIZE libtoolize glibtoolize" \
32 "ftp://ftp.gnu.org/pub/gnu/libtool/" 1 5 0 || DIE=1
33 version_check "pkg-config" "" \
34 "http://www.freedesktop.org/software/pkgconfig" 0 8 0 || DIE=1
37 ###version_check "gtkdocize" "" "" 1 9 && have_gtkdoc_1_9=1
38 ###if test "x$have_gtkdoc_1_9" = "x0"; then
39 ###version_check "gtkdocize" "" \
40 ### "ftp://ftp.gnome.org/pub/gnome/sources/gtk-doc/" 1 4
45 autoconf_2_52d_check || DIE=1
46 aclocal_check || DIE=1
47 autoheader_check || DIE=1
51 # if no arguments specified then this will be printed
53 echo "+ checking for autogen.sh options"
54 echo " This autogen script will automatically run ./configure as:"
55 echo " ./configure $CONFIGURE_DEF_OPT"
56 echo " To pass any additional options, please specify them on the $0"
60 tool_run "$aclocal" "-I m4/ $ACLOCAL_FLAGS"
61 tool_run "$libtoolize" "--copy --force"
62 if test -n "$gtkdocize"; then
63 if test "x$have_gtkdoc_1_9" = "x0"; then
64 tool_run "$gtkdocize" "--copy"
66 tool_run "$gtkdocize" "--copy --flavour no-tmpl"
69 echo "EXTRA_DIST = " > gtk-doc.make
71 tool_run "$autoheader"
73 tool_run "$automake" "-a -c"
75 # if enable exists, add an -enable option for each of the lines in that file
76 if test -f enable; then
77 for a in `cat enable`; do
78 CONFIGURE_FILE_OPT="--enable-$a"
82 # if disable exists, add an -disable option for each of the lines in that file
83 if test -f disable; then
84 for a in `cat disable`; do
85 CONFIGURE_FILE_OPT="$CONFIGURE_FILE_OPT --disable-$a"
89 test -n "$NOCONFIGURE" && {
90 echo "+ skipping configure stage for package $package, as requested."
91 echo "+ autogen.sh done."
95 echo "+ running configure ... "
96 test ! -z "$CONFIGURE_DEF_OPT" && echo " ./configure default flags: $CONFIGURE_DEF_OPT"
97 test ! -z "$CONFIGURE_EXT_OPT" && echo " ./configure external flags: $CONFIGURE_EXT_OPT"
98 test ! -z "$CONFIGURE_FILE_OPT" && echo " ./configure enable/disable flags: $CONFIGURE_FILE_OPT"
101 ./configure $CONFIGURE_DEF_OPT $CONFIGURE_EXT_OPT $CONFIGURE_FILE_OPT || {
102 echo " configure failed"
106 echo "Now type 'make' to compile $package."