Annotation of libsoftmpeg/autogen.sh, revision 1.1

1.1     ! hunold      1: #!/bin/sh
        !             2: # Run this to generate the initial makefiles, etc.
        !             3: 
        !             4: PROJECT="libsoftmpeg"
        !             5: TEST_TYPE=-f
        !             6: FILE=include/softmpeg.h
        !             7: 
        !             8: LIBTOOL_REQUIRED_VERSION=1.3.4
        !             9: AUTOCONF_REQUIRED_VERSION=2.13
        !            10: AUTOMAKE_REQUIRED_VERSION=1.4
        !            11: 
        !            12: M4_FILES=
        !            13: 
        !            14: srcdir=`dirname $0`
        !            15: test -z "$srcdir" && srcdir=.
        !            16: ORIGDIR=`pwd`
        !            17: cd $srcdir
        !            18: 
        !            19: check_version ()
        !            20: {
        !            21:     if expr $1 \>= $2 > /dev/null; then
        !            22:         echo "yes (version $1)"
        !            23:     else
        !            24:         echo "Too old (found version $1)!"
        !            25:         DIE=1
        !            26:     fi
        !            27: }
        !            28: 
        !            29: echo "I am testing that you have the required versions of autoconf, automake"
        !            30: echo "and libtool ..."
        !            31: echo
        !            32: 
        !            33: DIE=0
        !            34: 
        !            35: echo -n "checking for libtool >= $LIBTOOL_REQUIRED_VERSION ... "
        !            36: if (libtoolize --version) < /dev/null > /dev/null 2>&1; then
        !            37:     VER=`libtoolize --version \
        !            38:          | grep libtool | sed "s/.* \([0-9.]*\)[-a-z0-9]*$/\1/"`
        !            39:     check_version $VER $LIBTOOL_REQUIRED_VERSION
        !            40: else
        !            41:     echo
        !            42:     echo "  You must have libtool installed to compile $PROJECT."
        !            43:     echo "  Install the appropriate package for your distribution,"
        !            44:     echo "  or get the source tarball at ftp://ftp.gnu.org/pub/gnu/"
        !            45:     DIE=1;
        !            46: fi
        !            47: 
        !            48: echo -n "checking for autoconf >= $AUTOCONF_REQUIRED_VERSION ... "
        !            49: if (autoconf --version) < /dev/null > /dev/null 2>&1; then
        !            50:     VER=`autoconf --version \
        !            51:          | grep -iw autoconf | sed "s/.* \([0-9.]*\)[-a-z0-9]*$/\1/"`
        !            52:     check_version $VER $AUTOCONF_REQUIRED_VERSION
        !            53: else
        !            54:     echo
        !            55:     echo "  You must have autoconf installed to compile $PROJECT."
        !            56:     echo "  Download the appropriate package for your distribution,"
        !            57:     echo "  or get the source tarball at ftp://ftp.gnu.org/pub/gnu/"
        !            58:     DIE=1;
        !            59: fi
        !            60: 
        !            61: echo -n "checking for automake >= $AUTOMAKE_REQUIRED_VERSION ... "
        !            62: if (automake --version) < /dev/null > /dev/null 2>&1; then
        !            63:     VER=`automake --version \
        !            64:          | grep automake | sed "s/.* \([0-9.]*\)[-a-z0-9]*$/\1/"`
        !            65:     check_version $VER $AUTOMAKE_REQUIRED_VERSION
        !            66: else
        !            67:     echo
        !            68:     echo "  You must have automake installed to compile $PROJECT."
        !            69:     echo "  Download the appropriate package for your distribution,"
        !            70:     echo "  or get the source tarball at ftp://ftp.gnu.org/pub/gnu/"
        !            71:     DIE=1
        !            72: fi
        !            73: 
        !            74: if test "$DIE" -eq 1; then
        !            75:     echo
        !            76:     echo "Please install/upgrade the missing tools and call me again."
        !            77:     echo        
        !            78:     exit 1
        !            79: fi
        !            80: 
        !            81: test $TEST_TYPE $FILE || {
        !            82:     echo
        !            83:     echo "You must run this script in the top-level $PROJECT directory."
        !            84:     echo
        !            85:     exit 1
        !            86: }
        !            87: 
        !            88: if test -z "$*"; then
        !            89:     echo
        !            90:     echo "I am going to run ./configure with no arguments - if you wish "
        !            91:     echo "to pass any to it, please specify them on the $0 command line."
        !            92:     echo
        !            93: fi
        !            94: 
        !            95: if test -z "$ACLOCAL_FLAGS"; then
        !            96: 
        !            97:     acdir=`aclocal --print-ac-dir`
        !            98: 
        !            99:     for file in $M4_FILES
        !           100:     do
        !           101:         if [ ! -f "$acdir/$file" ]; then
        !           102:             echo
        !           103:             echo "WARNING: aclocal's directory is $acdir, but..."
        !           104:             echo "         no file $acdir/$file"
        !           105:             echo "         You may see fatal macro warnings below."
        !           106:             echo "         If these files are installed in /some/dir, set the ACLOCAL_FLAGS "
        !           107:             echo "         environment variable to \"-I /some/dir\", or install"
        !           108:             echo "         $acdir/$file."
        !           109:             echo
        !           110:         fi
        !           111:     done
        !           112: fi
        !           113: 
        !           114: if ! aclocal $ACLOCAL_FLAGS; then
        !           115:    echo "aclocal gave errors. Please fix the error conditions and try again."
        !           116:    exit 1
        !           117: fi
        !           118: 
        !           119: libtoolize --force
        !           120: 
        !           121: # optionally feature autoheader
        !           122: (autoheader --version)  < /dev/null > /dev/null 2>&1 && autoheader
        !           123: 
        !           124: automake --add-missing
        !           125: autoconf
        !           126: 
        !           127: 
        !           128: 
        !           129: cd $ORIGDIR
        !           130: 
        !           131: if $srcdir/configure --enable-maintainer-mode "$@"; then
        !           132:   echo
        !           133:   echo "Now type 'make' to compile $PROJECT."
        !           134: else
        !           135:   echo
        !           136:   echo "Configure failed or did not finish!"
        !           137: fi

LinuxTV legacy CVS <linuxtv.org/cvs>