package=GStreamer
srcfile=gst/gstobject.h
#DEBUG=defined
-if test "x$1" = "x-d"; then echo "+ debug output enabled"; DEBUG=defined; fi
+
+CONFIGURE_OPT='--enable-maintainer-mode --enable-plugin-builddir'
+
+for i in $@; do
+ if test "$i" = "--autogen-noconfigure"; then
+ NOCONFIGURE=defined
+ echo "+ configure run disabled"
+ elif test "$i" = "--autogen-nocheck"; then
+ NOCHECK=defined
+ echo "+ autotools version check disabled"
+ elif test "$i" = "--autogen-debug"; then
+ DEBUG=defined
+ echo "+ debug output enabled"
+ elif test "$i" = "--help"; then
+ echo "autogen.sh help options: "
+ echo " --autogen-noconfigure don't run the configure script"
+ echo " --autogen-nocheck don't do version checks"
+ echo " --autogen-debug debug the autogen process"
+ echo "continuing with the autogen in order to get configure help messages..."
+ fi
+done
debug ()
# print out a debug message if DEBUG is a defined variable
MINOR=$4
MICRO=$5
+ WRONG=
debug "major $MAJOR minor $MINOR micro $MICRO"
VERSION=$MAJOR
if test ! -z "$MICRO"; then VERSION=$VERSION.$MICRO; else MICRO=0; fi
debug "major $MAJOR minor $MINOR micro $MICRO"
- echo -n "+ checking for $1 > $VERSION ... "
+
+ test -z "$NOCHECK" && {
+ echo -n "+ checking for $1 >= $VERSION ... "
+ } || {
+ return 0
+ }
+
($PACKAGE --version) < /dev/null > /dev/null 2>&1 ||
{
echo
#start checking the version
debug "version check"
- if [ ! "$pkg_major" \> "$MAJOR" ]; then
- debug "$pkg_major <= $MAJOR"
- if [ "$pkg_major" \< "$MAJOR" ]; then
+ if [ ! "$pkg_major" -gt "$MAJOR" ]; then
+ debug "$pkg_major -le $MAJOR"
+ if [ "$pkg_major" -lt "$MAJOR" ]; then
WRONG=1
- elif [ ! "$pkg_minor" \> "$MINOR" ]; then
- if [ "$pkg_minor" \< "$MINOR" ]; then
+ elif [ ! "$pkg_minor" -gt "$MINOR" ]; then
+ if [ "$pkg_minor" -lt "$MINOR" ]; then
WRONG=1
- elif [ "$pkg_micro" \< "$MICRO" ]; then
+ elif [ "$pkg_micro" -lt "$MICRO" ]; then
WRONG=1
fi
fi
fi
+if test -z "$*"; then
+ echo "This autogen script will automatically run ./configure as:"
+ echo "./configure $CONFIGURE_OPT"
+ echo "To pass any other options, please specify them on the $0"
+ echo "command line."
+ echo
+fi
+
version_check "autoconf" "ftp://ftp.gnu.org/pub/gnu/autoconf/" 2 52 || DIE=1
version_check "automake" "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 7 0 || DIE=1
+version_check "pkg-config" "http://www.freedesktop.org/software/pkgconfig" 0 8 0 || DIE=1
if test "$DIE" -eq 1; then
exit 1
exit 1
}
-if test -z "$*"; then
- echo "I am going to run ./configure with no arguments - if you wish "
- echo "to pass any to it, please specify them on the $0 command line."
-fi
-
-# FIXME : why does libtoolize keep complaining about aclocal ?
-echo "+ running libtoolize ..."
-libtoolize --copy --force
-
echo "+ running aclocal ..."
-aclocal $ACLOCAL_FLAGS || {
+cat m4/*.m4 >acinclude.m4;aclocal $ACLOCAL_FLAGS || {
echo
echo "aclocal failed - check that all needed development files are present on system"
exit 1
}
+
+# FIXME : why does libtoolize keep complaining about aclocal ?
+echo "+ not running libtoolize until libtool fix has flown downstream"
+#echo "+ running libtoolize ..."
+#libtoolize --copy --force || {
+# echo
+# echo "libtoolize failed"
+# exit 1
+#}
+
echo "+ running autoheader ... "
autoheader || {
echo
echo "autoheader failed"
exit 1
}
+# 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
echo "+ running autoconf ... "
autoconf || {
echo
echo "autoconf failed"
- #exit 1
+ exit 1
}
echo "+ running automake ... "
automake -a -c || {
echo
echo "automake failed"
- #exit 1
+ exit 1
}
-# now remove the cache, because it can be considered dangerous in this case
-echo "+ removing config.cache ... "
-rm -f config.cache
-
-CONFIGURE_OPT='--enable-maintainer-mode --enable-plugin-builddir --enable-debug --enable-DEBUG'
+dnl echo
+dnl echo "+ running autogen.sh in libs/ext/cothreads..."
+dnl pushd libs/ext/cothreads > /dev/null
+dnl echo
+dnl ./autogen.sh --autogen-noconfigure --autogen-nocheck
+dnl popd > /dev/null
+dnl echo
+
+test -n "$NOCONFIGURE" && {
+ echo "skipping configure stage for package $package, as requested."
+ echo "autogen.sh done."
+ exit 0
+}
echo "+ running configure ... "
echo "./configure default flags: $CONFIGURE_OPT"