#!/bin/sh
#
# Filename: build
# Author: Czo <Olivier.Sirol@lip6.fr>
# License: GPL (http://www.gnu.org/copyleft/gpl.html)
# Started: Oct 2002
# Last Change: Monday 16 December 2002, 15:08
# Edit Time: 1:08:54
# Description:
#
# $Id: build,v 1.6 2005/01/19 15:13:42 hcl Exp $
#

# The way the configure and Makefiles are written
# implies that you do a "make install" in one step
# rather than a "make" followed by a "make install"
#
# To avoid make problems, please use gnu make (gmake)
# The fowllowing commands builds the full package from scratch.




echo "checking for GNU make..."

  _cv_gnu_make_command='' ;
                for a in "$MAKE" make gmake gnumake ; do
                        if test -z "$a" ; then continue ; fi ;
                        if  ( sh -c "$a --version" 2> /dev/null | grep GNU  2>&1 > /dev/null ) ;  then
                                _cv_gnu_make_command=$a ;
                                break;
                        fi
                done ;

        if test  "x$_cv_gnu_make_command" != "x"  ; then
                MAKE=$_cv_gnu_make_command;
                echo "found, $_cv_gnu_make_command";
        else
                MAKE=make;
                echo "Not found, using make";
        fi

export MAKE
#ALLIANCE_TOP=/opt/alliance
#export ALLIANCE_TOP
./configure --prefix=$ALLIANCE_TOP
$MAKE

