From 67d9d38cff3cdf272be71845fa5c7f48aa4ca360 Mon Sep 17 00:00:00 2001 From: Thomas Vander Stichele Date: Wed, 11 Jun 2003 20:32:29 +0000 Subject: update to conform more to other modules fix spec file, the bindings build and work, yay ! Original commit message from CVS: update to conform more to other modules fix spec file, the bindings build and work, yay ! --- autogen.sh | 153 ++++++++++++++++++++++++++++++++----------------------------- 1 file changed, 80 insertions(+), 73 deletions(-) (limited to 'autogen.sh') diff --git a/autogen.sh b/autogen.sh index 14a81362a6..482d9aa4be 100755 --- a/autogen.sh +++ b/autogen.sh @@ -1,66 +1,66 @@ #!/bin/sh # Run this to generate all the initial makefiles, etc. -srcdir=`dirname $0` -test -z "$srcdir" && srcdir=. - -ORIGDIR=`pwd` -cd $srcdir -PROJECT=gst-python -TEST_TYPE=-d -FILE=gstreamer - DIE=0 - -test -z "$AUTOMAKE" && AUTOMAKE=automake -test -z "$ACLOCAL" && ACLOCAL=aclocal - -(autoconf --version) < /dev/null > /dev/null 2>&1 || { - echo - echo "You must have autoconf installed to compile $PROJECT." - echo "Download the appropriate package for your distribution," - echo "or get the source tarball at ftp://ftp.gnu.org/pub/gnu/" - DIE=1 -} - -(libtool --version) < /dev/null > /dev/null 2>&1 || { - echo - echo "You must have libtool installed to compile gnome-xml." - echo "Get ftp://ftp.gnu.org/gnu/libtool/libtool-1.4.tar.gz" - echo "(or a newer version if it is available)" - DIE=1 -} - -($AUTOMAKE --version) < /dev/null > /dev/null 2>&1 || { - echo - echo "You must have automake installed to compile $PROJECT." - echo "Get ftp://ftp.cygnus.com/pub/home/tromey/automake-1.2d.tar.gz" - echo "(or a newer version if it is available)" - DIE=1 -} - -if test "$DIE" -eq 1; then - exit 1 +package=gst-python +srcfile=gstreamer/gstreamer.c + +# a quick cvs co if necessary to alleviate the pain - may remove this +# when developers get a clue ;) +if test ! -d common; +then + echo "+ getting common/ from cvs" + cvs co common +fi + +# source helper functions +if test ! -e common/gst-autogen.sh; +then + echo There is something wrong with your source tree. + echo You are missing common/gst-autogen.sh + exit 1 fi -test $TEST_TYPE $FILE || { - echo "You must run this script in the top-level $PROJECT directory" - exit 1 -} - +. common/gst-autogen.sh + +CONFIGURE_DEF_OPT='--enable-maintainer-mode' + +autogen_options $@ + +echo -n "+ check for build tools" +if test ! -z $NOCHECK; then echo " skipped"; else echo; fi +version_check "autoconf" "$AUTOCONF autoconf autoconf-2.53 autoconf-2.52" \ + "ftp://ftp.gnu.org/pub/gnu/autoconf/" 2 52 || DIE=1 +version_check "automake" "$AUTOMAKE automake automake-1.6 automake-1.5" \ + "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 + +die_check $DIE + +autoconf_2_52d_check || DIE=1 + +aclocal_check || DIE=1 +autoheader_check || DIE=1 + +die_check $DIE + +# if no arguments specified then this will be printed 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." + 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." fi - -case $CC in -*xlc | *xlc\ * | *lcc | *lcc\ *) am_opt=--include-deps;; -esac + +toplevel_check $srcfile if test -z "$ACLOCAL_FLAGS"; then - - acdir=`$ACLOCAL --print-ac-dir` - m4list="glib-2.0.m4 gtk-2.0.m4 gettext.m4" + acdir=`$aclocal --print-ac-dir` + m4list="glib-2.0.m4 gtk-2.0.m4" for file in $m4list do @@ -76,26 +76,33 @@ if test -z "$ACLOCAL_FLAGS"; then done fi -#echo "Running gettextize... Ignore non-fatal messages." -# Hmm, we specify --force here, since otherwise things dont' -# get added reliably, but we don't want to overwrite intl -# while making dist. -#echo "no" | gettextize --copy --force - -$ACLOCAL $ACLOCAL_FLAGS - -# optionally feature autoheader -(autoheader --version) < /dev/null > /dev/null 2>&1 && autoheader +tool_run "$aclocal" "-I common/m4 $ACLOCAL_FLAGS" +tool_run "libtoolize" "--copy --force" +tool_run "$autoheader" + # 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 + +tool_run "$autoconf" -# run libtoolize ... -libtoolize --force --copy - -$AUTOMAKE --add-missing --copy $am_opt -autoheader -autoconf -cd $ORIGDIR +case $CC in +*xlc | *xlc\ * | *lcc | *lcc\ *) am_opt=--include-deps;; +esac +tool_run "$automake" "-a -c $am_opt" -$srcdir/configure --enable-maintainer-mode "$@" +test -n "$NOCONFIGURE" && { + echo "+ skipping configure stage for package $package, as requested." + echo "+ autogen.sh done." + exit 0 +} -echo -echo "Now type 'make' to compile $PROJECT." +echo "+ running configure ... " +test ! -z "$CONFIGURE_DEF_OPT" && echo " ./configure default flags: $CONFIGURE_DEF_OPT" +test ! -z "$CONFIGURE_EXT_OPT" && echo " ./configure external flags: $CONFIGURE_EXT_OPT" +echo + +./configure $CONFIGURE_DEF_OPT $CONFIGURE_EXT_OPT || { + echo " configure failed" + exit 1 +} + +echo "Now type 'make' to compile $package." -- cgit v1.2.3-70-g09d2