rtsp-client: don't use g_object_unref on GstRTSPSessionMedia
[platform/upstream/gstreamer.git] / autogen.sh
1 #!/bin/sh
2 # Run this to generate all the initial makefiles, etc.
3
4 DIE=0
5 package=gst-rtsp
6 srcfile=gst/rtsp-server/rtsp-server.c
7
8 # Make sure we have common
9 if test ! -f common/gst-autogen.sh;
10 then
11   echo "+ Setting up common submodule"
12   git submodule init
13 fi
14 git submodule update
15
16 # source helper functions
17 if test ! -f common/gst-autogen.sh;
18 then
19   echo There is something wrong with your source tree.
20   echo You are missing common/gst-autogen.sh
21   exit 1
22 fi
23 . common/gst-autogen.sh
24
25 # install pre-commit hook for doing clean commits
26 if test ! \( -x .git/hooks/pre-commit -a -L .git/hooks/pre-commit \);
27 then
28     rm -f .git/hooks/pre-commit
29     ln -s ../../common/hooks/pre-commit.hook .git/hooks/pre-commit
30 fi
31
32 CONFIGURE_DEF_OPT='--enable-maintainer-mode --enable-gtk-doc'
33
34 autogen_options $@
35
36 printf "+ check for build tools"
37 if test ! -z "$NOCHECK"; then echo ": skipped version checks"; else  echo; fi
38 version_check "autoconf" "$AUTOCONF autoconf autoconf270 autoconf269 autoconf268 autoconf267 autoconf266 autoconf265 autoconf264 autoconf263 autoconf262" \
39               "ftp://ftp.gnu.org/pub/gnu/autoconf/" 2 62 || DIE=1
40 version_check "automake" "$AUTOMAKE automake automake-1.11" \
41               "ftp://ftp.gnu.org/pub/gnu/automake/" 1 11 || DIE=1
42 version_check "autopoint" "autopoint" \
43               "ftp://ftp.gnu.org/pub/gnu/gettext/" 0 17 || DIE=1
44 version_check "libtoolize" "libtoolize glibtoolize" \
45               "ftp://ftp.gnu.org/pub/gnu/libtool/" 2 2 6 || DIE=1
46 version_check "pkg-config" "" \
47               "http://www.freedesktop.org/software/pkgconfig" 0 8 0 || DIE=1
48
49 die_check $DIE
50
51 aclocal_check || DIE=1
52 autoheader_check || DIE=1
53
54 die_check $DIE
55
56 # if no arguments specified then this will be printed
57 if test -z "$*"; then
58   echo "+ checking for autogen.sh options"
59   echo "  This autogen script will automatically run ./configure as:"
60   echo "  ./configure $CONFIGURE_DEF_OPT"
61   echo "  To pass any additional options, please specify them on the $0"
62   echo "  command line."
63 fi
64
65 toplevel_check $srcfile
66
67 # autopoint
68 #    older autopoint (< 0.12) has a tendency to complain about mkinstalldirs
69 if test -x mkinstalldirs; then rm mkinstalldirs; fi
70 #    first remove patch if necessary, then run autopoint, then reapply
71 if test -f po/Makefile.in.in;
72 then
73   patch -p0 -R --forward < common/gettext.patch
74 fi
75 tool_run "$autopoint" "--force" "patch -p0 < common/gettext.patch"
76 patch -p0 < common/gettext.patch
77
78 # aclocal
79 # if test -f acinclude.m4; then rm acinclude.m4; fi
80
81 tool_run "$libtoolize" "--copy --force"
82 tool_run "$aclocal" "-I m4 -I common/m4 $ACLOCAL_FLAGS"
83 tool_run "$autoheader"
84
85 # touch the stamp-h.in build stamp so we don't re-run autoheader in maintainer mode
86 echo timestamp > stamp-h.in 2> /dev/null
87
88 tool_run "$autoconf"
89 debug "automake: $automake"
90 tool_run "$automake" "--add-missing --copy"
91
92 test -n "$NOCONFIGURE" && {
93   echo "skipping configure stage for package $package, as requested."
94   echo "autogen.sh done."
95   exit 0
96 }
97
98 echo "+ running configure ... "
99 test ! -z "$CONFIGURE_DEF_OPT" && echo "  ./configure default flags: $CONFIGURE_DEF_OPT"
100 test ! -z "$CONFIGURE_EXT_OPT" && echo "  ./configure external flags: $CONFIGURE_EXT_OPT"
101 echo
102
103 echo ./configure $CONFIGURE_DEF_OPT $CONFIGURE_EXT_OPT
104 ./configure $CONFIGURE_DEF_OPT $CONFIGURE_EXT_OPT || {
105         echo "  configure failed"
106         exit 1
107 }
108
109 echo "Now type 'make' to compile $package."
110