remove extra frame skipping
[adaptation/intel_mfld/gst-plugins-atomisp.git] / autogen.sh
1 #!/bin/sh
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
4
5 DIE=0
6 package=gst-mfld-videosrc
7
8 # autogen.sh helper functions (copied from GStreamer's common/ CVS module)
9 if test ! -f ./gst-autogen.sh;
10 then
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
14   echo directory.
15   exit 1
16 fi
17 . ./gst-autogen.sh
18
19 CONFIGURE_DEF_OPT='--enable-maintainer-mode --enable-debug'
20
21 autogen_options $@
22
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            
35               
36 have_gtkdoc_1_9=0
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
41 fi
42
43 die_check $DIE
44
45 autoconf_2_52d_check || DIE=1
46 aclocal_check || DIE=1
47 autoheader_check || DIE=1
48
49 die_check $DIE
50
51 # if no arguments specified then this will be printed
52 if test -z "$*"; then
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"
57   echo "  command line."
58 fi
59
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"
65   else
66     tool_run "$gtkdocize" "--copy --flavour no-tmpl"
67   fi
68 else
69   echo "EXTRA_DIST = " > gtk-doc.make
70 fi
71 tool_run "$autoheader"
72 tool_run "$autoconf"
73 tool_run "$automake" "-a -c"
74
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"
79   done
80 fi
81
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"
86   done
87 fi
88
89 test -n "$NOCONFIGURE" && {
90   echo "+ skipping configure stage for package $package, as requested."
91   echo "+ autogen.sh done."
92   exit 0
93 }
94
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"
99 echo
100
101 ./configure $CONFIGURE_DEF_OPT $CONFIGURE_EXT_OPT $CONFIGURE_FILE_OPT || {
102         echo "  configure failed"
103         exit 1
104 }
105
106 echo "Now type 'make' to compile $package."