From: Rocky B. <ro...@us...> - 2003-01-24 20:00:56
|
Update of /cvsroot/xine/xine-vcdnav In directory sc8-pr-cvs1:/tmp/cvs-serv9521 Modified Files: autogen.sh cvscompile.sh Log Message: vcdimager/configure.ac: make more like vcdimager distribution. autogen.sh: get from xine cvscompile.sh: now points to autogen.sh rather than the other way around misc/Makefile.am: don't need autogen.sh any more. Index: autogen.sh =================================================================== RCS file: /cvsroot/xine/xine-vcdnav/autogen.sh,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- autogen.sh 6 Oct 2002 03:21:06 -0000 1.1 +++ autogen.sh 24 Jan 2003 19:59:59 -0000 1.2 @@ -1,21 +1,290 @@ #!/bin/sh -# $Id$ -# Run this to generate all the initial Makefiles, etc. +# +# Copyright (C) 2000-2002 the xine project +# +# This file is part of xine, a unix video player. +# +# xine is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# xine is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA +# +# $Id$ +# +# Maintained by Stephen Torri <st...@us...> +# +# run this to generate all the initial makefiles, etc. -# As reported by Masatake YAMATO, +PROG=xine-lib -# In the Autotools book written by Gary V. Vaughan, et al., -# bootstrap.sh and autogen.sh are are used for initializing files that -# are derived and are therefore not checked into CVS. The difference -# between bootstrap.sh and autogen.sh is running configure at the end -# of script or not; autogen.sh runs and bootstrap.sh does not. So -# autogen.sh is found in many projects; bootstrap.sh is good for cross -# compiling. - -./cvscompile.sh $@ - -#;;; Local Variables: *** -#;;; mode:shell-script *** -#;;; eval: (sh-set-shell "bash") *** -#;;; End: *** +# Minimum value required to build +AUTOMAKE_MIN=1.6.0 +AUTOCONF_MIN=2.53 +LIBTOOL_MIN=1.4.0 +# Check how echo works in this /bin/sh +case `echo -n` in +-n) _echo_n= _echo_c='\c';; +*) _echo_n=-n _echo_c=;; +esac + +detect_configure_ac() { + + srcdir=`dirname $0` + test -z "$srcdir" && srcdir=. + + (test -f $srcdir/configure.ac) || { + echo $_echo_n "*** Error ***: Directory "\`$srcdir\`" does not look like the" + echo " top-level directory" + exit 1 + } +} + + +#-------------------- +# AUTOCONF +#------------------- +detect_autoconf() { + set -- `type autoconf 2>/dev/null` + RETVAL=$? + NUM_RESULT=$# + RESULT_FILE=$3 + if [ $RETVAL -eq 0 -a $NUM_RESULT -eq 3 -a -f "$RESULT_FILE" ]; then + AC="`autoconf --version | sed -n 1p | sed -e 's/[a-zA-Z\ \.\(\)\-]//g'`" + AUTOCONF_MIN="`echo $AUTOCONF_MIN | sed -e 's/[a-zA-Z\ \.\(\)\-]//g'`" + if test $AC -lt 100 ; then + AC=`expr $AC \* 10` + fi + if [ `expr $AC` -ge $AUTOCONF_MIN ]; then + autoconf_ok=yes + fi + else + echo + echo "**Error**: You must have \`autoconf' >= $AUTOCONF_MIN installed to" + echo " compile $PROG. Download the appropriate package" + echo " for your distribution or source from ftp.gnu.org." + exit 1 + fi +} + +run_autoheader () { + if test x"$autoconf_ok" != x"yes"; then + echo + echo "**Warning**: Version of autoconf is less than $AUTOCONF_MIN." + echo " Some warning message might occur from autoconf" + echo + fi + + echo $_echo_n " + Running autoheader: $_echo_c"; + autoheader; + echo "done." +} + +run_autoconf () { + if test x"$autoconf_ok" != x"yes"; then + echo + echo "**Warning**: Version of autoconf is less than $AUTOCONF_MIN." + echo " Some warning message might occur from autoconf" + echo + fi + + echo $_echo_n " + Running autoconf: $_echo_c"; + autoconf; + echo "done." +} + +#-------------------- +# LIBTOOL +#------------------- +detect_libtool() { + set -- `type libtool 2>/dev/null` + RETVAL=$? + NUM_RESULT=$# + RESULT_FILE=$3 + if [ $RETVAL -eq 0 -a $NUM_RESULT -eq 3 -a -f "$RESULT_FILE" ]; then + LT="`libtool --version | awk '{ print $4 }' | sed -e 's/[a-zA-Z\ \.\(\)\-]//g'`" + LIBTOOL_MIN="`echo $LIBTOOL_MIN | sed -e 's/[a-zA-Z\ \.\(\)\-]//g'`" + if test $LT -lt 100 ; then + LT=`expr $LT \* 10` + fi + if [ `expr $LT` -ge $LIBTOOL_MIN ]; then + libtool_ok=yes + fi + else + echo + echo "**Error**: You must have \`libtool' >= $LIBTOOL_MIN installed to" + echo " compile $PROG. Download the appropriate package" + echo " for your distribution or source from ftp.gnu.org." + exit 1 + fi +} + +run_libtoolize() { + if test x"$libtool_ok" != x"yes"; then + echo + echo "**Warning**: Version of libtool is less than $LIBTOOL_MIN." + echo " Some warning message might occur from libtool" + echo + fi + + echo $_echo_n " + Running libtoolize: $_echo_c"; + libtoolize --force --copy >/dev/null 2>&1; + echo "done." +} + +#-------------------- +# AUTOMAKE +#-------------------- +detect_automake() { + # + # expected output from 'type' is + # automake is /usr/local/bin/automake + # + set -- `type automake 2>/dev/null` + RETVAL=$? + NUM_RESULT=$# + RESULT_FILE=$3 + if [ $RETVAL -eq 0 -a $NUM_RESULT -eq 3 -a -f "$RESULT_FILE" ]; then + AM="`automake --version | sed -n 1p | sed -e 's/[a-zA-Z\ \.\(\)\-]//g'`" + AUTOMAKE_MIN="`echo $AUTOMAKE_MIN | sed -e 's/[a-zA-Z\ \.\(\)\-]//g'`" + if test $AM -lt 100 ; then + AM=`expr $AM \* 10` + fi + if [ `expr $AM` -ge $AUTOMAKE_MIN ]; then + automake_ok=yes + fi + else + echo + echo "**Error**: You must have \`automake' >= $AUTOMAKE_MIN installed to" + echo " compile $PROG. Download the appropriate package" + echo " for your distribution or source from ftp.gnu.org." + exit 1 + fi +} + +run_automake () { + if test x"$automake_ok" != x"yes"; then + echo + echo "**Warning**: Version of automake is less than $AUTOMAKE_MIN." + echo " Some warning message might occur from automake" + echo + fi + + echo $_echo_n " + Running automake: $_echo_c"; + + automake --gnu --add-missing --copy; + echo "done." +} + +#-------------------- +# ACLOCAL +#------------------- +detect_aclocal() { + + # if no automake, don't bother testing for aclocal + set -- `type aclocal 2>/dev/null` + RETVAL=$? + NUM_RESULT=$# + RESULT_FILE=$3 + if [ $RETVAL -eq 0 -a $NUM_RESULT -eq 3 -a -f "$RESULT_FILE" ]; then + AC="`aclocal --version | sed -n 1p | sed -e 's/[a-zA-Z\ \.\(\)\-]//g'`" + ACLOCAL_MIN="`echo $AUTOMAKE_MIN | sed -e 's/[a-zA-Z\ \.\(\)\-]//g'`" + if test $AC -lt 100 ; then + AC=`expr $AC \* 10` + fi + if [ `expr $AC` -ge $ACLOCAL_MIN ]; then + aclocal_ok=yes + fi + else + echo + echo "**Error**: You must have \`automake' >= $AUTOMAKE_MIN installed to" + echo " compile $PROG. Download the appropriate package" + echo " for your distribution or source from ftp.gnu.org." + exit 1 + fi +} + +run_aclocal () { + + if test x"$aclocal_ok" != x"yes"; then + echo + echo "**Warning**: Version of aclocal is less than $AUTOMAKE_MIN." + echo " Some warning message might occur from aclocal" + echo + fi + + echo $_echo_n " + Running aclocal: $_echo_c" + + aclocal -I m4 + echo "done." +} + +#-------------------- +# CONFIGURE +#------------------- +run_configure () { + rm -f config.cache + echo " + Running 'configure $@':" + if [ -z "$*" ]; then + echo " ** If you wish to pass arguments to ./configure, please" + echo " ** specify them on the command line." + fi + ./configure "$@" +} + + +#--------------- +# MAIN +#--------------- +detect_configure_ac +detect_autoconf +detect_libtool +detect_automake +detect_aclocal + + +# help: print out usage message +# *) run aclocal, autoheader, automake, autoconf, configure +case "$1" in + aclocal) + run_aclocal + ;; + autoheader) + run_autoheader + ;; + automake) + run_aclocal + run_automake + ;; + autoconf) + run_aclocal + run_autoconf + ;; + libtoolize) + run_libtoolize + ;; + noconfig) + run_aclocal + run_libtoolize + run_autoheader + run_automake + run_autoconf + ;; + *) + run_aclocal + run_libtoolize + run_autoheader + run_automake + run_autoconf + run_configure $@ + ;; +esac Index: cvscompile.sh =================================================================== RCS file: /cvsroot/xine/xine-vcdnav/cvscompile.sh,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- cvscompile.sh 15 Jul 2002 10:45:49 -0000 1.3 +++ cvscompile.sh 24 Jan 2003 20:00:04 -0000 1.4 @@ -2,25 +2,23 @@ # $Id$ # Run this to generate all the initial Makefiles, etc. -m4_files="_xine.m4 xine.m4 vcdnav.m4 xml2.m4 cpp_func.m4" -if test -d m4; then - rm -f acinclude.m4 - for m4f in $m4_files; do - cat m4/$m4f >> acinclude.m4 - done -else - echo "Directory 'm4' is missing." - exit 1 -fi +# As reported by Masatake YAMATO, -srcdir=`dirname $0` -test -z "$srcdir" && srcdir=. +# In the Autotools book written by Gary V. Vaughan, et al., +# bootstrap.sh and autogen.sh are are used for initializing files that +# are derived and are therefore not checked into CVS. The difference +# between bootstrap.sh and autogen.sh is running configure at the end +# of script or not; autogen.sh runs and bootstrap.sh does not. So +# autogen.sh is found in many projects; bootstrap.sh is good for cross +# compiling. -(test -f $srcdir/configure.in) || { - echo -n "*** Error ***: Directory "\`$srcdir\'" does not look like the" - echo " top-level directory" - exit 1 -} +# I feel a little compelled to keep this file around for compatibility +# with the crap that had been in xine and has since thankfully been +# pulled. -. $srcdir/misc/autogen.sh +./autogen.sh $@ +#;;; Local Variables: *** +#;;; mode:shell-script *** +#;;; eval: (sh-set-shell "bash") *** +#;;; End: *** |