gst-plugins-mythtv/autogen.sh
author rosfran
Wed Nov 22 20:23:03 2006 +0000 (2006-11-22)
branchtrunk
changeset 103 c83e6f69f468
parent 3 265cdb1c59e3
permissions -rwxr-xr-x
[svn r104] Allows to receive buffers with unlimited size when reading data from backend.
     1 #!/bin/sh
     2 # Run this to generate all the initial makefiles, etc.
     3 
     4 DIE=0
     5 package=mythtvsrc
     6 srcfile=configure.ac
     7 
     8 # a quick cvs co if necessary to alleviate the pain - may remove this
     9 # when developers get a clue ;)
    10 if test ! -d common; 
    11 then 
    12   echo "+ getting common/ from svn"
    13  svn co common 
    14 fi
    15 
    16 # source helper functions
    17 if test ! -f common/autogen-helper.sh;
    18 then
    19   echo There is something wrong with your source tree.
    20   echo You are missing common/autogen-helper.sh
    21   exit 1
    22 fi
    23 . common/autogen-helper.sh
    24 
    25 CONFIGURE_DEF_OPT='--enable-maintainer-mode'
    26 
    27 CONFIGURE_EXT_OPT="$@"
    28 
    29 autogen_options 
    30 
    31 echo -n "+ check for build tools"
    32 if test ! -z "$NOCHECK"; then echo " skipped"; else  echo; fi
    33 version_check "autoconf" "$AUTOCONF autoconf autoconf-2.54 autoconf-2.53" \
    34               "ftp://ftp.gnu.org/pub/gnu/autoconf/" 2 53 || DIE=1
    35 version_check "automake" "$AUTOMAKE automake automake-1.9 automake-1.8 automake-1.7 automake-1.6" \
    36               "ftp://ftp.gnu.org/pub/gnu/automake/" 1 6 || DIE=1
    37 version_check "libtoolize" "$LIBTOOLIZE libtoolize" \
    38               "ftp://ftp.gnu.org/pub/gnu/libtool/" 1 5 0 || DIE=1
    39 version_check "pkg-config" "" \
    40               "http://www.freedesktop.org/software/pkgconfig" 0 8 0 || DIE=1
    41 
    42 die_check $DIE
    43 
    44 aclocal_check || DIE=1
    45 autoheader_check || DIE=1
    46 
    47 die_check $DIE
    48 
    49 # if no arguments specified then this will be printed
    50 if test -z "$*"; then
    51   echo "+ checking for autogen.sh options"
    52   echo "  This autogen script will automatically run ./configure as:"
    53   echo "  ./configure $CONFIGURE_DEF_OPT"
    54   echo "  To pass any additional options, please specify them on the $0"
    55   echo "  command line."
    56 fi
    57 
    58 toplevel_check $srcfile
    59 
    60 tool_run "$aclocal" "-I m4 $ACLOCAL_FLAGS"
    61 tool_run "$libtoolize" "--copy --force"
    62 tool_run "$autoheader"
    63 
    64 # touch the stamp-h.in build stamp so we don't re-run autoheader in maintainer mode -- wingo
    65 echo timestamp > stamp-h.in 2> /dev/null
    66 
    67 tool_run "$autoconf"
    68 tool_run "$automake" "-a -c"
    69 
    70 # if enable exists, add an -enable option for each of the lines in that file
    71 if test -f enable; then
    72   for a in `cat enable`; do
    73     CONFIGURE_FILE_OPT="--enable-$a"
    74   done
    75 fi
    76 
    77 # if disable exists, add an -disable option for each of the lines in that file
    78 if test -f disable; then
    79   for a in `cat disable`; do
    80     CONFIGURE_FILE_OPT="$CONFIGURE_FILE_OPT --disable-$a"
    81   done
    82 fi
    83 
    84 test -n "$NOCONFIGURE" && {
    85   echo "+ skipping configure stage for package $package, as requested."
    86   echo "+ autogen.sh done."
    87   exit 0
    88 }
    89 
    90 echo "+ running configure ... "
    91 test ! -z "$CONFIGURE_DEF_OPT" && echo "  ./configure default flags: $CONFIGURE_DEF_OPT"
    92 test ! -z "$CONFIGURE_EXT_OPT" && echo "  ./configure external flags: $CONFIGURE_EXT_OPT"
    93 test ! -z "$CONFIGURE_FILE_OPT" && echo "  ./configure enable/disable flags: $CONFIGURE_FILE_OPT"
    94 echo
    95 
    96 ./configure $CONFIGURE_DEF_OPT $CONFIGURE_EXT_OPT $CONFIGURE_FILE_OPT || {
    97         echo "  configure failed"
    98         exit 1
    99 }
   100 
   101 echo "Now type 'make' to compile $package."