add suffix 0.10 to package name, fix build failure.
[profile/ivi/gst-openmax0.10.git] / autogen.sh
1 #!/bin/sh
2 # Run this to generate all the initial makefiles, etc.
3
4 package=gst-openmax
5
6 . build-aux/gst-autogen.sh
7
8 touch ChangeLog
9
10 CONFIGURE_DEF_OPT='--enable-maintainer-mode'
11
12 autogen_options $@
13
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
24
25 die_check $DIE
26
27 autoconf_2_52d_check || DIE=1
28 aclocal_check || DIE=1
29 autoheader_check || DIE=1
30
31 die_check $DIE
32
33 # if no arguments specified then this will be printed
34 if test -z "$*"; then
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"
39   echo "  command line."
40 fi
41
42 toplevel_check $srcfile
43
44 tool_run "$aclocal" "-I m4 $ACLOCAL_FLAGS"
45 tool_run "$libtoolize" "--copy --force"
46 tool_run "$autoheader"
47
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
50
51 tool_run "$autoconf"
52 tool_run "$automake" "-a -c"
53
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"
58   done
59 fi
60
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"
65   done
66 fi
67
68 test -n "$NOCONFIGURE" && {
69   echo "+ skipping configure stage for package $package, as requested."
70   echo "+ autogen.sh done."
71   exit 0
72 }
73
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"
78 echo
79
80 ./configure $CONFIGURE_DEF_OPT $CONFIGURE_EXT_OPT $CONFIGURE_FILE_OPT || {
81   echo "  configure failed"
82   exit 1
83 }
84
85 echo "Now type 'make' to compile $package."