Remove lines that pull libs/ext/cothreads from CVS
[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=gstreamer
6 srcfile=gst/gst.c
7
8 # a quick cvs co to ease the transition
9 if test ! -d common; then
10   echo "+ getting common from cvs"; cvs co common
11 fi
12
13 # source helper functions
14 if test ! -f common/gst-autogen.sh;
15 then
16   echo There is something wrong with your source tree.
17   echo You are missing common/gst-autogen.sh
18   exit 1
19 fi
20 . common/gst-autogen.sh
21
22 CONFIGURE_DEF_OPT='--enable-maintainer-mode --enable-plugin-builddir --enable-failing-tests'
23
24 autogen_options $@
25
26 echo -n "+ check for build tools"
27 if test ! -z "$NOCHECK"; then echo ": skipped version checks"; else  echo; fi
28 version_check "autoconf" "$AUTOCONF autoconf autoconf-2.54 autoconf-2.53 autoconf-2.52" \
29               "ftp://ftp.gnu.org/pub/gnu/autoconf/" 2 52 || DIE=1
30 version_check "automake" "$AUTOMAKE automake automake-1.7 automake-1.6 automake-1.5" \
31               "ftp://ftp.gnu.org/pub/gnu/automake/" 1 5 || DIE=1
32 version_check "libtool" "" \
33               "ftp://ftp.gnu.org/pub/gnu/libtool/" 1 4 0 || DIE=1
34 version_check "pkg-config" "" \
35               "http://www.freedesktop.org/software/pkgconfig" 0 8 0 || DIE=1
36
37 die_check $DIE
38
39 autoconf_2_52d_check || DIE=1
40 aclocal_check || DIE=1
41 autoheader_check || DIE=1
42
43 die_check $DIE
44
45 # if no arguments specified then this will be printed
46 if test -z "$*"; then
47   echo "+ checking for autogen.sh options"
48   echo "  This autogen script will automatically run ./configure as:"
49   echo "  ./configure $CONFIGURE_DEF_OPT"
50   echo "  To pass any additional options, please specify them on the $0"
51   echo "  command line."
52 fi
53
54 toplevel_check $srcfile
55
56 if test -f acinclude.m4; then rm acinclude.m4; fi
57 tool_run "$aclocal" "-I common/m4 $ACLOCAL_FLAGS"
58
59 tool_run "libtoolize" "--copy --force"
60 tool_run "$autoheader"
61
62 # touch the stamp-h.in build stamp so we don't re-run autoheader in maintainer mode -- wingo
63 echo timestamp > stamp-h.in 2> /dev/null
64
65 tool_run "$autoconf"
66 debug "automake: $automake"
67 tool_run "$automake" "-a -c"
68
69 echo
70 echo "+ running autogen.sh --noconfigure $@ in libs/ext/cothreads..."
71 OLDDIR=`pwd` 
72 cd libs/ext/cothreads
73 echo
74 ./autogen.sh --noconfigure $@ || {
75         echo "autogen in cothreads failed."
76         exit 1
77 }
78 cd "$OLDDIR"
79 echo
80
81 test -n "$NOCONFIGURE" && {
82   echo "skipping configure stage for package $package, as requested."
83   echo "autogen.sh done."
84   exit 0
85 }
86
87 echo "+ running configure ... "
88 test ! -z "$CONFIGURE_DEF_OPT" && echo "  ./configure default flags: $CONFIGURE_DEF_OPT"
89 test ! -z "$CONFIGURE_EXT_OPT" && echo "  ./configure external flags: $CONFIGURE_EXT_OPT"
90 echo
91
92 ./configure $CONFIGURE_DEF_OPT $CONFIGURE_EXT_OPT || {
93         echo "  configure failed"
94         exit 1
95 }
96
97 echo "Now type 'make' to compile $package."
98