2 # Run this to generate all the initial makefiles, etc.
5 test -n "$srcdir" || srcdir=`dirname "$0"`
6 test -n "$srcdir" || srcdir=.
13 srcfile=gst/rtsp-server/rtsp-server.c
15 # Make sure we have common
16 if test ! -f common/gst-autogen.sh;
18 echo "+ Setting up common submodule"
23 # source helper functions
24 if test ! -f common/gst-autogen.sh;
26 echo There is something wrong with your source tree.
27 echo You are missing common/gst-autogen.sh
30 . common/gst-autogen.sh
32 # install pre-commit hook for doing clean commits
33 if test ! \( -x .git/hooks/pre-commit -a -L .git/hooks/pre-commit \);
35 rm -f .git/hooks/pre-commit
36 ln -s ../../common/hooks/pre-commit.hook .git/hooks/pre-commit
39 CONFIGURE_DEF_OPT='--enable-maintainer-mode --enable-gtk-doc'
43 printf "+ check for build tools"
44 if test ! -z "$NOCHECK"; then echo ": skipped version checks"; else echo; fi
45 version_check "autoconf" "$AUTOCONF autoconf autoconf270 autoconf269 autoconf268 " \
46 "ftp://ftp.gnu.org/pub/gnu/autoconf/" 2 68 || DIE=1
47 version_check "automake" "$AUTOMAKE automake automake-1.11" \
48 "ftp://ftp.gnu.org/pub/gnu/automake/" 1 11 || DIE=1
49 version_check "autopoint" "autopoint" \
50 "ftp://ftp.gnu.org/pub/gnu/gettext/" 0 17 || DIE=1
51 version_check "libtoolize" "$LIBTOOLIZE libtoolize glibtoolize" \
52 "ftp://ftp.gnu.org/pub/gnu/libtool/" 2 2 6 || DIE=1
53 version_check "pkg-config" "" \
54 "http://www.freedesktop.org/software/pkgconfig" 0 8 0 || DIE=1
58 aclocal_check || DIE=1
59 autoheader_check || DIE=1
63 # if no arguments specified then this will be printed
64 if test -z "$*" && test -z "$NOCONFIGURE"; then
65 echo "+ checking for autogen.sh options"
66 echo " This autogen script will automatically run ./configure as:"
67 echo " ./configure $CONFIGURE_DEF_OPT"
68 echo " To pass any additional options, please specify them on the $0"
72 toplevel_check $srcfile
76 # tool_run "$autopoint" "--force"
80 # if test -f acinclude.m4; then rm acinclude.m4; fi
82 tool_run "$libtoolize" "--copy --force"
83 tool_run "$aclocal" "-I m4 -I common/m4 $ACLOCAL_FLAGS"
84 tool_run "$autoheader"
86 # touch the stamp-h.in build stamp so we don't re-run autoheader in maintainer mode
87 echo timestamp > stamp-h.in 2> /dev/null
90 debug "automake: $automake"
91 tool_run "$automake" "--add-missing --copy"
93 test -n "$NOCONFIGURE" && {
94 echo "+ skipping configure stage for package $package, as requested."
95 echo "+ autogen.sh done."
101 echo "+ running configure ... "
102 test ! -z "$CONFIGURE_DEF_OPT" && echo " default flags: $CONFIGURE_DEF_OPT"
103 test ! -z "$CONFIGURE_EXT_OPT" && echo " external flags: $CONFIGURE_EXT_OPT"
106 echo "$srcdir/configure" $CONFIGURE_DEF_OPT $CONFIGURE_EXT_OPT
107 "$srcdir/configure" $CONFIGURE_DEF_OPT $CONFIGURE_EXT_OPT || {
108 echo " configure failed"
112 echo "Now type 'make' to compile $package."