X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/ff791bec549f85a7c22f2177fb5c4e2c8d1f0fde..b491aafd22320f24768c88161ecfce04d2102d7f:/bootstrap diff --git a/bootstrap b/bootstrap index 8f48373c20..1e86b571cf 100755 --- a/bootstrap +++ b/bootstrap @@ -1,35 +1,66 @@ -#!/bin/sh -e +#!/bin/sh # Run this to generate all the initial makefiles, etc. -amver=1.9 +# Copyright (c) 2004-2007. The SimGrid team. All right reserved. +# This file is part of the SimGrid project. This is free software: +# You can redistribute and/or modify it under the terms of the +# GNU LGPL (v2.1) licence. -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 +amversions="1.10 1.11" + +if [ ! -e bootstrap ] ; then + if [ -e ../bootstrap ] ; then + cd .. + fi fi -if [ "x$lt" = "x./libtool" ] ; then - echo "The found libtool is the one in the current directory." - echo "Either your path is broken ('.' is before '/usr/bin') or the libtool package is not installed." - echo "Please fix the situation to proceed with a CVS checkout" +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 SVN checkout" exit 1 fi am=`which automake-$amver` if [ "x$am" = "x" ] ; then - echo "automake version $amver not found. Please install the relevant package to proceed with a CVS checkout" + echo "automake versions $amversions not found. Please install the relevant package to proceed with a SVN 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" + echo "autoconf not found. Please install the relevant package to proceed with a SVN checkout" exit 1 fi - +set -e # AUTOCONF= # AUTOHEADER= # AUTOPOINT= @@ -50,7 +81,7 @@ echo "----------------------------------" echo echo "Most common flags:" -echo " --enable-maintainer-mode mandatory if you use the CVS version" +echo " --enable-maintainer-mode mandatory if you use the SVN version" echo " --disable-compile-optimizations useful if your gdb gets fooled" echo