rtspconnection: GstRTSPWatch func for tunnel GET response
[platform/upstream/gstreamer.git] / autogen.sh
1 #!/bin/sh
2 #
3 # gst-plugins-base autogen.sh
4 #
5 # Run this to generate all the initial makefiles, etc.
6 #
7 # This file has been generated from common/autogen.sh.in via common/update-autogen
8
9
10 test -n "$srcdir" || srcdir=`dirname "$0"`
11 test -n "$srcdir" || srcdir=.
12
13 olddir=`pwd`
14 cd "$srcdir"
15
16 DIE=0
17 package=gst-plugins-base
18 srcfile=gst-plugins-base.doap
19
20 # Make sure we have common
21 if test ! -f common/gst-autogen.sh;
22 then
23   echo "+ Setting up common submodule"
24   git submodule init
25 fi
26 git submodule update
27
28 # source helper functions
29 if test ! -f common/gst-autogen.sh;
30 then
31   echo There is something wrong with your source tree.
32   echo You are missing common/gst-autogen.sh
33   exit 1
34 fi
35 . common/gst-autogen.sh
36
37 # install pre-commit hook for doing clean commits
38 if test ! \( -x .git/hooks/pre-commit -a -L .git/hooks/pre-commit \);
39 then
40     rm -f .git/hooks/pre-commit
41     ln -s ../../common/hooks/pre-commit.hook .git/hooks/pre-commit
42 fi
43
44 # GNU gettext automake support doesn't get along with git.
45 # https://bugzilla.gnome.org/show_bug.cgi?id=661128
46 if test -d po ; then
47   touch -t 200001010000 po/gst-plugins-base-1.0.pot
48 fi
49
50 CONFIGURE_DEF_OPT='--enable-maintainer-mode --enable-gtk-doc'
51
52 if test "x$package" = "xgstreamer"; then
53   CONFIGURE_DEF_OPT="$CONFIGURE_DEF_OPT --enable-docbook --enable-failing-tests --enable-poisoning"
54 fi
55
56 autogen_options $@
57
58 printf "+ check for build tools"
59 if test ! -z "$NOCHECK"; then echo ": skipped version checks"; else  echo; fi
60 version_check "autoconf" "$AUTOCONF autoconf autoconf270 autoconf269 autoconf268 " \
61               "ftp://ftp.gnu.org/pub/gnu/autoconf/" 2 68 || DIE=1
62 version_check "automake" "$AUTOMAKE automake automake-1.11" \
63               "ftp://ftp.gnu.org/pub/gnu/automake/" 1 11 || DIE=1
64 version_check "autopoint" "autopoint" \
65               "ftp://ftp.gnu.org/pub/gnu/gettext/" 0 17 || DIE=1
66 version_check "libtoolize" "$LIBTOOLIZE libtoolize glibtoolize" \
67               "ftp://ftp.gnu.org/pub/gnu/libtool/" 2 2 6 || DIE=1
68 version_check "pkg-config" "" \
69               "http://www.freedesktop.org/software/pkgconfig" 0 8 0 || DIE=1
70
71 die_check $DIE
72
73 aclocal_check || DIE=1
74 autoheader_check || DIE=1
75
76 die_check $DIE
77
78 # if no arguments specified then this will be printed
79 if test -z "$*" && test -z "$NOCONFIGURE"; then
80   echo "+ checking for autogen.sh options"
81   echo "  This autogen script will automatically run ./configure as:"
82   echo "  ./configure $CONFIGURE_DEF_OPT"
83   echo "  To pass any additional options, please specify them on the $0"
84   echo "  command line."
85 fi
86
87 toplevel_check $srcfile
88
89 # autopoint
90 if test -d po ; then
91   tool_run "$autopoint" "--force"
92 fi
93
94 # aclocal
95 if test -f acinclude.m4; then rm acinclude.m4; fi
96
97 tool_run "$libtoolize" "--copy --force"
98 tool_run "$aclocal" "-I m4 -I common/m4 $ACLOCAL_FLAGS"
99 tool_run "$autoheader"
100
101 # touch the stamp-h.in build stamp so we don't re-run autoheader in maintainer mode
102 echo timestamp > stamp-h.in 2> /dev/null
103
104 tool_run "$autoconf"
105 debug "automake: $automake"
106 tool_run "$automake" "--add-missing --copy"
107
108 test -n "$NOCONFIGURE" && {
109   echo "+ skipping configure stage for package $package, as requested."
110   echo "+ autogen.sh done."
111   exit 0
112 }
113
114 cd "$olddir"
115
116 echo "+ running configure ... "
117 test ! -z "$CONFIGURE_DEF_OPT" && echo "  default flags:  $CONFIGURE_DEF_OPT"
118 test ! -z "$CONFIGURE_EXT_OPT" && echo "  external flags: $CONFIGURE_EXT_OPT"
119 echo
120
121 echo "$srcdir/configure" $CONFIGURE_DEF_OPT $CONFIGURE_EXT_OPT
122 "$srcdir/configure" $CONFIGURE_DEF_OPT $CONFIGURE_EXT_OPT || {
123         echo "  configure failed"
124         exit 1
125 }
126
127 echo "Now type 'make' to compile $package."