]> Gitweb @ Texas Instruments - Open Source Git Repositories - git.TI.com/gitweb - glsdk/gstreamer0-10.git/blob - autogen.sh
autogen.sh: Use printf instead of 'echo -n'. Check for automake-1.1[01]
[glsdk/gstreamer0-10.git] / autogen.sh
1 #!/bin/sh
2 # Run this to generate all the initial makefiles, etc.
4 DIE=0
5 package=gstreamer
6 srcfile=gst/gst.c
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
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
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
34 CONFIGURE_DEF_OPT='--enable-maintainer-mode --enable-failing-tests --enable-poisoning --enable-gtk-doc --enable-docbook'
36 autogen_options $@
38 printf "+ check for build tools"
39 if test ! -z "$NOCHECK"; then echo ": skipped version checks"; else  echo; fi
40 version_check "autoconf" "$AUTOCONF autoconf autoconf259 autoconf257 autoconf-2.54 autoconf-2.53 autoconf253 autoconf-2.52 autoconf252" \
41               "ftp://ftp.gnu.org/pub/gnu/autoconf/" 2 52 || DIE=1
42 version_check "automake" "$AUTOMAKE automake automake-1.11 automake-1.10 automake-1.9 automake19 automake-1.8 automake18 automake-1.7 automake17 automake-1.6 automake16" \
43               "ftp://ftp.gnu.org/pub/gnu/automake/" 1 7 || DIE=1
44 version_check "autopoint" "autopoint" \
45               "ftp://ftp.gnu.org/pub/gnu/gettext/" 0 17 || DIE=1
46 version_check "libtoolize" "libtoolize libtoolize15 glibtoolize" \
47               "ftp://ftp.gnu.org/pub/gnu/libtool/" 1 5 0 || DIE=1
48 version_check "pkg-config" "" \
49               "http://www.freedesktop.org/software/pkgconfig" 0 8 0 || DIE=1
51 die_check $DIE
53 autoconf_2_52d_check || DIE=1
54 aclocal_check || DIE=1
55 autoheader_check || DIE=1
57 die_check $DIE
59 # if no arguments specified then this will be printed
60 if test -z "$*"; then
61   echo "+ checking for autogen.sh options"
62   echo "  This autogen script will automatically run ./configure as:"
63   echo "  ./configure $CONFIGURE_DEF_OPT"
64   echo "  To pass any additional options, please specify them on the $0"
65   echo "  command line."
66 fi
68 toplevel_check $srcfile
70 # autopoint
71 #    older autopoint (< 0.12) has a tendency to complain about mkinstalldirs
72 if test -x mkinstalldirs; then rm mkinstalldirs; fi
73 #    first remove patch if necessary, then run autopoint, then reapply
74 if test -f po/Makefile.in.in;
75 then
76   patch -p0 -R --forward < common/gettext.patch
77 fi
78 tool_run "$autopoint" "--force" "patch -p0 < common/gettext.patch"
79 patch -p0 < common/gettext.patch
81 # aclocal
82 if test -f acinclude.m4; then rm acinclude.m4; fi
84 tool_run "$libtoolize" "--copy --force"
85 tool_run "$aclocal" "-I common/m4 $ACLOCAL_FLAGS"
86 tool_run "$autoheader"
88 # touch the stamp-h.in build stamp so we don't re-run autoheader in maintainer mode -- wingo
89 echo timestamp > stamp-h.in 2> /dev/null
91 tool_run "$autoconf"
92 debug "automake: $automake"
93 tool_run "$automake" "--add-missing --copy"
95 test -n "$NOCONFIGURE" && {
96   echo "skipping configure stage for package $package, as requested."
97   echo "autogen.sh done."
98   exit 0
99 }
101 echo "+ running configure ... "
102 test ! -z "$CONFIGURE_DEF_OPT" && echo "  ./configure default flags: $CONFIGURE_DEF_OPT"
103 test ! -z "$CONFIGURE_EXT_OPT" && echo "  ./configure external flags: $CONFIGURE_EXT_OPT"
104 echo
106 echo ./configure $CONFIGURE_DEF_OPT $CONFIGURE_EXT_OPT
107 ./configure $CONFIGURE_DEF_OPT $CONFIGURE_EXT_OPT || {
108         echo "  configure failed"
109         exit 1
112 echo "Now type 'make' to compile $package."