libgnomevfs2-mythtv/autogen.sh
author rosfran
Tue Apr 03 19:48:52 2007 +0100 (2007-04-03)
branchtrunk
changeset 489 1f143a0376aa
child 621 1bf45de64bd5
permissions -rwxr-xr-x
[svn r494] Added function to get the channel list from the MythTV backend.
     1 #!/bin/sh
     2 # Run this to generate all the initial makefiles, etc.
     3 
     4 DIE=0
     5 package=libgnomevfs2-mythtv
     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 cvs"
    13   cvs 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 autogen_options $*
    28 
    29 echo -n "+ check for build tools"
    30 if test ! -z "$NOCHECK"; then echo " skipped"; else  echo; fi
    31 version_check "autoconf" "$AUTOCONF autoconf autoconf-2.54 autoconf-2.53" \
    32               "ftp://ftp.gnu.org/pub/gnu/autoconf/" 2 53 || DIE=1
    33 version_check "automake" "$AUTOMAKE automake automake-1.9 automake-1.8 automake-1.7 automake-1.6" \
    34               "ftp://ftp.gnu.org/pub/gnu/automake/" 1 6 || DIE=1
    35 version_check "libtoolize" "$LIBTOOLIZE libtoolize" \
    36               "ftp://ftp.gnu.org/pub/gnu/libtool/" 1 5 0 || DIE=1
    37 version_check "pkg-config" "" \
    38               "http://www.freedesktop.org/software/pkgconfig" 0 8 0 || DIE=1
    39 
    40 die_check $DIE
    41 
    42 aclocal_check || DIE=1
    43 autoheader_check || DIE=1
    44 
    45 die_check $DIE
    46 
    47 # if no arguments specified then this will be printed
    48 if test -z "$*"; then
    49   echo "+ checking for autogen.sh options"
    50   echo "  This autogen script will automatically run ./configure as:"
    51   echo "  ./configure $CONFIGURE_DEF_OPT"
    52   echo "  To pass any additional options, please specify them on the $0"
    53   echo "  command line."
    54 fi
    55 
    56 toplevel_check $srcfile
    57 
    58 tool_run "$aclocal" "-I m4 $ACLOCAL_FLAGS"
    59 tool_run "$libtoolize" "--copy --force"
    60 tool_run "$autoheader"
    61 
    62 # touch the stamp-h.in build stamp so we don't re-run autoheader in maintainer mode -- wingo
    63 echo timestamp > stamp-h.in 2> /dev/null
    64 
    65 tool_run "$autoconf"
    66 tool_run "$automake" "-a -c"
    67 
    68 # if enable exists, add an -enable option for each of the lines in that file
    69 if test -f enable; then
    70   for a in `cat enable`; do
    71     CONFIGURE_FILE_OPT="--enable-$a"
    72   done
    73 fi
    74 
    75 # if disable exists, add an -disable option for each of the lines in that file
    76 if test -f disable; then
    77   for a in `cat disable`; do
    78     CONFIGURE_FILE_OPT="$CONFIGURE_FILE_OPT --disable-$a"
    79   done
    80 fi
    81 
    82 test -n "$NOCONFIGURE" && {
    83   echo "+ skipping configure stage for package $package, as requested."
    84   echo "+ autogen.sh done."
    85   exit 0
    86 }
    87 
    88 echo "+ running configure ... "
    89 test ! -z "$CONFIGURE_DEF_OPT" && echo "  ./configure default flags: $CONFIGURE_DEF_OPT"
    90 test ! -z "$CONFIGURE_EXT_OPT" && echo "  ./configure external flags: $CONFIGURE_EXT_OPT"
    91 test ! -z "$CONFIGURE_FILE_OPT" && echo "  ./configure enable/disable flags: $CONFIGURE_FILE_OPT"
    92 echo
    93 
    94 ./configure $CONFIGURE_DEF_OPT $CONFIGURE_EXT_OPT $CONFIGURE_FILE_OPT || {
    95         echo "  configure failed"
    96         exit 1
    97 }
    98 
    99 echo "Now type 'make' to compile $package."