removed (generated from docs/*)
[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-python
6 srcfile=gstreamer/gstreamermodule.c
7                                                                                 
8 # a quick cvs co if necessary to alleviate the pain - may remove this
9 # when developers get a clue ;)
10 if test ! -d common;
11 then
12   echo "+ getting common/ from cvs"
13   cvs co common
14 fi
15                                                                                 
16 # source helper functions
17 if test ! -e 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
24 . common/gst-autogen.sh
25                                                                                 
26 CONFIGURE_DEF_OPT='--enable-maintainer-mode'
27
28 autogen_options $@
29                                                                                 
30 echo -n "+ check for build tools"
31 if test ! -z $NOCHECK; then echo " skipped"; else  echo; fi
32 version_check "autoconf" "$AUTOCONF autoconf autoconf-2.53 autoconf-2.52" \
33               "ftp://ftp.gnu.org/pub/gnu/autoconf/" 2 52 || DIE=1
34 version_check "automake" "$AUTOMAKE automake automake-1.6 automake-1.5" \
35               "ftp://ftp.gnu.org/pub/gnu/automake/" 1 5 || DIE=1
36 version_check "libtool" "" \
37               "ftp://ftp.gnu.org/pub/gnu/libtool/" 1 4 0 || DIE=1
38 version_check "pkg-config" "" \
39               "http://www.freedesktop.org/software/pkgconfig" 0 8 0 || DIE=1
40                                                                                 
41 die_check $DIE
42                                                                                 
43 autoconf_2_52d_check || DIE=1
44
45 aclocal_check || DIE=1
46 autoheader_check || DIE=1
47                                                                                 
48 die_check $DIE
49                                                                                 
50 # if no arguments specified then this will be printed
51 if test -z "$*"; then
52   echo "+ checking for autogen.sh options"
53   echo "  This autogen script will automatically run ./configure as:"
54   echo "  ./configure $CONFIGURE_DEF_OPT"
55   echo "  To pass any additional options, please specify them on the $0"
56   echo "  command line."
57 fi
58                                                                                 
59 toplevel_check $srcfile
60
61 if test -z "$ACLOCAL_FLAGS"; then
62         acdir=`$aclocal --print-ac-dir`
63         m4list="glib-2.0.m4 gtk-2.0.m4"
64
65         for file in $m4list
66         do
67                 if [ ! -f "$acdir/$file" ]; then
68                         echo "WARNING: aclocal's directory is $acdir, but..."
69                         echo "         no file $acdir/$file"
70                         echo "         You may see fatal macro warnings below."
71                         echo "         If these files are installed in /some/dir, set the ACLOCAL_FLAGS "
72                         echo "         environment variable to \"-I /some/dir\", or install"
73                         echo "         $acdir/$file."
74                         echo ""
75                 fi
76         done
77 fi
78
79 tool_run "$aclocal" "-I common/m4 $ACLOCAL_FLAGS"
80 tool_run "libtoolize" "--copy --force"
81 tool_run "$autoheader"
82                                                                                  # touch the stamp-h.in build stamp so we don't re-run autoheader in maintainer mode -- wingo
83 echo timestamp > stamp-h.in 2> /dev/null
84                                                                                 
85 tool_run "$autoconf"
86
87 case $CC in
88 *xlc | *xlc\ * | *lcc | *lcc\ *) am_opt=--include-deps;;
89 esac
90 tool_run "$automake" "-a -c $am_opt"
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 ./configure $CONFIGURE_DEF_OPT $CONFIGURE_EXT_OPT || {
104         echo "  configure failed"
105         exit 1
106 }
107                                                                                 
108 echo "Now type 'make' to compile $package."