rtspserver: Add udp-mcast transport SETUP test
[platform/upstream/gstreamer.git] / autogen.sh
1 #!/bin/sh
2 #
3 # gst-rtsp-server 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 package=gst-rtsp-server
17 srcfile=gst-rtsp-server.doap
18
19 # Make sure we have common
20 if test ! -f common/gst-autogen.sh;
21 then
22   echo "+ Setting up common submodule"
23   git submodule init
24 fi
25 git submodule update
26
27 # source helper functions
28 if test ! -f common/gst-autogen.sh;
29 then
30   echo There is something wrong with your source tree.
31   echo You are missing common/gst-autogen.sh
32   exit 1
33 fi
34 . common/gst-autogen.sh
35
36 # install pre-commit hook for doing clean commits
37 if test ! \( -x .git/hooks/pre-commit -a -L .git/hooks/pre-commit \);
38 then
39     rm -f .git/hooks/pre-commit
40     ln -s ../../common/hooks/pre-commit.hook .git/hooks/pre-commit
41 fi
42
43 # GNU gettext automake support doesn't get along with git.
44 # https://bugzilla.gnome.org/show_bug.cgi?id=661128
45 if test -d po ; then
46   touch -t 200001010000 po/gst-rtsp-server-1.0.pot
47 fi
48
49 CONFIGURE_DEF_OPT='--enable-maintainer-mode --enable-gtk-doc'
50
51 if test "x$package" = "xgstreamer"; then
52   CONFIGURE_DEF_OPT="$CONFIGURE_DEF_OPT --enable-docbook --enable-failing-tests --enable-poisoning"
53 fi
54
55 autogen_options $@
56
57 printf "+ check for build tools"
58 if test -z "$NOCHECK"; then
59   echo
60
61   printf "  checking for autoreconf ... "
62   echo
63   which "autoreconf" 2>/dev/null || {
64     echo "not found! Please install the autoconf package."
65     exit 1
66   }
67
68   printf "  checking for pkg-config ... "
69   echo
70   which "pkg-config" 2>/dev/null || {
71     echo "not found! Please install pkg-config."
72     exit 1
73   }
74 else
75   echo ": skipped version checks"
76 fi
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 && grep ^AM_GNU_GETTEXT_VERSION configure.ac >/dev/null ; then
91   tool_run "autopoint" "--force"
92 fi
93
94 # aclocal
95 if test -f acinclude.m4; then rm acinclude.m4; fi
96
97 autoreconf --force --install || exit 1
98
99 test -n "$NOCONFIGURE" && {
100   echo "+ skipping configure stage for package $package, as requested."
101   echo "+ autogen.sh done."
102   exit 0
103 }
104
105 cd "$olddir"
106
107 echo "+ running configure ... "
108 test ! -z "$CONFIGURE_DEF_OPT" && echo "  default flags:  $CONFIGURE_DEF_OPT"
109 test ! -z "$CONFIGURE_EXT_OPT" && echo "  external flags: $CONFIGURE_EXT_OPT"
110 echo
111
112 echo "$srcdir/configure" $CONFIGURE_DEF_OPT $CONFIGURE_EXT_OPT
113 "$srcdir/configure" $CONFIGURE_DEF_OPT $CONFIGURE_EXT_OPT || {
114         echo "  configure failed"
115         exit 1
116 }
117
118 echo "Now type 'make' to compile $package."