diff --git a/autogen.sh b/autogen.sh index 2927099d16..2826e9ee86 100755 --- a/autogen.sh +++ b/autogen.sh @@ -1,67 +1,181 @@ #! /bin/bash # -# Copyright (c) 2003 The Trustees of Indiana University. -# All rights reserved. +# @COPYRIGHT@ # # This file is part of the LAM/MPI software package. For license # information, see the LICENSE file in the top level directory of the # LAM/MPI source distribution. # -# $Id: autogen.sh,v 1.4 2003/12/28 15:11:48 jsquyres Exp $ +# $Id: autogen.sh,v 1.5 2004/01/04 00:14:51 brbarret Exp $ # # This script is run on developer copies of LAM/MPI -- *not* # distribution tarballs. + + +################################################################################ # -# Some helper functions +# User-definable parameters (search path and minimum supported versions) # +################################################################################ +lam_aclocal_search="aclocal" +lam_autoheader_search="autoheader" +lam_autoconf_search="autoconf" +lam_libtoolize_search="libtoolize glibtoolize" +lam_automake_search="automake" + +lam_automake_version="1.6" +lam_autoconf_version="2.57" +lam_libtool_version="1.5" + + +################################################################################ # -# Subroutine to check for the existence of various standard GNU tools +# Global variables - should not need to modify defaults # -# First argument: variable name to set -# Other arguments: list of programs to look for +################################################################################ + +lam_aclocal_version="$lam_automake_version" +lam_autoheader_version="$lam_autoconf_version" +lam_libtoolize_version="$lam_libtool_version" + +# program names to execute +lam_aclocal="" +lam_autoheader="" +lam_autoconf="" +lam_libtoolize="" +lam_automake="" + + +################################################################################ # -test_for_existence() { - local tfe_foo_set=0 - local tfe_found=0 - local tfe_output=0 - tfe_name="$1" +# Version check - does major,minor,release check (hopefully ignoring beta et al) +# +# INPUT: +# - minimum version allowable +# - version we found +# +# OUTPUT: +# - 0 version is ok +# - 1 version is not ok +# +# SIDE EFFECTS: +# none +# +################################################################################ +check_version() { + local min_version="$1" + local version="$2" - for i in $* ; do - if [ $tfe_foo_set = 0 ]; then - tfe_foo_set=1 - continue - fi - - tfe_output="`$i --version 2>&1`" - if [ $? == 0 ]; then - tfe_found=1 - eval "$tfe_name=$i" - break - fi - done - - if test $tfe_found = 0; then - cat < configure.new mv configure.new configure chmod a+x configure -run_and_check $libtoolize --automake --copy -run_and_check automake --foreign -a --copy --include-deps +run_and_check $lam_libtoolize --automake --copy +run_and_check $lam_automake --foreign -a --copy --include-deps # All done - exit 0