2001-12-10 13:41:59 +00:00
|
|
|
#!/bin/bash
|
2000-01-30 09:03:00 +00:00
|
|
|
# Run this to generate all the initial makefiles, etc.
|
|
|
|
|
|
|
|
DIE=0
|
2002-02-09 21:05:12 +00:00
|
|
|
package=gstreamer
|
|
|
|
srcfile=gst/gst.c
|
2001-12-22 01:58:59 +00:00
|
|
|
|
2002-02-09 21:05:12 +00:00
|
|
|
# a quick cvs co to ease the transition
|
2002-02-06 22:28:25 +00:00
|
|
|
if test ! -d common; then
|
|
|
|
echo "+ getting common from cvs"; cvs co common
|
|
|
|
fi
|
|
|
|
if test ! -d libs/ext/cothreads; then
|
2002-02-09 21:05:12 +00:00
|
|
|
echo "+ getting cothreads from cvs"; cvs co gst-cothreads
|
2002-02-06 22:28:25 +00:00
|
|
|
fi
|
2002-02-06 21:35:37 +00:00
|
|
|
|
2002-02-09 21:05:12 +00:00
|
|
|
# source helper functions
|
|
|
|
if test ! -f common/gst-autogen.sh;
|
|
|
|
then
|
|
|
|
echo There is something wrong with your source tree.
|
|
|
|
echo You are missing common/gst-autogen.sh
|
2001-12-10 17:59:35 +00:00
|
|
|
exit 1
|
|
|
|
fi
|
2002-02-09 21:05:12 +00:00
|
|
|
. common/gst-autogen.sh
|
2001-12-10 17:59:35 +00:00
|
|
|
|
2002-07-01 13:02:03 +00:00
|
|
|
CONFIGURE_DEF_OPT='--enable-maintainer-mode --enable-plugin-builddir --enable-failing-tests'
|
2002-05-27 13:37:37 +00:00
|
|
|
|
2002-02-09 21:05:12 +00:00
|
|
|
autogen_options $@
|
2001-12-10 17:59:35 +00:00
|
|
|
|
2002-02-09 21:05:12 +00:00
|
|
|
echo -n "+ check for build tools"
|
2002-03-02 12:01:32 +00:00
|
|
|
if test ! -z $NOCHECK; then echo ": skipped version checks"; else echo; fi
|
2002-11-01 22:03:56 +00:00
|
|
|
version_check "autoconf" "$AUTOCONF autoconf autoconf-2.54 autoconf-2.53 autoconf-2.52" \
|
2002-09-30 07:17:40 +00:00
|
|
|
"ftp://ftp.gnu.org/pub/gnu/autoconf/" 2 52 || DIE=1
|
2002-11-01 22:03:56 +00:00
|
|
|
version_check "automake" "$AUTOMAKE automake automake-1.7 automake-1.6 automake-1.5" \
|
2002-09-30 07:17:40 +00:00
|
|
|
"ftp://ftp.gnu.org/pub/gnu/automake/" 1 5 || DIE=1
|
|
|
|
version_check "libtool" "" \
|
|
|
|
"ftp://ftp.gnu.org/pub/gnu/libtool/" 1 4 0 || DIE=1
|
|
|
|
version_check "pkg-config" "" \
|
|
|
|
"http://www.freedesktop.org/software/pkgconfig" 0 8 0 || DIE=1
|
2000-01-30 09:03:00 +00:00
|
|
|
|
2002-02-13 12:18:10 +00:00
|
|
|
die_check $DIE
|
|
|
|
|
2002-02-09 21:05:12 +00:00
|
|
|
autoconf_2.52d_check || DIE=1
|
2002-04-18 20:47:00 +00:00
|
|
|
aclocal_check || DIE=1
|
2002-05-27 13:37:37 +00:00
|
|
|
autoheader_check || DIE=1
|
2002-02-09 21:05:12 +00:00
|
|
|
|
2002-02-13 12:18:10 +00:00
|
|
|
die_check $DIE
|
|
|
|
|
2002-02-09 21:05:12 +00:00
|
|
|
# if no arguments specified then this will be printed
|
|
|
|
if test -z "$*"; then
|
|
|
|
echo "+ checking for autogen.sh options"
|
|
|
|
echo " This autogen script will automatically run ./configure as:"
|
|
|
|
echo " ./configure $CONFIGURE_DEF_OPT"
|
|
|
|
echo " To pass any additional options, please specify them on the $0"
|
|
|
|
echo " command line."
|
2000-01-30 09:03:00 +00:00
|
|
|
fi
|
|
|
|
|
2002-02-09 21:05:12 +00:00
|
|
|
toplevel_check $srcfile
|
2000-01-30 09:03:00 +00:00
|
|
|
|
2002-02-10 09:25:45 +00:00
|
|
|
if test -e acinclude.m4; then rm acinclude.m4; fi
|
2002-04-18 20:47:00 +00:00
|
|
|
tool_run "$aclocal" "-I common/m4 $ACLOCAL_FLAGS"
|
2001-12-14 11:30:50 +00:00
|
|
|
|
2002-11-01 22:03:56 +00:00
|
|
|
tool_run "libtoolize" "--copy --force"
|
2002-05-27 13:37:37 +00:00
|
|
|
tool_run "$autoheader"
|
2002-02-09 21:05:12 +00:00
|
|
|
|
2001-12-20 01:20:22 +00:00
|
|
|
# touch the stamp-h.in build stamp so we don't re-run autoheader in maintainer mode -- wingo
|
|
|
|
echo timestamp > stamp-h.in 2> /dev/null
|
2002-02-09 21:05:12 +00:00
|
|
|
|
2002-03-02 12:01:32 +00:00
|
|
|
tool_run "$autoconf"
|
|
|
|
debug "automake: $automake"
|
|
|
|
tool_run "$automake" "-a -c"
|
2000-01-30 09:03:00 +00:00
|
|
|
|
2002-02-07 19:32:10 +00:00
|
|
|
echo
|
2002-11-01 22:03:56 +00:00
|
|
|
echo "+ running autogen.sh --noconfigure $@ in libs/ext/cothreads..."
|
2002-02-07 19:32:10 +00:00
|
|
|
pushd libs/ext/cothreads > /dev/null
|
|
|
|
echo
|
2002-11-01 22:03:56 +00:00
|
|
|
./autogen.sh --noconfigure $@ || {
|
2002-02-07 19:32:10 +00:00
|
|
|
echo "autogen in cothreads failed."
|
|
|
|
exit 1
|
|
|
|
}
|
|
|
|
popd > /dev/null
|
|
|
|
echo
|
2001-05-25 21:13:05 +00:00
|
|
|
|
2001-12-22 01:58:59 +00:00
|
|
|
test -n "$NOCONFIGURE" && {
|
2002-02-09 21:05:12 +00:00
|
|
|
echo "skipping configure stage for package $package, as requested."
|
|
|
|
echo "autogen.sh done."
|
|
|
|
exit 0
|
2001-12-22 01:58:59 +00:00
|
|
|
}
|
|
|
|
|
2001-12-10 14:05:50 +00:00
|
|
|
echo "+ running configure ... "
|
2002-02-09 21:05:12 +00:00
|
|
|
test ! -z "$CONFIGURE_DEF_OPT" && echo " ./configure default flags: $CONFIGURE_DEF_OPT"
|
|
|
|
test ! -z "$CONFIGURE_EXT_OPT" && echo " ./configure external flags: $CONFIGURE_EXT_OPT"
|
2001-10-17 10:21:27 +00:00
|
|
|
echo
|
|
|
|
|
2002-02-10 15:54:09 +00:00
|
|
|
./configure $CONFIGURE_DEF_OPT $CONFIGURE_EXT_OPT || {
|
2002-02-09 21:05:12 +00:00
|
|
|
echo " configure failed"
|
|
|
|
exit 1
|
2001-05-29 16:40:07 +00:00
|
|
|
}
|
2000-01-30 09:03:00 +00:00
|
|
|
|
|
|
|
echo "Now type 'make' to compile $package."
|
2002-02-09 21:05:12 +00:00
|
|
|
|