X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/0629782d01ab97abca349c353d967f3124241c14..de06d16ffe51a0f739ffc8d5e8259788c79fd16d:/bootstrap diff --git a/bootstrap b/bootstrap index f130f91b99..69b16ccdc2 100755 --- a/bootstrap +++ b/bootstrap @@ -1,8 +1,54 @@ -#!/bin/sh -e +#!/bin/sh # Run this to generate all the initial makefiles, etc. -amver=1.9 +amversions="${amver:-1.10}" +check_version() +{ + eval $2 --version 2>/dev/null | grep -i "$1.*$3" >/dev/null +} + +find_version() +{ + tool=$1 + found="NOT_FOUND" + shift + versions="$*" + + for version in $versions ; do + if check_version $tool ${tool}${variant} $version; then + found="${version}" + echo ${version} >&2 + break + fi + done + if [ "x$found" = "xNOT_FOUND" ]; then + found="-" + fi + echo $found +} + +amver=`find_version automake ${amversions}` + +lt=`which libtoolize` +if [ "x$lt" = "x" ] ; then + echo "Libtool not found. Please install the libtool package to proceed with a CVS checkout" + exit 1 +fi + +am=`which automake-$amver` +if [ "x$am" = "x" ] ; then + echo "automake versions $amversions not found. Please install the relevant package to proceed with a CVS checkout" + exit 1 +fi + +ac=`which autoconf` +if [ "x$ac" = "x" ] ; then + echo "autoconf not found. Please install the relevant package to proceed with a CVS checkout" + exit 1 +fi + +set -e # AUTOCONF= # AUTOHEADER= # AUTOPOINT= @@ -23,7 +69,7 @@ echo "----------------------------------" echo echo "Most common flags:" -echo " --enable-maintainer-mode mandatory if you are a maintainer" +echo " --enable-maintainer-mode mandatory if you use the CVS version" echo " --disable-compile-optimizations useful if your gdb gets fooled" echo