]> Gitweb @ Texas Instruments - Open Source Git Repositories - git.TI.com/gitweb - glsdk/gstreamer0-10.git/blob - autogen.sh
autogen.sh: replace test -e with test -x for mkinstalldirs to be more portable.
[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 # a quick cvs co to ease the transition
9 if test ! -d common; then
10   if test -f CVS/Tag; then
11     # get everything from CVS/Tag from second character on
12     TAG="-r `tail -c +2 CVS/Tag`"
13   fi
14   echo "+ getting common from cvs"; cvs co $TAG common
15 fi
17 # source helper functions
18 if test ! -f common/gst-autogen.sh;
19 then
20   echo There is something wrong with your source tree.
21   echo You are missing common/gst-autogen.sh
22   exit 1
23 fi
24 . common/gst-autogen.sh
26 CONFIGURE_DEF_OPT='--enable-maintainer-mode --enable-plugin-builddir --enable-failing-tests --enable-poisoning'
28 autogen_options $@
30 echo -n "+ check for build tools"
31 if test ! -z "$NOCHECK"; then echo ": skipped version checks"; else  echo; fi
32 version_check "autoconf" "$AUTOCONF autoconf autoconf-2.54 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.7 automake17 automake-1.6" \
35               "ftp://ftp.gnu.org/pub/gnu/automake/" 1 6 || DIE=1
36 version_check "autopoint" "autopoint" \
37               "ftp://ftp.gnu.org/pub/gnu/gettext/" 0 11 5 || DIE=1
38 version_check "libtoolize" "libtoolize libtoolize14" \
39               "ftp://ftp.gnu.org/pub/gnu/libtool/" 1 4 0 || DIE=1
40 version_check "pkg-config" "" \
41               "http://www.freedesktop.org/software/pkgconfig" 0 8 0 || DIE=1
43 die_check $DIE
45 autoconf_2_52d_check || DIE=1
46 aclocal_check || DIE=1
47 autoheader_check || DIE=1
49 die_check $DIE
51 # if no arguments specified then this will be printed
52 if test -z "$*"; then
53   echo "+ checking for autogen.sh options"
54   echo "  This autogen script will automatically run ./configure as:"
55   echo "  ./configure $CONFIGURE_DEF_OPT"
56   echo "  To pass any additional options, please specify them on the $0"
57   echo "  command line."
58 fi
60 toplevel_check $srcfile
62 # autopoint
63 #    older autopoint (< 0.12) has a tendency to complain about mkinstalldirs
64 if test -x mkinstalldirs; then rm mkinstalldirs; fi
65 #    first remove patch if necessary, then run autopoint, then reapply
66 if test -f po/Makefile.in.in;
67 then
68   patch -p0 -R < common/gettext.patch
69 fi
70 tool_run "$autopoint --force"
71 patch -p0 < common/gettext.patch
73 # aclocal
74 if test -f acinclude.m4; then rm acinclude.m4; fi
75 tool_run "$aclocal" "-I common/m4 $ACLOCAL_FLAGS"
77 tool_run "$libtoolize" "--copy --force"
78 tool_run "$autoheader"
80 # touch the stamp-h.in build stamp so we don't re-run autoheader in maintainer mode -- wingo
81 echo timestamp > stamp-h.in 2> /dev/null
83 tool_run "$autoconf"
84 debug "automake: $automake"
85 tool_run "$automake" "--add-missing --copy"
87 test -n "$NOCONFIGURE" && {
88   echo "skipping configure stage for package $package, as requested."
89   echo "autogen.sh done."
90   exit 0
91 }
93 echo "+ running configure ... "
94 test ! -z "$CONFIGURE_DEF_OPT" && echo "  ./configure default flags: $CONFIGURE_DEF_OPT"
95 test ! -z "$CONFIGURE_EXT_OPT" && echo "  ./configure external flags: $CONFIGURE_EXT_OPT"
96 echo
98 echo ./configure $CONFIGURE_DEF_OPT $CONFIGURE_EXT_OPT
99 ./configure $CONFIGURE_DEF_OPT $CONFIGURE_EXT_OPT || {
100         echo "  configure failed"
101         exit 1
104 echo "Now type 'make' to compile $package."