#! /bin/bash # # Copyright (c) 2003 The Trustees of Indiana University. # All rights reserved. # # 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 $ # # This script is run on developer copies of LAM/MPI -- *not* # distribution tarballs. # # Some helper functions # # # Subroutine to check for the existence of various standard GNU tools # # First argument: variable name to set # Other arguments: list of programs to look for # test_for_existence() { local tfe_foo_set=0 local tfe_found=0 local tfe_output=0 tfe_name="$1" 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 < Errr... there's no configure.in or configure.ac file!" fi if test -n "$fad_cfile"; then auxdir="`grep AC_CONFIG_AUX_DIR $fad_cfile | cut -d\( -f 2 | cut -d\) -f 1`" fi if test -f "$auxdir/$fad_file"; then rm -f "$auxdir/$fad_file" fi unset fad_cfile fi unset fad_file } ########################################################################## # Main ########################################################################## if test -f VERSION -a -f configure.ac -a -f src/mpi/datatype/d_get_name.c ; then bad=0 else 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 # All done exit 0