libgnomevfs2-mythtv/autogen.sh
branchtrunk
changeset 314 15f6102ef37d
child 621 1bf45de64bd5
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/libgnomevfs2-mythtv/autogen.sh	Tue Jan 30 21:25:36 2007 +0000
     1.3 @@ -0,0 +1,99 @@
     1.4 +#!/bin/sh
     1.5 +# Run this to generate all the initial makefiles, etc.
     1.6 +
     1.7 +DIE=0
     1.8 +package=libgnomevfs2-mythtv
     1.9 +srcfile=configure.ac
    1.10 +
    1.11 +# a quick cvs co if necessary to alleviate the pain - may remove this
    1.12 +# when developers get a clue ;)
    1.13 +if test ! -d common; 
    1.14 +then 
    1.15 +  echo "+ getting common/ from cvs"
    1.16 +  cvs co common 
    1.17 +fi
    1.18 +
    1.19 +# source helper functions
    1.20 +if test ! -f common/autogen-helper.sh;
    1.21 +then
    1.22 +  echo There is something wrong with your source tree.
    1.23 +  echo You are missing common/autogen-helper.sh
    1.24 +  exit 1
    1.25 +fi
    1.26 +. common/autogen-helper.sh
    1.27 +
    1.28 +CONFIGURE_DEF_OPT='--enable-maintainer-mode'
    1.29 +
    1.30 +autogen_options $*
    1.31 +
    1.32 +echo -n "+ check for build tools"
    1.33 +if test ! -z "$NOCHECK"; then echo " skipped"; else  echo; fi
    1.34 +version_check "autoconf" "$AUTOCONF autoconf autoconf-2.54 autoconf-2.53" \
    1.35 +              "ftp://ftp.gnu.org/pub/gnu/autoconf/" 2 53 || DIE=1
    1.36 +version_check "automake" "$AUTOMAKE automake automake-1.9 automake-1.8 automake-1.7 automake-1.6" \
    1.37 +              "ftp://ftp.gnu.org/pub/gnu/automake/" 1 6 || DIE=1
    1.38 +version_check "libtoolize" "$LIBTOOLIZE libtoolize" \
    1.39 +              "ftp://ftp.gnu.org/pub/gnu/libtool/" 1 5 0 || DIE=1
    1.40 +version_check "pkg-config" "" \
    1.41 +              "http://www.freedesktop.org/software/pkgconfig" 0 8 0 || DIE=1
    1.42 +
    1.43 +die_check $DIE
    1.44 +
    1.45 +aclocal_check || DIE=1
    1.46 +autoheader_check || DIE=1
    1.47 +
    1.48 +die_check $DIE
    1.49 +
    1.50 +# if no arguments specified then this will be printed
    1.51 +if test -z "$*"; then
    1.52 +  echo "+ checking for autogen.sh options"
    1.53 +  echo "  This autogen script will automatically run ./configure as:"
    1.54 +  echo "  ./configure $CONFIGURE_DEF_OPT"
    1.55 +  echo "  To pass any additional options, please specify them on the $0"
    1.56 +  echo "  command line."
    1.57 +fi
    1.58 +
    1.59 +toplevel_check $srcfile
    1.60 +
    1.61 +tool_run "$aclocal" "-I m4 $ACLOCAL_FLAGS"
    1.62 +tool_run "$libtoolize" "--copy --force"
    1.63 +tool_run "$autoheader"
    1.64 +
    1.65 +# touch the stamp-h.in build stamp so we don't re-run autoheader in maintainer mode -- wingo
    1.66 +echo timestamp > stamp-h.in 2> /dev/null
    1.67 +
    1.68 +tool_run "$autoconf"
    1.69 +tool_run "$automake" "-a -c"
    1.70 +
    1.71 +# if enable exists, add an -enable option for each of the lines in that file
    1.72 +if test -f enable; then
    1.73 +  for a in `cat enable`; do
    1.74 +    CONFIGURE_FILE_OPT="--enable-$a"
    1.75 +  done
    1.76 +fi
    1.77 +
    1.78 +# if disable exists, add an -disable option for each of the lines in that file
    1.79 +if test -f disable; then
    1.80 +  for a in `cat disable`; do
    1.81 +    CONFIGURE_FILE_OPT="$CONFIGURE_FILE_OPT --disable-$a"
    1.82 +  done
    1.83 +fi
    1.84 +
    1.85 +test -n "$NOCONFIGURE" && {
    1.86 +  echo "+ skipping configure stage for package $package, as requested."
    1.87 +  echo "+ autogen.sh done."
    1.88 +  exit 0
    1.89 +}
    1.90 +
    1.91 +echo "+ running configure ... "
    1.92 +test ! -z "$CONFIGURE_DEF_OPT" && echo "  ./configure default flags: $CONFIGURE_DEF_OPT"
    1.93 +test ! -z "$CONFIGURE_EXT_OPT" && echo "  ./configure external flags: $CONFIGURE_EXT_OPT"
    1.94 +test ! -z "$CONFIGURE_FILE_OPT" && echo "  ./configure enable/disable flags: $CONFIGURE_FILE_OPT"
    1.95 +echo
    1.96 +
    1.97 +./configure $CONFIGURE_DEF_OPT $CONFIGURE_EXT_OPT $CONFIGURE_FILE_OPT || {
    1.98 +        echo "  configure failed"
    1.99 +        exit 1
   1.100 +}
   1.101 +
   1.102 +echo "Now type 'make' to compile $package."